[ Foro de Python ]

Linear Models (gradient descend classifier) and Support Vector Machine

01-Aug-2021 21:10
Invitado (Andy)
0 Respuestas

HOLA! Alguien me puede ayudar?! No entiendo lo que  me están pudiendo y esto se entrga en 3 dias. Si alguien me puede ayudar se lo agradecería infinitamente!

3) Take the ‘geyser.csv’ for the classification task. Split it on train and test parts.
Train the model SGDClassifier on it. To do it, you should convert labels to numbers, where a positive class (P) will be encoded by ‘+1’, and a negative (N) by ‘-1’. Print the resulting equation of the separating line.

f(x) = w_1 * x_ 1 + w_2 * x_2 .....

Consider ‘chips.csv’. Also split it on train and test parts. Do the same things.
Evaluate classifiers with F1 score . Compare the resluts (F1 scores)

F1 score - https://scikit-learn.org/stable/modules/generated/sklearn.metrics.f1_score.html#sklearn.metrics.f1_score


4) For both datasets (‘chips.csv’ and ‘geyser.csv’), do the train and test split and apply the SVM model on them. Try different kernels. For each kernel, find the best parameter C for it and draw how the SVM model classify whole space with it. You can find an example here (notebook in the attachment).
Compare the SVM results (by F1 score).





(No se puede continuar esta discusión porque tiene más de dos meses de antigüedad. Si tienes dudas parecidas, abre un nuevo hilo.)