필터 지우기
필터 지우기

How can I do a 50-50 split on data to obtain train and test datasets such that no value is common to both sets?

조회 수: 1 (최근 30일)
I am new to matlab and I can't find a function to do this.

채택된 답변

Walter Roberson
Walter Roberson 2016년 9월 11일
"The divide function is accessed automatically whenever the network is trained, and is used to divide the data into training, validation and testing subsets. If net.divideFcn is set to 'dividerand' (the default), then the data is randomly divided into the three subsets using the division parameters net.divideParam.trainRatio, net.divideParam.valRatio, and net.divideParam.testRatio. The fraction of data that is placed in the training set is trainRatio/(trainRatio+valRatio+testRatio), with a similar formula for the other two sets. The default ratios for training, testing and validation are 0.7, 0.15 and 0.15, respectively."
net.divideParam.trainRatio = 0.5;
net.divideParam.testRatio = 0.5;
net.divideParam.valRatio = 0;
  댓글 수: 1
Greg Heath
Greg Heath 2016년 9월 11일
Since you are new at this my advice is to begin using all of the defaults. Short examples are given in the documentation. See
REGRESSION/CURVEFITTING
help fitnet
doc fitnet
CLASSIFICATION/PATTERNRECOGNITION
help patternnet
doc patternet
For zillions of examples search in both the NEWSGROUP and ANSWERS using the search words
greg fitnet
greg patternnet
Hope this helps.
Greg

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Dimensionality Reduction and Feature Extraction에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by