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); }
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); }