SlideShare une entreprise Scribd logo
1  sur  28
Télécharger pour lire hors ligne
Machine Learning for Java
Developers
Nirmal Fernando
WSO2 Inc.
{Java Colombo}
Few things about me...
● Associated Technical Lead at WSO2
● Team Lead of WSO2 Machine Learner
● Just completed 4th year in the industry
● Graduated from Department of Computer Science, University
of Moratuwa.
● Schooled at St. Sebastian’s College, Moratuwa.
● Can sing a bit :-)
https://goo.gl/qbAXLz
Predictive Analytics
Extract information from existing datasets to determine
patterns and predict future
outcomes and trends.
It does not tell you what will
happen in the future.
But forecasts what might happen
in the future with an acceptable
level of reliability.
source: http://insidebigdata.com/2014/08/25/salespredict-
marketo-partner-using-predictive-analytics/
Predictive Analytics
“Big Data Predictive Analytics”
Forrester Research report is the
second most read Forrester report
in Q3, 2015
https://www.forrester.com
Predictive Analytics - Use cases
http://californialoanfind.com/what-and-who-is-teletrack/
Predictive Analytics - Use cases
http://www.chrisdunn.com/
Machine Learning
Field of study that gives computers
the ability to learn
without being explicitly
programmed.
- Arthur Samuel (1959)
Machine Learning - Pipeline
Machine Learning - Terminology
● Input data must be in tabular format
● Each row is called a data point
● Each column is called a feature
● Value you are going to predict is called the “response
variable”
● Next value prediction
● Classification
● Clustering
● Recommendations
etc…
Machine Learning - What type of a problem?
Next value prediction
Example of linear regression on one
independent variable
Predicting a discrete value
Classification
Grouping similar data points
together.
Clustering
Seek to predict preferences a user
would give to an item/product.
Recommendations
● Supervised learning
● Unsupervised learning
● Reinforcement learning
Machine Learning - Which algorithm category?
Supervised vs Unsupervised
Supervised Learning Algorithms
Regression Classification
Linear Regression
Lasso Regression
Ridge Regression
Logistic Regression
Support Vector Machine
(SVM)
Decision Tree
Random Forest
Naive Bayes
Bayesian Network
Unsupervised Learning Algorithms
Clustering
K-means
K-medians
Hierarchical Clustering
….
Java tools for Machine Learning
Tool License URL
Weka GNU General Public
License
http://www.cs.
waikato.ac.
nz/ml/weka/
JSAT GPL v3 https://github.
com/EdwardRaff/JSAT
Mahout Apache v2 https://mahout.
apache.org/
Spark MLlib Apache v2 http://spark.apache.
org/mllib/
Speed
Run programs up to 100x faster than Hadoop MapReduce in
memory, or 10x faster on disk.
Ease of Use
Write applications quickly in Java, Scala, Python, R.
Easy to Deploy
Runs on existing Hadoop clusters and data.
Apache Spark MLlib - scalable machine learning library
SparkConf - Configuration for a Spark application. Used to
set various Spark parameters as key-value pairs.
SparkContext / JavaSparkContext - Main entry point for Spark
functionality. A SparkContext represents the connection to a
Spark cluster. Only one SparkContext may active per JVM.
RDD / JavaRDD - A Resilient Distributed Dataset (RDD), the
basic abstraction in Spark. Represents an immutable,
partitioned collection of elements that can be operated in
parallel.
Apache Spark - few terms
Filter - Return a new dataset formed by selecting those
elements of the source on which function returns true.
Map - Return a new distributed dataset formed by passing
each element of the source through a function.
Random Split - Split a dataset randomly based on a given
ratio.
Cache - Persisting (or caching) a dataset in memory across
operations.
Apache Spark - few operations on a RDD
● Dataset
Pima Indian diabetes dataset
https://archive.ics.uci.
edu/ml/datasets/Pima+Indians+Diabetes
Number of instances : 768
Number of features : 8
Let’s solve a classification problem using Apache Spark
● Response variable
Name : class
Values : 0 or 1
Interpretation : Whether a given Pima Indian has diabetes
or not
Let’s solve a classification problem using Apache Spark
● Objective
Build a classification model to predict whether a given
Pima Indian has diabetes or not.
Let’s try to build a Logistic Regression
model for this.
Let’s solve a classification problem using Apache Spark
Code:
https://github.com/nirmal070125/ml-java-meetup
Solution using Apache Spark
Powered by Apache Spark and Apache Spark MLlib.
● Manage and explore your data
● Analyze the data using machine learning algorithms
● Build machine learning models
● Compare and manage generated machine learning models
● Predict using the built models
● Use the built models with WSO2 CEP and WSO2 ESB.
http://wso2.com/products/machine-learner/
Few words on WSO2 Machine Learner
Machine learning for java developers

