Icon

01_Analytics

Analytics - Model Selection to Predict Flight Departure Delays
Annotations and comments
  • Model Selection to Predict Flight Departure Delays This workflow trains a number of data analytics models and automatically selects the best model to predict departure delays from a selected airport. Data is the airline dataset downloadable from: http://stat-computing.org/dataexpo/2009/the-data.html. Departure delay is a delay > 15min. Default selected airport is ORD. This workflow shows data reading, data blending, ETL, guided analytics, dimensionality reduction, advanced data mining models, and model selection.
  • Read & Blend Data
  • Advanced ETL Functionality & Machine Learning-based Pre-processing - Outlier Detection - Dimensionality Reduction - Feature Generation - Missing Values - Discretization - Normalization - Automatic Dimensionality Reduction (SVD, PCA) - Machine Learning for Feature Selection
  • Model Training - Bag of Models - Decision Tree & Random Forest - Neural Network & Deep Learning - Gradient Boosted Trees - Logistic Regression (in KNIME) - Logistic Regression (in R) - Your own Ensemble Model - Random Forest (with H2O)
  • Model Selection & Comparsion - ROC Curve - A/B Test using a Cross Validation - Lift Chart
  • Warning! The dataset used here is just a subset of the original dataset. Therefore final model performances will be different than what reported in videos https://youtu.be/IEAsUTN8q68 and https://youtu.be/rvTHhgCKQiw The original datasets can be downloaded from The full datasets can be found under the following links: - airline dataset: %%00009http://stat-computing.org/dataexpo/2009/the-data.html - calender and weather information: %%00009https://developers.google.com/google-apps/calendar/%%00009 %%00009https://www.ncdc.noaa.gov/data-access/land-based-station-data/land-based-datasets/global-historical-climatology-network-ghcn
  • Model Factory - Predictive Model for Each Airline
  • Note. Some nodes require R and Python installed. How to install Python: https://www.knime.com/blog/setting-up-the-knime-python-extension-revisited-for-python-30-and-20 R in KNIME video: https://youtu.be/Dfm4-RuABmY
  • 100 hidden neurons 500 epochs
  • Only accuracy
  • Add RowID
  • Add Modelname
  • Only Overall
  • 2000 FC Units
  • 250 FC Units
  • 1500 FC Units
  • 500 FC Units
  • 1000 FC Units
  • 100 FC Units
  • N-5-2
  • Target = "DepDelay"
  • Combine predictions by averaging the probabilities
  • Write the model in a cell
  • Use glm() to train a model
  • Change: delay = 1 no delay = 0
  • 40%
  • all previous runs
  • Do the final filtering here
  • Choose the variable to optimize
  • Configure your set of columns here
  • on all columns
  • only String in configuration
  • Standard Deviation sort ascending
  • Count Missings
  • ratio # missing values / # rows
  • color by target values
  • outlier removal
  • show table with columns and their std dev
  • show table with columns and their skeweness
  • show table with columns and their correlation
  • show table with columns and % missing values
  • label for outlier removal
  • label for % missing values
  • label
  • List of Unique Carrier from 2007
  • Filter column unique carrier
  • Join unique carrier to PCA output
  • Model in Cell
  • Filter current Unique Carrier
  • Loop over all Unique Carrier
  • Node 453
  • Wrtie the Error Rate
  • Partitionate the whole Dataset in each of the ten iterations
  • Filter only Error Rate
  • Calculate Error Rate in %
  • Convert Error Rate into a Flow Variable
  • Use a single sample t- test to show that the new Model is significant better
  • Apply current model
  • Lift Chart for best model
  • Lift Chart for current model
  • Import the current used model
  • Only best model
  • Sort by area under the curve
  • Save best model as flowvariable
  • Distance flight
  • Elapsed time
  • Elapsed variable categorized
  • keeping only PCA components
  • keeping all original strings
  • Information fraction to preserve => 90%
  • 80% vs. 20% (stratified on DepDelay)
  • calculate distance matrix
  • Only the 20 most often used features in the first splits
  • Only 50 %
  • Only numeric columns
  • Target column as last columns
  • Target columns as last column
  • Define numbers of columns Default = 20
  • From sci-kit libary
  • Transform the testing set
  • Transform the training set
  • ascending
  • DepDelay =delay
  • DepDelay = no delay
  • 50% with stratified sampling
  • delay vs. no delay
  • k-means with N clusters
  • by correlation descending
  • abs(skewness)
  • by skewness increasing
  • if column has % missing values > 95% => true
  • if column has std dev < 0.1 => true
  • if column has skewness < 0.001 => true
  • if column pair has correlation > 0.95 => true
  • empty option to start
  • Calculate 0.25 and 0.75 quantil
  • Split upper and lower value of the intervals
  • Rename
  • Group by the binned intervals
  • Remove 0 quantil
  • Sort ascending
  • Remove brackets
  • Change quantils from string to double
  • Calculate upper whisker
  • Calculate lower whisker
  • Convert TMIN into a string
  • Filter only TMIN
  • Join the upper and lower whisker
  • Join the filtered tables
  • Delete all rows with outliers
  • Delete row if DepTime > 2400 or DepTime < 0
  • Convert the upper and lower whisker into a flowvariable
  • Avg delay by TailNum
  • Only hour ArrTime
  • Only hour DepTime
  • Day segments DepTime
  • Day segments ArrTime
  • Convert all String values in columns into numbers
  • exclude tailnum
  • Handle all others missing values through fixed values Other missing value strategies are available.
  • remove rows with missing values in DepDelay
  • In general we would use a Partitioning node to create a training set and a test set
  • Split between 2007 and 2008
  • Read sample of the fully joined dataset
  • Write the best model

Nodes

Extensions

Links