# Decision Tree vs Linear

Linear (Linear Regression for regression tasks, and Logistic Regression for classification tasks) is a linear approach of modelling relationship between target valiable and explanatory variables.

RandomForestClassifier Documentation

RandomForestRegressor Documentation

Scikit-Learn GitHub

Scikit-Learn Website

Decision Tree is a supervised algorithm used in machine learning. It is using a binary tree graph (each node has two children) to assign for each data sample a target value. The target values are presented in the tree leaves. To reach the leaf, the sample is propagated through nodes, starting at the root node. In each node a decision is made, to which descendant node it should go. A decision is made based on the selected sample’s feature. It is usually one feature used to make the decision (one feature is used in the node to make a decision). Decision tree learning is a process of finding the optimal rules in each internal tree node according to the selected metric.

### References

L. Breiman, J. Friedman, R. Olshen, and C. Stone, Classification and Regression Trees, 1984

T. Hastie, R. Tibshirani and J. Friedman., Elements of Statistical Learning, Springer, 2009.

DecisionTreeClassifier Documentation

DecisionTreeRegressor Documentation

Scikit-Learn GitHub

Scikit-Learn Website

« Back to Machine Learning Algorithms Comparison

Algorithms were compared on OpenML datasets. There were 19 datasets with binary-classification, 7 datasets with multi-class classification, and 16 datasets with regression tasks. Algorithms were trained with AutoML mljar-supervised. They were trained with advanced feature engineering switched off, without ensembling. All models were trained with the 5-fold cross validation with shuffle and stratification (for classification tasks).
Different hyperparameters for each algorithm were checked during the training.

For binary classification the Area Under ROC Curve (AUC) metric was used.
For multi-class classification the LogLoss metric was used.
The regression task was optimized with Root Mean Square Error (RMSE).

Algorithms were scored on each dataset and compared. The better performing algorithm have 1 point for each dataset. The more points assigned for the algorithm the better.

## Regression

« Back to Machine Learning Algorithms Comparison

## Binary classification

### apsfailure dataset

Metric: Area Under ROC Curve (AUC)

Decision Tree 0.9835 - vs - 0.9839 Linear

This is an APS Failure at Scania Trucks. The dataset consists of data collected from heavy Scania trucks in everyday usage. The system in focus is the Air Pressure system (APS), which generates pressurized air utilized in various functions in a truck, ...

Category: Manufacturing

# Rows: 76,000 # Columns: 170

Metric: Area Under ROC Curve (AUC)

Decision Tree 0.8555 - vs - 0.9483 Linear

This dataset represents a set of possible advertisements on Internet pages. The features encode the image's geometry (if available) as well as phrases occurring in the URL, the image's URL and alt text, the anchor text, and words occurring near the anchor ...

Category: Marketing

# Rows: 3,279 # Columns: 1,558

### kddcup09_churn dataset

Metric: Area Under ROC Curve (AUC)

Decision Tree 0.6859 - vs - 0.6681 Linear

This is a KDDCup09_churn database. The KDD Cup 2009 offers the opportunity to work on large marketing databases from the French Telecom company Orange to predict customers' propensity to switch providers (churn). Churn is one of two primary factors that ...

Category: Marketing

# Rows: 50,000 # Columns: 230

### kddcup09_upselling dataset

Metric: Area Under ROC Curve (AUC)

Decision Tree 0.8546 - vs - 0.7979 Linear

This is a KDDCup09_upselling database. Customer Relationship Management (CRM) is a key element of modern marketing strategies. The KDD Cup 2009 offers the opportunity to work on large marketing databases from the French Telecom company Orange to predict ...

Category: Marketing

# Rows: 50,000 # Columns: 230

Metric: Area Under ROC Curve (AUC)

Decision Tree 0.8671 - vs - 0.8499 Linear

This is an Adult database. The prediction task is to determine whether a person makes over 50K a year. Data extraction was done by Barry Becker from the 1994 Census database. Variables are all self-explanatory except __fnlwgt__. This is a proxy for the ...

Category: People

# Rows: 48,842 # Columns: 14

### amazon_employee_access dataset

Metric: Area Under ROC Curve (AUC)

Decision Tree 0.6833 - vs - 0.5837 Linear

This is an Amazon_employee_access database. The data consists of real historical data collected from 2010 & 2011. Employees are manually allowed or denied access to resources over time. The data is used to create an algorithm capable of learning from ...

Category: Technology

# Rows: 32,769 # Columns: 9

### bank-marketing dataset

Metric: Area Under ROC Curve (AUC)

