You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When quantile-based knots generation (currently equidistant) is used together with an ordinal value of low cardinality (10-12), multiple knots (at least two) might hit he same value.
{noformat}import h2o
import numpy as np
from h2o.estimators.gam import H2OGeneralizedAdditiveEstimator
h2o.init()
When quantile-based knots generation (currently equidistant) is used together with an ordinal value of low cardinality (10-12), multiple knots (at least two) might hit he same value.
{noformat}import h2o
import numpy as np
from h2o.estimators.gam import H2OGeneralizedAdditiveEstimator
h2o.init()
load and prepare California housing dataset
np.random.seed(1234)
data = h2o.H2OFrame(
python_obj={'C1': list(np.random.randint(0, 9, size=1000)),
'target': list(np.random.randint(0, 2, size=1000))
})
use only 3 features and transform into classification problem
feature_names = ['C1']
data['target'] = data['target'].asfactor()
split into train and validation sets
train, test = data.split_frame([0.8], seed=1234)
build the GAM model
h2o_model = H2OGeneralizedAdditiveEstimator(family='binomial',
gam_columns=feature_names,
scale=[1],
num_knots=[10],
)
h2o_model.train(x=feature_names, y='target', training_frame=train){noformat}
!image (1).png|width=2068,height=1288!
Discovered by [~accountid:5f484754fe0a46004dc38d32]
The text was updated successfully, but these errors were encountered: