<?php
// How to scale an existing unscaled training file and save it
$path = 'TrainingData' . DIRECTORY_SEPARATOR;
// Read raw (un-scaled) training data from file
$train_data = fann_read_train_from_file($path . "Training.data");
// Scale to a range of -1 to 1
fann_scale_train_data($train_data, -1, 1);
// Save the new scaled traning data as a file
fann_save_train($train_data, $path . 'ScaledTraining.data');