Icon

02_AutoML_Regression_and_Classification_Examples

AutoML Regression and Classification Examples

This application is a simple example of AutoML with KNIME Software for regression and classification tasks. The key of this example is the “AutoML (Regression)” and “AutoML” components, verified and developed by the KNIME Team. The components (in green) use the extension KNIME Integrated Deployment in order to train several models and combine them with other nodes and output a deployment workflow.

URL: KNIME Integrated Deployment - KNIME.com https://www.knime.com/integrated-deployment
URL: Guided Automation: a more complex AutoML example with KNIME Software https://kni.me/w/eAGfGtEAIr-1iYR-
URL: KNIME Verified Components - KNIME.com https://www.knime.com/verified-components
URL: Ames Iowa Housing Data https://www.kaggle.com/marcopale/housing
URL: Bike Sharing Dataset https://archive.ics.uci.edu/ml/datasets/Bike+Sharing+Dataset
URL: Auto MPG Data Set https://archive.ics.uci.edu/ml/datasets/auto+mpg
URL: Diabetes Data http://statweb.lsu.edu/faculty/li/teach/exst7142/diabetes.html
URL: Titanic Data https://www.kaggle.com/c/titanic
URL: Iris Data https://archive.ics.uci.edu/ml/datasets/iris
URL: Wine Data https://archive.ics.uci.edu/ml/datasets/wine
URL: Census Income Data https://archive.ics.uci.edu/ml/datasets/adult

