Icon

2. My first Model

<p><strong>My first Model</strong></p><p>This workflow reads the two datasets (training and test set) created in the workflow "1. Data Preparation". It then trains two machine learning algorithms to predict the income (target class = "income"; &gt;50k or &lt;=50k) based on the remaining input features of the adult dataset. In this workflow we use the following two algorithms:</p><ol><li><p>Naive Bayes</p></li><li><p>Decision Tree (C4.5)</p></li></ol><p>Lastly, both models are evaluated based on the test set (<em>Scorer </em>nodes) and the two mode performances are visualized and compared (<em>ROC Curve</em> and <em>Decision Tree View </em>nodes).</p>

URL: KNIME Beginner's Luck (Book Homepage) https://www.knime.com/knimepress/beginners-luck

Workflow: My first Model


This workflow reads the two datasets (training and test set) created in the workflow "1. Data Preparation". It then trains two machine learning algorithms to predict the income (target class = "income"; >50k or <=50k) based on the remaining input features of the adult dataset. In this workflow we use the following two algorithms:

  1. Naive Bayes

  2. Decision Tree (C4.5)

Lastly, both models are evaluated based on the test set (Scorer vs. Scorer (JavaScript) nodes) and the two mode performances are visualized and compared (ROC Curve and Decision Tree View nodes).

Training machine learning models

using training set and remaining input features of adult dataset

Applying trained models

on test set

Evaluating the trained models

Actual "income" value vs. predicted values

Visualization

ROC curves and decision tree

Reading data

Training and test set created in workflow "1. Data Preparation".

adult_training_set.csv
CSV Reader
Training to predict "income"based on remaining input features
Decision Tree Learner
Confusion matrix &overall statistics
Scorer (JavaScript)
adult_test_set.csv
CSV Reader
Confusion matrix &overall statistics
Scorer (JavaScript)
Column Renamer
PerformanceNaive Bayes vs. Decision Tree
ROC Curve
Joiner
Column Renamer
Training to predict "income"based on remaining input features
Naive Bayes Learner
Visualize thedecision tree view
Decision Tree to Image
Append prediction probabilitiesas separate column
Naive Bayes Predictor
Confusion matrix &overall statistics
Scorer
Append prediction probabilitiesas separate column
Decision Tree Predictor
Confusion matrix &overall statistics
Scorer

Nodes

Extensions

Links