Module: RidgeThreadedReg

Constructor for the RidgeThreadedReg Object which uses unweighted ridge regression to correlate click and mouse movement to eye patch features This class has the same functionality as RidgeReg with two large differences: 1. training examples are batched for retraining the model instead of retraining on each new example 2. the training runs on a separate thread which should enable better running time
Source:

Methods

addData(eyes, screenPos, type)

adds data to the regression model
Parameters:
Name Type Description
eyes object util.eyes Object containing left and right data
screenPos array the screen [x,y] position when a training event happens
type string the type of event
Source:

getData() → {Array.<Object>}

gets the training data stored in this regression model, *this is not the model itself, but merely its training data*
Source:
Returns:
the set of training data stored in this regression class
Type
Array.<Object>

predict(eyesObj) → {Object|integer|integer}

gets a prediction based on the current set of training data
Parameters:
Name Type Description
eyesObj object util.eyes Object
Source:
Returns:
  • prediction - Object containing the prediction data
    Type
    Object
  • prediction.x - the x screen coordinate predicted
    Type
    integer
  • prediction.y - the y screen coordinate predicted
    Type
    integer

setData()

seeds the model with initial training data in case data is stored in a separate location
Source: