Icon

06_​Logistic_​Regression (check overfitting)

Logistic Regression (verificare se si è in overfitting)

Per verificare se i valori elevati di accuratezza dell'algoritmo Logistic regression non siano dovuti ad overfitting, in questa variante del workflow originale, provo a separare tutte le osservazioni utilizzando l'algoritmo di clustering K-means, per determinare se questo riesce a separarle alla stessa maniera.
Utilizzando un loop di ottimizzazione per K-means e il nodo Silhouette, ricavo che il numero di cluster ottimale è due (corrisponde col problema di classificazione binaria) e graficamente, tramite l'utilizzo di PCA e del nodo 3D Scatter Plot riesco a visualizzare che le osservazioni sono adeguatamente 'separate', quindi che le performance dell'algoritmo di logistic regression sono corrette e non sono dovute ad overfitting.

Con una pivot sui dati clusterizzati si può costruire una pseudo matrice di confusione e l'accuratezza, anche utilizzando il clustering, rimane elevata (per questa elaborazione circa 99% per i bianchi e 95% per i rossi).

URL: Logistic Regression Node: Algorithm Settings https://youtu.be/AclQdjxpGA0

Logistic Regression: TrainingThis workflow is an example of how to build a basic prediction / classification model usinglogistic regression. Calculate accuracy andconfusion matrix80% for training set20% for testing setTrain model withSAG and Gausspriorz-normalize the data with0 mean and standarddeviation of 1Read the wine.tabledatasetUse the model to make predictionsPCARosso o BiancostartTutti i punteggiBest parameterSalvo i punteggiPunteggioSlhouetteVerificare laseparazione delle classi Scorer (deprecated) Partitioning LogisticRegression Learner Normalizer (PMML) Table Reader(deprecated) Logistic RegressionPredictor PCA Color Manager k-Means Parameter OptimizationLoop Start Line Plot(JavaScript) ParameterOptimization Loop End Table Rowto Variable SilhouetteCoefficient Column Rename(deprecated) 3D ScatterPlot (Plotly) Logistic Regression: TrainingThis workflow is an example of how to build a basic prediction / classification model usinglogistic regression. Calculate accuracy andconfusion matrix80% for training set20% for testing setTrain model withSAG and Gausspriorz-normalize the data with0 mean and standarddeviation of 1Read the wine.tabledatasetUse the model to make predictionsPCARosso o BiancostartTutti i punteggiBest parameterSalvo i punteggiPunteggioSlhouetteVerificare laseparazione delle classi Scorer (deprecated) Partitioning LogisticRegression Learner Normalizer (PMML) Table Reader(deprecated) Logistic RegressionPredictor PCA Color Manager k-Means Parameter OptimizationLoop Start Line Plot(JavaScript) ParameterOptimization Loop End Table Rowto Variable SilhouetteCoefficient Column Rename(deprecated) 3D ScatterPlot (Plotly)

Nodes

Extensions

  • No modules found

Links