Module: LinearReg

LinearReg class which uses pupil detection and simple linear regression to predict gaze from eye patches
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: