Lecture 11: Machine Learning

Slides:



Advertisements
Similar presentations
Step 1 Login to NFA Course List. Step 2 Login Screen.
Advertisements

Florida International University COP 4770 Introduction of Weka.
Machine Learning in Practice Lecture 3 Carolyn Penstein Rosé Language Technologies Institute/ Human-Computer Interaction Institute.
Navneet Goyal. Instance Based Learning  Rote Classifier  K- nearest neighbors (K-NN)  Case Based Resoning (CBR)
1 Application of Metamorphic Testing to Supervised Classifiers Xiaoyuan Xie, Tsong Yueh Chen Swinburne University of Technology Christian Murphy, Gail.
CS 1400 Using Microsoft Visual Studio 2005 if you don’t have the appropriate appendix.
A step-by-step tutorial to launch Terrier under Eclipse
Introduction to machine learning
CS1101: Programming Methodology Aaron Tan.
SVMLight SVMLight is an implementation of Support Vector Machine (SVM) in C. Download source from :
TINONS1 Nonlinear SP and Pattern recognition
It’s as easy as remembering to GUESS!.  Write down the information that is given in the problem.  You must write the variable, the number and the units.
TagHelper: Basics Part 1 Carolyn Penstein Rosé Carnegie Mellon University Funded through the Pittsburgh Science of Learning Center and The Office of Naval.
K Nearest Neighborhood (KNNs)
1 1 Slide Evaluation. 2 2 n Interactive decision tree construction Load segmentchallenge.arff; look at dataset Load segmentchallenge.arff; look at dataset.
Introduction to machine learning and data mining 1 iCSC2014, Juan López González, University of Oviedo Introduction to machine learning Juan López González.
Change sound track. What to Learn Able to split the sound track from a video by – Right click a clip – Split audio button Know the difference of voice.
SPAM DETECTION AND FILTERING By Prasanna Kunchavaram.
Copying Music From a CD Margaret S. Britt. Loading Media Player  Click Start  Select the Windows Media Player.
Installing Repast in the Eclipse IDE Charlie Gieseler 6/28/04.
School of Engineering and Computer Science Victoria University of Wellington Copyright: Peter Andreae, VUW Image Recognition COMP # 18.
IR Homework #3 By J. H. Wang May 4, Programming Exercise #3: Text Classification Goal: to classify each document into predefined categories Input:
Advanced Analytics on Hadoop Spring 2014 WPI, Mohamed Eltabakh 1.
A Supervised Machine Learning Algorithm for Research Articles Leonidas Akritidis, Panayiotis Bozanis Dept. of Computer & Communication Engineering, University.
Machine Learning in GATE Valentin Tablan. 2 Machine Learning in GATE Uses classification. [Attr 1, Attr 2, Attr 3, … Attr n ]  Class Classifies annotations.
How to save a folder to Q Drive Click on computer icon.
Copyright  2004 limsoon wong Using WEKA for Classification (without feature selection)
DeepDive Case Study Dongfang Xu School of Information.
Height Estimation from Egocentric Video- Week 1 Dr. Ali Borji Aisha Urooj Khan Jessie Finocchiaro UCF CRCV REU 2016.
Upgrade on Windows 7. DownloadSoftware Download Software from link provided in Webliography: e/
Collection Synthesis Donna Bergmark Cornell Digital Library Research Group March 12, 2002.
IR Homework #2 By J. H. Wang May 9, Programming Exercise #2: Text Classification Goal: to classify each document into predefined categories Input:
CLOUD
CS 445/545 Machine Learning Winter, 2017
Sentence Modeling Representation of sentences is the heart of Natural Language Processing A sentence model is a representation and analysis of semantic.
Random projection in Dimensionality Reduction
Intro to Machine Learning
Click the mouse button or press the Space Bar to display the answers.
How to access your work from home or another computer
Download TPL.zip to some directory
Change sound track.
Development-Introduction
External Services & Frameworks
Perceptrons Lirong Xia.
Classification Nearest Neighbor
Classification with Perceptrons Reading:
Mining and Analyzing Data from Open Source Software Repository
Machine Learning Week 1.
Setting up Eclipse Locally
Create some project. Transferring an Android Application Project from One Instance of Eclipse to another.
Classification Nearest Neighbor
Setting up an Eclipse project from a repository on GitHub
Lecture 9: Semantic Parsing
Change sound track.

Mobile and Web Programming
Data Mining Classification: Alternative Techniques
Basics of ML Rohan Suri.
CSE4334/5334 Data Mining Lecture 7: Classification (4)
Require PO Overview when Submitting Invoices
Working with Libraries
f(x) y x A function is a relation that gives a single
Lecture 9: Machine Learning
Assignment 1: Classification by K Nearest Neighbors (KNN) technique
Time to Reach New Heights
WEDNESDAY, SEPTEMBER 19TH
Perceptrons Lirong Xia.
Math 20-1 Chapter 8 Absolute Value and Reciprocal Functions
Data Mining CSCI 307, Spring 2019 Lecture 7
P 72 (PDF 76) Figure 32 Information item name Rules in columns
Presentation transcript:

