Documentation ¶
Index ¶
- func LeakyReLU(x float64) float64
- func LoadCSVData(src string, inputLen, targetLen int, names bool) ([][]float64, [][]float64)
- func MAE(predicted, target float64) float64
- func MAEPrime(predicted, target float64) float64
- func MSE(predicted, target float64) float64
- func MSEPrime(predicted, target float64) float64
- func NoActivation(x float64) float64
- func ReLU(x float64) float64
- func ReLUPrime(x float64) float64
- func Sigmoid(x float64) float64
- func SigmoidPrime(x float64) float64
- func Softplus(x float64) float64
- func SoftplusPrime(x float64) float64
- func Tanh(x float64) float64
- func TanhPrime(x float64) float64
- type ActivationFunc
- type DNN
- type FFNN
- type LossFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadCSVData ¶
LoadCSVData loads training data from source and returns two float64 matrices containing the training data and the target outcome.
inputLen determines how many fields contain the input data.
outputLen determines the number of targets.
names signifies if the first entry in the CSV contains field names.
func NoActivation ¶
func SigmoidPrime ¶
func SoftplusPrime ¶
Types ¶
type ActivationFunc ¶
type DNN ¶
type DNN struct { Rate float64 // contains filtered or unexported fields }
func NewDNN ¶
func NewDNN(sizes []int, learningRate float64, hiddenActivation, hiddenVariance, outputActivation, outputVariance ActivationFunc, loss, lossPrime LossFunc) *DNN
NewDNN creates a new Dropout Multilayer Perceptron
sizes contains the sizes of each layer in the network
learningRate is the scaling hyperparameter for gradient descent
activation defines the normalization function applied to the output
variance defines the derivative of the activation function used
func (*DNN) SetDropout ¶
SetDropout sets the dropout rate for the network.
rate defines the dropout rate for the network. It can contain one value for the whole network or specific values for each layer in the network.
** The dropout rate must be set before training, and then set to 0 before predicting new data **
func (*DNN) ValidateBinaryClassification ¶
type FFNN ¶
type FFNN struct { Rate float64 // contains filtered or unexported fields }
func NewFFNN ¶
func NewFFNN(sizes []int, learningRate float64, hiddenActivation, hiddenVariance, outputActivation, outputVariance ActivationFunc, loss, lossPrime LossFunc) *FFNN