Annotations and comments
  • Solving a Regression Task with AutoML
  • Solving a Classification Task with AutoML
  • Break if all models static
  • more faulty models
  • new faulty models
  • create new list as noithing failed during training
  • 0 : not missing performance 1 : missing performance
  • Recall
  • Precision
  • F-measure
  • static prediction: models always predicting one class
  • models with more than one class in the prediction
  • list static models
  • selected metric
  • model names
  • automated selection
  • interactive view selection
  • if multiclass remove conf. matrix metrics
  • activate view
  • fixed colors
  • negative Coehn's kappa is 0
  • add zoom
  • select metric
  • only cat cols output or normal wf
  • decide preprocess workflow cat cols or normal wf
  • decide postprocess workflow cat cols or normal wf
  • update domain
  • Columns to check for unique values
  • Bottom: string
  • Unique count
  • Max number of unique values
  • <= 25 unique values
  • integer features to double
  • cat_present = 1
  • cat_present = 0
  • One hot encoding choice binary
  • One hot encoding choice
  • categorical cols found
  • no categorical
  • remove orignal string cols
  • class
  • features
  • numerical flag
  • num_present = 1
  • num_present = 0
  • do nothing
  • only cat cols and check OHE status
  • only predictions not active: 0 active: 1
  • decide preproces Ohe =on/off workflow
  • post-process active: 0 not active: 1
  • 0: OHE off 1: OHE on
  • 0: train 1: test
  • Preprocessing Missing value
  • feattures+class
  • all features + OHE
  • split string cols
  • OHE + feattures + class
  • column loop and rename
  • remove all original data
  • Select One-Hot Encoded Columns
  • Remove One-Hot Encoded Columns
  • Combining OHE Removal (if any) with Denormalization (if any)
  • Missing values + Optional One Hot Encoding
  • train / test based on component external settings
  • 0 train 1 test
  • Postprocessing Denormalisation
  • flow variable decides activeness
  • Select columns for normalization
  • bottom: numeric
  • Min-max normalization
  • Normalization mode
  • Preprocessing Normalization
  • decide workflow for transformation
  • check to append OHE workflow
  • pass to denorm
  • ohe check
  • Normalization + OHE
  • Target Col selection
  • DataPrep Transfomations on test data
  • Prediction
  • Failed
  • Unchecked
  • check configuration component
  • Break if params are null
  • port 1: extractred params port 0 : other columns
  • extract params
  • port 0: model selected other: model not selected
  • Rename the column containing the objective value.
  • Fail if only one column is available.
  • Set seed.
  • Store the accuracy for k folds
  • Translate to setting names.
  • select the metric
  • keep 1 row
  • select positive class
  • Select search strategy.
  • Send avg accuracy as variaable
  • rename class0
  • rename class1
  • rename prediction column
  • negative
  • positive
  • prediction col creation
  • class0 + class1 + ground truth
  • negative class rename
  • positive class rename
  • binary target + features
  • add back extra columns
  • target class
  • Dense 64
  • softmax
  • Input
  • reshape for dynamic
  • Predict Model
  • Build Model
  • send features for prediction
  • sample 10 rows to pass feature cols
  • selected unselected KDL
  • Binary Multiclass
  • top : features bottom : target
  • extract cols
  • number of units
  • number of samples per epoch
  • check if KDL selected
  • port 1: extractred params port0 : other columns
  • multi target + features
  • input + pred
  • separate features target
  • sigmoid output units
  • Reshape layer
  • add prefix
  • max col
  • pass max
  • pred_0
  • pred
  • rename target
  • original input columns
  • top : pred cols bottom: tareget
  • rename pred cols
  • many to pred col
  • pass numerical features
  • sample 10 rows for identifying features
  • append test rowids to prediction
  • pass rowIds of test column
  • port 1: extractred params port0 : other column
  • MultiClass
  • Merge the flow variables
  • Btreak when all selected models are failed
  • Change the col schema
  • port 0: if any model fails port 1: if none fails
  • Remove failed models
  • Remove unselected models
  • Print failed models
  • print all models were successful
  • clean name of failed models
  • Add params to sucess
  • extracted_params
  • Fail if no nominal column is available.
  • Filter nominal columns.
  • remove categorical if any
  • seed_yes
  • select negative col
  • select positive col
  • take 2nd row
  • Create variable for Prediction col
  • Class + features
  • num features + OHE
  • 0 : OHE + numericals 1 : categoricals + numericals
  • Cell to Workflow
  • Choose only prediction related cols
  • Rename Prediction to Modelname Prediction
  • RowId so that GLM can be concat with other models
  • Pass the rename prediction col. name
  • create flow variable of current prediction col.
  • Executes the prediction workflow
  • 0: features 1: gound truth
  • 0: trained models table 1: new data / test data / validation data
  • manage missing values in predictions columuns
  • if binary
  • Iterating Model by Model
  • overall stats
  • positive class
  • handle the special characters in class names
  • One Hot Encoding
  • Target Selection
  • Number of CV Folds
  • Train / Test Split
  • unique values removal
  • Select Models
  • features + target
  • choose target
  • TTR divide by 100
  • deactivate_postprocess
  • only_prediction
  • Store the model names
  • remove all numerical
  • Multiclass flag
  • Rename target col
  • Unique value in target
  • Binary or Multi class
  • Performance Metric
  • output modes
  • 1. pre-process model 2. ML model 3. post-process model
  • capitalization
  • predictions
  • target
  • by target
  • cont. error. plot
  • sorting dependent on the metric
  • r2 or not
  • by selected metric
  • title
  • model labels and color mapping
  • Select model
  • description ranges
  • r2 disclaimer
  • description lines
  • optional target and others
  • 1 row
  • feats + preds
  • rename denormalized output with proper prediction column name
  • rename output as target to denormalize
  • feats vs other
  • prediction vs other
  • add fake prediction
  • Remove outliers among predictions
  • higher_bound
  • lower_bound
  • Add params to success
  • Only prediciton
  • remove features of type string
  • only double
  • to double
  • only features
  • just 1 row
  • Rename the metric
  • Send avg metric as variaable
  • For each model
  • Calculate # of missing predictions
  • Get missing predictions
  • # misisng values > 0
  • Remove Extreme Preds
  • Feature Column Selection
  • Extreme Preds Threshold:
  • Models Selection
  • No models are selected
  • metric_auto_h2o
  • maximize R^2, minimize the losses
  • zeros in the target and MAPE
  • zeros in the target
  • Output Settings
  • Top : Train + Validation sets Bottom : Test set
  • Bike-Sharing-Dataset-day
  • Bike-Sharing-Dataset-hours
  • auto-mpg
  • AmesHousing full
  • Predict

Nodes

Extensions

Links