directed_factor_model function

Create a directed factor model graph