Title: P3: I was at Tinkoff.AI RecSys Meetup #3 [2024-03-07 Thu]
print('reduction sum :', sum([cross_entropy(x,y) for x,y in zip(y_true, y_pred)]))
print('reduction mean:', mean([cross_entropy(x,y) for x,y in zip(y_true, y_pred)]))
: for each:
: - 0.05129329438755058
: - 2.3025850929940455
: reduction sum : 2.353878387381596
: reduction mean: 1.176939193690798
😶 #3 #dailyreport #crossentropy #logloss #loss #3

Title: P2: I was at Tinkoff.AI RecSys Meetup #3 [2024-03-07 Thu]
Others: https://scikit-learn.org/stable/modules/model_evaluation.html

Python example:

from math import log
from numpy import mean

def cross_entropy(p, q):
return -sum([p[i]*log(q[i]) for i in range(len(p))])

y_true = [[0, 1, 0], [0, 0, 1]]
y_pred = [[0.05, 0.95, 0.00001], [0.1, 0.8, 0.1]]

print('for each:')
[print('-', cross_entropy(x,y)) for x,y in zip(y_true, y_pred)] #3 #dailyreport #crossentropy #logloss #loss #3

3.4. Metrics and scoring: quantifying the quality of predictions

Which scoring function should I use?: Before we take a closer look into the details of the many scores and evaluation metrics, we want to give some guidance, inspired by statistical decision theory...

scikit-learn

Title: P1: I was at Tinkoff.AI RecSys Meetup #3 [2024-03-07 Thu]
Used to calc entropy to protect from 'skewed distribution'.

I still don't understand Why this have minimum when p is equal
to q.

cross-entropy or log_loss used because of properties:
Gradient-Friendly, best compatible with Softmax Activation,
sensitive to small differences between the predicted and true
distributions, penalizes larger deviations more severely
than smaller ones. #3 #dailyreport #crossentropy #logloss #loss #3

Title: P0: I was at Tinkoff.AI RecSys Meetup #3 [2024-03-07 Thu]
- Yandex uses Transformer architecture in their library for recsys.
over 900f code is writen in C++ (proprietary library)
- Sber has their own open source library for recsys (RePlay?)

I have been reading about cross-entropy. It is Asymetric to
(p,q). It is a averaged probabilities of p outcomes by the
weights of amount of information in q outcomes. Averaged sum #3 #dailyreport #crossentropy #logloss #loss #3

Logistic regression may be used for classification.

In order to preserve the convex nature for the loss function, a log-loss cost function has been designed for logistic regression. This cost function extremes at labels True and False.

The gradient for the loss function of logistic regression comes out to have the same form of terms as the gradient for the Least Squared Error.

More: https://www.baeldung.com/cs/gradient-descent-logistic-regression

#optimization #algebra #linearAlgebra #math #maths #mathematics #mathStodon #ML #dataScience #machineLearning #DeepLearning #neuralNetworks #NLP #modeling #modelling #models #dataDev #AIDev #regression #modelling #dataLearning #probabilities #logisticRegression #logLoss #sigmoid #classification #differentialCalculus #loss