Esempio n. 1
0
            help="number of chains used")
    parser.add_argument("--cnf", action= "store_true",
            help="conjunctive normal for, enter structure as a-or-b c-or-d ...")


    
    ns = parser.parse_args()
    dataset=ns.dataset
    date_str=ns.d
    num_chains = ns.num_chains
    cnf = ns.cnf
    list_cov =[]
    for file in os.listdir("results/"+date_str):
	if dataset in file:
	    df = pd.read_pickle("results/"+date_str+"/"+file)
	    list_cov.append(simplify(df["Covariance Structure"].iloc[-1]))

    count = 0

    if cnf:
       structure=ns.structure
       disjunctions=[]
       for item in structure:
           disjunctions.append(item.split('-or-'))

       disjunctions=[[simplify(atom) for atom in disjunction] for disjunction in disjunctions]
       for cov_structure in list_cov:
           hyp_true_in_structure=True
           for disjunction in disjunctions:
               if not find_disjunction(disjunction,cov_structure):
	           hyp_true_in_structure=False