Skip to content

Instantly share code, notes, and snippets.

@a-agmon
Created February 26, 2023 12:27
Show Gist options
  • Save a-agmon/d6392011d24dcd5d91ea5e815f632b0c to your computer and use it in GitHub Desktop.
Save a-agmon/d6392011d24dcd5d91ea5e815f632b0c to your computer and use it in GitHub Desktop.
private def trainXGBBooster(trainSeq: Seq[FeaturesRecord]):
Try[Booster] = Try {
XGBoost.train(trainSeq.toDMatrix,
Map("eta" -> 0.1f, "max_depth" -> 4, "objective" -> "reg:squarederror"), 50)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment