Documentation ¶
Index ¶
- type ActivationFunc
- type Ann
- func (ann *Ann) CascadeTrainOnData(td *TrainData, max_neurons uint32, neurons_between_reports uint32, ...)
- func (ann *Ann) CascadeTrainOnFile(filename string, max_neurons uint32, neurons_between_reports uint32, ...)
- func (ann *Ann) ClearScalingParams() int
- func (ann *Ann) DescaleInput(input_vector []FannType)
- func (ann *Ann) DescaleOutput(output_vector []FannType)
- func (ann *Ann) DescaleTrain(td *TrainData)
- func (ann *Ann) Destroy()
- func (ann *Ann) GetActivationFunction(layer int, neuron int) ActivationFunc
- func (ann *Ann) GetActivationSteepness(layer int, neuron int) FannType
- func (ann *Ann) GetBiasArray() []uint32
- func (ann *Ann) GetBitFail() uint32
- func (ann *Ann) GetBitFailLimit() FannType
- func (ann *Ann) GetCascadeActivationFunctions() []ActivationFunc
- func (ann *Ann) GetCascadeActivationFunctionsCount() uint32
- func (ann *Ann) GetCascadeActivationSteepnesses() []FannType
- func (ann *Ann) GetCascadeActivationSteepnessesCount() uint32
- func (ann *Ann) GetCascadeCandidateChangeFraction() float32
- func (ann *Ann) GetCascadeCandidateLimit() FannType
- func (ann *Ann) GetCascadeCandidateStagnationEpochs() uint32
- func (ann *Ann) GetCascadeMaxCandEpochs() uint32
- func (ann *Ann) GetCascadeMaxOutEpochs() uint32
- func (ann *Ann) GetCascadeNumCandidateGroups() uint32
- func (ann *Ann) GetCascadeNumCandidates() uint32
- func (ann *Ann) GetCascadeOutputChangeFraction() float32
- func (ann *Ann) GetCascadeOutputStagnationEpochs() uint32
- func (ann *Ann) GetCascadeWeightMultiplier() FannType
- func (ann *Ann) GetConnectionRate() float32
- func (ann *Ann) GetLayerArray() []uint32
- func (ann *Ann) GetLearningMomentum() float32
- func (ann *Ann) GetLearningRate() float32
- func (ann *Ann) GetMSE() float32
- func (ann *Ann) GetNetworkType() Nettype
- func (ann *Ann) GetNumInput() uint32
- func (ann *Ann) GetNumLayers() uint32
- func (ann *Ann) GetNumOutput() uint32
- func (ann *Ann) GetQuickpropDecay() float32
- func (ann *Ann) GetQuickpropMu() float32
- func (ann *Ann) GetRpropDecreaseFactor() float32
- func (ann *Ann) GetRpropDeltaMax() float32
- func (ann *Ann) GetRpropDeltaMin() float32
- func (ann *Ann) GetRpropDeltaZero() float32
- func (ann *Ann) GetRpropIncreaseFactor() float32
- func (ann *Ann) GetTotalConnections() uint32
- func (ann *Ann) GetTotalNeurons() uint32
- func (ann *Ann) GetTrainErrorFunction() TrainErrorFunction
- func (ann *Ann) GetTrainStopFunction() StopFunction
- func (ann *Ann) GetTrainingAlgorithm() TrainingAlgorithm
- func (ann *Ann) InitWeights(train_data *TrainData)
- func (ann *Ann) PrintConnections()
- func (ann *Ann) PrintParameters()
- func (ann *Ann) RandomizeWeights(min_weight FannType, max_weight FannType)
- func (ann *Ann) ResetMSE()
- func (ann *Ann) Run(input []FannType) []FannType
- func (ann *Ann) Save(filename string)
- func (ann *Ann) SaveToFixed(configuration_file string)
- func (ann *Ann) ScaleInput(input_vector []FannType)
- func (ann *Ann) ScaleOutput(output_vector []FannType)
- func (ann *Ann) ScaleTrain(td *TrainData)
- func (ann *Ann) SetActivationFunction(activation_function ActivationFunc, layer int, neuron int)
- func (ann *Ann) SetActivationFunctionHidden(tp ActivationFunc)
- func (ann *Ann) SetActivationFunctionLayer(activation_function ActivationFunc, layer int)
- func (ann *Ann) SetActivationFunctionOutput(tp ActivationFunc)
- func (ann *Ann) SetActivationSteepness(steepness FannType, layer int, neuron int)
- func (ann *Ann) SetActivationSteepnessHidden(steepness FannType)
- func (ann *Ann) SetActivationSteepnessLayer(steepness FannType, layer int)
- func (ann *Ann) SetActivationSteepnessOutput(steepness FannType)
- func (ann *Ann) SetBitFailLimit(bit_fail_limit FannType)
- func (ann *Ann) SetCascadeActivationFunctions(cascade_activation_functions []ActivationFunc)
- func (ann *Ann) SetCascadeActivationSteepnesses(cascade_activation_steepnesses []FannType)
- func (ann *Ann) SetCascadeCandidateChangeFraction(cascade_candidate_change_fraction float32)
- func (ann *Ann) SetCascadeCandidateLimit(cascade_candidate_limit FannType)
- func (ann *Ann) SetCascadeCandidateStagnationEpochs(cascade_candidate_stagnation_epochs uint32)
- func (ann *Ann) SetCascadeMaxCandEpochs(cascade_max_cand_epochs uint32)
- func (ann *Ann) SetCascadeMaxOutEpochs(cascade_max_out_epochs uint32)
- func (ann *Ann) SetCascadeNumCandidateGroups(cascade_num_candidate_groups uint32)
- func (ann *Ann) SetCascadeOutputChangeFraction(cascade_output_change_fraction float32)
- func (ann *Ann) SetCascadeOutputStagnationEpochs(cascade_output_stagnation_epochs uint32)
- func (ann *Ann) SetCascadeWeightMultiplier(cascade_weight_multiplier FannType)
- func (ann *Ann) SetInputScalingParams(td *TrainData, new_input_min float32, new_input_max float32) int
- func (ann *Ann) SetLearningMomentum(learning_momentum float32)
- func (ann *Ann) SetLearningRate(learning_rate float32)
- func (ann *Ann) SetOutputScalingParams(td *TrainData, new_output_min float32, new_output_max float32) int
- func (ann *Ann) SetQuickpropDecay(quickprop_decay float32)
- func (ann *Ann) SetQuickpropMu(quickprop_mu float32)
- func (ann *Ann) SetRpropDecreaseFactor(rprop_decrease_factor float32)
- func (ann *Ann) SetRpropDeltaMax(rprop_delta_max float32)
- func (ann *Ann) SetRpropDeltaMin(rprop_delta_min float32)
- func (ann *Ann) SetRpropDeltaZero(rprop_delta_max float32)
- func (ann *Ann) SetRpropIncreaseFactor(rprop_increase_factor float32)
- func (ann *Ann) SetScalingParams(td *TrainData, new_input_min float32, new_input_max float32, ...) int
- func (ann *Ann) SetTrainErrorFunction(train_error_function TrainErrorFunction)
- func (ann *Ann) SetTrainStopFunction(train_stop_function StopFunction)
- func (ann *Ann) SetTrainingAlgorithm(training_algorithm TrainingAlgorithm)
- func (ann *Ann) SetWeight(from_neuron uint32, to_neuron uint32, weight FannType)
- func (ann *Ann) SetWeightArray(connections []Connection, num_connections uint32)
- func (ann *Ann) Test(input []FannType, desired_output []FannType) []FannType
- func (ann *Ann) TestData(td *TrainData) float32
- func (ann *Ann) Train(input []FannType, desired_output []FannType)
- func (ann *Ann) TrainEpoch(td *TrainData) float32
- func (ann *Ann) TrainOnData(td *TrainData, max_epochs uint32, epochs_between_reports uint32, ...)
- func (ann *Ann) TrainOnFile(filename string, maxEpoches uint32, epochBetweenReports uint32, ...)
- type Connection
- type Error
- type FannType
- type Nettype
- type StopFunction
- type TrainData
- func (td *TrainData) Destroy()
- func (td *TrainData) Duplicate() *TrainData
- func (td *TrainData) GetInput(i uint32) []FannType
- func (td *TrainData) GetNumInput() uint32
- func (td *TrainData) GetNumOutput() uint32
- func (td *TrainData) GetOutput(i uint32) []FannType
- func (td *TrainData) Length() uint32
- func (td *TrainData) PushExample(din []float64, dout []float64, nMax int)
- func (td *TrainData) SaveTrain(filename string)
- func (td *TrainData) SaveTrainToFixed(filename string, decimal_point uint32)
- func (td *TrainData) ScaleInputTrainData(new_min FannType, new_max FannType)
- func (td *TrainData) ScaleOutputTrainData(new_min FannType, new_max FannType)
- func (td *TrainData) ScaleTrainData(new_min FannType, new_max FannType)
- func (td *TrainData) Shuffle()
- func (td *TrainData) Subset(pos uint32, length uint32) *TrainData
- type TrainErrorFunction
- type TrainingAlgorithm
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivationFunc ¶
type ActivationFunc C.enum_fann_activationfunc_enum
list all activation functions
var COS ActivationFunc = C.FANN_COS
var COS_SYMMETRIC ActivationFunc = C.FANN_COS_SYMMETRIC
var ELLIOT ActivationFunc = C.FANN_ELLIOT
var ELLIOT_SYMMETRIC ActivationFunc = C.FANN_ELLIOT_SYMMETRIC
var GAUSSIAN ActivationFunc = C.FANN_GAUSSIAN
var GAUSSIAN_STEPWISE ActivationFunc = C.FANN_GAUSSIAN_STEPWISE
var GAUSSIAN_SYMMETRIC ActivationFunc = C.FANN_GAUSSIAN_SYMMETRIC
var LINEAR ActivationFunc = C.FANN_LINEAR
var LINEAR_PIECE ActivationFunc = C.FANN_LINEAR_PIECE
var LINEAR_PIECE_SYMMETRIC ActivationFunc = C.FANN_LINEAR_PIECE_SYMMETRIC
var SIGMOID ActivationFunc = C.FANN_SIGMOID
var SIGMOID_STEPWISE ActivationFunc = C.FANN_SIGMOID_STEPWISE
var SIGMOID_SYMMETRIC ActivationFunc = C.FANN_SIGMOID_SYMMETRIC
var SIGMOID_SYMMETRIC_STEPWISE ActivationFunc = C.FANN_SIGMOID_SYMMETRIC_STEPWISE
var SIN ActivationFunc = C.FANN_SIN
var SIN_SYMMETRIC ActivationFunc = C.FANN_SIN_SYMMETRIC
var THRESHOLD ActivationFunc = C.FANN_THRESHOLD
var THRESHOLD_SYMMETRIC ActivationFunc = C.FANN_THRESHOLD_SYMMETRIC
type Ann ¶
type Ann struct {
// contains filtered or unexported fields
}
func CreateFromFile ¶
func CreateShortcut ¶
func CreateStandard ¶
Create ann functions
func (*Ann) CascadeTrainOnData ¶
func (*Ann) CascadeTrainOnFile ¶
func (*Ann) ClearScalingParams ¶
func (*Ann) DescaleInput ¶
func (*Ann) DescaleOutput ¶
func (*Ann) DescaleTrain ¶
func (*Ann) GetActivationFunction ¶
func (ann *Ann) GetActivationFunction(layer int, neuron int) ActivationFunc
func (*Ann) GetActivationSteepness ¶
func (*Ann) GetBiasArray ¶
func (*Ann) GetBitFail ¶
func (*Ann) GetBitFailLimit ¶
func (*Ann) GetCascadeActivationFunctions ¶
func (ann *Ann) GetCascadeActivationFunctions() []ActivationFunc
func (*Ann) GetCascadeActivationFunctionsCount ¶
func (*Ann) GetCascadeActivationSteepnesses ¶
func (*Ann) GetCascadeActivationSteepnessesCount ¶
func (*Ann) GetCascadeCandidateChangeFraction ¶
func (*Ann) GetCascadeCandidateLimit ¶
func (*Ann) GetCascadeCandidateStagnationEpochs ¶
func (*Ann) GetCascadeMaxCandEpochs ¶
func (*Ann) GetCascadeMaxOutEpochs ¶
func (*Ann) GetCascadeNumCandidateGroups ¶
func (*Ann) GetCascadeNumCandidates ¶
func (*Ann) GetCascadeOutputChangeFraction ¶
func (*Ann) GetCascadeOutputStagnationEpochs ¶
func (*Ann) GetCascadeWeightMultiplier ¶
func (*Ann) GetConnectionRate ¶
func (*Ann) GetLayerArray ¶
func (*Ann) GetLearningMomentum ¶
func (*Ann) GetLearningRate ¶
func (*Ann) GetNetworkType ¶
func (*Ann) GetNumLayers ¶
func (*Ann) GetNumOutput ¶
func (*Ann) GetQuickpropDecay ¶
func (*Ann) GetQuickpropMu ¶
func (*Ann) GetRpropDecreaseFactor ¶
func (*Ann) GetRpropDeltaMax ¶
func (*Ann) GetRpropDeltaMin ¶
func (*Ann) GetRpropDeltaZero ¶
func (*Ann) GetRpropIncreaseFactor ¶
func (*Ann) GetTotalConnections ¶
func (*Ann) GetTotalNeurons ¶
func (*Ann) GetTrainErrorFunction ¶
func (ann *Ann) GetTrainErrorFunction() TrainErrorFunction
func (*Ann) GetTrainStopFunction ¶
func (ann *Ann) GetTrainStopFunction() StopFunction
func (*Ann) GetTrainingAlgorithm ¶
func (ann *Ann) GetTrainingAlgorithm() TrainingAlgorithm
func (*Ann) InitWeights ¶
func (*Ann) PrintParameters ¶
func (ann *Ann) PrintParameters()
func (*Ann) RandomizeWeights ¶
func (*Ann) SaveToFixed ¶
func (*Ann) ScaleInput ¶
func (*Ann) ScaleOutput ¶
func (*Ann) ScaleTrain ¶
func (*Ann) SetActivationFunction ¶
func (ann *Ann) SetActivationFunction(activation_function ActivationFunc, layer int, neuron int)
func (*Ann) SetActivationFunctionHidden ¶
func (ann *Ann) SetActivationFunctionHidden(tp ActivationFunc)
func (*Ann) SetActivationFunctionLayer ¶
func (ann *Ann) SetActivationFunctionLayer(activation_function ActivationFunc, layer int)
func (*Ann) SetActivationFunctionOutput ¶
func (ann *Ann) SetActivationFunctionOutput(tp ActivationFunc)
func (*Ann) SetActivationSteepness ¶
func (*Ann) SetActivationSteepnessHidden ¶
func (*Ann) SetActivationSteepnessLayer ¶
func (*Ann) SetActivationSteepnessOutput ¶
func (*Ann) SetBitFailLimit ¶
func (*Ann) SetCascadeActivationFunctions ¶
func (ann *Ann) SetCascadeActivationFunctions(cascade_activation_functions []ActivationFunc)
func (*Ann) SetCascadeActivationSteepnesses ¶
func (*Ann) SetCascadeCandidateChangeFraction ¶
func (*Ann) SetCascadeCandidateLimit ¶
func (*Ann) SetCascadeCandidateStagnationEpochs ¶
func (*Ann) SetCascadeMaxCandEpochs ¶
func (*Ann) SetCascadeMaxOutEpochs ¶
func (*Ann) SetCascadeNumCandidateGroups ¶
func (*Ann) SetCascadeOutputChangeFraction ¶
func (*Ann) SetCascadeOutputStagnationEpochs ¶
func (*Ann) SetCascadeWeightMultiplier ¶
func (*Ann) SetInputScalingParams ¶
func (*Ann) SetLearningMomentum ¶
func (*Ann) SetLearningRate ¶
func (*Ann) SetOutputScalingParams ¶
func (*Ann) SetQuickpropDecay ¶
func (*Ann) SetQuickpropMu ¶
func (*Ann) SetRpropDecreaseFactor ¶
func (*Ann) SetRpropDeltaMax ¶
func (*Ann) SetRpropDeltaMin ¶
func (*Ann) SetRpropDeltaZero ¶
func (*Ann) SetRpropIncreaseFactor ¶
func (*Ann) SetScalingParams ¶
func (*Ann) SetTrainErrorFunction ¶
func (ann *Ann) SetTrainErrorFunction(train_error_function TrainErrorFunction)
func (*Ann) SetTrainStopFunction ¶
func (ann *Ann) SetTrainStopFunction(train_stop_function StopFunction)
func (*Ann) SetTrainingAlgorithm ¶
func (ann *Ann) SetTrainingAlgorithm(training_algorithm TrainingAlgorithm)
func (*Ann) SetWeightArray ¶
func (ann *Ann) SetWeightArray(connections []Connection, num_connections uint32)
setters
func (*Ann) TrainEpoch ¶
func (*Ann) TrainOnData ¶
type Connection ¶
type Connection C.struct_fann_connection
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
func (*Error) PrintError ¶
func (err *Error) PrintError()
//FANN_EXTERNAL char *FANN_API fann_get_errstr(struct fann_error *errdat);
func GetErrstr() () { C.fann_get_errstr() }
func (*Error) ResetErrno ¶
func (err *Error) ResetErrno()
//FANN_EXTERNAL enum fann_errno_enum FANN_API fann_get_errno(struct fann_error *errdat);
func GetErrno(errdat []) ( ) { C.fann_get_errno() }
func (*Error) ResetErrstr ¶
func (err *Error) ResetErrstr()
FANN_EXTERNAL void FANN_API fann_reset_errstr(struct fann_error *errdat);
type Nettype ¶
type Nettype C.enum_fann_nettype_enum
net types
var NETTYPE_LAYER Nettype = C.FANN_NETTYPE_LAYER
var NETTYPE_SHORTCUT Nettype = C.FANN_NETTYPE_SHORTCUT
type StopFunction ¶
type StopFunction C.enum_fann_stopfunc_enum
stop functions
var STOPFUNC_BIT StopFunction = C.FANN_STOPFUNC_BIT
var STOPFUNC_MSE StopFunction = C.FANN_STOPFUNC_MSE
type TrainData ¶
type TrainData struct {
// contains filtered or unexported fields
}
func CreateTrain ¶
func PushExample(td *TrainData, din []float64, dout []float64,
nMax int) *TrainData { td.object = C.push_train_data(C.uint(nMax), td.object, (*C.double)(unsafe.Pointer(&din[0])), (*C.double)(unsafe.Pointer(&dout[0])), ) return td }
func MergeTrainData ¶
func ReadTrainFromFile ¶
func (*TrainData) Destroy ¶
func (td *TrainData) Destroy()
func MakeTrainFromArray() *TrainData { var td TrainData cfn := C.CString(filename) defer C.free(unsafe.Pointer(cfn)) td.object = C.fann_read_train_from_file(cfn) return &td }
func (*TrainData) GetNumInput ¶
func (*TrainData) GetNumOutput ¶
func (*TrainData) PushExample ¶
func (*TrainData) SaveTrainToFixed ¶
func (*TrainData) ScaleInputTrainData ¶
func (*TrainData) ScaleOutputTrainData ¶
func (*TrainData) ScaleTrainData ¶
type TrainErrorFunction ¶
type TrainErrorFunction C.enum_fann_errorfunc_enum
error function
var ERRORFUNC_LINEAR TrainErrorFunction = C.FANN_ERRORFUNC_LINEAR
var ERRORFUNC_TANH TrainErrorFunction = C.FANN_ERRORFUNC_TANH
type TrainingAlgorithm ¶
type TrainingAlgorithm C.enum_fann_train_enum
training algs
var TRAIN_BATCH TrainingAlgorithm = C.FANN_TRAIN_BATCH
var TRAIN_INCREMENTAL TrainingAlgorithm = C.FANN_TRAIN_INCREMENTAL
var TRAIN_QUICKPROP TrainingAlgorithm = C.FANN_TRAIN_QUICKPROP
var TRAIN_RPROP TrainingAlgorithm = C.FANN_TRAIN_RPROP
Source Files ¶
Click to show internal directories.
Click to hide internal directories.