Name | Description |
---|---|
options.booster string
(default 'gbtree' )
|
|
options.objective string
(default 'reg:linear' )
|
|
options.max_depth number
(default 5 )
|
|
options.eta number
(default 0.1 )
|
|
options.min_child_weight number
(default 1 )
|
|
options.subsample number
(default 0.5 )
|
|
options.colsample_bytree number
(default 1 )
|
|
options.silent number
(default 1 )
|
|
options.iterations number
(default 200 )
|
(object)
for load purposes.
Free the memory allocated for the model. Since this memory is stored in the memory model of emscripten, it is allocated within an ArrayBuffer and WILL NOT BE GARBARGE COLLECTED, you have to explicitly free it. So not calling this will result in memory leaks. As of today in the browser, there is no way to hook the garbage collection of the XGBoost object to free it automatically. Free the memory that was created by the compiled XGBoost library to. store the model. This model is reused every time the predict method is called.
Predicts the output given the matrix to predict.
Array<number>
:
predictions
Export the current model to JSON.
object
:
Current model.
Train the decision tree with the given training set and labels.
Load a Decision tree classifier with the given model.
(object)
XGBoost
:
Load a model trained from other programming language
(string)
(object
= {}
)
Name | Description |
---|---|
options.labels Array?
|
Some classifiers are trained with a one-hot encoder (Ex: Python API) so the current classifier returns the probability of each class, if you want the single predictions, you should provide an array with the corresponding labels, if you are doing regression you should ignore this option |
XGBoost
:
model