ヘルプ センターヘルプ センター
'dividerand'
ランダムなインデックスを使用した、3 つのセットへのターゲットの分割
[trainInd,valInd,testInd] = dividerand(Q,trainRatio,valRatio,testRatio)
例
[trainInd,valInd,testInd] = dividerand(Q,trainRatio,valRatio,testRatio) は、分割するターゲットの数、学習用のベクトルの比率、検証用のベクトルの比率、およびテスト用のベクトルの比率を取り、学習インデックス、検証インデックス、およびテスト インデックスを返します。
trainInd
valInd
testInd
Q
trainRatio
valRatio
testRatio
すべて折りたたむ
この例では、関数 dividerand を使用して学習、検証、およびテスト用のインデックスを取得する方法を示します。
dividerand
3000 サンプルを、学習用が 60%、検証用が 20%、テスト用が 20% として分割します。
3000
60%
20%
[trainInd,valInd,testInd] = dividerand(3000,0.6,0.2,0.2)
分割するターゲットの数。スカラーとして指定します。
0.7
学習用のベクトルの比率。スカラーとして指定します。
0.15
検証用のベクトルの比率。スカラーとして指定します。
テスト用のベクトルの比率。スカラーとして指定します。
学習インデックス。行ベクトルとして返されます。
検証インデックス。行ベクトルとして返されます。
テスト インデックス。行ベクトルとして返されます。
train が呼び出されるときに、使用するデータ分割関数、そのパラメーター、およびターゲットを分割する基準を定義するネットワーク プロパティを以下に示します。
train
net.divideFcn net.divideParam net.divideMode
R2008a で導入
divideblock | divideind | divideint | dividetrain
divideblock
divideind
divideint
dividetrain
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office