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

Classificaiton models dont run #164

Open
knussear opened this issue May 1, 2024 · 4 comments
Open

Classificaiton models dont run #164

knussear opened this issue May 1, 2024 · 4 comments

Comments

@knussear
Copy link

knussear commented May 1, 2024

Trying to run a classification model.

Simple example per your code demo here gbm3::printExamples

data( iris )
kMod <- gbm( Species ~ . , data=iris , distribution = "gaussian", n.tree=1000, shrinkage=.1,
cv.folds=5, train.fraction=.9)
results in
"Error: Not compatible with requested type: [type=character; target=double]."

checked the Species variable, and it is a factor. Not sure how to proceed, seems like an error.

@gregridgeway
Copy link
Contributor

gregridgeway commented May 1, 2024 via email

@knussear
Copy link
Author

knussear commented May 1, 2024

Yet this is literally directly out of your examples document. Is this no longer possible in gbm? I think the old one used multinomial distributions, but this is no longer an option.

@gregridgeway
Copy link
Contributor

gregridgeway commented May 1, 2024 via email

@knussear
Copy link
Author

knussear commented May 1, 2024

Yes - Here is where I found it. In the code demos link at the top of the package help there is a link to the print examples, and within that file there is the code I gave above

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