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

can you please share some simple, but meaningful toy example like pycorels #3

Open
Sandy4321 opened this issue Feb 7, 2020 · 2 comments

Comments

@Sandy4321
Copy link

can you please share some simple, but meaningful toy example like pycorels
to make sure it works
for example like
https://github.com/fingoldin/pycorels
Toy dataset (See picture example above)
from corels import CorelsClassifier

["loud", "samples"] is the most verbose setting possible
C = CorelsClassifier(max_card=2, c=0.0, verbosity=["loud", "samples"])

4 samples, 3 features
X = [[1, 0, 1], [0, 0, 0], [1, 1, 0], [0, 1, 0]]
y = [1, 0, 0, 1]

Feature names
features = ["Mac User", "Likes Pie", "Age < 20"]

Fit the model
C.fit(X, y, features=features, prediction_name="Has a dirty computer")

Print the resulting rulelist
print(C.rl())

Predict on the training set
print(C.predict(X))

@Sandy4321
Copy link
Author

Can you please add simple example
I do have time this Sunday so would try
You should be interesting in second opinion how your code works, or you have some reservations
And need more time to debug?

@Sandy4321
Copy link
Author

any progress in this direction?
it would be simple for you to create such a n example?

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

1 participant