GoLang fann_read_train_from_file

request it (111)
GoLang replacement for PHP's fann_read_train_from_file [edit | history]



Do you know a GoLang replacement for PHP's fann_read_train_from_file? Write it!

PHP fann_read_train_from_file

PHP original manual for fann_read_train_from_file [ show | php.net ]

fann_read_train_from_file

(PECL fann >= 1.0.0)

fann_read_train_from_fileReads a file that stores training data

Description

resource fann_read_train_from_file ( string $filename )

Reads a file that stores training data.

Parameters

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

Return Values

Returns a train data resource on success, or FALSE on error.

Examples

Example #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

See Also