필터 지우기
필터 지우기

how to partition a dataset into 60% v 40%

조회 수: 4 (최근 30일)
sam
sam 2014년 11월 9일
댓글: the cyclist 2020년 2월 13일
I have a diabaetes.mat file downloaded. I want to partition the data set into two groups 60% training set and 40% test set. I then want to rank the features.
I figure to rank the features i will use the function corrcoef but i have no idea how to partian the data set into 60% vs 40%.
cheers sam

답변 (1개)

the cyclist
the cyclist 2014년 11월 9일
Depending on what toolboxes you have installed, there are a number of options:
cvpartition
randsample
randperm
The first two require the Statistics Toolbox, but that last one is in core MATLAB.
  댓글 수: 2
Taiwo Kupoluyi
Taiwo Kupoluyi 2020년 2월 13일
편집: Taiwo Kupoluyi 2020년 2월 13일
I guess the question to ask(for smeone new to Matlab) is what Toolbox do i need to have in order to be able to partition a dataset into Training and Holdout data.
Thank you in anticipation of your response.
the cyclist
the cyclist 2020년 2월 13일
You don't have to have any Toolbox to partition a dataset. You can partitiion a dataset into training and holdout using the randperm function (in base MATLAB) to randomly order the data, and then pick the first 80% (for example) for training.
But the cvpartition and randsample functions might make the job a little easier. Also, the Statistics and Machine Learning Toolbox is likely to have many other functions you might want to use for modeling.
This is kind of a general rule for toolboxes. You could write everything from scratch if you want to. Getting a toolbox is paying for the convenience (and rigor) of having MathWorks do it.

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

카테고리

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