Permalink
Browse files

tweaking parameters and cleanup

  • Loading branch information...
1 parent 8ae6978 commit 51189cce4826ea4759f81cf5b50d755042e8f912 @alexrudnick committed Apr 28, 2012
Showing with 3 additions and 9 deletions.
  1. +1 −1 scripts/many_experiments.sh
  2. +2 −8 src/maltlibweka/LibWeka.java
@@ -20,5 +20,5 @@ LEARNER=$2
WEKACLASSIFIER=$3
for n in `seq 1 11`; do
- scripts/run_experiment.sh "$LANG"_"$n"000 $LEARNER $WEKACLASSIFIER testsets/"$LANG"_test.conll
+ scripts/run_experiment.sh "$LANG"_"$n"000 $LEARNER $WEKACLASSIFIER "-M 2" testsets/"$LANG"_test.conll
done
@@ -13,8 +13,6 @@
import java.util.LinkedHashMap;
import java.util.Map;
-import libsvm.svm_parameter;
-
import org.maltparser.core.exception.MaltChainedException;
import org.maltparser.core.feature.FeatureVector;
import org.maltparser.core.feature.value.FeatureValue;
@@ -28,18 +26,14 @@
import org.maltparser.parser.history.action.SingleDecision;
import weka.attributeSelection.GainRatioAttributeEval;
-import weka.attributeSelection.LinearForwardSelection;
import weka.attributeSelection.Ranker;
-import weka.attributeSelection.SubsetSizeForwardSelection;
import weka.classifiers.Classifier;
import weka.classifiers.functions.Logistic;
import weka.core.Attribute;
import weka.core.FastVector;
import weka.core.Instance;
import weka.core.Instances;
-import weka.core.SelectedTag;
import weka.filters.Filter;
-import weka.filters.supervised.attribute.AttributeSelection;
import weka.filters.supervised.attribute.NominalToBinary;
import weka.filters.unsupervised.attribute.Remove;
@@ -63,7 +57,7 @@
private ArrayList<HashMap<String, Integer>> save_attributeValueCounts;
- private Integer minValueCount = 5;
+ private Integer minValueCount = 20;
public LibWeka(InstanceModel owner, Integer learnerMode)
throws MaltChainedException {
@@ -216,7 +210,7 @@ private Instances binarizeAndFilter(Instances instances) throws Exception {
instances = Filter.useFilter(instances, nominalToBinary);
System.out.println("num attributes after binarization: "
+ instances.numAttributes());
- instances = simpleFilterAttributes(instances, 300);
+ instances = simpleFilterAttributes(instances, 200);
System.out.println("num attributes at the end: "
+ instances.numAttributes());
return instances;

0 comments on commit 51189cc

Please sign in to comment.