Don’t worry. The homework is for me, not you. But feel free to have a go yourself also! I want to create a set of data which contains a binary response that is linearly separable within a plane defined by two input variables.
And I want to do this in a visual interactive way. Here’s an video explanation of how I want to do it:
There are a number of elements to the solution.
Before a graph can be created in JMP a data table needs to be created. This will columns for the input variables X1 and X2, as well as the binary response Y. The input variables can be created using JMP’s random number generators.
This is straightforward. The graph builder can be used to generate the JSL to produce the graph.
Using graphics functions a line can be added to the graph. JMP also supports “drag” object s that allow the user to drag graphical objects within the graphical region.
The green/red colouring is a visual indication of the binary classification of the response. For a given linear boundary described by an equation of a line, points higher and lower can be classified. This needs to link back to the table – most probably through the use of a function and table variables (I say most probably because I’ve not started the homework yet!).
Join me over the coming week to see how the code progresses!