문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top