Lecture 11: Machine Learning Topics: Basics of ML, Using Java ML in Android

Application Papers We Studied All use some form of machine learning: Musical Heart Selection Power manage: wake lock, reboot. Feature Extraction Preprocessing Classification Sound Sifter Auditeur

What is Machine Learning? The ability of computers to learn rules from data. A Math Equation That We Don’t Know X1 Y X2 Power manage: wake lock, reboot.

What is Machine Learning? The ability of computers to learn rules from data. A Math Equation That We Don’t Know X1 X2 Y 3 4 12 5 2 10 30 X1 Y X2 Power manage: wake lock, reboot. Can you guess the function given the input-output data? Answer: Y = X1 * X2

What is Machine Learning? The ability of computers to learn rules from data. A Math Equation That We Don’t Know X1 X2 Y 10 2 12 5 7 8 X1 Y X2 Power manage: wake lock, reboot. Can you guess the function now? Answer: Y = X1 + X2

What is Machine Learning? The ability of computers to learn rules from data. A Math Equation That We Don’t Know X1 X2 Y 10 2 12 5 7 8 3 6 X1 Y X2 Power manage: wake lock, reboot. Can you guess the function now? Answer: Y = X1 - X2 + 4

What is Machine Learning? Often in machine learning, the output is +1 or -1. We may want to call it a “Classification” problem X1 X2 Y 170 137 +1 165 145 120 2000 -1 127 2200 A Function/Mapping That We Don’t Know X1 Y X2 Power manage: wake lock, reboot.

What is Machine Learning? Often in machine learning, the output is +1 or -1. We may want to call it a “Classification” problem X1 X2 Y 170 137 +1 165 145 120 2000 -1 127 2200 A Function/Mapping That We Don’t Know X1 Y X2 Power manage: wake lock, reboot. if (X1 <= 127 && X2 >= 2000) { Y = -1; } else if (X1 <= 170 && X2 <= 145){ Y = +1;

What is Machine Learning? A real classification problem: Man vs. Cow Height X1 (cm) Weight X2 (lb) Class 170 137 Human 165 145 120 2000 Cow 127 2200 if (X1 <= 127 && X2 >= 2000) { Y = -1; //Cow } else if (X1 <= 170 && X2 <= 145){ Y = +1; //Man Power manage: wake lock, reboot. Why do we want to learn these rules?

What is Machine Learning? Learning/Training Phase: Applying/Testing Phase: Height X1 (cm) Weight X2 (lb) Class 170 137 Human 165 145 120 2000 Cow 127 2200 if (X1 <= 127 && X2 >= 2000) { Y = -1; //Cow } else if (X1 <= 170 && X2 <= 145){ Y = +1; //Man Power manage: wake lock, reboot. Height X1 (cm) Weight X2 (lb) Class 120 2300 ? 160 100

What is Machine Learning? Learning/Training Phase: Applying/Testing Phase: features Class Label X1 X2 … XN Y Model Instance Training Set Power manage: wake lock, reboot. X1 X2 … XN Y Test Set

Machine Learning with Android We will download and use JavaML library To setup the library in Android Studio: http://java-ml.sourceforge.net/ https://stackoverflow.com/questions/25660166/how-to-add-a-jar-in-external-libraries-in-android-studio Add your jar file to app/libs (if there is no libs folder you can create it) folder, and then right click the jar file and click "add as library“ Power manage: wake lock, reboot.

Creating a Dataset (e.g. for training) Create Instances: Add Instances to Dataset: double row1 = new double[] {170.0, 137.0}; double row2 = new double[] {165.0, 145.0}; double row3 = new double[] {120.0, 2000.0}; double row4 = new double[] {127.0, 2200.0}; Instance example1 = new DenseInstance (row1, ”human”); Instance example1 = new DenseInstance (row2, ”human”); Instance example1 = new DenseInstance (row3, ”cow”); Instance example1 = new DenseInstance (row4, ”cow”); Power manage: wake lock, reboot. Dataset dset = new DefaultDataset(); dset.add(example1); dset.add(example2); dset.add(example3); dset.add(example4);

Creating a Classifier (model) Add Instances to Dataset: Classifier knn = KNearestNeighbors(3); knn.buildClassifier(dset); double unknown = new double[] {120.0, 2300.0}; Instance unknown_example = new Instance(unknown); Object result = knn.classify(unknown_example); Power manage: wake lock, reboot.

References Study the API documentation of JavaML (Getting Started and Classification PDFs) Power manage: wake lock, reboot.