Exemplo n.º 1
0
 public void EndTrainingSession()
 {
     Console.WriteLine("End");
     stv = new StringToWordVector();
     stv.setAttributeNamePrefix("#");
     stv.setLowerCaseTokens(true);
     stv.setOutputWordCounts(true);
     stv.setInputFormat(oDataSet);
     stv.setStemmer(new weka.core.stemmers.LovinsStemmer());
     stv.setIDFTransform(true);
     dataSet = Filter.useFilter(oDataSet, stv);
     MultiLabelInstances mli = new MultiLabelInstances(dataSet, loadLabelsMeta(dataSet, tagsNb));
     BinaryRelevance br = new mulan.classifier.transformation.BinaryRelevance(new NaiveBayes());
     lps = new mulan.classifier.meta.RAkEL(br);
     br.setDebug(true);
     lps.setDebug(true);
     lps.build(mli);
 }
Exemplo n.º 2
0
 public void EndTrainingSession()
 {
     MultiLabelInstances mli = new MultiLabelInstances(dataSet, loadLabelsMeta(dataSet, tagsNb));
     cl = new mulan.classifier.lazy.MLkNN();
     cl.setDfunc(new LevWord());
     //            cl.setDistanceWeighting(10000);
     cl.build(mli);
 }