Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • FeedforwardNeuralNetwork

Index

Constructors

constructor

  • Parameters

    • numberOfNodesPerLayer: number[]
    • Optional randomSeed: number

    Returns FeedforwardNeuralNetwork

Properties

Private batchSize

batchSize: number = 0

Private learningRate

learningRate: number = 0.001

Private numberOfEpochs

numberOfEpochs: number = 1000

Private weightMatrices

weightMatrices: Matrix[] = []

Methods

Private activationFunction

  • activationFunction(value: number): number
  • Parameters

    • value: number

    Returns number

Private activationGradientFunction

  • activationGradientFunction(value: number): number
  • Parameters

    • value: number

    Returns number

Private backPropagate

  • backPropagate(activations: Matrix[], incomingActivations: Matrix[], targets: Matrix): void
  • Parameters

    Returns void

Private forwardPropagate

  • Parameters

    Returns Array<Array<Matrix>>

getActivationFunction

  • Returns activationFunction

getActivationGradientFunction

getBatchSize

  • getBatchSize(): number
  • Returns number

getLearningRate

  • getLearningRate(): number
  • Returns number

getNumberOfEpochs

  • getNumberOfEpochs(): number
  • Returns number

predict

  • Parameters

    Returns Matrix

setActivationFunction

  • setActivationFunction(activationFunction: function): void
  • Parameters

    • activationFunction: function
        • (value: number): number
        • Parameters

          • value: number

          Returns number

    Returns void

setActivationGradientFunction

  • setActivationGradientFunction(activationGradientFunction: function): void
  • Parameters

    • activationGradientFunction: function
        • (value: number): number
        • Parameters

          • value: number

          Returns number

    Returns void

setBatchSize

  • setBatchSize(batchSize?: number): void
  • Set batch size to

    • 0 for batch gradient descent
    • 1 for stochastic gradient descent
    • 1 for mini-batch gradient descent

    Parameters

    • Default value batchSize: number = 0

    Returns void

setLearningRate

  • setLearningRate(learningRate?: number): void
  • Parameters

    • Default value learningRate: number = 0.001

    Returns void

setNumberOfEpochs

  • setNumberOfEpochs(numberOfEpochs?: number): void
  • The number of iterations over the full training set.

    Parameters

    • Default value numberOfEpochs: number = 1000

    Returns void

train

  • Parameters

    Returns void

Private trainBatch

  • Parameters

    Returns void

Generated using TypeDoc