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
Currently in docs:
{code:python}import h2o from h2o.estimators.coxph import H2OCoxProportionalHazardsEstimator h2o.init()
heart = h2o.import_file("http://s3.amazonaws.com/h2o-public-test-data/smalldata/coxph_test/heart.csv")
train, test = heart.split_frame(ratios = [.8], seed = 1234)
heart_coxph = H2OCoxProportionalHazardsEstimator(start_column="start", stop_column="stop", ties="breslow") heart_coxph.train(x="age", y="event", training_frame=train)
pred = heart_coxph.predict(test){code}
ADD a few more lines to get other properties from CoxPH
{code:python}# Get baseline hazard h2o.baseline_hazard_frame
h2o.baseline_survival_frame
heart_coxph.model_performance().concordance(){code}
The text was updated successfully, but these errors were encountered:
Michal Kurka commented: [~accountid:5d1185d4f46aa30c271c7cc6] improvements were made and Jira description updated
cc: [~accountid:5dc4f5bbb6e6b50c58af0624]
Sorry, something went wrong.
JIRA Issue Details
Jira Issue: PUBDEV-8091 Assignee: hannah.tillman Reporter: Neema Mashayekhi State: Resolved Fix Version: 3.32.1.3 Attachments: N/A Development PRs: Available
Linked PRs from JIRA
#5424 #5430
hannah-tillman
No branches or pull requests
Currently in docs:
{code:python}import h2o
from h2o.estimators.coxph import H2OCoxProportionalHazardsEstimator
h2o.init()
Import the heart dataset into H2O:
heart = h2o.import_file("http://s3.amazonaws.com/h2o-public-test-data/smalldata/coxph_test/heart.csv")
Split the dataset into a train and test set:
train, test = heart.split_frame(ratios = [.8], seed = 1234)
Build and train the model:
heart_coxph = H2OCoxProportionalHazardsEstimator(start_column="start",
stop_column="stop",
ties="breslow")
heart_coxph.train(x="age",
y="event",
training_frame=train)
Generate predictions on a test set (if necessary):
pred = heart_coxph.predict(test){code}
ADD a few more lines to get other properties from CoxPH
{code:python}# Get baseline hazard
h2o.baseline_hazard_frame
Get baseline survival
h2o.baseline_survival_frame
Get model concordance
heart_coxph.model_performance().concordance(){code}
The text was updated successfully, but these errors were encountered: