CS 4518 Mobile and Ubiquitous Computing Lecture 13: Machine Learning for Ubiquitous Computing Emmanuel Agu

Similar documents
Twitter Sentiment Classification on Sanders Data using Hybrid Approach

CS Machine Learning

Activity Recognition from Accelerometer Data

CS 446: Machine Learning

Speech Emotion Recognition Using Support Vector Machine

A Web Based Annotation Interface Based of Wheel of Emotions. Author: Philip Marsh. Project Supervisor: Irena Spasic. Project Moderator: Matthew Morgan

Active Learning. Yingyu Liang Computer Sciences 760 Fall

Lecture 1: Machine Learning Basics

Introduction to Ensemble Learning Featuring Successes in the Netflix Prize Competition

Machine Learning and Data Mining. Ensembles of Learners. Prof. Alexander Ihler

Human Emotion Recognition From Speech

Learning From the Past with Experiment Databases

Analysis of Emotion Recognition System through Speech Signal Using KNN & GMM Classifier

Rule Learning With Negation: Issues Regarding Effectiveness

Rule Learning with Negation: Issues Regarding Effectiveness

Reducing Features to Improve Bug Prediction

Switchboard Language Model Improvement with Conversational Data from Gigaword

Computers Change the World

Introduction to Mobile Learning Systems and Usability Factors

Semi-supervised methods of text processing, and an application to medical concept extraction. Yacine Jernite Text-as-Data series September 17.

What is this place? Inferring place categories through user patterns identification in geo-tagged tweets

Module 12. Machine Learning. Version 2 CSE IIT, Kharagpur

Quantitative Research Questionnaire

Understanding and Changing Habits

Predicting Student Attrition in MOOCs using Sentiment Analysis and Neural Networks

A Case Study: News Classification Based on Term Frequency

Multivariate k-nearest Neighbor Regression for Time Series data -

The 9 th International Scientific Conference elearning and software for Education Bucharest, April 25-26, / X

Netpix: A Method of Feature Selection Leading. to Accurate Sentiment-Based Classification Models

Airplane Rescue: Social Studies. LEGO, the LEGO logo, and WEDO are trademarks of the LEGO Group The LEGO Group.

Experiment Databases: Towards an Improved Experimental Methodology in Machine Learning

WE GAVE A LAWYER BASIC MATH SKILLS, AND YOU WON T BELIEVE WHAT HAPPENED NEXT

Data Fusion Models in WSNs: Comparison and Analysis

CSL465/603 - Machine Learning

Houghton Mifflin Online Assessment System Walkthrough Guide

Learning in the digital age

IBM Software Group. Mastering Requirements Management with Use Cases Module 6: Define the System

ScienceDirect. A Framework for Clustering Cardiac Patient s Records Using Unsupervised Learning Techniques

MYCIN. The MYCIN Task

Python Machine Learning

(Sub)Gradient Descent

Laboratorio di Intelligenza Artificiale e Robotica

Course Outline. Course Grading. Where to go for help. Academic Integrity. EE-589 Introduction to Neural Networks NN 1 EE

Data Stream Processing and Analytics

Five Challenges for the Collaborative Classroom and How to Solve Them

2 months: Social and Emotional Begins to smile at people Can briefly calm self (may bring hands to mouth and suck on hand) Tries to look at parent

Defragmenting Textual Data by Leveraging the Syntactic Structure of the English Language

Lecture 1: Basic Concepts of Machine Learning

CS4491/CS 7265 BIG DATA ANALYTICS INTRODUCTION TO THE COURSE. Mingon Kang, PhD Computer Science, Kennesaw State University

RETURNING TEACHER REQUIRED TRAINING MODULE YE TRANSCRIPT

Shockwheat. Statistics 1, Activity 1

Interactive Whiteboard

The EDI contains five core domains which are described in Table 1. These domains are further divided into sub-domains.

Activity Discovery and Activity Recognition: A New Partnership

Role of Pausing in Text-to-Speech Synthesis for Simultaneous Interpretation

Quantitative analysis with statistics (and ponies) (Some slides, pony-based examples from Blase Ur)

Modeling user preferences and norms in context-aware systems

