Module: RidgeWightedReg

Constructor for the RidgeWightedReg Object which uses *weighted* ridge regression to correlate click and mouse movement to eye patch features The weighting essentially provides a scheduled falloff in influence for mouse movements. This means that mouse moevemnts will only count towards the prediction for a short period of time, unlike unweighted ridge regression where all mouse movements are treated equally.
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: