We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The http://docs.h2o.ai/h2o/latest-stable/h2o-py/docs/model_categories.html#module-h2o.model.multinomial section in the Python documentation is missing examples.
The source file is located at h2o-3/h2o-py/model/multinomial.py
Multinomial examples are available in this https://github.com/h2oai/h2o-3/blob/master/h2o-py/tests/testdir_misc/pyunit_metric_accessors.py#L414
Note that the following in the test is incorrect (line 423):
{code} gbm.distribution="multinomial" {code}
Replace that line with the following to build the model:
{code} gbm = H2OGradientBoostingEstimator(nfolds=3, distribution=distribution) {code}
The examples use the cars dataset: cars = h2o.import_file("https://s3.amazonaws.com/h2o-public-test-data/smalldata/junit/cars_20mpg.csv")
The text was updated successfully, but these errors were encountered:
Angela Bartz commented: You can use the following example for the confusion matrix. This is a little different than the binomial example:
{code} import h2o h2o.init() from h2o.estimators.gbm import H2OGradientBoostingEstimator
cars = h2o.import_file("https://s3.amazonaws.com/h2o-public-test-data/smalldata/junit/cars_20mpg.csv") cars["cylinders"] = cars["cylinders"].asfactor() r = cars[0].runif() train = cars[r > .2] valid = cars[r <= .2] response_col = "cylinders" distribution = "multinomial" predictors = ["displacement","power","weight","acceleration","year"]
gbm = H2OGradientBoostingEstimator(nfolds=3, distribution=distribution) gbm.train(x=predictors,y=response_col, training_frame=train, validation_frame=valid) confusion_matrix = gbm.confusion_matrix(train) {code}
Sorry, something went wrong.
JIRA Issue Migration Info
Jira Issue: PUBDEV-6728 Assignee: hannah.tillman Reporter: Angela Bartz State: Resolved Fix Version: 3.28.0.1 Attachments: N/A Development PRs: Available
Linked PRs from JIRA
#3762
hannah-tillman
No branches or pull requests
The http://docs.h2o.ai/h2o/latest-stable/h2o-py/docs/model_categories.html#module-h2o.model.multinomial section in the Python documentation is missing examples.
The source file is located at h2o-3/h2o-py/model/multinomial.py
Multinomial examples are available in this https://github.com/h2oai/h2o-3/blob/master/h2o-py/tests/testdir_misc/pyunit_metric_accessors.py#L414
Note that the following in the test is incorrect (line 423):
{code}
gbm.distribution="multinomial"
{code}
Replace that line with the following to build the model:
{code}
gbm = H2OGradientBoostingEstimator(nfolds=3, distribution=distribution)
{code}
The examples use the cars dataset:
cars = h2o.import_file("https://s3.amazonaws.com/h2o-public-test-data/smalldata/junit/cars_20mpg.csv")
The text was updated successfully, but these errors were encountered: