一樣是從從線性迴歸跟類別型兩大類來看Metrics optimization/ 評估指標最佳化
L2
.Tree-basedXGBoost, LightGBM sklearn.RandomForestRegressor
.Linear modelssklearn.<>Regression sklearn.SGDRegressor Vowpal Wabbit (quantile loss)
.Neural netsPytorch, Keras, TF, etc
L1
.Tree-basedLightGBM sklearn.RandomForestRegressor
.Linear modelsVowpal Wabbit (quantile loss)
.Neural netsPytorch, Keras, TF, etc
.使用 sample_weights, XGBoost, LightGBM 等 library 有, 但像 Neral nets 就不 support.
. resample the train set, 通常 resample 多次df.sample(weights=sample_weights)