-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Good first part to #28 : Extract a small API to set the modes directly in Java instead of loading them from a file every time.
Running something like this:
package edu.wisc.cs.will;
import edu.wisc.cs.will.Boosting.Common.RunBoostedModels;
public class RunToyCancer
{
public void runToyCancerLearnInfer() {
String[] trainArgs = {"-l", "-train", "/toy_cancer/train/", "-target", "cancer", "-trees", "10"};
RunBoostedModels.main(trainArgs);
String[] testArgs = {"-i", "-model", "/toy_cancer/train/models/", "-test", "/toy_cancer/test/", "-target", "cancer"};
RunBoostedModels.main(testArgs);
}
}
Passes a list of _pos
, _neg
, _facts
, and _bk
files between objects, eventually ending up as buffered readers in ILPOuterLoop
and LearnOneClause
.
Start with something like this:
public void runTC()
{
String newline = System.getProperty("line.separator");
String localModes = String.join(
newline,
"usePrologVariables: true.",
"mode: friends(+person,-person).",
"mode: friends(-person,+person).",
"mode: smokes(+person).",
"mode: cancer(+person)."
);
// Fill
// String[] trainArgs = {""};
RunBoostedModels.newMain(trainArgs, localModes);
}
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request