Icon

Logistic_​Regression_​Solution

Logistic Regression

Logistic Regression: predict wine color.

- Normalize numerical columns
- Partition the dataset into train and test set
- Train a Logistic Regression model
- Apply the model to the test set
- Evaluate the model performance



Exercise: Logistic RegressionIn this exercise we will train a Logistic Regresion model that predicts whether a wine is red or white.1) Read data wine.csv (Hint: drag and drop)2) Use the Normalizer (PMML) node to z normalize all numerical columns3) Partition the dataset into a training set (80%) and a test set (20%). - Apply stratified sampling on the color column.4) Train a logistic regression model on the training set, and apply the model to the test set5) Use the Scorer node to evaluate the accuracy of the model Logistic Regresion: color prediction Train the modelto predict wine colorApply the modelto the test setZ-Score Normalizationon all numerical columnsTop: train set (80%)Bottom: test set (20%)Stratified sampling on colorEvaluate model accuracyRead datawine.csv LogisticRegression Learner Logistic RegressionPredictor Normalizer (PMML) Partitioning Scorer CSV Reader Exercise: Logistic RegressionIn this exercise we will train a Logistic Regresion model that predicts whether a wine is red or white.1) Read data wine.csv (Hint: drag and drop)2) Use the Normalizer (PMML) node to z normalize all numerical columns3) Partition the dataset into a training set (80%) and a test set (20%). - Apply stratified sampling on the color column.4) Train a logistic regression model on the training set, and apply the model to the test set5) Use the Scorer node to evaluate the accuracy of the model Logistic Regresion: color prediction Train the modelto predict wine colorApply the modelto the test setZ-Score Normalizationon all numerical columnsTop: train set (80%)Bottom: test set (20%)Stratified sampling on colorEvaluate model accuracyRead datawine.csv LogisticRegression Learner Logistic RegressionPredictor Normalizer (PMML) Partitioning Scorer CSV Reader

Nodes

Extensions

Links