IZEL_test

セットされたテスト用データについてテストを行います。

テスト結果はMT4エキスパートアドバイザの操作履歴に出力されます。

void  IZEL_test(int handle)

引数

  引数名

I/O                説明
handle In ハンドラ値

戻り値

0 : 正常

-1: エラー

サンプルソース

#include <Izel.mqh>

void sample()
{
   int handle;

   //   オープン
   handle = IZEL_open();

   if( handle < 0 ) {
      // エラー処理;
   }

   // 学習モデルの定義 
   IZEL_add_layer(handle, 100);
   IZEL_add_layer(handle, 200);
   IZEL_set_output_layer(handle, 2);

   // トレーニングデータのセット
   IZEL_open_x_train(handle);
   IZEL_append_x_train(handle, 1.0);
   IZEL_append_x_train(handle, 2.0);
   IZEL_close_x_train(handle);
   IZEL_set_y_train(handle, 1);

   /*
      データのセットを繰り返す。
      ・
  ・
  ・
 */
   // トレーニング
   IZEL_fit(handle, 100, 32);
   
  
 // トレーニングデータのセット
   IZEL_open_x_test(handle);
   IZEL_append_x_test(handle, 1.0);
   IZEL_append_x_test(handle, 2.0);
   IZEL_close_x_test(handle);
   IZEL_set_y_test(handle, 2);

   /*
      データのセットを繰り返す。
      ・
  ・
  ・
 */   

   IZEL_test(handle);
   // クローズ
   IZEL_close(handle);
}

実行結果

Copyright (C) izel.cloud-line.com All Rights Reserved.