fann_read_train_from_file

(PECL fann >= 1.0.0)

fann_read_train_from_fileReads a file that stores training data

説明

fann_read_train_from_file(string $filename): resource

Reads a file that stores training data.

パラメータ

filename

The input file in the following format:

num_train_data num_input num_output
inputdata separated by space
outputdata separated by space

.
.
.

inputdata separated by space
outputdata separated by space

戻り値

成功した場合にニューラルネットワークトレーニングリソース、エラー時に false を返します。

例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

参考

関連キーワード:  file, fann, Reads, stores, that, in, data, space, separated, read