Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run GA2M with FAST? #22

Open
dfrankow opened this issue May 1, 2019 · 2 comments
Open

How to run GA2M with FAST? #22

dfrankow opened this issue May 1, 2019 · 2 comments

Comments

@dfrankow
Copy link

dfrankow commented May 1, 2019

I've been reading the docs trying to create an example of classification with GA2MLearner using command-line tools.

I checked in https://github.com/dfrankow/mltk/tree/master/examples with train_ga2m.sh. You should be able to check it out and run it. If I can get it to work, I'm happy to pass it back as an example, as requested in #17.

Several questions:

  • How do we generate a sensible pairwise terms file to pass to GA2MLearner instead of including all? I think that would possibly include the FAST algorithm, but I don't know how to use it.
  • Why does Evaluator not have any output?
  • Can I use the command line to run predictions (in this case classification output) on the test set?
@dfrankow
Copy link
Author

dfrankow commented May 1, 2019

@sds-dubois - any suggestions? It looks like you used GA2Ms in #7.

@yinlou
Copy link
Owner

yinlou commented May 1, 2019

Here is the script to get GA2M running from end to end. You might find mltk.predictor.evaluation.Predictor and mltk.predictor.gam.interaction.FAST useful. I will update wiki soon.

MLTK=/Users/yin_lou/repos/mltk-github/mltk/target/mltk-0.1.0-SNAPSHOT.jar

java -Xmx4g -cp $MLTK mltk.core.processor.Discretizer \
-r cal_housing.attr \
-t cal_housing.train.all \
-m cal_housing_binned.attr \
-i cal_housing.train.all \
-o cal_housing_binned.train.all

java -Xmx4g -cp $MLTK mltk.core.processor.Discretizer \
-r cal_housing.attr \
-d cal_housing_binned.attr \
-i cal_housing.train \
-o cal_housing_binned.train

java -Xmx4g -cp $MLTK mltk.core.processor.Discretizer \
-r cal_housing.attr \
-d cal_housing_binned.attr \
-i cal_housing.valid \
-o cal_housing_binned.valid

java -Xmx4g -cp $MLTK mltk.core.processor.Discretizer \
-r cal_housing.attr \
-d cal_housing_binned.attr \
-i cal_housing.test \
-o cal_housing_binned.test

java -Xmx4g -cp $MLTK mltk.predictor.gam.GAMLearner \
-r cal_housing_binned.attr \
-t cal_housing_binned.train \
-v cal_housing_binned.valid \
-m 1000 \
-l 1 \
-o gam.model

java -Xmx4g -cp $MLTK mltk.predictor.evaluation.Predictor \
-r cal_housing_binned.attr \
-d cal_housing_binned.train.all \
-m gam.model \
-g r \
-R cal_housing_residual.txt

java -Xmx4g -cp $MLTK mltk.predictor.gam.interaction.FAST \
-r cal_housing_binned.attr \
-d cal_housing_binned.train.all \
-R cal_housing_residual.txt \
-o pairs.txt

java -Xmx4g -cp $MLTK mltk.predictor.gam.GA2MLearner \
-r cal_housing_binned.attr \
-t cal_housing_binned.train \
-v cal_housing_binned.valid \
-I pairs.txt \
-m 100 \
-i gam.model \
-o ga2m.model

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants