-
Notifications
You must be signed in to change notification settings - Fork 119
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
RuleFitClassifier not working with simple example using iris data #131
Comments
Looks like The from sklearn.datasets import load_iris
from imodels import RuleFitClassifier
import numpy
iris = load_iris()
X, y = iris.data, iris.target
# THIS! Predict if the iris species is "virginica" or not
y = numpy.where(y == 2, 1, 0)
#print(y)
rulefit = RuleFitClassifier()
rulefit.fit(X, y)
print(rulefit) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following code snippet results in an error:
The error reads:
I tried to look into this issue myself, but I am not familiar enough with the method to make any definitive claims. However, this line of code seems fishy. Why not just use the actual number of features stored in
self.n_features
? Could be a source of the indexing error.The text was updated successfully, but these errors were encountered: