**Log Loss**

It is the evaluation measure to check the performance of the classification model. It measures the amount of divergence of predicted probability with the actual label. So lesser the log loss value, more the perfectness of model. For a perfect model, log loss value = 0. For instance, as accuracy is the count of correct predictions i.e. the prediction that matches the actual label, Log Loss value is the measure of uncertainty of our predicted labels based on how it varies from the actual label.

where,N :no. of samples.M :no. of attributes.yindicates whether i_{ij}:^{th}sample belongs to j^{th}class or not.pindicates probability of i_{ij}:^{th}sample belonging to j^{th}class.

**Implementation of LogLoss using sklearn**

`from` `sklearn.metrics ` `import` `log_loss: ` ` ` `LogLoss ` `=` `log_loss(y_true, y_pred, eps ` `=` `1e` `-` `15` `, ` ` ` `normalize ` `=` `True` `, sample_weight ` `=` `None` `, labels ` `=` `None` `) ` |

*chevron_right*

*filter_none*

**Mean Squared Error**

It is simply the average of the square of the difference between the original values and the predicted values.

**Implementation of Mean Squared Error using sklearn**

`from` `sklearn.metrics ` `import` `mean_squared_error ` ` ` `MSE ` `=` `mean_squared_error(y_true, y_pred) ` |

*chevron_right*

*filter_none*

## Recommended Posts:

- Python | Mean Squared Error
- ML | Mathematical explanation of RMSE and R-squared error
- ML | R-squared in Regression Analysis
- Python - Non-Central Chi-squared Distribution in Statistics
- Find the profit and loss in the given Excel sheet using Pandas
- Find the profit and loss percent in the given Excel sheet using Pandas
- ML | Common Loss Functions
- MultiLabel Ranking Metrics - Ranking Loss | ML
- Pandas - GroupBy One Column and Get Mean, Min, and Max values
- Log transformation of an image using Python and OpenCV
- Log and natural Logarithmic value of a column in Pandas - Python
- Absolute Deviation and Absolute Mean Deviation using NumPy | Python
- Create the Mean and Standard Deviation of the Data of a Pandas Series
- How to Plot Mean and Standard Deviation in Pandas?
- Compute the mean, standard deviation, and variance of a given NumPy array
- Python | Prompt for Password at Runtime and Termination with Error Message
- ML | Models Score and Error
- Log functions in Python
- numpy.log() in Python
- Python | Tensorflow log() method

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.