• No results found

Microsoft Azure Machine learning Algorithms

N/A
N/A
Protected

Academic year: 2021

Share "Microsoft Azure Machine learning Algorithms"

Copied!
50
0
0

Loading.... (view fulltext now)

Full text

(1)

Microsoft Azure Machine learning Algorithms

Tomaž KAŠTRUN

@tomaz_tsql

[email protected]

http://tomaztsql.wordpress.com

(2)

#sqlsatVienna

#sqlsat494

1. April, 2016

Our Sponsors

(3)

Speaker info

https://tomaztsql.wordpress.com

(4)

#sqlsatVienna

#sqlsat494

1. April, 2016

Agenda

 Focus on explanation of algorithms available for predictive analytics in Azure Machine Learning service.

 Algorithms

 1) regression algorithms,

 2) Two-Class classifications,

 3) Multi-class classification,

 4) Clustering

- Explore algorithm

- which algorithm is used and useful for what kind of empirical problem

- which is suitable for particular data-set.

(5)

Before start... Why this session?!

(6)

#sqlsatVienna

#sqlsat494

1. April, 2016

First things first

(7)

First things „something“

By Type

Categorical Numerical

Nominal Ordinal Interval Ratio

gender (male/ Female), eye colour (blue, green, black,...),

marital status (S, M, D,V,...),

Buyer | Nonbuyer (0 | 1) No inherited order; all values are the „same“

and all values equal in representation

education (primary, secondary, high school,...),

Salary (<101€,101- 200€, 201-300€,..) Ordering can be applied; values can be compared with =,>,<

and recoded with numbers / classes.

Height (173cm, 196cm), Invoice Value (24.4€, 42.6€,..)

Ordering can be applied; values can be compared with =,>,<

and expressed 2 is 2x times bigger..

Temperature: Celsius vs. Fahrenheit

(8)

#sqlsatVienna

#sqlsat494

1. April, 2016

For warmup...regression

(9)

First things second

(10)

#sqlsatVienna

#sqlsat494

1. April, 2016

Sample Data

(11)

1 General (interferance) statistics

Source: https://msdn.microsoft.com/en-us/library/azure/dn905867.aspx

Apply Math Operation -> Applies a mathematical operation to column values Compute Elementary Statistics -> Calculates specified summary statistics for selected dataset columns

Compute Linear Correlation -> Calculates the linear correlation between column values in a dataset

Descriptive Statistics -> Generates a basic descriptive statistics report for the columns in a dataset

Evaluate Probability Function -> Fits a specified probability distribution function to a dataset

Replace Discrete Values -> Replaces discrete values from one column with numeric values based on another column

Test Hypothesis Using t-Test -> Compares means from two datasets using a t-test

(12)

#sqlsatVienna

#sqlsat494

1. April, 2016

1 General Statistics

(13)

1 Spliting data

it depends on the size of our dataset.

If it is large enough, 66% split is a good choice (66% for training and the others for test).

if it is a moderated dataset, 10-fold cross validation (or leave-one-out) can be a good choice.

if your dataset is small then Bootstraping is good.

Splitting Mode:

- Split rows

- Recommender split

- Regular / Relative expression Random seed

Stratified split

Jackknife, cross validation, n-fold cross validation, ....

(14)

#sqlsatVienna

#sqlsat494

1. April, 2016

1 Spliting data

(15)

1 Initializing Model

(16)

#sqlsatVienna

#sqlsat494

1. April, 2016

1 Initializing Model

(17)

1 Initializing Model

Making list of algorithms more transparent

(18)

#sqlsatVienna

#sqlsat494

1. April, 2016

Algorithms in Theory

Regression

Linear and Logistic

Azure ML: Linear Regression Azure ML: Two-class Classification Logistic Regression

Multiclass classification Logistic Regression

(19)

Algorithms in Theory

Decision Tree, Decision Forests, Decision Jungles

Decision Forest

Decision tree Decision Jungle

Azure ML: Regression boosted decision tree Two-class classification boosted decision tree

Azure ML: Regression decision forrest Two-class classification decision forrest

Multi classification decision forrest Azure ML: Multi-class decision jungle Two-class classification decision jungle

(20)

#sqlsatVienna

#sqlsat494

1. April, 2016

Algorithms in Theory

Naive Bayes

Azure ML: Regression Bayes linear

Two Class classificationBayes‘ point machine

(21)

Algorithms in Theory

Neural networks and perceptrons

Azure ML: Regression Neural networks Two Class classification Neural networks Multi Class classification Neural networks Two Class Classification averaged perceptrons

(22)

#sqlsatVienna

#sqlsat494

1. April, 2016

Algorithms in Theory

SVM

Azure ML: Two Class classification SVM Two Class classification locally deep SVM Anomaly detection SVM

(23)

1 Regression Algorithms

(24)

#sqlsatVienna

#sqlsat494

1. April, 2016

1 Regression Algorithms Parameters

(25)

1 Regression Algorithms

(26)

#sqlsatVienna

#sqlsat494

1. April, 2016

Evaluating Regression Algorithms

http://mund-consulting.com/Blog/understanding-evaluate-model-in-microsoft-azure-machine-learning/

Metrics to measure how close predictions are to eventual outcomes

Summarization of regression model how well fits a statistical model; R^2 = 1 model is

perfect, respectively

Metrics of differences

between predicted values

and actual values.

(27)

Evaluating Regression Algorithms

http://mund-consulting.com/Blog/understanding-evaluate-model-in-microsoft-azure-machine-learning/

Predicting Salary

(28)

#sqlsatVienna

#sqlsat494

1. April, 2016

Comparison of Regression Algorithms

