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

[SW-2700] Add spline_orders to Tests Covering Parameter Propagation to H2OGAMMOJOModel #2760

Merged
merged 1 commit into from Apr 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -102,6 +102,7 @@ class MOJOParameterTestSuite extends FunSuite with SharedH2OTestContext with Mat
.setNumKnots(Array(5, 5))
.setBs(Array(1, 1))
.setScale(Array(.5, .5))
.setSplineOrders(Array(-1, -1))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question, are those values (-1, -1) meaningful ones?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These values haven't been selected to improve performance algorithm, but are valid according to the tests on H2O-3 side:
https://github.com/h2oai/h2o-3/pull/6090/files#diff-4340a0b6fcce0ae9216a6d99f650d45af3f198370c43a422a9f7056707c104e1R233

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I can't judge if combination of Bs, NumKnots and SplineOrders is a meaningful or not, but regarding the interface extension, this is OK (straightforward).

val mojo = algorithm.fit(dataset)

compareParameterValues(algorithm, mojo, Set("getFeaturesCols"))
Expand Down
Expand Up @@ -53,7 +53,7 @@ def testGLMParameters(prostateDataset):
def testGAMParameters(prostateDataset):
features = ['AGE', 'RACE', 'DPROS', 'DCAPS', 'PSA']
algorithm = H2OGAM(seed=1, labelCol="CAPSULE", gamCols=[["PSA"], ["AGE"]], numKnots=[5, 5], lambdaValue=[0.5],
featuresCols=features, bs=[1, 1], scale=[0.5, 0.5])
featuresCols=features, bs=[1, 1], scale=[0.5, 0.5], splineOrders=[-1, -1])
model = algorithm.fit(prostateDataset)
compareParameterValues(algorithm, model, ["getFeaturesCols"])

Expand Down