SlideShare a Scribd company logo
Machine learning with R
AMIS Day April 3rd 2017
Maarten Smeets
MACHINE LEARNING WITH R
WHAT IS MACHINE LEARNING USE CASES FOR MACHINE
LEARNING
SUPERVISED LEARNING
UNSUPERVISED LEARNING INTRODUCING R
COOL FEATURES OF R R AND ORACLE
MACHINE LEARNING
• Machine learning is the subfield of computer science that gives
computers the ability to learn without being explicitly programmed.
MACHINE LEARNING
USE CASES
• E-mail categorization
Spam, News, Personal, Orders, …
• Anomaly detection
Fraud detection, behavior which does not fit known classifications well
• Optical Character recognition (OCR)
• Genetics
Will you have a high change of relapse when you have this cancer type
and these genes?
MACHINE LEARNING
USE CASES
• Log file analysis
Which entries are rare?
Which are the variables in a log line?
Intruder detection
• IoT
Self learning thermostats
• Predict weather
Based on environmental measures like
humidity, air pressure, satellite images
• Detect trends
The number of cases present in the
KEI system at Spir-it and performance
• Image recognition
Self driving cars like Tesla, BMW
• Predict stock prices
Find correlations between stocks and try to
find features which can predict future prices
1 2
WHAT IS MACHINE LEARNING
Supervised learning Unsupervised learning
SUPERVISED LEARNING
• The computer is presented with input and desired output
• The goal is to derive a general ruleset to map input to output
• This ruleset can be used to do predictions of output based on input
SUPERVISED LEARNING
EXAMPLES
• Linear regression
• Support Vector Regression
• Random forest
• Artificial Neural Networks (ANN)
SUPERVISED LEARNING
LINEAR REGRESSION
Data
Statistics
Plot
SUPERVISED LEARNING
SUPPORT VECTOR REGRESSION
SUPERVISED LEARNING
SUPPORT VECTOR REGRESSION
http://www.svm-tutorial.com/2014/10/support-vector-regression-r/
Prediction with tuned model
SUPERVISED LEARNING
RANDOM FOREST
SUPERVISED LEARNING
RANDOM FOREST
• Features are used to classify data
• A set of decision trees are generated based on 2 sets of random features
• Every tree sees a subset of the data
• Splits in the tree are determined by training data values
where does a split add most information
• To do predictions, features are put through all decision trees
and the result classifications are given a weight
SUPERVISED LEARNING
RANDOM FOREST
SUPERVISED LEARNING
RANDOM FOREST
SUPERVISED LEARNING
RANDOM FOREST
Variable importance plot
Mainly Y was used in the decision trees
to determine the outcome
i (a counter) was not important
SUPERVISED LEARNING
RANDOM FOREST
• Why is it very useful?
• Data does not have many requirements
• Can deal with multiple dimensions
• Does good predictions in a lot of cases
• Fast
• Variable importance can easily be determined
If many features are correlated, a single representative feature can be used
Large black box
performing magic
SUPERVISED LEARNING
ARTIFICIAL NEURAL NETWORKS (ANN)
Input Output
SUPERVISED LEARNING
ARTIFICIAL NEURAL NETWORKS (ANN)
Input Output
Input
nodes
Output
nodes
Hidden
nodes
ARTIFICIAL NEURAL NETWORKS (ANN)
EXAMPLE BACKPROPAGATION
• Backpropagation
1. Nodes have connections and connections have a random assigned weight
2. Provide input and let the network generate output
3. Compare generated output with desired output
4. Go from output nodes back to input and adjust the weight of the node connections.
Adjusting a little bit at a time increases learning time and accuracy
5. Repeat from step 2 until desired error rate reached
• Can be done with weights or with node activation thresholds
ARTIFICIAL NEURAL NETWORKS (ANN)
SOME PERSONAL THOUGHTS (AS NEUROBIOLOGIST)
• Most samples of artificial neural networks do not take into account several
properties of biological neural networks
• Signals take time to go from A to B
• Neurons are not arranged in layers
Biological neural networks have a 3d structure with specialized area’s
• Once trained, most artificial neural networks are static and don’t learn anymore
• Biological neural networks implement a wide range of signaling mechanisms per node
(neurotransmitters)
• Learning algorithms are not only internal to the neural network.
Natural selection also plays a role
SUPERVISED LEARNING
CHALLENGES
• Requires learning set of inputs and desired outputs
• Training data should be balanced
• Correlated features cause biases
• Outputs should be distributed as evenly as possible
SUPERVISED LEARNING
AAAAAA A
B B
Training data
A
BBBBBB
Test data A
BAAAAAA
Input Output
Input Output
UNSUPERVISED LEARNING
• Unsupervised machine learning is the machine learning task of
inferring a function to describe hidden structure from "unlabeled"
data
a classification or categorization is not included in the observations
• Examples
• Clustering
• Anomaly detection
• Neural networks (Self Organizing Map)
HIERARCHICAL CLUSTERING
Every point starts a cluster
Clusters merge as
they go up the tree
HIERARCHICAL CLUSTERING
A: MEAN 2,2 STDEV 2 B: MEAN 6,6 STDEV 2
HIERARCHICAL CLUSTERING (HCL)
HIERARCHICAL CLUSTERING
A: MEAN 2,2 STDEV 2 B: MEAN 6,6 STDEV 2
Original Prediction
HIERARCHICAL CLUSTERING
A: MEAN 2,2 STDEV 1 B: MEAN 6,6 STDEV 1
Original Prediction
1 2 3
History Installation Basics
INTRODUCING R
R A SHORT HISTORY
• Conceived august 1993
An implementation of the S programming language
S was conceived in 1976
• Open sourced June 1995
• Main competitors: SPSS and SAS
• A lot of (mostly statistical) libraries available
CRAN package repository features 10366 available packages.
R INSTALLATION
• Download and install R
https://www.r-project.org/
R STUDIO INSTALLATION
• Download and install R Studio
https://www.rstudio.com/
R BASICS
• R is a functional programming (FP) language
• It provides many tools for the creation and manipulation of functions.
• You can do anything with functions that you can do with vectors: you
can assign them to variables, store them in lists, pass them as
arguments to other functions, create them inside functions, and even
return them as the result of a function.
R BASICS
SOME FEATURES
• GIT integration
• Interpreted; does not require compilation
Execute a line in your script and look at the result in the console
• Has its own markdown variant for documentation
Especially useful if you want to have graphs
• R Shiny allows you to generate and host scripts / graphs and make
them available from a browser
R BASICS
SOME FEATURES
• Code completion
• Allows multi threaded execution
• Can be run remotely on an R-server
• Great at reading / writing datasets
For example web site scraping for data
• Of course great at statistics
• Great at generating plots
Especially when using the ggplot2 library
R BASICS
SOME TIPS TO GET STARTED
• ?ggplot
• help(package=“ggplot2")
R DATATYPES
THE VECTOR
• Vector
a <- c(1,2,5.3,6,-2,4) # numeric vector
b <- c("one","two","three") # character vector
c <- c(TRUE,TRUE,TRUE,FALSE,TRUE,FALSE) #logical vector
a <- c(1,2,5.3,6,-2,4)
b <- a * 2
[1] 2.0 4.0 10.6 12.0 -4.0 8.0
R DATATYPES
THE MATRIX. ALL VALUES HAVE THE SAME TYPE AND LENGTH
# generates 5 x 4 numeric matrix
y<-matrix(1:20, nrow=5,ncol=4)
# another example
cells <- c(1,26,24,68)
rnames <- c("R1", "R2")
cnames <- c("C1", "C2")
mymatrix <- matrix(cells, nrow=2, ncol=2,
byrow=TRUE, dimnames=list(rnames, cnames))
# accessing matrix values
|x[,4] # 4th column of matrix
x[3,] # 3rd row of matrix
x[2:4,1:3] # rows 2,3,4 of columns 1,2,3
R DATATYPES
THE DATA.FRAME. LIKE A MATRIX BUT TYPES AND LENGTHS CAN VARY
d <- c(1,2,3,4)
e <- c("red", "white", "red", NA)
f <- c(TRUE,TRUE,TRUE,FALSE)
mydata <- data.frame(d,e,f)
names(mydata) <- c("ID","Color","Passed") # variable names
myframe[3:5] # columns 3,4,5 of data frame
myframe[c("ID","Age")] # columns ID and Age from data frame
myframe$X1 # variable x1 in the data frame
R DATATYPES
THE LIST
• An ordered collection of objects (components)
# example of a list with 4 components –
# a string, a numeric vector, a matrix, and a scaler
w <- list(name=“Maarten", mynumbers=a, mymatrix=y, age=36)
# example of a list containing two lists
v <- c(list1,list2)
1 2 3
Hosting plots
Shiny
Plot.ly
R markdown Web site crawling
COOL FEATURES OF R
COOL FEATURES OF R
SHINY
COOL FEATURES OF R
SHINY
UI Server
COOL FEATURES OF R
PLOT.LY INTERACTIVE GRAPHS
COOL FEATURES OF R
PLOT.LY INTERACTIVE GRAPHS
COOL FEATURES OF R
R MARKDOWN
COOL FEATURES OF R
R MARKDOWN
COOL FEATURES OF R
WEB SITE CRAWLING
COOL FEATURES OF R
WEB SITE CRAWLING
• Sector to Industry, Industry to Company
COOL FEATURES OF R
WEB SITE CRAWLING
COOL FEATURES OF R
WEB SITE CRAWLING
http://chart.finance.yahoo.com/table.csv?s=ABT.AX&a=1&b=28&c=2017&d=2&e=28&f=2017&g=d&ignore=.csv
1 2 3
What does
Oracle do with R
Using data from
an Oracle DB in R
Using functions from
R in the Oracle DB
ORACLE AND R
ORACLE AND R
ORACLE R ENTERPRISE
USING DATABASE DATA IN R
ORACLE R ENTERPRISE
USING R SCRIPTS DIRECTLY IN SQL STATEMENTS
https://github.com/MaartenSmeets/R

More Related Content

What's hot

Ranking and Diversity in Recommendations - RecSys Stammtisch at SoundCloud, B...
Ranking and Diversity in Recommendations - RecSys Stammtisch at SoundCloud, B...Ranking and Diversity in Recommendations - RecSys Stammtisch at SoundCloud, B...
Ranking and Diversity in Recommendations - RecSys Stammtisch at SoundCloud, B...
Alexandros Karatzoglou
 
R- Introduction
R- IntroductionR- Introduction
R- Introduction
Venkata Reddy Konasani
 
A Primer on Entity Resolution
A Primer on Entity ResolutionA Primer on Entity Resolution
A Primer on Entity Resolution
Benjamin Bengfort
 
Feature engineering pipelines
Feature engineering pipelinesFeature engineering pipelines
Feature engineering pipelines
Ramesh Sampath
 
264finalppt (1)
264finalppt (1)264finalppt (1)
264finalppt (1)
Mahima Verma
 
A Workshop on R
A Workshop on RA Workshop on R
A Workshop on R
Ajay Ohri
 
Machine Learning - Dummy Variable Conversion
Machine Learning - Dummy Variable ConversionMachine Learning - Dummy Variable Conversion
Machine Learning - Dummy Variable Conversion
Andrew Ferlitsch
 
Language R
Language RLanguage R
Language R
Girish Khanzode
 
Machine Learning - Dataset Preparation
Machine Learning - Dataset PreparationMachine Learning - Dataset Preparation
Machine Learning - Dataset Preparation
Andrew Ferlitsch
 
geekgap.io webinar #1
geekgap.io webinar #1geekgap.io webinar #1
geekgap.io webinar #1
junior Teudjio
 
R language
R languageR language
R language
Isra El Isa
 
Boosted tree
Boosted treeBoosted tree
Boosted tree
Zhuyi Xue
 
11. Arrays
11. Arrays11. Arrays
11. Arrays
Nilesh Dalvi
 
Netflix's Recommendation ML Pipeline Using Apache Spark: Spark Summit East ta...
Netflix's Recommendation ML Pipeline Using Apache Spark: Spark Summit East ta...Netflix's Recommendation ML Pipeline Using Apache Spark: Spark Summit East ta...
Netflix's Recommendation ML Pipeline Using Apache Spark: Spark Summit East ta...
Spark Summit
 
Visual diagnostics for more effective machine learning
Visual diagnostics for more effective machine learningVisual diagnostics for more effective machine learning
Visual diagnostics for more effective machine learning
Benjamin Bengfort
 
Data Structure
Data StructureData Structure
Data Structure
sheraz1
 
Wrokflow programming and provenance query model
Wrokflow programming and provenance query model  Wrokflow programming and provenance query model
Wrokflow programming and provenance query model
Rayhan Ferdous
 
LSESU a Taste of R Language Workshop
LSESU a Taste of R Language WorkshopLSESU a Taste of R Language Workshop
LSESU a Taste of R Language Workshop
Korkrid Akepanidtaworn
 
ensembles_emptytemplate_v2
ensembles_emptytemplate_v2ensembles_emptytemplate_v2
ensembles_emptytemplate_v2
Shrayes Ramesh
 
Week 1 - Data Structures and Algorithms
Week 1 - Data Structures and AlgorithmsWeek 1 - Data Structures and Algorithms
Week 1 - Data Structures and Algorithms
Ferdin Joe John Joseph PhD
 

What's hot (20)

Ranking and Diversity in Recommendations - RecSys Stammtisch at SoundCloud, B...
Ranking and Diversity in Recommendations - RecSys Stammtisch at SoundCloud, B...Ranking and Diversity in Recommendations - RecSys Stammtisch at SoundCloud, B...
Ranking and Diversity in Recommendations - RecSys Stammtisch at SoundCloud, B...
 
R- Introduction
R- IntroductionR- Introduction
R- Introduction
 
A Primer on Entity Resolution
A Primer on Entity ResolutionA Primer on Entity Resolution
A Primer on Entity Resolution
 
Feature engineering pipelines
Feature engineering pipelinesFeature engineering pipelines
Feature engineering pipelines
 
264finalppt (1)
264finalppt (1)264finalppt (1)
264finalppt (1)
 
A Workshop on R
A Workshop on RA Workshop on R
A Workshop on R
 
Machine Learning - Dummy Variable Conversion
Machine Learning - Dummy Variable ConversionMachine Learning - Dummy Variable Conversion
Machine Learning - Dummy Variable Conversion
 
Language R
Language RLanguage R
Language R
 
Machine Learning - Dataset Preparation
Machine Learning - Dataset PreparationMachine Learning - Dataset Preparation
Machine Learning - Dataset Preparation
 
geekgap.io webinar #1
geekgap.io webinar #1geekgap.io webinar #1
geekgap.io webinar #1
 
R language
R languageR language
R language
 
Boosted tree
Boosted treeBoosted tree
Boosted tree
 
11. Arrays
11. Arrays11. Arrays
11. Arrays
 
Netflix's Recommendation ML Pipeline Using Apache Spark: Spark Summit East ta...
Netflix's Recommendation ML Pipeline Using Apache Spark: Spark Summit East ta...Netflix's Recommendation ML Pipeline Using Apache Spark: Spark Summit East ta...
Netflix's Recommendation ML Pipeline Using Apache Spark: Spark Summit East ta...
 
Visual diagnostics for more effective machine learning
Visual diagnostics for more effective machine learningVisual diagnostics for more effective machine learning
Visual diagnostics for more effective machine learning
 
Data Structure
Data StructureData Structure
Data Structure
 
Wrokflow programming and provenance query model
Wrokflow programming and provenance query model  Wrokflow programming and provenance query model
Wrokflow programming and provenance query model
 
LSESU a Taste of R Language Workshop
LSESU a Taste of R Language WorkshopLSESU a Taste of R Language Workshop
LSESU a Taste of R Language Workshop
 
ensembles_emptytemplate_v2
ensembles_emptytemplate_v2ensembles_emptytemplate_v2
ensembles_emptytemplate_v2
 
Week 1 - Data Structures and Algorithms
Week 1 - Data Structures and AlgorithmsWeek 1 - Data Structures and Algorithms
Week 1 - Data Structures and Algorithms
 

Similar to Machine learning with R

Machine learning for IoT - unpacking the blackbox
Machine learning for IoT - unpacking the blackboxMachine learning for IoT - unpacking the blackbox
Machine learning for IoT - unpacking the blackbox
Ivo Andreev
 
Prepare your data for machine learning
Prepare your data for machine learningPrepare your data for machine learning
Prepare your data for machine learning
Ivo Andreev
 
Towards a Comprehensive Machine Learning Benchmark
Towards a Comprehensive Machine Learning BenchmarkTowards a Comprehensive Machine Learning Benchmark
Towards a Comprehensive Machine Learning Benchmark
Turi, Inc.
 
Basic terminologies & asymptotic notations
Basic terminologies & asymptotic notationsBasic terminologies & asymptotic notations
Basic terminologies & asymptotic notations
Rajendran
 
Data structure and algorithm.
Data structure and algorithm. Data structure and algorithm.
Data structure and algorithm.
Abdul salam
 
rsec2a-2016-jheaton-morning
rsec2a-2016-jheaton-morningrsec2a-2016-jheaton-morning
rsec2a-2016-jheaton-morning
Jeff Heaton
 
Introduction of data science
Introduction of data scienceIntroduction of data science
Introduction of data science
TanujaSomvanshi1
 
An LSTM-Based Neural Network Architecture for Model Transformations
An LSTM-Based Neural Network Architecture for Model TransformationsAn LSTM-Based Neural Network Architecture for Model Transformations
An LSTM-Based Neural Network Architecture for Model Transformations
Jordi Cabot
 
U-SQL - Azure Data Lake Analytics for Developers
U-SQL - Azure Data Lake Analytics for DevelopersU-SQL - Azure Data Lake Analytics for Developers
U-SQL - Azure Data Lake Analytics for Developers
Michael Rys
 
L5. Data Transformation and Feature Engineering
L5. Data Transformation and Feature EngineeringL5. Data Transformation and Feature Engineering
L5. Data Transformation and Feature Engineering
Machine Learning Valencia
 
Machine learning and linear regression programming
Machine learning and linear regression programmingMachine learning and linear regression programming
Machine learning and linear regression programming
Soumya Mukherjee
 
The Power of Auto ML and How Does it Work
The Power of Auto ML and How Does it WorkThe Power of Auto ML and How Does it Work
The Power of Auto ML and How Does it Work
Ivo Andreev
 
The Machine Learning Workflow with Azure
The Machine Learning Workflow with AzureThe Machine Learning Workflow with Azure
The Machine Learning Workflow with Azure
Ivo Andreev
 
background.pptx
background.pptxbackground.pptx
background.pptx
KabileshCm
 
M. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEM
M. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEMM. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEM
M. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEM
Dr.Florence Dayana
 
Demystifying Machine Learning
Demystifying Machine LearningDemystifying Machine Learning
Demystifying Machine Learning
Ayodele Odubela
 
Machine Learning with Azure
Machine Learning with AzureMachine Learning with Azure
Machine Learning with Azure
Barbara Fusinska
 
b,Sc it data structure.pptx
b,Sc it data structure.pptxb,Sc it data structure.pptx
b,Sc it data structure.pptx
classall
 
Machine Learning with ML.NET and Azure - Andy Cross
Machine Learning with ML.NET and Azure - Andy CrossMachine Learning with ML.NET and Azure - Andy Cross
Machine Learning with ML.NET and Azure - Andy Cross
Andrew Flatters
 
data science with python_UNIT 2_full notes.pdf
data science with python_UNIT 2_full notes.pdfdata science with python_UNIT 2_full notes.pdf
data science with python_UNIT 2_full notes.pdf
mukeshgarg02
 

Similar to Machine learning with R (20)

Machine learning for IoT - unpacking the blackbox
Machine learning for IoT - unpacking the blackboxMachine learning for IoT - unpacking the blackbox
Machine learning for IoT - unpacking the blackbox
 
Prepare your data for machine learning
Prepare your data for machine learningPrepare your data for machine learning
Prepare your data for machine learning
 
Towards a Comprehensive Machine Learning Benchmark
Towards a Comprehensive Machine Learning BenchmarkTowards a Comprehensive Machine Learning Benchmark
Towards a Comprehensive Machine Learning Benchmark
 
Basic terminologies & asymptotic notations
Basic terminologies & asymptotic notationsBasic terminologies & asymptotic notations
Basic terminologies & asymptotic notations
 
Data structure and algorithm.
Data structure and algorithm. Data structure and algorithm.
Data structure and algorithm.
 
rsec2a-2016-jheaton-morning
rsec2a-2016-jheaton-morningrsec2a-2016-jheaton-morning
rsec2a-2016-jheaton-morning
 
Introduction of data science
Introduction of data scienceIntroduction of data science
Introduction of data science
 
An LSTM-Based Neural Network Architecture for Model Transformations
An LSTM-Based Neural Network Architecture for Model TransformationsAn LSTM-Based Neural Network Architecture for Model Transformations
An LSTM-Based Neural Network Architecture for Model Transformations
 
U-SQL - Azure Data Lake Analytics for Developers
U-SQL - Azure Data Lake Analytics for DevelopersU-SQL - Azure Data Lake Analytics for Developers
U-SQL - Azure Data Lake Analytics for Developers
 
L5. Data Transformation and Feature Engineering
L5. Data Transformation and Feature EngineeringL5. Data Transformation and Feature Engineering
L5. Data Transformation and Feature Engineering
 
Machine learning and linear regression programming
Machine learning and linear regression programmingMachine learning and linear regression programming
Machine learning and linear regression programming
 
The Power of Auto ML and How Does it Work
The Power of Auto ML and How Does it WorkThe Power of Auto ML and How Does it Work
The Power of Auto ML and How Does it Work
 
The Machine Learning Workflow with Azure
The Machine Learning Workflow with AzureThe Machine Learning Workflow with Azure
The Machine Learning Workflow with Azure
 
background.pptx
background.pptxbackground.pptx
background.pptx
 
M. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEM
M. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEMM. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEM
M. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEM
 
Demystifying Machine Learning
Demystifying Machine LearningDemystifying Machine Learning
Demystifying Machine Learning
 
Machine Learning with Azure
Machine Learning with AzureMachine Learning with Azure
Machine Learning with Azure
 
b,Sc it data structure.pptx
b,Sc it data structure.pptxb,Sc it data structure.pptx
b,Sc it data structure.pptx
 
Machine Learning with ML.NET and Azure - Andy Cross
Machine Learning with ML.NET and Azure - Andy CrossMachine Learning with ML.NET and Azure - Andy Cross
Machine Learning with ML.NET and Azure - Andy Cross
 
data science with python_UNIT 2_full notes.pdf
data science with python_UNIT 2_full notes.pdfdata science with python_UNIT 2_full notes.pdf
data science with python_UNIT 2_full notes.pdf
 

More from Maarten Smeets

Google jib: Building Java containers without Docker
Google jib: Building Java containers without DockerGoogle jib: Building Java containers without Docker
Google jib: Building Java containers without Docker
Maarten Smeets
 
Introduction to Anchore Engine
Introduction to Anchore EngineIntroduction to Anchore Engine
Introduction to Anchore Engine
Maarten Smeets
 
R2DBC Reactive Relational Database Connectivity
R2DBC Reactive Relational Database ConnectivityR2DBC Reactive Relational Database Connectivity
R2DBC Reactive Relational Database Connectivity
Maarten Smeets
 
Performance Issue? Machine Learning to the rescue!
Performance Issue? Machine Learning to the rescue!Performance Issue? Machine Learning to the rescue!
Performance Issue? Machine Learning to the rescue!
Maarten Smeets
 
Performance of Microservice Frameworks on different JVMs
Performance of Microservice Frameworks on different JVMsPerformance of Microservice Frameworks on different JVMs
Performance of Microservice Frameworks on different JVMs
Maarten Smeets
 
Performance of Microservice frameworks on different JVMs
Performance of Microservice frameworks on different JVMsPerformance of Microservice frameworks on different JVMs
Performance of Microservice frameworks on different JVMs
Maarten Smeets
 
VirtualBox networking explained
VirtualBox networking explainedVirtualBox networking explained
VirtualBox networking explained
Maarten Smeets
 
Microservices on Application Container Cloud Service
Microservices on Application Container Cloud ServiceMicroservices on Application Container Cloud Service
Microservices on Application Container Cloud Service
Maarten Smeets
 
WebLogic Stability; Detect and Analyse Stuck Threads
WebLogic Stability; Detect and Analyse Stuck ThreadsWebLogic Stability; Detect and Analyse Stuck Threads
WebLogic Stability; Detect and Analyse Stuck Threads
Maarten Smeets
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
Maarten Smeets
 
All you need to know about transport layer security
All you need to know about transport layer securityAll you need to know about transport layer security
All you need to know about transport layer security
Maarten Smeets
 
Webservice security considerations and measures
Webservice security considerations and measuresWebservice security considerations and measures
Webservice security considerations and measures
Maarten Smeets
 
WebLogic Scripting Tool made Cool!
WebLogic Scripting Tool made Cool!WebLogic Scripting Tool made Cool!
WebLogic Scripting Tool made Cool!
Maarten Smeets
 
Oracle SOA Suite 12.2.1 new features
Oracle SOA Suite 12.2.1 new featuresOracle SOA Suite 12.2.1 new features
Oracle SOA Suite 12.2.1 new features
Maarten Smeets
 
How to build a cloud adapter
How to build a cloud adapterHow to build a cloud adapter
How to build a cloud adapter
Maarten Smeets
 
WebLogic authentication debugging
WebLogic authentication debuggingWebLogic authentication debugging
WebLogic authentication debugging
Maarten Smeets
 

More from Maarten Smeets (16)

Google jib: Building Java containers without Docker
Google jib: Building Java containers without DockerGoogle jib: Building Java containers without Docker
Google jib: Building Java containers without Docker
 
Introduction to Anchore Engine
Introduction to Anchore EngineIntroduction to Anchore Engine
Introduction to Anchore Engine
 
R2DBC Reactive Relational Database Connectivity
R2DBC Reactive Relational Database ConnectivityR2DBC Reactive Relational Database Connectivity
R2DBC Reactive Relational Database Connectivity
 
Performance Issue? Machine Learning to the rescue!
Performance Issue? Machine Learning to the rescue!Performance Issue? Machine Learning to the rescue!
Performance Issue? Machine Learning to the rescue!
 
Performance of Microservice Frameworks on different JVMs
Performance of Microservice Frameworks on different JVMsPerformance of Microservice Frameworks on different JVMs
Performance of Microservice Frameworks on different JVMs
 
Performance of Microservice frameworks on different JVMs
Performance of Microservice frameworks on different JVMsPerformance of Microservice frameworks on different JVMs
Performance of Microservice frameworks on different JVMs
 
VirtualBox networking explained
VirtualBox networking explainedVirtualBox networking explained
VirtualBox networking explained
 
Microservices on Application Container Cloud Service
Microservices on Application Container Cloud ServiceMicroservices on Application Container Cloud Service
Microservices on Application Container Cloud Service
 
WebLogic Stability; Detect and Analyse Stuck Threads
WebLogic Stability; Detect and Analyse Stuck ThreadsWebLogic Stability; Detect and Analyse Stuck Threads
WebLogic Stability; Detect and Analyse Stuck Threads
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
 
All you need to know about transport layer security
All you need to know about transport layer securityAll you need to know about transport layer security
All you need to know about transport layer security
 
Webservice security considerations and measures
Webservice security considerations and measuresWebservice security considerations and measures
Webservice security considerations and measures
 
WebLogic Scripting Tool made Cool!
WebLogic Scripting Tool made Cool!WebLogic Scripting Tool made Cool!
WebLogic Scripting Tool made Cool!
 
Oracle SOA Suite 12.2.1 new features
Oracle SOA Suite 12.2.1 new featuresOracle SOA Suite 12.2.1 new features
Oracle SOA Suite 12.2.1 new features
 
How to build a cloud adapter
How to build a cloud adapterHow to build a cloud adapter
How to build a cloud adapter
 
WebLogic authentication debugging
WebLogic authentication debuggingWebLogic authentication debugging
WebLogic authentication debugging
 

Recently uploaded

LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
lorraineandreiamcidl
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
rodomar2
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
SOCRadar
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 

Recently uploaded (20)

LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 

Machine learning with R

  • 1.
  • 2. Machine learning with R AMIS Day April 3rd 2017 Maarten Smeets
  • 3. MACHINE LEARNING WITH R WHAT IS MACHINE LEARNING USE CASES FOR MACHINE LEARNING SUPERVISED LEARNING UNSUPERVISED LEARNING INTRODUCING R COOL FEATURES OF R R AND ORACLE
  • 4. MACHINE LEARNING • Machine learning is the subfield of computer science that gives computers the ability to learn without being explicitly programmed.
  • 5. MACHINE LEARNING USE CASES • E-mail categorization Spam, News, Personal, Orders, … • Anomaly detection Fraud detection, behavior which does not fit known classifications well • Optical Character recognition (OCR) • Genetics Will you have a high change of relapse when you have this cancer type and these genes?
  • 6. MACHINE LEARNING USE CASES • Log file analysis Which entries are rare? Which are the variables in a log line? Intruder detection • IoT Self learning thermostats • Predict weather Based on environmental measures like humidity, air pressure, satellite images • Detect trends The number of cases present in the KEI system at Spir-it and performance • Image recognition Self driving cars like Tesla, BMW • Predict stock prices Find correlations between stocks and try to find features which can predict future prices
  • 7. 1 2 WHAT IS MACHINE LEARNING Supervised learning Unsupervised learning
  • 8. SUPERVISED LEARNING • The computer is presented with input and desired output • The goal is to derive a general ruleset to map input to output • This ruleset can be used to do predictions of output based on input
  • 9. SUPERVISED LEARNING EXAMPLES • Linear regression • Support Vector Regression • Random forest • Artificial Neural Networks (ANN)
  • 12. SUPERVISED LEARNING SUPPORT VECTOR REGRESSION http://www.svm-tutorial.com/2014/10/support-vector-regression-r/ Prediction with tuned model
  • 14. SUPERVISED LEARNING RANDOM FOREST • Features are used to classify data • A set of decision trees are generated based on 2 sets of random features • Every tree sees a subset of the data • Splits in the tree are determined by training data values where does a split add most information • To do predictions, features are put through all decision trees and the result classifications are given a weight
  • 17. SUPERVISED LEARNING RANDOM FOREST Variable importance plot Mainly Y was used in the decision trees to determine the outcome i (a counter) was not important
  • 18. SUPERVISED LEARNING RANDOM FOREST • Why is it very useful? • Data does not have many requirements • Can deal with multiple dimensions • Does good predictions in a lot of cases • Fast • Variable importance can easily be determined If many features are correlated, a single representative feature can be used
  • 19. Large black box performing magic SUPERVISED LEARNING ARTIFICIAL NEURAL NETWORKS (ANN) Input Output
  • 20. SUPERVISED LEARNING ARTIFICIAL NEURAL NETWORKS (ANN) Input Output Input nodes Output nodes Hidden nodes
  • 21. ARTIFICIAL NEURAL NETWORKS (ANN) EXAMPLE BACKPROPAGATION • Backpropagation 1. Nodes have connections and connections have a random assigned weight 2. Provide input and let the network generate output 3. Compare generated output with desired output 4. Go from output nodes back to input and adjust the weight of the node connections. Adjusting a little bit at a time increases learning time and accuracy 5. Repeat from step 2 until desired error rate reached • Can be done with weights or with node activation thresholds
  • 22. ARTIFICIAL NEURAL NETWORKS (ANN) SOME PERSONAL THOUGHTS (AS NEUROBIOLOGIST) • Most samples of artificial neural networks do not take into account several properties of biological neural networks • Signals take time to go from A to B • Neurons are not arranged in layers Biological neural networks have a 3d structure with specialized area’s • Once trained, most artificial neural networks are static and don’t learn anymore • Biological neural networks implement a wide range of signaling mechanisms per node (neurotransmitters) • Learning algorithms are not only internal to the neural network. Natural selection also plays a role
  • 23. SUPERVISED LEARNING CHALLENGES • Requires learning set of inputs and desired outputs • Training data should be balanced • Correlated features cause biases • Outputs should be distributed as evenly as possible
  • 24. SUPERVISED LEARNING AAAAAA A B B Training data A BBBBBB Test data A BAAAAAA Input Output Input Output
  • 25. UNSUPERVISED LEARNING • Unsupervised machine learning is the machine learning task of inferring a function to describe hidden structure from "unlabeled" data a classification or categorization is not included in the observations • Examples • Clustering • Anomaly detection • Neural networks (Self Organizing Map)
  • 26. HIERARCHICAL CLUSTERING Every point starts a cluster Clusters merge as they go up the tree
  • 27. HIERARCHICAL CLUSTERING A: MEAN 2,2 STDEV 2 B: MEAN 6,6 STDEV 2
  • 29. HIERARCHICAL CLUSTERING A: MEAN 2,2 STDEV 2 B: MEAN 6,6 STDEV 2 Original Prediction
  • 30. HIERARCHICAL CLUSTERING A: MEAN 2,2 STDEV 1 B: MEAN 6,6 STDEV 1 Original Prediction
  • 31. 1 2 3 History Installation Basics INTRODUCING R
  • 32. R A SHORT HISTORY • Conceived august 1993 An implementation of the S programming language S was conceived in 1976 • Open sourced June 1995 • Main competitors: SPSS and SAS • A lot of (mostly statistical) libraries available CRAN package repository features 10366 available packages.
  • 33. R INSTALLATION • Download and install R https://www.r-project.org/
  • 34. R STUDIO INSTALLATION • Download and install R Studio https://www.rstudio.com/
  • 35. R BASICS • R is a functional programming (FP) language • It provides many tools for the creation and manipulation of functions. • You can do anything with functions that you can do with vectors: you can assign them to variables, store them in lists, pass them as arguments to other functions, create them inside functions, and even return them as the result of a function.
  • 36. R BASICS SOME FEATURES • GIT integration • Interpreted; does not require compilation Execute a line in your script and look at the result in the console • Has its own markdown variant for documentation Especially useful if you want to have graphs • R Shiny allows you to generate and host scripts / graphs and make them available from a browser
  • 37. R BASICS SOME FEATURES • Code completion • Allows multi threaded execution • Can be run remotely on an R-server • Great at reading / writing datasets For example web site scraping for data • Of course great at statistics • Great at generating plots Especially when using the ggplot2 library
  • 38. R BASICS SOME TIPS TO GET STARTED • ?ggplot • help(package=“ggplot2")
  • 39. R DATATYPES THE VECTOR • Vector a <- c(1,2,5.3,6,-2,4) # numeric vector b <- c("one","two","three") # character vector c <- c(TRUE,TRUE,TRUE,FALSE,TRUE,FALSE) #logical vector a <- c(1,2,5.3,6,-2,4) b <- a * 2 [1] 2.0 4.0 10.6 12.0 -4.0 8.0
  • 40. R DATATYPES THE MATRIX. ALL VALUES HAVE THE SAME TYPE AND LENGTH # generates 5 x 4 numeric matrix y<-matrix(1:20, nrow=5,ncol=4) # another example cells <- c(1,26,24,68) rnames <- c("R1", "R2") cnames <- c("C1", "C2") mymatrix <- matrix(cells, nrow=2, ncol=2, byrow=TRUE, dimnames=list(rnames, cnames)) # accessing matrix values |x[,4] # 4th column of matrix x[3,] # 3rd row of matrix x[2:4,1:3] # rows 2,3,4 of columns 1,2,3
  • 41. R DATATYPES THE DATA.FRAME. LIKE A MATRIX BUT TYPES AND LENGTHS CAN VARY d <- c(1,2,3,4) e <- c("red", "white", "red", NA) f <- c(TRUE,TRUE,TRUE,FALSE) mydata <- data.frame(d,e,f) names(mydata) <- c("ID","Color","Passed") # variable names myframe[3:5] # columns 3,4,5 of data frame myframe[c("ID","Age")] # columns ID and Age from data frame myframe$X1 # variable x1 in the data frame
  • 42. R DATATYPES THE LIST • An ordered collection of objects (components) # example of a list with 4 components – # a string, a numeric vector, a matrix, and a scaler w <- list(name=“Maarten", mynumbers=a, mymatrix=y, age=36) # example of a list containing two lists v <- c(list1,list2)
  • 43. 1 2 3 Hosting plots Shiny Plot.ly R markdown Web site crawling COOL FEATURES OF R
  • 44. COOL FEATURES OF R SHINY
  • 45. COOL FEATURES OF R SHINY UI Server
  • 46. COOL FEATURES OF R PLOT.LY INTERACTIVE GRAPHS
  • 47. COOL FEATURES OF R PLOT.LY INTERACTIVE GRAPHS
  • 48. COOL FEATURES OF R R MARKDOWN
  • 49. COOL FEATURES OF R R MARKDOWN
  • 50. COOL FEATURES OF R WEB SITE CRAWLING
  • 51. COOL FEATURES OF R WEB SITE CRAWLING • Sector to Industry, Industry to Company
  • 52. COOL FEATURES OF R WEB SITE CRAWLING
  • 53. COOL FEATURES OF R WEB SITE CRAWLING http://chart.finance.yahoo.com/table.csv?s=ABT.AX&a=1&b=28&c=2017&d=2&e=28&f=2017&g=d&ignore=.csv
  • 54. 1 2 3 What does Oracle do with R Using data from an Oracle DB in R Using functions from R in the Oracle DB ORACLE AND R
  • 56. ORACLE R ENTERPRISE USING DATABASE DATA IN R
  • 57. ORACLE R ENTERPRISE USING R SCRIPTS DIRECTLY IN SQL STATEMENTS