Class06 Answer:

Operate iris_model in JavaScript.

I operated iris_model in JavaScript using my Chrome-browser.

I got started by calling a simple shell script to start a web server:

cd ~ann/mljs

Next, I browsed a URL: http://localhost:8080/iris2.html

I saw this:

Asking the model to issue a prediction is easy; I just pressed the predict-button.

To see JavaScript create the model, I right-clicked on the page to bring up the inspect-UI:

I found the HTML which connects the button to JavaScript:

I found handleClick() in iris2.js:

I set a breakpoint at line 32:

I clicked the predict-button and watched control flow to line 32:

I stepped through the code and watched the 3-predictions appear in an object named: outputData:

I watched D3.js wrap those 3-predictions in HTML-li-elements and send them to iris2.html for display:

I use this list to describe what happened:

Class06 Lab About Blog Contact Class01 Class02 Class03 Class04 Class05 Class06 Class07 Class08 Class09 Class10 dan101 Forum Google Hangout Vboxen