Skip to content

LightGBMBooster's mergeModel function works? #315

@ywskycn

Description

@ywskycn

I was playing around the mergeModels function. The following function looks like not change the first booster, as it always creates a new LightGBMBooster using the old "model" value. Do I miss anything there?

  def mergeModels(newModel: LightGBMBooster): LightGBMBooster = {
    // Merges models to first handle
    if (model != null) {
      LightGBMUtils.validate(
        lightgbmlib.LGBM_BoosterMerge(getModel(), newModel.getModel()),
        "Booster merge")
    }
    new LightGBMBooster(model)
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions