Skip to content

Commit

Permalink
add enhancement for xgboost (intel-analytics#2807)
Browse files Browse the repository at this point in the history
  • Loading branch information
dding3 committed Sep 2, 2020
1 parent 086efd4 commit 188d430
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ class XGBRegressor () {

private val model = new XGBoostRegressor()
model.setNthread(EngineRef.getCoreNumber())
model.setMaxBins(256)

def setLabelCol(labelColName : String) : this.type = {
model.setLabelCol(labelColName)
Expand All @@ -383,6 +384,7 @@ class XGBRegressor () {
}

def fit(df: DataFrame): XGBRegressorModel = {
df.repartition(EngineRef.getNodeNumber())
val xgbModel = model.fit(df)
new XGBRegressorModel(xgbModel)
}
Expand Down

0 comments on commit 188d430

Please sign in to comment.