Decision Tree 0.878 - vs - 0.8757 Linear

The Bank Marketing Dataset. The data is related to direct marketing campaigns of a Portuguese banking institution. The marketing campaigns were based on phone calls. More than one contact to the same client was often required to access if the product ...

Category: Marketing

# Rows: 45,211 # Columns: 16

### banknote-authentication dataset

Metric: Area Under ROC Curve (AUC)

Decision Tree 0.9913 - vs - 1.0 Linear

This is a banknote-authentication. Dataset about distinguishing genuine and forged banknotes. Data were extracted from images that were taken from genuine and forged banknote-like specimens. For digitization, an industrial camera usually used for print ...

Category: Fintech

# Rows: 1,372 # Columns: 4

### bioresponse dataset

Metric: Area Under ROC Curve (AUC)

Decision Tree 0.8149 - vs - 0.8196 Linear

This is a Bioresponse database. Predict a biological response of molecules from their chemical properties. The first column contains experimental data describing an actual biological response; the molecule was seen to elicit this response (1) or not (0). ...

Category: Technology

# Rows: 3,751 # Columns: 1,776

### churn dataset

Metric: Area Under ROC Curve (AUC)

Decision Tree 0.8471 - vs - 0.8091 Linear

This is a churn dataset. A dataset relating characteristics of telephony account features and usage and whether or not the customer churned.

Category: Marketing

# Rows: 5,000 # Columns: 20

### click_prediction_small dataset

Metric: Area Under ROC Curve (AUC)

Decision Tree 0.661 - vs - 0.6275 Linear

This is a Click_prediction_small database. This data is derived from the 2012 KDD Cup. The data is about advertisements shown alongside search results in a search engine and whether or not people clicked on these ads. A search session contains information ...

Category: Marketing

# Rows: 39,948 # Columns: 11

### credit-approval dataset

Metric: Area Under ROC Curve (AUC)

Decision Tree 0.9192 - vs - 0.9564 Linear

This is a credit-approval dataset. This file concerns credit card applications. All attribute names and values have been changed to meaningless symbols to protect the confidentiality of the data.

Category: Banking

# Rows: 690 # Columns: 15

### credit-g dataset

Metric: Area Under ROC Curve (AUC)

Decision Tree 0.741 - vs - 0.7881 Linear

This is a German Credit dataset. It classifies people described by a set of attributes as good or bad credit risks. This dataset contains such information as a type of job, age, credit history.

Category: Banking

# Rows: 1,000 # Columns: 20

### diabetes dataset

Metric: Area Under ROC Curve (AUC)

Decision Tree 0.8744 - vs - 0.9148 Linear

This is a Pima Indians Diabetes Database. According to World Health Organization criteria, the diagnostic, binary-valued variable investigated is whether the patient shows signs of diabetes.

Category: Healthcare

# Rows: 768 # Columns: 8

### electricity dataset

Metric: Area Under ROC Curve (AUC)

Decision Tree 0.8358 - vs - 0.814 Linear

This is an Electricity dataset. This data was collected from the Australian New South Wales Electricity Market. In this market, prices are not fixed and are affected by the market's demand and supply. They are set every five minutes. Electricity transfers ...

Category: Energy

# Rows: 45,312 # Columns: 8

### higgs dataset

Metric: Area Under ROC Curve (AUC)

Decision Tree 0.7176 - vs - 0.6774 Linear

This is a Higgs database. Higgs Boson detection data. The data has been produced using Monte Carlo simulations.

Category: Science

# Rows: 98,050 # Columns: 28

### phishingwebsites dataset

Metric: Area Under ROC Curve (AUC)

Decision Tree 0.9684 - vs - 0.98 Linear

This is the Phishing Websites Data. There's plenty of articles about predicting phishing websites have been disseminated these days; no reliable training dataset has been published publically, maybe because there is no agreement in the literature on the ...

Category: Web

# Rows: 11,055 # Columns: 30

### spambase dataset

Metric: Area Under ROC Curve (AUC)

Decision Tree 0.9206 - vs - 0.9711 Linear

This is a SPAM E-mail Database. This collection of spam e-mails came from postmasters and individuals who had filed spam. Collection of non-spam e-mails came from filed work and personal e-mails, and hence the word 'george' and the area code '650' are ...

Category: Technology

# Rows: 4,601 # Columns: 57

### wdbc dataset

Metric: Area Under ROC Curve (AUC)

Decision Tree 0.996 - vs - 0.9987 Linear