Regression

Algorithm Accuracy Training

time Linearity Customization Predicting Variable

Type of independant

variable(s)

Data Quantity

linear Good Fast Excellent Good Interval Any small to big

Bayesian linear Good Fast Excellent Moderate Interval Any big

decision forest Excellent Moderate Good Good Interval Any

boosted decision tree Excellent Fast Good Good Interval Any big

fast forest quantile Excellent Moderate Moderate Excellent Distribution (Interval) Any

neural network Excellent Slow Moderate Excellent Interval Any smaller

Poisson Good Moderate

Excellent*

(log linear) Good Interval (counts) Any small to big

ordinal Good Moderate Excellent None Ordinal (order) Any small to big

Excellent Good Moderate Fast Moderate Slow

Scale:

(29)

2 Two-class Classification

(30)

#sqlsatVienna

#sqlsat494

1. April, 2016

2 Two-class Classification parameters

(31)

Regularization weight

(32)

#sqlsatVienna

#sqlsat494

1. April, 2016

2 Two-class Classification

(33)

2 Evaluating two-class Classification

AUC/ROC:

<= 0.5 -- 

0.5 – 0.6 --  0.6 – 0.7 --  0.7 – 0.8 --  0.8 – 0.9 -- 

0.9 – 1 -- WTF?

(34)

#sqlsatVienna

#sqlsat494

1. April, 2016

2 Evaluating two-class Classification

(35)

Comparison of Two-class Classification Algorithms

Excellent Good Moderate Fast Moderate Slow

Scale:

Two-class classification Accuracy Training

time Linearity Customization Predicting Variable

Type of independant

variable(s)

Data Quantity

logistic regression Good Fast Excellent Good dichotomous / binary Any small-big

decision forest Excellent Moderate Good Good dichotomous / binary Any small-big

decision jungle Excellent Moderate Good Good dichotomous / binary Any big

boosted decision tree Excellent Moderate Good Good dichotomous / binary Any big

neural network Excellent Slow Moderate Excellent dichotomous / binary Any

averaged perceptron Good Moderate Excellent Moderate dichotomous / binary Any

support vector machine Excellent Moderate Excellent Good dichotomous / binary Any big

locally deep support vector machine Good Slow Good Excellent dichotomous / binary Any big Bayes’ point machine Moderate Moderate Excellent Moderate dichotomous / binary Any

(36)

#sqlsatVienna

#sqlsat494

1. April, 2016

3 Multi-class Classification

(37)

3 Multi-class Classification parameters

(38)

#sqlsatVienna

#sqlsat494

1. April, 2016

3 Multi-class Classification

(39)

3 Evaluating multi-class Classification

(40)

#sqlsatVienna

#sqlsat494

1. April, 2016

3 Evaluating multi-class Classification

(41)

3 Comparison of Multi-class Classification

Multi-class

classification Accuracy Training

time Linearity Customization Predicting Variable

Type of independant

variable(s)

Data Quantity

logistic regression Good Fast Excellent Good Nominal / ordinal (with 2+ classes) any small-big decision forest Excellent Moderate Good Good Nominal / ordinal (with 2+ classes) any big decision jungle Excellent Moderate Good Good Nominal / ordinal (with 2+ classes) any big neural network Excellent Slow Moderate Excellent Nominal / ordinal (with 2+ classes) any small

Excellent Good Moderate Fast Moderate Slow

Scale:

(42)

#sqlsatVienna

#sqlsat494

1. April, 2016

4 Using Sweeping and SMOTE

(43)

4 Using Sweeping and SMOTE

(44)

#sqlsatVienna

#sqlsat494

1. April, 2016

5 Clustering

(45)

5 Clustering

(46)

#sqlsatVienna

#sqlsat494

1. April, 2016

5 Clustering

(47)

5 Evaluating Clustering

(48)

#sqlsatVienna

#sqlsat494

1. April, 2016

Key takeaways

https://azure.microsoft.com/en-us/documentation/articles/machine- learning-algorithm-cheat-sheet/

https://msdn.microsoft.com/en-

us/library/azure/dn906033.aspx

(49)

How did you like it?

Please give feedback to the event:

http://www.sqlsaturday.com/494/eventeval.aspx to me as a speaker:

http://www.sqlsaturday.com/494/sessions/

sessionevaluation.aspx

(50)

#sqlsatVienna

#sqlsat494

1. April, 2016

THANKS!

References

Related documents

Excellent Very good Good Fair Never Used What best describes your skill level operating a small tractor.. Excellent Very good Good Fair

The four soybean genomic regions studied in this paper, the UBP12 regions and the galactinol synthase regions, represent retrotransposon rich (gene poor) and retrotransposon

MAIN BODY OF CHURCH Poor Good Excellent SHRINE Poor Good Excellent FOYERS Poor Good Excellent BATHROOMS Poor Good Excellent COMMENTS: FLOORS Poor Good Excellent PEWS Poor

.Integer Linear Programming model for optimal shift scheduling with multiple shifts and break windows is used to determine the optimal number of employees needed in

But the equilibrium on the derivative market is also influenced by the price of the foreign exchange and the equilibrium exchange rate depends on the FX option order flows

Use a color printer or red paper to print the Canadian WHIMS label (shown above) and attach printed label to R1234yf contaminated recovery cylinder with clear packing tape.

Binary Categorical &amp; continuous Binary logistic Regression Nominal with &gt;2 categories Categorical &amp; continuous Multinomial logistic regression Ordinal Categorical

Atmos receiver is good a home receivers are integra home theater receivers reviews of inputs are right fit their cost.. Might prefer to integra receivers when it is good portion