○ RecognitionAPP.java の適切な場所に適切な部分を追記すること ○ 各自で完成させる部分もあるので注意すること ============================= // 学習用画像 protected BufferedImage training_images0[]; protected BufferedImage training_images1[]; // 評価用画像 protected BufferedImage evaluation_images0[]; protected BufferedImage evaluation_images1[]; ============================= // 学習用・評価用画像の決定方法の設定 enum DistributionMethod { USE_ALL_SAMPLES, CROSS_VALIDATION, BOOTSTRAP }; // 学習用・評価用画像の決定方法 protected DistributionMethod distribution_method = DistributionMethod.CROSS_VALIDATION; ============================= // Cross Validation 法を用いるときのグループ数 protected int cv_number_of_folds = 4; // Cross Validation 法を用いるとき、何番目のグループを評価に使用するか設定 protected int cv_evaluation_fold = 0; ============================= // 学習・評価に用いるサンプル画像の決定 public void sampleDistribution() { // サンプル画像が読み込まれていなければ終了 if ( ( sample_images0 == null ) || ( sample_images1 == null ) ) return; // 学習用画像の配列を削除する training_images0 = null; training_images1 = null; // 評価用画像の配列を削除する evaluation_images0 = null; evaluation_images1 = null; // 全てのサンプル画像を学習と評価に使用 if ( distribution_method == DistributionMethod.USE_ALL_SAMPLES ) { // 全てのサンプル画像を学習用画像の配列にコピー training_images0 = new BufferedImage[ sample_images0.length ]; for ( int i=0; i