Download presentation
Presentation is loading. Please wait.
Published byToby Stephens Modified over 9 years ago
1
m Machine Learning F# and Accord.net
2
Alena Dzenisenka Software architect at Luxoft Poland Member of F# Software Foundation Board of Trustees Researcher in the field of mathematical theoretical possible in modern programming concepts Speaker and active software engineering community member @ lenadroid
3
Machine Learning
4
Why machine learning? What is the data? How? Questions
5
Data Questions.
6
Data reality :\
7
Path to grasping machine learning and data science…
8
Contents Multiple Linear Regression Logistic Regression Classification Neural Networks Classification K Means Clustering What’s next?
10
F# for machine learning and data science!
11
Linear Regression
12
MATH
13
How to predict? 1.Make a guess. 2.Measure how wrong the guess is. 3.Fix the error.
14
Make a guess!
15
Make a guess? What does it mean?... Hypothesis /guess : weights
16
Find out our mistake… Cost function/ Mistake function: … and minimize it:
17
Mistake function looks like… Global minimums
18
How to reduce the mistake? Update each slope parameter until Mistake Function minimum is reached: Simultaneously Alpha Learning rate Derivative Direction of moving
19
Fix the error
20
Multiple Linear Regression X [ ] – Predictors: Statistical data about bike rentals for previous years or months. Y – Output: Amount of bike rentals we should expect today or some other day in the future. * Y is not nominal, here it’s numerical continuous range.
21
Make a guess!
22
Fix the error
23
Multiple linear regression: Bike rentals demand “Talk is cheap. Show me the code.”
24
What to remember? 1.Simplest regression algorithm 2.Very fast, runs in constant time 3.Good at numerical data with lots of features 4. Output from numerical continuous range 5. Linear hypothesis 6. Uses gradient descent Linear Regression
25
Logistic Regression
26
Hypothesis function Estimated probability that Y = 1 on input X
27
Mistake function Mistake function is the cost for a single training data example h(x)
28
Full mistake function 1. Uses the principle of maximum likelihood estimation. 2. We minimize it same way as with Linear Regression
29
“Talk is cheap. Show me the code.” Logistic Regression Classification Example
30
What to remember? Classification algorithm Classification algorithm Output is the binary value, either 1 or 0 Output is the binary value, either 1 or 0 Relatively small number of predictors Relatively small number of predictors Uses logistics function for hypothesis Uses logistics function for hypothesis Has the cost function that is convex Has the cost function that is convex Uses gradient descent for correcting the mistake Uses gradient descent for correcting the mistake Logistic Regression
31
At this point…
32
Machine Learning What society thinks I do…What other programmers think I do…
33
What I really do is…
34
Neural Networks
35
Neuron
36
Neural Networks
37
Layer transitions! InputWeightsActivation function Activation unit (value which is computed and outputted by the node)
38
Activation function? Step activation function Used in binary classification Sigmoid activation function Uses logistic function to perform the activation
39
Forward propagation x x x x a a a a a a a X = X X = a 1 X = a 2 Hypothetic Outputs! Activation Computational Nodes! Predictors
40
Multi class? OR x x x a a a a a x x x a a a a a
41
Cost function? x x x Looks difficult? No, it’s really not so complicated… 1.Outputs the vector with size == number of output classes 2.Similar to Logistic Regression cost function 3.Finds the mistake of our hypothesis and real outputs
42
Minimize the error! x x x x Error value And then… recalculate weights!
43
“Talk is cheap. Show me the code.” Neural Networks Classification Example.
44
What to remember? Extremely powerful Extremely powerful Slow learning / Fast prediction Slow learning / Fast prediction Big number of predictors Big number of predictors Complex hierarchical relationships Complex hierarchical relationships No need to understand the data No need to understand the data Wide applications Wide applications Neural Networks
45
K-Means
46
Clustering
47
Birth-death percentage rates
48
… with clustering K = 2
49
… with clustering K = 3
50
… with clustering K = 4
51
What’s next?
53
I’m Lena @lenadroid
54
Thank you!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.