Using EEG to Improve Massive Open Online Courses Feedback Interaction

Iterative Cross-Training: An Algorithm for Learning from Unlabeled Web Pages

2 User Guide of Blackboard Mobile Learn for CityU Students (Android) How to download / install Bb Mobile Learn? Downloaded from Google Play Store

OCR for Arabic using SIFT Descriptors With Online Failure Prediction

Experiments with SMS Translation and Stochastic Gradient Descent in Spanish Text Author Profiling

Lip reading: Japanese vowel recognition by tracking temporal changes of lip shape

Mining Student Evolution Using Associative Classification and Clustering

Universidade do Minho Escola de Engenharia

Indian Institute of Technology, Kanpur

A Biological Signal-Based Stress Monitoring Framework for Children Using Wearable Devices

Lesson 1 Taking chances with the Sun

Linking Task: Identifying authors and book titles in verbose queries

Getting Started with TI-Nspire High School Science

Using GIFT to Support an Empirical Study on the Impact of the Self-Reference Effect on Learning

Laboratorio di Intelligenza Artificiale e Robotica

Multilingual Sentiment and Subjectivity Analysis

CS 1103 Computer Science I Honors. Fall Instructor Muller. Syllabus

A Decision Tree Analysis of the Transfer Student Emma Gunu, MS Research Analyst Robert M Roe, PhD Executive Director of Institutional Research and

COSI Meet the Majors Fall 17. Prof. Mitch Cherniack Undergraduate Advising Head (UAH), COSI Fall '17: Instructor COSI 29a

DEVELOPMENT OF AN INTELLIGENT MAINTENANCE SYSTEM FOR ELECTRONIC VALVES

By Zorica Đukić, Secondary School of Pharmacy and Physiotherapy

Take a Loupe at That! : The Private Eye Jeweler s Loupes in Afterschool Programming

Emotion Sensors Go To School

Computerized Adaptive Psychological Testing A Personalisation Perspective

Semi-Supervised Face Detection

Interpretive (seeing) Interpersonal (speaking and short phrases)

Experience Corps. Mentor Toolkit

Detecting English-French Cognates Using Orthographic Edit Distance

Beginning to Flip/Enhance Your Classroom with Screencasting. Check out screencasting tools from (21 Things project)

Lesson Overview: This lesson will introduce what a possessive pronoun is by reviewing

MOODLE 2.0 GLOSSARY TUTORIALS

Beyond the Pipeline: Discrete Optimization in NLP

WHEN THERE IS A mismatch between the acoustic

CLASSIFICATION OF TEXT DOCUMENTS USING INTEGER REPRESENTATION AND REGRESSION: AN INTEGRATED APPROACH

1 Copyright Texas Education Agency, All rights reserved.

UNIT IX. Don t Tell. Are there some things that grown-ups don t let you do? Read about what this child feels.

On-Line Data Analytics

Let's Learn English Lesson Plan

Chapter 1 Analyzing Learner Characteristics and Courses Based on Cognitive Abilities, Learning Styles, and Context

Ph.D in Advance Machine Learning (computer science) PhD submitted, degree to be awarded on convocation, sept B.Tech in Computer science and

Using Web Searches on Important Words to Create Background Sets for LSI Classification

Busuu The Mobile App. Review by Musa Nushi & Homa Jenabzadeh, Introduction. 30 TESL Reporter 49 (2), pp

arxiv: v1 [cs.cl] 2 Apr 2017

Transcription:

CS 4518 Mobile and Ubiquitous Computing Lecture 13: Machine Learning for Ubiquitous Computing Emmanuel Agu

Reminder: 1 Slide of Final Project 1-slide from group today, extended till tomorrow Tuesday (2/7): 2/40 of final project grade Propose mobile/ubiquitous computing app, solves WPI problem Slide should contain 3 bullets 1. Problem you intend to work on Solve WPI/societal problem (e.g. walking safe at night) Use at least location, 1 sensor or camera If games, must gamify solution to real world problem 2. Why this problem is important E.g. 37% of WPI students feel unsafe walking home 3. Summary of envisioned mobile app (?) solution 1. E.g. Mobile app automatically texts users friends when they get home at night Can bounce ideas of me (email, or in person) Can change idea any time

