Skip to content
Snippets Groups Projects
Commit ebfe00e1 authored by bbauvin's avatar bbauvin
Browse files

debugging

parent 062c64ef
Branches
No related tags found
No related merge requests found
......@@ -358,7 +358,6 @@ else:
classifiersNames = [[result[1][0] for result in resultsMonoview if result[0]==viewIndex] for viewIndex in viewsIndices]
classifiersConfigs = [[result[1][1] for result in resultsMonoview if result[0]==viewIndex] for viewIndex in viewsIndices]
monoviewTime = time.time()-dataBaseTime-start
print benchmark
if True:
if benchmark["Multiview"]:
try:
......
......@@ -32,11 +32,12 @@ def fit(DATASET, CLASS_LABELS, NB_CORES=1,**kwargs):
attributeClassification = kwargs["attributeClassification"]
binaryAttributes = kwargs["binaryAttributes"]
except:
attributeClassification, binaryAttributes, dsetFile = transformData(DATASET)
attributeClassification, binaryAttributes, dsetFile, name = transformData(DATASET)
classifier = pyscm.scm.SetCoveringMachine(p=p, max_attributes=max_attrtibutes, model_type=model_type, verbose=False)
classifier.fit(binaryAttributes, CLASS_LABELS, X=None, attribute_classifications=attributeClassification, iteration_callback=None)
try:
dsetFile.close()
os.remove(name)
except:
pass
return classifier
......@@ -133,7 +134,7 @@ def transformData(dataArray):
dsetFile = h5py.File(name, "r")
packedDataset = dsetFile.get("temp_scm")
attributeClassification = BaptisteRuleClassifications(packedDataset, nbExamples)
return attributeClassification, binaryAttributes, dsetFile
return attributeClassification, binaryAttributes, dsetFile, name
def isBinary(dataset):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment