- Metric - Function which we want to use to evaluate the model. Maximum accuracy in classification
- Optimization Loss - Easy to optimize for given model, Function our model optimizes. MSE, LogLoss
- Preprocess train and optimize another metric - MSPE, MAPE, RMSLE
- Optimize another metric postprocess predictions - Accuracy, Kapps
- Early Stopping - Stop traning when models starts to overfit
Accuracy Metrics
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def logregobj(preds, dtrain): | |
labels = dtrain.get_label() | |
preds = 1.0/(1.0+np.exp(-preds)) | |
grad = preds-labels | |
hess = preds*(1.0-preds) | |
return grad, hess |
No comments:
Post a Comment