Question

In FANN , after I import the training data I scale it accordingly the activation functions I am using . I use FANN_SIGMOID_SYMMETRIC so it should be -1.0 and 1.0.

The range of my training data is [-100,100]

...

fann_scale_input_train_data (train_data, -1.0, 1.0);
fann_scale_output_train_data(train_data, -1.0, 1.0);
...

After the network converges I want to run it with new input data. Since the my new data has range [-50,50] I should scale respecting the previous setup and I should call

...
fann_scale_input_train_data (run_data, -0.5, 0.5);
...

Is there any function can I use so that I can avoid this check and scale my new data accordingly to the previous scale? Something that may be stored in the network itself?

Essentially without knowing which input and scales were used is it possible to scale new data by using some function?

I am still new to the library (incredibly fast) and I cannot sort this out.

Was it helpful?

Solution

I found it there are functions

fann_scale_input( struct fann * ann,  fann_type * input_vector)
fann_scale_output( struct fann * ann, fann_type * output_vector)

That scale input/output based on a previous trained data.

I guess that they should do the job.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top