(PECL fann >= 1.0.0)
fann_read_train_from_file — Reads a file that stores training data
$filename
) : resourceReads a file that stores training data.
filename
The input file in the following format:
num_train_data num_input num_output inputdata seperated by space outputdata seperated by space . . . inputdata seperated by space outputdata seperated by space
Gibt bei Erfolg eine Resource mit Trainingsdaten zurück, ansonsten FALSE
im Fehlerfall.
Beispiel #1 fann_read_train_from_file() example
<?php
$train_data = fann_read_train_from_file("xor.data");
if ($train_data) {
// Do something with $train_data for XOR function
}
?>
Contents of xor.data
4 2 1 -1 -1 -1 -1 1 1 1 -1 1 1 1 -1