フィルターのクリア

Neural Networks - Simple question ?

2 ビュー (過去 30 日間)
Dink
Dink 2013 年 4 月 14 日
What is the difference between 'dividerand' and 'divideint' ??
  1 件のコメント
mangood UK
mangood UK 2013 年 4 月 14 日
i am with you

サインインしてコメントする。

採用された回答

Greg Heath
Greg Heath 2013 年 4 月 15 日
1.Read the command line documentation:
help dividerand
doc dividerand
type dividerand % If you have permission
and
help divideint
doc divideint
type divideint % If you have permission
My naive interpretation:
dividerand: randomly rearranges the integers 1:N ( e.g., with randperm) and with the default ratios 0.7/0.15/0.15, assigns the last Ntst = round(0.15*N) to the test set, the middle Nval = round(0.15*N) to the validation set and the first Ntrn = N - Nval - Ntst to the training set.
Example: choose a value for N and numtrials
N = 30
numtrials = 10
rng(0) % Initialize the RNG so that the example can be duplicated
for n =1:numtrials
[trnind,valind,tstind] = dividerand(N,0.7,0.15,0.15) % no semicolon
end
divideint: assigns members of the three sets to be as interleaved as possible. For example, if N = 30 then Nval = Ntst = round(0.15*30) = 5 and Ntrn = 20. I don't know the algorithm used by MATLAB (you can check type divideint) but, you could choose the spacing of valind and tstind to be uniform (e.g., = 6), and starting with a number in 1:6.
Hope this helps.
Thank you for formally accepting my answer
Greg
  1 件のコメント
Dink
Dink 2013 年 4 月 15 日
Thanks very much Greg!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSequence and Numeric Feature Data Workflows についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by