Contenu connexe

Tendances

Graph Based Machine Learning on Relational Data
Graph Based Machine Learning on Relational DataGraph Based Machine Learning on Relational Data
Graph Based Machine Learning on Relational Data
Benjamin Bengfort
 
Data Science With Python | Python For Data Science | Python Data Science Cour...
Data Science With Python | Python For Data Science | Python Data Science Cour...Data Science With Python | Python For Data Science | Python Data Science Cour...
Data Science With Python | Python For Data Science | Python Data Science Cour...
Simplilearn
 
AllegroGraph - Cognitive Probability Graph webcast
AllegroGraph - Cognitive Probability Graph webcastAllegroGraph - Cognitive Probability Graph webcast
AllegroGraph - Cognitive Probability Graph webcast
Franz Inc. - AllegroGraph
 

Tendances (20)

Data science
Data scienceData science
Data science
 
Graph Based Machine Learning on Relational Data
Graph Based Machine Learning on Relational DataGraph Based Machine Learning on Relational Data
Graph Based Machine Learning on Relational Data
 
Quick presentation for the OpenML workshop in Eindhoven 2014
Quick presentation for the OpenML workshop in Eindhoven 2014Quick presentation for the OpenML workshop in Eindhoven 2014
Quick presentation for the OpenML workshop in Eindhoven 2014
 
Application of Clustering in Data Science using Real-life Examples
Application of Clustering in Data Science using Real-life Examples Application of Clustering in Data Science using Real-life Examples
Application of Clustering in Data Science using Real-life Examples
 
resume_MH
resume_MHresume_MH
resume_MH
 
Data Science With Python | Python For Data Science | Python Data Science Cour...
Data Science With Python | Python For Data Science | Python Data Science Cour...Data Science With Python | Python For Data Science | Python Data Science Cour...
Data Science With Python | Python For Data Science | Python Data Science Cour...
 
Building Data Products with Python (Georgetown)
Building Data Products with Python (Georgetown)Building Data Products with Python (Georgetown)
Building Data Products with Python (Georgetown)
 
Maoye resume 2017_1_v10_short
Maoye resume 2017_1_v10_shortMaoye resume 2017_1_v10_short
Maoye resume 2017_1_v10_short
 
Big Data Science in Scala
Big Data Science in ScalaBig Data Science in Scala
Big Data Science in Scala
 
Anomaly Detection and Automatic Labeling with Deep Learning
Anomaly Detection and Automatic Labeling with Deep LearningAnomaly Detection and Automatic Labeling with Deep Learning
Anomaly Detection and Automatic Labeling with Deep Learning
 
Strata San Jose 2016: Scalable Ensemble Learning with H2O
Strata San Jose 2016: Scalable Ensemble Learning with H2OStrata San Jose 2016: Scalable Ensemble Learning with H2O
Strata San Jose 2016: Scalable Ensemble Learning with H2O
 
Building Data Apps with Python
Building Data Apps with PythonBuilding Data Apps with Python
Building Data Apps with Python
 
Helping data scientists escape the seduction of the sandbox - Krish Swamy, We...
Helping data scientists escape the seduction of the sandbox - Krish Swamy, We...Helping data scientists escape the seduction of the sandbox - Krish Swamy, We...
Helping data scientists escape the seduction of the sandbox - Krish Swamy, We...
 
AllegroGraph - Cognitive Probability Graph webcast
AllegroGraph - Cognitive Probability Graph webcastAllegroGraph - Cognitive Probability Graph webcast
AllegroGraph - Cognitive Probability Graph webcast
 
Deep learning and Apache Spark
Deep learning and Apache SparkDeep learning and Apache Spark
Deep learning and Apache Spark
 
Data Science in the Real World: Making a Difference
Data Science in the Real World: Making a Difference Data Science in the Real World: Making a Difference
Data Science in the Real World: Making a Difference
 
Challenges on Distributed Machine Learning
Challenges on Distributed Machine LearningChallenges on Distributed Machine Learning
Challenges on Distributed Machine Learning
 
Project
ProjectProject
Project
 
Distributed machine learning
Distributed machine learningDistributed machine learning
Distributed machine learning
 
Top Machine Learning Tools and Frameworks for Beginners | Edureka
Top Machine Learning Tools and Frameworks for Beginners | EdurekaTop Machine Learning Tools and Frameworks for Beginners | Edureka
Top Machine Learning Tools and Frameworks for Beginners | Edureka
 

Similaire à Machine learning for java developers

