Skip to content

AndLen/gpmal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gp-mal

NEW WAY:

Okay, I've tried to make it a lot more user-friendly. There's two new classes, featureLearn.RunGPMaL and featureLearn.LoadAndApplyModel.

RunGPMaL takes up to two arguments, where the first argument is the path of the dataset to use. The second (optional) argument specifies the number of trees (components), and defaults to 2 if not given.

The dataset needs to be formatted as follows:

classLast,4,3,comma
5.1,3.5,1.4,0.2,Iris-setosa
4.9,3.0,1.4,0.2,Iris-setosa
4.7,3.2,1.3,0.2,Iris-setosa
4.6,3.1,1.5,0.2,Iris-setosa
5.0,3.6,1.4,0.2,Iris-setosa

That is, a header line followed by lines of data. The header line above means:

  • classLast: the class label is last (vs classFirst);
  • 4: 4 features;
  • 3: 3 classes;
  • comma: comma-separated file (vs space for space-separated or tab for tab-separated).

LoadAndApplyModel does basically what it says in the name: it takes a learned model, and applies it to new data. It takes two arguments: firstly, the path of the learned model (which has a suffix "-gpmal.state") and a dataset to use. The dataset needs to be formatted the same as in RunGPMaL (with the header etc).

The default output location is ~/gpmal/flNeighboursFG/ i.e., the directory "gpmal" in your home directory. Inside this directory, each run is identified by the dataset name (from the file name) as well as a timestamp for when it was run.

You may want to decrease the number of generations --- you can do this in gp/flNeighboursFG.params by adjusting the "generations" parameter.

OLD WAY:

GP-MaL entry point is tests.featureLearn.FLNeighboursFG (as proposed in EuroGP '19) GP-MaL using ALL neighburs entry point is tests.featureLearn.FLNeighbours

Uses JUnit via tests.Tests to run on a range of different datasets automatically, e.g. a_irisTest()

Alternatively, there is an exectuable jar that can be used at target/gp-mal-eurogp-19-bin.jar in the form: java -jar gp-mal-eurogp-19-bin.jar "tests.featureLearn.FLNeighboursFG#a_irisTest" for the Iris dataset. The a_irisTest corresponds to the dataset being tested, which is stored inside the jar (see tests.Tests).

A range of datasets are in the datasets/ folder and use the format as described above.

Releases

No releases published

Packages

No packages published