This is a WDBC dataset (Wisconsin Diagnostic Brest Cancer). Features are computed from a digitized image of a fine needle aspirate (FNA) of a breast mass. They describe the characteristics of the cell nuclei present in the image.

Category: Healthcare

# Rows: 569 # Columns: 30

## Multiclass classification

### amazon-commerce-reviews dataset

Metric: Cross-Entropy Loss (LOGLOSS)

Decision Tree 4.0668 - vs - 1.0628 Linear

This is an amazon-commerce-reviews. Datasets are derived from the customer's reviews on Amazon Commerce Website for authorship identification. Most previous studies conducted identification experiments for two to ten authors. But in the online context, ...

Category: Marketing

# Rows: 1,500 # Columns: 10,000

### car dataset

Metric: Cross-Entropy Loss (LOGLOSS)

Decision Tree 0.3554 - vs - 0.6823 Linear

The Car Evaluation Database contains examples with the structural information removed, i.e., directly relates CAR to the six input attributes: buying, maint, doors, persons, lug_boot, safety. Because of known underlying concept structure, this database ...

Category: Automotive

# Rows: 1,728 # Columns: 6

### cnae-9 dataset

Metric: Cross-Entropy Loss (LOGLOSS)

Decision Tree 1.2741 - vs - 0.2697 Linear

This is a cnae-9 database. It is a data set containing 1080 documents of free text business descriptions of Brazilian companies categorized into a subset of 9 categories. The original texts were preprocessed to obtain the current data set: initially, ...

# Rows: 1,080 # Columns: 856

### connect-4 dataset

Metric: Cross-Entropy Loss (LOGLOSS)

Decision Tree 0.7842 - vs - 0.8163 Linear

This database contains all legal 8-ply positions in the game of connect-4 in which neither player has won yet, and in which the next move is not forced. Attributes represent board positions on a 6x6 board. The outcome class is the game-theoretical value ...

Category: Gaming

# Rows: 67,557 # Columns: 42

### mfeat-factors dataset

Metric: Cross-Entropy Loss (LOGLOSS)

Decision Tree 0.5415 - vs - 0.0762 Linear

