@ai-on-browser/data-analysis-models
    Preparing search index...

    Winnow

    Index

    Constructors

    Properties

    Methods

    Constructors

    • Parameters

      • Optionalalpha: boolean

        Learning rate

      • Optionalthreshold: number

        Threshold

      • Optionalversion: 1 | 2

        Version of model

      Returns Winnow

    Properties

    _alpha: boolean
    _th: number
    _th_org: number
    _v: 1 | 2
    _w: any[]

    Methods

    • Fit model.

      Parameters

      • x: (0 | 1)[][]

        Training data

      • y: (-1 | 1)[]

        Target values

      Returns void

    • Returns predicted values.

      Parameters

      • data: (0 | 1)[][]

        Sample data

      Returns (-1 | 1)[]

      Predicted values