Rubric: Grading Considerations Problem (30/100) How much is the problem a real problem (e.g. not contrived) Is this really a good problem that is a good fit to solve with mobile/ubiquitous computing? (e.g. are there better approaches?) Importance (30/100) How useful would it be if this problem is solved? What is the potential impact on the community (e.g. WPI students) (e.g. how much money? Time? Productivity.. Would be saved?) What is the evidence of the importance? (E.g. quote a statistic) Proposed Solution (40/100) How good/clever is the solution? How sophisticated and how many are the mobile/ubiquitous computing components (high level) proposed? (e.g. location, geofencing, activity recognition, face recognition, machine learning, etc)

Intuitive Introduction to Machine Learning for Ubiquitous Computing

My Goals in this Section If you know machine learning Set off light bulb Projects involving ML? If you don t know machine learning Get general idea, how it s used Knowledge will also make papers easier to read/understand

Recall: Activity Recognition Want app to detect when user is performing any of the following 6 activities Walking, Jogging, Ascending stairs, Descending stairs, Sitting, Standing

Recall: Activity Recognition Overview Gather Accelerometer data Walking Machine Learning Classifier Classify Accelerometer data Running Climbing Stairs

Recall: Example Accelerometer Data for Activities Different user activities generate different accelerometer patterns

Recall: Example Accelerometer Data for Activities Different user activities generate different accelerometer patterns

DIY Activity Recognition (AR) Android App As user performs an activity, AR app on user s smartphone 1. Gathers accelerometer data 2. Uses machine learning classifier to determine what activity (running, jumping, etc) accelerometer pattern corresponds to Classifier: Machine learning algorithm that guesses what activity class accelerometer sample corresponds to msensor = (msensormanager) getsystemservice(context.sensor_service) Activity Recognition App Gather Accelerometer Data from Smartphone Machine Learning Classifier. Public void onsensorchanged(sensorevent event){. } Walking Running In Vehicle Next: Machine learning Classification

Classification for Ubiquitous Computing

Classification Classification is type of machine learning used a lot in Ubicomp Classification? determine which class a sample belongs to. Examples: Accelerometer Sample Walking Machine Learning Classifier Activity Recognition App Jogging Sitting still Ascending Stairs Classes Voice Sample Machine Learning Classifier Stress Detector App Stressed Not Stressed Classes

Classification Image showing Facial Expression Anger Machine Learning Classifier Facial Interpretation App Disgust Fear Happy Neutral Sadness Surprise Classes

Classifier Analyzes new sample, guesses corresponding class Intuitively, can think of classifier as set of rules for classification. E.g. Example rules for classifying accelerometer signal in Activity Recognition If ((Accelerometer peak value > 12 m/s) and (Accelerometer average value < 6 m/s)){ Activity = Jogging ; } Accelerometer Sample Walking Machine Learning Classifier Activity Recognition App Jogging Sitting still Ascending Stairs Classes

Training a Classifier Created using example-based approach (called training) Training a classifier: Examples of each class => generate rules to categorize new samples E.g: Analyze 30+ Examples (from 30 subjects) of accelerometer signal for each activity type (walking, jogging, sitting, ascending stairs) => generate rules (classifier) to classify future activities Examples of user jogging Examples of user walking Train Machine Learning Classifier Examples of user sitting Activity Recognition Classifier Examples of user ascending stairs

Training a Classifier: Steps

Steps for Training a Classifier 1. Gather data samples + label them 2. Import accelerometer samples into classification library (e.g. Weka, MATLAB) 3. Pre-processing (segmentation, smoothing, etc) 4. Extract features 5. Train classifier 6. Export classification model as JAR file 7. Import into Android app

Step 1: Gather Sample data + Label them Need many samples of accelerometer data corresponding to each activity type (jogging, walking, sitting, ascending stairs, etc) Samples of user standing Samples of user jogging Need 30+ samples of each activity type Samples of user walking Samples of user sitting Train Machine Learning Classifier Activity Recognition Classifier Samples of user ascending stairs

