📄 fann_train.h
字号:
This function appears in FANN >= 2.1.0
*/
FANN_EXTERNAL int FANN_API fann_set_scaling_params(
struct fann *ann,
const struct fann_train_data *data,
float new_input_min,
float new_input_max,
float new_output_min,
float new_output_max);
/* Function: fann_clear_scaling_params
Clears scaling parameters.
Parameters:
ann - ann for which to clear scaling parameters
This function appears in FANN >= 2.1.0
*/
FANN_EXTERNAL int FANN_API fann_clear_scaling_params(struct fann *ann);
/* Function: fann_scale_input
Scale data in input vector before feed it to ann based on previously calculated parameters.
Parameters:
ann - for which scaling parameters were calculated
input_vector - input vector that will be scaled
See also:
<fann_descale_input>, <fann_scale_output>
This function appears in FANN >= 2.1.0
*/
FANN_EXTERNAL void FANN_API fann_scale_input( struct fann *ann, fann_type *input_vector );
/* Function: fann_scale_output
Scale data in output vector before feed it to ann based on previously calculated parameters.
Parameters:
ann - for which scaling parameters were calculated
output_vector - output vector that will be scaled
See also:
<fann_descale_output>, <fann_scale_input>
This function appears in FANN >= 2.1.0
*/
FANN_EXTERNAL void FANN_API fann_scale_output( struct fann *ann, fann_type *output_vector );
/* Function: fann_descale_input
Scale data in input vector after get it from ann based on previously calculated parameters.
Parameters:
ann - for which scaling parameters were calculated
input_vector - input vector that will be descaled
See also:
<fann_scale_input>, <fann_descale_output>
This function appears in FANN >= 2.1.0
*/
FANN_EXTERNAL void FANN_API fann_descale_input( struct fann *ann, fann_type *input_vector );
/* Function: fann_descale_output
Scale data in output vector after get it from ann based on previously calculated parameters.
Parameters:
ann - for which scaling parameters were calculated
output_vector - output vector that will be descaled
See also:
<fann_scale_output>, <fann_descale_input>
This function appears in FANN >= 2.1.0
*/
FANN_EXTERNAL void FANN_API fann_descale_output( struct fann *ann, fann_type *output_vector );
#endif
/* Function: fann_scale_input_train_data
Scales the inputs in the training data to the specified range.
See also:
<fann_scale_output_train_data>, <fann_scale_train_data>
This function appears in FANN >= 2.0.0.
*/
FANN_EXTERNAL void FANN_API fann_scale_input_train_data(struct fann_train_data *train_data,
fann_type new_min, fann_type new_max);
/* Function: fann_scale_output_train_data
Scales the outputs in the training data to the specified range.
See also:
<fann_scale_input_train_data>, <fann_scale_train_data>
This function appears in FANN >= 2.0.0.
*/
FANN_EXTERNAL void FANN_API fann_scale_output_train_data(struct fann_train_data *train_data,
fann_type new_min, fann_type new_max);
/* Function: fann_scale_train_data
Scales the inputs and outputs in the training data to the specified range.
See also:
<fann_scale_output_train_data>, <fann_scale_input_train_data>
This function appears in FANN >= 2.0.0.
*/
FANN_EXTERNAL void FANN_API fann_scale_train_data(struct fann_train_data *train_data,
fann_type new_min, fann_type new_max);
/* Function: fann_merge_train_data
Merges the data from *data1* and *data2* into a new <struct fann_train_data>.
This function appears in FANN >= 1.1.0.
*/
FANN_EXTERNAL struct fann_train_data *FANN_API fann_merge_train_data(struct fann_train_data *data1,
struct fann_train_data *data2);
/* Function: fann_duplicate_train_data
Returns an exact copy of a <struct fann_train_data>.
This function appears in FANN >= 1.1.0.
*/
FANN_EXTERNAL struct fann_train_data *FANN_API fann_duplicate_train_data(struct fann_train_data
*data);
/* Function: fann_subset_train_data
Returns an copy of a subset of the <struct fann_train_data>, starting at position *pos*
and *length* elements forward.
>fann_subset_train_data(train_data, 0, fann_length_train_data(train_data))
Will do the same as <fann_duplicate_train_data>.
See also:
<fann_length_train_data>
This function appears in FANN >= 2.0.0.
*/
FANN_EXTERNAL struct fann_train_data *FANN_API fann_subset_train_data(struct fann_train_data
*data, unsigned int pos,
unsigned int length);
/* Function: fann_length_train_data
Returns the number of training patterns in the <struct fann_train_data>.
This function appears in FANN >= 2.0.0.
*/
FANN_EXTERNAL unsigned int FANN_API fann_length_train_data(struct fann_train_data *data);
/* Function: fann_num_input_train_data
Returns the number of inputs in each of the training patterns in the <struct fann_train_data>.
See also:
<fann_num_train_data>, <fann_num_output_train_data>
This function appears in FANN >= 2.0.0.
*/
FANN_EXTERNAL unsigned int FANN_API fann_num_input_train_data(struct fann_train_data *data);
/* Function: fann_num_output_train_data
Returns the number of outputs in each of the training patterns in the <struct fann_train_data>.
See also:
<fann_num_train_data>, <fann_num_input_train_data>
This function appears in FANN >= 2.0.0.
*/
FANN_EXTERNAL unsigned int FANN_API fann_num_output_train_data(struct fann_train_data *data);
/* Function: fann_save_train
Save the training structure to a file, with the format as specified in <fann_read_train_from_file>
Return:
The function returns 0 on success and -1 on failure.
See also:
<fann_read_train_from_file>, <fann_save_train_to_fixed>
This function appears in FANN >= 1.0.0.
*/
FANN_EXTERNAL int FANN_API fann_save_train(struct fann_train_data *data, const char *filename);
/* Function: fann_save_train_to_fixed
Saves the training structure to a fixed point data file.
This function is very usefull for testing the quality of a fixed point network.
Return:
The function returns 0 on success and -1 on failure.
See also:
<fann_save_train>
This function appears in FANN >= 1.0.0.
*/
FANN_EXTERNAL int FANN_API fann_save_train_to_fixed(struct fann_train_data *data, const char *filename,
unsigned int decimal_point);
/* Group: Parameters */
/* Function: fann_get_training_algorithm
Return the training algorithm as described by <fann_train_enum>. This training algorithm
is used by <fann_train_on_data> and associated functions.
Note that this algorithm is also used during <fann_cascadetrain_on_data>, although only
FANN_TRAIN_RPROP and FANN_TRAIN_QUICKPROP is allowed during cascade training.
The default training algorithm is FANN_TRAIN_RPROP.
See also:
<fann_set_training_algorithm>, <fann_train_enum>
This function appears in FANN >= 1.0.0.
*/
FANN_EXTERNAL enum fann_train_enum FANN_API fann_get_training_algorithm(struct fann *ann);
/* Function: fann_set_training_algorithm
Set the training algorithm.
More info available in <fann_get_training_algorithm>
This function appears in FANN >= 1.0.0.
*/
FANN_EXTERNAL void FANN_API fann_set_training_algorithm(struct fann *ann,
enum fann_train_enum training_algorithm);
/* Function: fann_get_learning_rate
Return the learning rate.
The learning rate is used to determine how aggressive training should be for some of the
training algorithms (FANN_TRAIN_INCREMENTAL, FANN_TRAIN_BATCH, FANN_TRAIN_QUICKPROP).
Do however note that it is not used in FANN_TRAIN_RPROP.
The default learning rate is 0.7.
See also:
<fann_set_learning_rate>, <fann_set_training_algorithm>
This function appears in FANN >= 1.0.0.
*/
FANN_EXTERNAL float FANN_API fann_get_learning_rate(struct fann *ann);
/* Function: fann_set_learning_rate
Set the learning rate.
More info available in <fann_get_learning_rate>
This function appears in FANN >= 1.0.0.
*/
FANN_EXTERNAL void FANN_API fann_set_learning_rate(struct fann *ann, float learning_rate);
/* Function: fann_get_learning_momentum
Get the learning momentum.
The learning momentum can be used to speed up FANN_TRAIN_INCREMENTAL training.
A too high momentum will however not benefit training. Setting momentum to 0 will
be the same as not using the momentum parameter. The recommended value of this parameter
is between 0.0 and 1.0.
The default momentum is 0.
See also:
<fann_set_learning_momentum>, <fann_set_training_algorithm>
This function appears in FANN >= 2.0.0.
*/
FANN_EXTERNAL float FANN_API fann_get_learning_momentum(struct fann *ann);
/* Function: fann_set_learning_momentum
Set the learning momentum.
More info available in <fann_get_learning_momentum>
This function appears in FANN >= 2.0.0.
*/
FANN_EXTERNAL void FANN_API fann_set_learning_momentum(struct fann *ann, float learning_momentum);
/* Function: fann_get_activation_function
Get the activation function for neuron number *neuron* in layer number *layer*,
counting the input layer as layer 0.
It is not possible to get activation functions for the neurons in the input layer.
Information about the individual activation functions is available at <fann_activationfunc_enum>.
Returns:
The activation function for the neuron or -1 if the neuron is not defined in the neural network.
See also:
<fann_set_activation_function_layer>, <fann_set_activation_function_hidden>,
<fann_set_activation_function_output>, <fann_set_activation_steepness>,
<fann_set_activation_function>
This function appears in FANN >= 2.1.0
*/
FANN_EXTERNAL enum fann_activationfunc_enum FANN_API fann_get_activation_function(struct fann *ann,
int layer,
int neuron);
/* Function: fann_set_activation_function
Set the activation function for neuron number *neuron* in layer number *layer*,
counting the input layer as layer 0.
It is not possible to set activation functions for the neurons in the input layer.
When choosing an activation function it is important to note that the activation
functions have different range. FANN_SIGMOID is e.g. in the 0 - 1 range while
FANN_SIGMOID_SYMMETRIC is in the -1 - 1 range and FANN_LINEAR is unbound.
Information about the individual activation functions is available at <fann_activationfunc_enum>.
The default activation function is FANN_SIGMOID_STEPWISE.
See also:
<fann_set_activation_function_layer>, <fann_set_activation_function_hidden>,
<fann_set_activation_function_output>, <fann_set_activation_steepness>,
<fann_get_activation_function>
This function appears in FANN >= 2.0.0.
*/
FANN_EXTERNAL void FANN_API fann_set_activation_function(struct fann *ann,
enum fann_activationfunc_enum
activation_function,
int layer,
int neuron);
/* Function: fann_set_activation_function_layer
Set the activation function for all the neurons in the layer number *layer*,
counting the input layer as layer 0.
It is not possible to set activation functions for the neurons in the input layer.
See also:
<fann_set_activation_function>, <fann_set_activation_function_hidden>,
<fann_set_activation_function_output>, <fann_set_activation_steepness_layer>
This function appears in FANN >= 2.0.0.
*/
FANN_EXTERNAL void FANN_API fann_set_activation_function_layer(struct fann *ann,
enum fann_activationfunc_enum
activation_function,
int layer);
/* Function: fann_set_activation_function_hidden
Set the activation function for all of the hidden layers.
See also:
<fann_set_activation_function>, <fann_set_activation_function_layer>,
<fann_set_activation_function_output>, <fann_set_activation_steepness_hidden>
This function appears in FANN >= 1.0.0.
*/
FANN_EXTERNAL void FANN_API fann_set_activation_function_hidden(struct fann *ann,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -