Skip to content

Commit

Permalink
add H2OTargetEncoderEstimator schema
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanSoley committed Feb 27, 2024
1 parent d4b3d79 commit 55615d8
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rubicon_ml/schema/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
"h2o__H2ORandomForestEstimator": lambda: _load_schema(
os.path.join("schema", "h2o__H2ORandomForestEstimator.yaml")
),
"h2o__H2OTargetEncoderEstimator": lambda: _load_schema(
os.path.join("schema", "h2o__H2OTargetEncoderEstimator.yaml")
),
"lightgbm__LGBMModel": lambda: _load_schema(os.path.join("schema", "lightgbm__LGBMModel.yaml")),
"lightgbm__LGBMClassifier": lambda: _load_schema(
os.path.join("schema", "lightgbm__LGBMClassifier.yaml")
Expand Down
32 changes: 32 additions & 0 deletions rubicon_ml/schema/schema/h2o__H2OTargetEncoderEstimator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: h2o__H2OTargetEncoderEstimator
version: 1.0.0

compatibility:
lightgbm:
max_version:
min_version: 3.44.0.1
docs_url: https://docs.h2o.ai/h2o/latest-stable/h2o-py/docs/modeling.html#h2otargetencoderestimator

parameters:
- name: blending
value_attr: blending
- name: columns_to_encode
value_attr: columns_to_encode
- name: data_leakage_handling
value_attr: data_leakage_handling
- name: fold_column
value_attr: fold_column
- name: ignored_columns
value_attr: ignored_columns
- name: inflection_point
value_attr: inflection_point
- name: keep_original_categorical_columns
value_attr: keep_original_categorical_columns
- name: noise
value_attr: noise
- name: response_column
value_attr: response_column
- name: seed
value_attr: seed
- name: smoothing
value_attr: smoothing
2 changes: 2 additions & 0 deletions tests/integration/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from h2o.estimators.gbm import H2OGradientBoostingEstimator
from h2o.estimators.glm import H2OGeneralizedLinearEstimator
from h2o.estimators.random_forest import H2ORandomForestEstimator
from h2o.estimators.targetencoder import H2OTargetEncoderEstimator
from lightgbm import LGBMClassifier, LGBMRegressor
from sklearn.ensemble import RandomForestClassifier
from xgboost import XGBClassifier, XGBRegressor
Expand All @@ -14,6 +15,7 @@
H2OGeneralizedLinearEstimator,
H2OGradientBoostingEstimator,
H2ORandomForestEstimator,
H2OTargetEncoderEstimator,
]
PANDAS_SCHEMA_CLS = [
LGBMClassifier,
Expand Down

0 comments on commit 55615d8

Please sign in to comment.