One of a set of 6 datasets describing features of handwritten numerals (0 - 9) extracted from a collection of Dutch utility maps. Corresponding patterns in different datasets correspond to the same original character. 200 instances per class (for a total ...

Category: Technology

# Rows: 2,000 # Columns: 216

### segment dataset

Metric: Cross-Entropy Loss (LOGLOSS)

Decision Tree 0.199 - vs - 0.1926 Linear

The instances were drawn randomly from a database of 7 outdoor images. The images were hand-segmented to create a classification for every pixel. Each instance is a 3x3 region.

Category: Technology

# Rows: 2,310 # Columns: 19

### vehicle dataset

Metric: Cross-Entropy Loss (LOGLOSS)

Decision Tree 0.6446 - vs - 0.4218 Linear

The vehicle silhouettes - purpose to classify a given silhouette as one of four types of vehicle, using a set of features extracted from the silhouette. The vehicle may be viewed from one of many different angles.

Category: Automotive

# Rows: 846 # Columns: 18

## Regression

### airlines_depdelay_1m dataset

Metric: Root Mean Square Error (RMSE)

Decision Tree 27.5888 - vs - 27.6739 Linear

This is an Airlines Departure Delay Prediction. This is a processed version of the original data, designed to predict departure delay.

Category: Technology

# Rows: 1,000,000 # Columns: 9

### allstate_claims_severity dataset

Metric: Root Mean Square Error (RMSE)

Decision Tree 2,274.17 - vs - 2,231.87 Linear

This is an Allstate Claims severity database. This dataset contains insurance claims. Allstate is developing automated methods of predicting the cost, and hence severity, of claims. This dataset was shared on Kaggle to find insight into better ways to ...

Category: Insurance

# Rows: 188,318 # Columns: 131

Metric: Root Mean Square Error (RMSE)

Decision Tree 219.719 - vs - 210.509 Linear

This is a Buzz in the Social Media Twitter database. This data-set contains examples of buzz events from two different social networks: Twitter, and Tom's Hardware, a forum network focusing on new technology with more conservative dynamics.

Category: Social Media

# Rows: 583,250 # Columns: 77

### moneyball dataset

Metric: Root Mean Square Error (RMSE)

Decision Tree 27.9045 - vs - 20.3286 Linear

This is the Moneyball database. This dataset contains some of the information that was available to Billy Beane and Paul DePodesta, who worked for the Oakland Athletics in the early 2000s and changed the game of baseball. It can be used to understand ...

Category: Sport

# Rows: 1,232 # Columns: 14

### onlinenewspopularity dataset

Metric: Root Mean Square Error (RMSE)

Decision Tree 15,453.7 - vs - 15,452.5 Linear

This is an Online News Popularity database. This dataset summarizes a heterogeneous set of features about Mashable articles in a period of two years. The goal is to predict the number of shares in social networks (popularity).

Category: Marketing

# Rows: 39,644 # Columns: 60

### santander_transaction_value dataset

Metric: Root Mean Square Error (RMSE)

Decision Tree 7,938,000.0 - vs - 4.4793e+19 Linear

This is a Santander Transaction Value database. It provides an anonymized dataset containing numeric feature variables, the numeric target column, and a string ID column. The Santander Group supplied this database on Kaggle to find a way to identify the ...

Category: Technology

# Rows: 4,459 # Columns: 4,992

### abalone dataset

Metric: Root Mean Square Error (RMSE)

Decision Tree 2.4048 - vs - 2.435 Linear

This is Abalone data. Predicting the age of abalone from physical measurements. The age of abalone is determined by cutting the shell through the cone, staining it, and counting the number of rings through a microscope. There are other, easier to obtain ...

Category: Animals

# Rows: 4,177 # Columns: 8

### black_friday dataset

Metric: Root Mean Square Error (RMSE)

Decision Tree 3,793.48 - vs - 4,593.69 Linear

This is a Black Friday database. It contains customer purchases on Black Friday and information as age, gender, marital status of consumers.

Category: Retail

# Rows: 166,821 # Columns: 9

### boston dataset

Metric: Root Mean Square Error (RMSE)

Decision Tree 2.6748 - vs - 4.6995 Linear

This is the Boston house-price data database. It contains such information as per capita crime rate by town, the proportion of non-retail business acres per town, the average number of rooms per dwelling.

Category: Real Estate

# Rows: 506 # Columns: 13

### colleges dataset

Metric: Root Mean Square Error (RMSE)

Decision Tree 0.1715 - vs - 0.1684 Linear

This is the Colleges database. Regroups information for about 7800 different US colleges. Including geographical information, stats about the population attending, and post-graduation career earnings.

Category: People

# Rows: 7,063 # Columns: 47

### diamonds dataset

Metric: Root Mean Square Error (RMSE)

Decision Tree 1,186.16 - vs - 1,359.0 Linear

This is a Diamonds database. This classic dataset contains the prices and other attributes of almost 54,000 diamonds.

Category: Technology

# Rows: 53,940 # Columns: 9

### house_sales dataset

Metric: Root Mean Square Error (RMSE)

Decision Tree 173,312.0 - vs - 185,723.0 Linear

This is a house_sales database. This dataset contains house sale prices for King County, which includes Seattle. It includes homes sold between May 2014 and May 2015. It contains 19 house features plus the price and the id columns, along with 21613 observations. ...

# Rows: 21,613 # Columns: 22

### nyc-taxi-green-dec-2016 dataset

Metric: Root Mean Square Error (RMSE)

Decision Tree 1.9423 - vs - 1.9798 Linear

This is a Trip Record Data database. It is provided by the New York City Taxi and Limousine Commission (TLC). The dataset included TLC trips of the green line in December 2016.

Category: Automotive

# Rows: 581,835 # Columns: 18

### space_ga dataset

Metric: Root Mean Square Error (RMSE)

Decision Tree 0.1279 - vs - 0.1184 Linear

This is an Election database. It contains 3,107 observations on county votes cast in the 1980 U.S. presidential election. Specifically, it contains the total number of votes cast in the 1980 presidential election per county (VOTES), the population in ...

Category: Public Sector

# Rows: 3,107 # Columns: 6

### us_crime dataset

Metric: Root Mean Square Error (RMSE)

Decision Tree 0.1531 - vs - 0.1411 Linear

This is a Communities and Crime database. Communities within the United States. The data combines socio-economic data from the 1990 US Census, law enforcement data from the 1990 US LEMAS survey, and crime data from the 1995 FBI UCR.

Category: People

# Rows: 1,994 # Columns: 127

### wine_quality dataset

Metric: Root Mean Square Error (RMSE)

Decision Tree 0.7234 - vs - 0.712 Linear

This is a Wine Quality database. Datasets are related to red and white. This is a Wine Quality database. Datasets are related to red and white variants of the Portuguese "Vinho Verde" wine. Due to privacy and logistic issues, only physicochemical (inputs) ...

Category: Retail

# Rows: 6,497 # Columns: 11