Himansu-Java&BigdataDeveloper
Himansu-Java&BigdataDeveloperHimansu-Java&BigdataDeveloper
Himansu-Java&BigdataDeveloper
Himansu Behera
 

Similaire à Machine learning for java developers (20)

DevOps for DataScience
DevOps for DataScienceDevOps for DataScience
DevOps for DataScience
 
NYC_2016_slides
NYC_2016_slidesNYC_2016_slides
NYC_2016_slides
 
Energy analytics with Apache Spark workshop
Energy analytics with Apache Spark workshopEnergy analytics with Apache Spark workshop
Energy analytics with Apache Spark workshop
 
Started with-apache-spark
Started with-apache-sparkStarted with-apache-spark
Started with-apache-spark
 
Spark1
Spark1Spark1
Spark1
 
Analyzing Big data in R and Scala using Apache Spark 17-7-19
Analyzing Big data in R and Scala using Apache Spark  17-7-19Analyzing Big data in R and Scala using Apache Spark  17-7-19
Analyzing Big data in R and Scala using Apache Spark 17-7-19
 
Hadoop/Spark Non-Technical Basics
Hadoop/Spark Non-Technical BasicsHadoop/Spark Non-Technical Basics
Hadoop/Spark Non-Technical Basics
 
Continuous delivery for machine learning
Continuous delivery for machine learningContinuous delivery for machine learning
Continuous delivery for machine learning
 
Running Emerging AI Applications on Big Data Platforms with Ray On Apache Spark
Running Emerging AI Applications on Big Data Platforms with Ray On Apache SparkRunning Emerging AI Applications on Big Data Platforms with Ray On Apache Spark
Running Emerging AI Applications on Big Data Platforms with Ray On Apache Spark
 
Aniket_Gaikwad_ML
Aniket_Gaikwad_MLAniket_Gaikwad_ML
Aniket_Gaikwad_ML
 
Scaling Analytics with Apache Spark
Scaling Analytics with Apache SparkScaling Analytics with Apache Spark
Scaling Analytics with Apache Spark
 
Intro to Spark development
 Intro to Spark development  Intro to Spark development
Intro to Spark development
 
Apache Spark Tutorial | Spark Tutorial for Beginners | Apache Spark Training ...
Apache Spark Tutorial | Spark Tutorial for Beginners | Apache Spark Training ...Apache Spark Tutorial | Spark Tutorial for Beginners | Apache Spark Training ...
Apache Spark Tutorial | Spark Tutorial for Beginners | Apache Spark Training ...
 
Introduction to Spark Training
Introduction to Spark TrainingIntroduction to Spark Training
Introduction to Spark Training
 
Deploying Data Science Engines to Production
Deploying Data Science Engines to ProductionDeploying Data Science Engines to Production
Deploying Data Science Engines to Production
 
IBM Strategy for Spark
IBM Strategy for SparkIBM Strategy for Spark
IBM Strategy for Spark
 
sudipto_resume
sudipto_resumesudipto_resume
sudipto_resume
 
PPT5: Neuron Introduction
PPT5: Neuron IntroductionPPT5: Neuron Introduction
PPT5: Neuron Introduction
 
2015 Data Science Summit @ dato Review
2015 Data Science Summit @ dato Review2015 Data Science Summit @ dato Review
2015 Data Science Summit @ dato Review
 
Himansu-Java&BigdataDeveloper
Himansu-Java&BigdataDeveloperHimansu-Java&BigdataDeveloper
Himansu-Java&BigdataDeveloper
 

Dernier

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 

Dernier (20)

Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 

