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

simple decision tree example #31

Closed
syakush opened this issue Aug 28, 2015 · 2 comments
Closed

simple decision tree example #31

syakush opened this issue Aug 28, 2015 · 2 comments
Labels

Comments

@syakush
Copy link

syakush commented Aug 28, 2015

please provide basic example for machine learning / decision trees.
input: csv file with values of features and labels (boolean)
program_size, opt_flag, is_cmov_expected
20, O2 , no
20, O3 , yes
20, Os , yes
output: dot file with decision tree

@gfursin
Copy link
Contributor

gfursin commented Sep 11, 2015

Sergey, I created a simple demo for your example:
You can get it here:
$ ck pull repo:ck-analytics
$ ck find demo:ml-decision-tree

In this directory you have two scripts:
$ ./model-sklearn-dtc-build.bat
$ ./model-sklearn-dtc-validate.bat

Input is in model-input.json

It will create a model and will produce various useful files including .dot, .pdf, .png, etc ...:
model-sklearn-dtc.model.*

Can you please check it and if it's ok close this ticket ...
Thanks a lot!

@gfursin
Copy link
Contributor

gfursin commented Sep 12, 2015

Note that categorical feature dimensions are currently converted into floats (since I didn't find universal way in our ML modules to support strings directly), so you will see such conversion when building a decision tree. Alternatively, we can convert such string to floats before using CK ML (to keep consistency) ...

By the way, I also added CK mode to record produced predictive models (with all extra useful information) in a CK entry and to reuse it, i.e. just give some features and get answer.

Finally, I added small demo description here: https://github.com/ctuning/ck/wiki/Getting_started_guide_basic_ml

@gfursin gfursin closed this as completed Sep 21, 2015
ctuning-admin pushed a commit that referenced this issue Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants