elif choice == '8': task = psx.SubgroupDiscoveryTask(data, target, searchspace, resultSetSize=[20], depth=2, qf=psx.graph_target.EdgeSurplus(), minQuality=-np.inf) measure = 'EdgeSurplus' else: print("Invalid option.") measure = 'SI' search_time = [] search_time_s = time.time() result = psx.BeamSearch(beamWidth=30).execute(task) search_time.append(time.time() - search_time_s) Result.append(result) print(result) # save key variables cwd = os.getcwd() file = os.path.join(cwd, *['results', 'si_' + name + measure + '_results.pkl']) Obj = (search_time, Result) f = open(file, 'wb') pickle.dump(Obj, f) f.close()
searchspace = psx.createSelectors(data) print(searchspace) print(len(searchspace)) task = psx.SubgroupDiscoveryTask( data, target, searchspace, resultSetSize=[6, 8], depth=2, qf=psx.graph_target.SubjectiveInterestingness()) search_time_s = time.time() # result = psx.BeamSearch(beamWidth=10).execute_in_bicases(task) result = psx.BeamSearch(beamWidth=10).execute_in_bicases_constraints(task) search_time.append(time.time() - search_time_s) Result.append(result) print(result) # save key variables cwd = os.getcwd() file = os.path.join( cwd, *['results', 'scalability_' + name + '_varyingNumAttr.pkl']) Obj = (testing_list, search_time) f = open(file, 'wb') pickle.dump(Obj, f) f.close()
searchspace = psx.createSelectors(data) print(searchspace) print(len(searchspace)) task = psx.SubgroupDiscoveryTask( data, target, searchspace, resultSetSize=[6, 8], depth=2, qf=psx.graph_target.SubjectiveInterestingness()) search_time = [] search_time_s = time.time() result = psx.BeamSearch(beamWidth=10).execute_in_bicases(task) # result = psx.BeamSearch(beamWidth=10).execute_in_bicases_constraints(task) search_time.append(time.time() - search_time_s) Result.append(result) print(result) # save key variables cwd = os.getcwd() file = os.path.join(cwd, *['results', 'bi_' + name + '_results.pkl']) Obj = (x_rows, x_columns, rowbeans_index, colbeans_index, lambda_dict, bg_time, search_time, Result) f = open(file, 'wb') pickle.dump(Obj, f) f.close()