Machine learning for java developers

  • 1. Machine Learning for Java Developers Nirmal Fernando WSO2 Inc. {Java Colombo}
  • 2. Few things about me... ● Associated Technical Lead at WSO2 ● Team Lead of WSO2 Machine Learner ● Just completed 4th year in the industry ● Graduated from Department of Computer Science, University of Moratuwa. ● Schooled at St. Sebastian’s College, Moratuwa. ● Can sing a bit :-) https://goo.gl/qbAXLz
  • 3. Predictive Analytics Extract information from existing datasets to determine patterns and predict future outcomes and trends. It does not tell you what will happen in the future. But forecasts what might happen in the future with an acceptable level of reliability. source: http://insidebigdata.com/2014/08/25/salespredict- marketo-partner-using-predictive-analytics/
  • 4. Predictive Analytics “Big Data Predictive Analytics” Forrester Research report is the second most read Forrester report in Q3, 2015 https://www.forrester.com
  • 5. Predictive Analytics - Use cases http://californialoanfind.com/what-and-who-is-teletrack/
  • 6. Predictive Analytics - Use cases http://www.chrisdunn.com/
  • 7. Machine Learning Field of study that gives computers the ability to learn without being explicitly programmed. - Arthur Samuel (1959)
  • 9. Machine Learning - Terminology ● Input data must be in tabular format ● Each row is called a data point ● Each column is called a feature ● Value you are going to predict is called the “response variable”
  • 10. ● Next value prediction ● Classification ● Clustering ● Recommendations etc… Machine Learning - What type of a problem?
  • 11. Next value prediction Example of linear regression on one independent variable
  • 12. Predicting a discrete value Classification
  • 13. Grouping similar data points together. Clustering
  • 14. Seek to predict preferences a user would give to an item/product. Recommendations
  • 15. ● Supervised learning ● Unsupervised learning ● Reinforcement learning Machine Learning - Which algorithm category?
  • 17. Supervised Learning Algorithms Regression Classification Linear Regression Lasso Regression Ridge Regression Logistic Regression Support Vector Machine (SVM) Decision Tree Random Forest Naive Bayes Bayesian Network
  • 19. Java tools for Machine Learning Tool License URL Weka GNU General Public License http://www.cs. waikato.ac. nz/ml/weka/ JSAT GPL v3 https://github. com/EdwardRaff/JSAT Mahout Apache v2 https://mahout. apache.org/ Spark MLlib Apache v2 http://spark.apache. org/mllib/
  • 20. Speed Run programs up to 100x faster than Hadoop MapReduce in memory, or 10x faster on disk. Ease of Use Write applications quickly in Java, Scala, Python, R. Easy to Deploy Runs on existing Hadoop clusters and data. Apache Spark MLlib - scalable machine learning library
  • 21. SparkConf - Configuration for a Spark application. Used to set various Spark parameters as key-value pairs. SparkContext / JavaSparkContext - Main entry point for Spark functionality. A SparkContext represents the connection to a Spark cluster. Only one SparkContext may active per JVM. RDD / JavaRDD - A Resilient Distributed Dataset (RDD), the basic abstraction in Spark. Represents an immutable, partitioned collection of elements that can be operated in parallel. Apache Spark - few terms
  • 22. Filter - Return a new dataset formed by selecting those elements of the source on which function returns true. Map - Return a new distributed dataset formed by passing each element of the source through a function. Random Split - Split a dataset randomly based on a given ratio. Cache - Persisting (or caching) a dataset in memory across operations. Apache Spark - few operations on a RDD
  • 23. ● Dataset Pima Indian diabetes dataset https://archive.ics.uci. edu/ml/datasets/Pima+Indians+Diabetes Number of instances : 768 Number of features : 8 Let’s solve a classification problem using Apache Spark
  • 24. ● Response variable Name : class Values : 0 or 1 Interpretation : Whether a given Pima Indian has diabetes or not Let’s solve a classification problem using Apache Spark
  • 25. ● Objective Build a classification model to predict whether a given Pima Indian has diabetes or not. Let’s try to build a Logistic Regression model for this. Let’s solve a classification problem using Apache Spark
  • 27. Powered by Apache Spark and Apache Spark MLlib. ● Manage and explore your data ● Analyze the data using machine learning algorithms ● Build machine learning models ● Compare and manage generated machine learning models ● Predict using the built models ● Use the built models with WSO2 CEP and WSO2 ESB. http://wso2.com/products/machine-learner/ Few words on WSO2 Machine Learner

Notes de l'éditeur

  1. Fraud detection
  2. stock market prediction Stock market prediction is the act of trying to determine the future value of a company stock or other financial instrument traded on an exchange. The successful prediction of a stock's future price could yield significant profit.
  3. stock market prediction
  4. stock market prediction
  5. Reinforcement learning : A computer program interacts with a dynamic environment in which it must perform a certain goal (such as driving a vehicle), without a teacher explicitly telling it whether it has come close to its goal or not. Another example is learning to play a game by playing against an opponent
  6. Reinforcement learning : A computer program interacts with a dynamic environment in which it must perform a certain goal (such as driving a vehicle), without a teacher explicitly telling it whether it has come close to its goal or not. Another example is learning to play a game by playing against an opponent
  7. Mention about the row wise operations
  8. Reinforcement learning : A computer program interacts with a dynamic environment in which it must perform a certain goal (such as driving a vehicle), without a teacher explicitly telling it whether it has come close to its goal or not. Another example is learning to play a game by playing against an opponent
  9. Reinforcement learning : A computer program interacts with a dynamic environment in which it must perform a certain goal (such as driving a vehicle), without a teacher explicitly telling it whether it has come close to its goal or not. Another example is learning to play a game by playing against an opponent