Skip to content

Commit

Permalink
Improved support for the 'ExplainableBoostingRegressor.link_' attribu…
Browse files Browse the repository at this point in the history
  • Loading branch information
vruusmann committed Jun 19, 2024
1 parent 874e6e9 commit 1ac6e70
Show file tree
Hide file tree
Showing 4 changed files with 397 additions and 394 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public Number getIntercept(){
}

public String getLink(){
return getEnum("link_", this::getString, Arrays.asList(ExplainableBoostingRegressor.LINK_IDENTITY));
return getEnum("link_", this::getString, Arrays.asList(ExplainableBoostingRegressor.LINK_IDENTITY, ExplainableBoostingRegressor.LINK_LOG));
}

@Override
Expand All @@ -93,10 +93,13 @@ private RegressionModel.NormalizationMethod parseLink(String link){
switch(link){
case ExplainableBoostingRegressor.LINK_IDENTITY:
return RegressionModel.NormalizationMethod.NONE;
case ExplainableBoostingRegressor.LINK_LOG:
return RegressionModel.NormalizationMethod.EXP;
default:
throw new IllegalArgumentException(link);
}
}

private static final String LINK_IDENTITY = "identity";
private static final String LINK_LOG = "log";
}
Loading

0 comments on commit 1ac6e70

Please sign in to comment.