Step 1: Gather Sample data + Label them Run a study to gather sample accelerometer data for each activity class Recruit 30+ subjects Run program that gathers accelerometer sensor data on subject s phone Make subjects perform each activity (walking, jogging, sitting, etc) Collect accelerometer data while they perform each activity (walking, jogging, sitting, etc) Label data. i.e. tag each accelerometer sample with the corresponding activity Now have 30 examples of each activity 30+ Samples of user sitting 30+ Samples of user ascending stairs

Step 1: Gather Sample data + Label them Program to Gather Accelerometer Data Option 1: Can write sensor program app that gathers accelerometer data while user is doing each of 6 activities (1 at a time) msensor = (msensormanager) getsystemservice(context.sensor_service). Public void onsensorchanged(sensorevent event){. }

Step 1: Gather Sample data + Label them Program to Gather Accelerometer Data Option 2: Use 3 rd party app to gather accelerometer 2 popular ones: Funf and AndroSensor Just download app, Select sensors to log (e.g. accelerometer) Continuously gathers sensor data in background FUNF app from MIT Accelerometer readings Phone calls SMS messages, etc AndroSensor Funf AndroSensor

Step 2: Import accelerometer samples into classification library (e.g. Weka, MATLAB) Import accelerometer data (labelled with corresponding activity) into Weka (or other Machine learning Framework) LABELS ACCELEROMETER DATA Jogging Weka Classifiers Walking Sitting Ascending stairs Classifier is trained offline

Step 3: Pre-processing (segmentation, smoothing, etc) Segment Data (Windows) Pre-processing data (in Weka) may include segmentation, smoothing, etc Segment: Divide 60 seconds of raw time-series data divided into chunks(e.g. 10 seconds) Smoothing: Replace groups of values with moving average Segments

Step 4: Compute (Extract) Features For each segment (batch of accelerometer values) compute features (in Weka) Features: Functions computed on accelerometer data, captures important accelerometer characteristics Examples: min-max of values, largest magnitude within segment, standard deviation

Step 4: Compute (Extract) Features Important: Ideally, values of features different for each activity type E.g: Min-max range feature Large min-max for jogging Small min-max for sitting

Step 4: Compute (Extract) Features Calculate many different features

Step 5: Train classifier Features are just numbers Different values for different activities Training classifier: figures out feature values corresponding to each activity Weka already programmed with different classification algorithms (SVM, Decision Trees, Naïve Bayes, Random Forest, J48, logistic regression, SMO, etc) Try different classification algorithms, compare accuracy SVM example Activity 2 (e.g. sitting) Activity 1 (e.g. walking) Classifier

Step 5: Train classifier Example: Decision Tree Classifier Feature values compared against learned thresholds at each node

Step 5: Train classifier Compare Accuracy of Classifier Algorithms Weka also reports accuracy of each classifier type Pick most accurate classification algorithm for all classes

Step 6: Export classification model as JAR file Step 7: Import into Android app Export classification model (most accurate classifier) as Java JAR file Import JAR file into Android app In app write Android code to Gather accelerometer data, segment, extract feature, classify using classifier in JAR file Classifies new accelerometer patterns while user is performing activity => Guess (infer) what activity Activity (e.g. Jogging) New accelerometer Sample in real time Classifier in Android app

Context Sensing

Recall: Ubicomp Senses User s Context Context? Human: motion, mood, identity, gesture Environment: temperature, sound, humidity, location Computing Resources: Hard disk space, memory, bandwidth Ubicomp example: Assistant senses: Temperature outside is 10F (environment sensing) + Human plans to go work (schedule) Ubicomp assistant advises: Dress warm! Sensed environment + Human + Computer resources = Context Context-Aware applications adapt their behavior to context

Context Sensing Activity Recognition uses data from only accelerometer (1 sensor) Can combine multiple sensors, use machine learning to sense user context More later Sensor 1 Sensor 2 Sensor 3 Machine Learning Classifier User Context Sensor N

References Jennifer R. Kwapisz, Gary M. Weiss, and Samuel A. Moore, Activity recognition using cell phone accelerometers, SIGKDD Explor. Newsl. 12, 2 (March 2011), 74-82. Deepak Ganesan, Activity Recognition, Physiological Sensing Class, UMASS Amherst