A User-Interactive Machine Learning Model for Identifying ... · Andrea Solis - REU...

13
A User-Interactive Machine Learning Model for Identifying Structural Relationships of Code Features By: Andrea Solis, Kartik Chugh, Ankit Gupta

Transcript of A User-Interactive Machine Learning Model for Identifying ... · Andrea Solis - REU...

Page 1: A User-Interactive Machine Learning Model for Identifying ... · Andrea Solis - REU Presentation-Andrea Created Date: 2/3/2019 11:51:17 PM ...

A User-Interactive Machine Learning Model for Identifying Structural Relationships of Code Features

By: Andrea Solis, Kartik Chugh, Ankit Gupta

Page 2: A User-Interactive Machine Learning Model for Identifying ... · Andrea Solis - REU Presentation-Andrea Created Date: 2/3/2019 11:51:17 PM ...

Introduction

Problems with tools using Machine Learning:

� User doesn’t know what is happening

� Get’s not say on how the system works

Applied in a tool that combines both Machine Learning and User Interaction:

� Applied to an HTML editor and Auto-Complete

� Includes User Interface

Page 3: A User-Interactive Machine Learning Model for Identifying ... · Andrea Solis - REU Presentation-Andrea Created Date: 2/3/2019 11:51:17 PM ...

Introduction

HTML Structural patterns:

� Elements in same section

� Type of element

� Size

� Position

� Color

� Etc.

Page 4: A User-Interactive Machine Learning Model for Identifying ... · Andrea Solis - REU Presentation-Andrea Created Date: 2/3/2019 11:51:17 PM ...

Code Completion

Types of code completion:� Tag

� Attribute

� Value <body bgcolor=“#E6E6FA”>

<a href=“gmu”>George Mason</a>

</body>

Parent’s tag Parent’s Attribute-Value pair

Tag

AttributeValue

Page 5: A User-Interactive Machine Learning Model for Identifying ... · Andrea Solis - REU Presentation-Andrea Created Date: 2/3/2019 11:51:17 PM ...

Auto Complete Process

Every time user types something:

� Determines the type of prediction

� Get Abstract Syntax Tree (AST) from source code

html

Head

title

bodyId=“foo”

h1 P

fontColor=“red”

p

fontcolor=“orange

nav

aHref=“gmu”

aHref=“reu”

<>

Page 6: A User-Interactive Machine Learning Model for Identifying ... · Andrea Solis - REU Presentation-Andrea Created Date: 2/3/2019 11:51:17 PM ...

Auto Complete Process

� Obtain training data, and sample features from AST.

Parent’s Tag Parent’s Attr-Val Pair

Tag

head “” Title

body Id=“foo” h1

body Id=“foo” p

p “” font

body Id=“foo” p

p “” font

body Id=“foo” nav

nav “” a

nav “” a

Parent’s Tag Parent’s Attr-Val Pair

Tag

body Id=“foo” (prediction)

Page 7: A User-Interactive Machine Learning Model for Identifying ... · Andrea Solis - REU Presentation-Andrea Created Date: 2/3/2019 11:51:17 PM ...

Auto Complete Process

� Build Decision Tree.

� Use sample features and get a prediction from Decision Tree

� Show the predictions as options in Auto Complete

Parent’s Tag

a

font

title

p, nav, h1

nav

p body

head

Page 8: A User-Interactive Machine Learning Model for Identifying ... · Andrea Solis - REU Presentation-Andrea Created Date: 2/3/2019 11:51:17 PM ...

Results for Auto Complete

� Without any user feedback

� Leave-one-out Validation

� Using 13 websites

Page 9: A User-Interactive Machine Learning Model for Identifying ... · Andrea Solis - REU Presentation-Andrea Created Date: 2/3/2019 11:51:17 PM ...

User Interface

Information given to the user:

� Pattern rule for current top prediction

� Option to see other pattern rules

Page 10: A User-Interactive Machine Learning Model for Identifying ... · Andrea Solis - REU Presentation-Andrea Created Date: 2/3/2019 11:51:17 PM ...

User Interface

Changes made by the user:

� Prioritize or blacklist current prediction

� Change current prediction

� Add a new pattern rule

Page 11: A User-Interactive Machine Learning Model for Identifying ... · Andrea Solis - REU Presentation-Andrea Created Date: 2/3/2019 11:51:17 PM ...

Pilot Study

Features added to User Interface

� Highlight examples

� Option to unprioritized pattern rules

2 tasks for users:

� Start a document from scratch

� Complete an existing document

Page 12: A User-Interactive Machine Learning Model for Identifying ... · Andrea Solis - REU Presentation-Andrea Created Date: 2/3/2019 11:51:17 PM ...

Future Work

Auto Complete:

� Improve value prediction

User Interface:

� Change the way the rules are shown to the user

� Based on future pilot studies

Testing:

� 2nd Pilot study, formal user study

� More validation tests

Page 13: A User-Interactive Machine Learning Model for Identifying ... · Andrea Solis - REU Presentation-Andrea Created Date: 2/3/2019 11:51:17 PM ...

Thank you!