dagfactory creates a DAG. It takes a threshold value when created.