object Optimizer
The Optimizer
object provides functions to optimize the parameters/weights
of Neural Networks with various numbers of layers.
- Alphabetic
- By Inheritance
- Optimizer
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
assign(aa: MatriD, bb: MatriD): Unit
Deep assign matrix 'bb' to matrix 'aa' '(aa = bb)'.
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val hp: HyperParameter
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def limitF(rows: Int): Double
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
optimize(x: MatriD, y: VectoD, b: VectoD, eta_: Double = hp.default ("eta"), bSize: Int = hp.default ("bSize").toInt, maxEpochs: Int = hp.default ("maxEpochs").toInt, f1: AFF = f_sigmoid): (Double, Int)
Given training data 'x' and 'y' for a 2-layer, single output neural network, fit the parameter/weight vector 'b'.
Given training data 'x' and 'y' for a 2-layer, single output neural network, fit the parameter/weight vector 'b'. Iterate over several epochs, where each epoch divides the training set into 'nbat' batches. Each batch is used to update the weights.
- x
the m-by-nx input matrix (training data consisting of m input vectors)
- y
the m output vector (training data consisting of m output vectors)
- b
the nx parameter/weight vector for layer 1->2 (input to output)
- eta_
the initial learning/convergence rate
- bSize
the batch size
- maxEpochs
the maximum number of training epochs/iterations
- f1
the activation function family for layers 1->2 (input to output)
-
def
optimize2(x: MatriD, y: MatriD, bb: MatriD, eta_: Double = hp.default ("eta"), bSize: Int = hp.default ("bSize").toInt, maxEpochs: Int = hp.default ("maxEpochs").toInt, f1: AFF = f_sigmoid): (Double, Int)
Given training data 'x' and 'y' for a 2-layer neural network, fit the parameter/weight matrix 'bb'.
Given training data 'x' and 'y' for a 2-layer neural network, fit the parameter/weight matrix 'bb'. Iterate over several epochs, where each epoch divides the training set into 'nbat' batches. Each batch is used to update the weights.
- x
the m-by-nx input matrix (training data consisting of m input vectors)
- y
the m-by-ny output matrix (training data consisting of m output vectors)
- bb
the nx-by-ny parameter/weight matrix for layer 1->2 (input to output)
- eta_
the initial learning/convergence rate
- bSize
the batch size
- maxEpochs
the maximum number of training epochs/iterations
- f1
the activation function family for layers 1->2 (input to output)
-
def
optimize2I(x: MatriD, y: MatriD, bb: MatriD, etaI: (Double, Double), bSize: Int = hp.default ("bSize").toInt, maxEpochs: Int = hp.default ("maxEpochs").toInt, f1: AFF = f_sigmoid): (Double, Int)
Given training data 'x' and 'y' for a 2-layer, single output neural network, fit the parameter/weight vector 'b'.
Given training data 'x' and 'y' for a 2-layer, single output neural network, fit the parameter/weight vector 'b'. Iterate over several epochs, where each epoch divides the training set into 'nbat' batches. Each batch is used to update the weights.
- x
the m-by-nx input matrix (training data consisting of m input vectors)
- y
the m output vector (training data consisting of m output vectors)
- bb
the nx-by-ny parameter/weight matrix for layer 1->2 (input to output)
- bSize
the batch size
- maxEpochs
the maximum number of training epochs/iterations
- f1
the activation function family for layers 1->2 (input to output)
-
def
optimize3(x: MatriD, y: MatriD, aa: MatriD, bb: MatriD, eta_: Double = hp.default ("eta"), bSize: Int = hp.default ("bSize").toInt, maxEpochs: Int = hp.default ("maxEpochs").toInt, f1: AFF = f_sigmoid, f2: AFF = f_sigmoid): (Double, Int)
Given training data 'x' and 'y' for a 3-layer neural network, fit the parameter/weight matrices 'aa' and 'bb'.
Given training data 'x' and 'y' for a 3-layer neural network, fit the parameter/weight matrices 'aa' and 'bb'. Iterate over several epochs, where each epoch divides the training set into 'nbat' batches. Each batch is used to update the weights.
- x
the m-by-nx input matrix (training data consisting of m input vectors)
- y
the m-by-ny output matrix (training data consisting of m output vectors)
- aa
the nx-by-nz parameter/weight matrix for layer 1->2 (input to hidden)
- bb
the nz-by-ny parameter/weight matrix for layer 2->3 (hidden to output)
- eta_
the initial learning/convergence rate
- bSize
the batch size
- maxEpochs
the maximum number of training epochs/iterations
- f1
the activation function family for layers 1->2 (input to hidden)
- f2
the activation function family for layers 2->3 (hidden to output)
-
def
optimize3I(x: MatriD, y: MatriD, aa: MatriD, bb: MatriD, etaI: (Double, Double), bSize: Int = hp.default ("bSize").toInt, maxEpochs: Int = hp.default ("maxEpochs").toInt, f1: AFF = f_sigmoid, f2: AFF = f_sigmoid): (Double, Int)
Given training data 'x' and 'y' for a 2-layer, single output neural network, fit the parameter/weight vector 'b'.
Given training data 'x' and 'y' for a 2-layer, single output neural network, fit the parameter/weight vector 'b'. Iterate over several epochs, where each epoch divides the training set into 'nbat' batches. Each batch is used to update the weights.
- x
the m-by-nx input matrix (training data consisting of m input vectors)
- y
the m output vector (training data consisting of m output vectors)
- aa
the nx-by-nz parameter/weight matrix for layer 1->2 (input to hidden)
- bb
the nx-by-ny parameter/weight matrix for layer 1->2 (input to output)
- maxEpochs
the maximum number of training epochs/iterations
- f1
the activation function family for layers 1->2 (input to output)
-
def
optimizeI(x: MatriD, y: VectoD, b: VectoD, etaI: (Double, Double), bSize: Int = hp.default ("bSize").toInt, maxEpochs: Int = hp.default ("maxEpochs").toInt, f1: AFF = f_sigmoid): (Double, Int)
Given training data 'x' and 'y' for a 2-layer, single output neural network, fit the parameter/weight vector 'b'.
Given training data 'x' and 'y' for a 2-layer, single output neural network, fit the parameter/weight vector 'b'. Iterate over several epochs, where each epoch divides the training set into 'nbat' batches. Each batch is used to update the weights.
- x
the m-by-nx input matrix (training data consisting of m input vectors)
- y
the m output vector (training data consisting of m output vectors)
- b
the nx parameter/weight vector for layer 1->2 (input to output)
- bSize
the batch size
- maxEpochs
the maximum number of training epochs/iterations
- f1
the activation function family for layers 1->2 (input to output)
-
def
sseF(y: MatriD, yp: MatriD): Double
Compute the sum of squared errors (sse).
Compute the sum of squared errors (sse).
- y
the actual response/output matrix
- yp
the predicted response/output matrix
-
def
sseF(y: VectoD, yp: VectoD): Double
Compute the sum of squared errors (sse).
Compute the sum of squared errors (sse).
- y
the actual response/output vector
- yp
the predicted response/output vector
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
weightMat(rows: Int, cols: Int, stream: Int = 0, limit: Double = -1.0): MatriD
Generate a random weight/parameter matrix with elements values in (0, limit).
Generate a random weight/parameter matrix with elements values in (0, limit).
- rows
the number of rows
- cols
the number of columns
- stream
the random number stream to use
- limit
the maximum value for any weight
-
def
weightVec(rows: Int, stream: Int = 0, limit: Double = -1.0): VectoD
Generate a random weight/parameter matrix with elements values in (0, limit).
Generate a random weight/parameter matrix with elements values in (0, limit).
- rows
the number of rows
- stream
the random number stream to use
- limit
the maximum value for any weight