-
Notifications
You must be signed in to change notification settings - Fork 1
Training_annexe
Olanto Foundation edited this page May 30, 2018
·
3 revisions
public static void main(String[] args) {
String signature = null; // reserve
// open indexer
id = new IdxStructure("QUERY", new ConfigurationForCat());
id.Statistic.global(); // get statistics
// define path to catalog
String fntrain = SenseOS.getMYCLASS_ROOT() + "MYCLASS_MODEL/sample/langdetect/corpus_dgt2014.cat";
String fntest = SenseOS.getMYCLASS_ROOT() + "MYCLASS_MODEL/sample/langdetect/EMPTY.cat";
// load catalog at the specified level (2 char codification in this case)
NNBottomGroup BootGroup = new NNBottomGroup(id, fntrain, fntest, 2, false, false);
// initialise the neural network ...
NNOneN.init(signature, BootGroup, id, NNOneN.NORMALISED, NNOneN.SDF_SQUARE);
// initialise the neural network ...
Experiment x = new Experiment(
// define filename and folder to store result
"worddetect", // String experimentName,
SenseOS.getMYCLASS_ROOT() + "MYCLASS_MODEL/experiment/langdetect/", // String pathfileSave,
// define process parameter
8, // number of cores ,
true, // store BOW in memory,
// parameters for the training
2,// train at this category level,
"", // only for this sub-class,
// parameters for the algorithm
5, // int repeatK,
1000, // float qlevel,
1.06f, // float add,
2, // int minocc,
100000000, // int maxocc,
300, // float deltamin,
300, // float deltamax,
false, // boolean verbosetrain,
// parameters for the test
true, // boolean testtrain,
80, // int trainpart,
// TEST -- parameters for the test
3, // int Nfirst,
true, // boolean maintest,
true, // boolean maintestGroupdetail,
false, // boolean maintestDocumentdetail,
true, // boolean multitest,
true, // boolean multitestGroupdetail ,
false // boolean multitestOtherdetail
);
x.doIt();
// display a Confusion Matrix
NNOneN.ConfusionMatrix(false);
// display top features
NNOneN.explainGroup(20, true);
}