Commit 2056b1bb authored by Alessandro dos Santos Ferreira's avatar Alessandro dos Santos Ferreira
Browse files

Pynovisao - Corrigindo verificacao de python-weka-wrapper

parent 3878d015
from .classifier import Classifier
from .weka_classifiers import WekaClassifiers
import weka.core.jvm as jvm
weka_is_defined = True
from .weka_classifiers import WekaClassifiers
weka_is_defined = False
WekaClassifiers = None
__all__ = ["classifier",
......@@ -18,8 +17,8 @@ from util.config import Config
_classifier_list = OrderedDict( [
["weka_classifiers", Config(WekaClassifiers().get_name(), weka_is_defined, bool, meta=WekaClassifiers, hidden=not weka_is_defined)],
["invalid", Config("Invalid", True, bool, meta=None, hidden=True)]
["weka_classifiers", Config("Invalid" if WekaClassifiers is None else WekaClassifiers().get_name(),
WekaClassifiers is not None, bool, meta=WekaClassifiers, hidden=WekaClassifiers is None)]
] )
def get_classifier_config():
......@@ -281,7 +281,7 @@ class Act(object):"%s", '\n'.join([extraction._extractor_list[extractor].label for extractor in extraction._extractor_list
if extraction._extractor_list[extractor].value == True ]))
output_file, run_time = fextractor.extract_all(self.dataset, "trainning")
output_file, run_time = fextractor.extract_all(self.dataset, "training")"\nOutput file saved in %s", output_file)"Time elapsed: %0.3f seconds", run_time)
......@@ -345,14 +345,14 @@ class Act(object):
list_segments = self.segmenter.get_list_segments()
if self.classifier.must_train():"Creating trainning data... (%0.3f seconds)", (TimeUtils.get_time() - start_time))"Creating training data... (%0.3f seconds)", (TimeUtils.get_time() - start_time))
fextractor = FeatureExtractor(self.extractors)
output_file, run_time = fextractor.extract_all(self.dataset, "trainning", overwrite = False)
output_file, run_time = fextractor.extract_all(self.dataset, "training", overwrite = False)"Training classifier... (%0.3f seconds)", (TimeUtils.get_time() - start_time))
self.classifier.train(self.dataset, "trainning")
self.classifier.train(self.dataset, "training")
self._image = self._const_image
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment