fann_read_train_from_file
PHP function
Edit on GitHub ✎
(PECL fann >= 1.0.0)
Reads a file that stores training data
Description
fann_read_train_from_file(string $filename): resource
Reads a file that stores training data.
Parameters
filenameThe input file in the following format:
txtnum_train_data num_input num_output inputdata separated by space outputdata separated by space . . . inputdata separated by space outputdata separated by space
Return Values Train
Examples
fann_read_train_from_file example
php
<?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
txt
4 2 1
-1 -1
-1
-1 1
1
1 -1
1
1 1
-1