how to split a dataset for training and testing in matlab?

조회 수: 19 (최근 30일)
Bidyarani
Bidyarani 2023년 1월 22일
댓글: the cyclist 2023년 1월 22일
i have a dataset in .mat format with variables having different dimensions. i want to used this dataset to train the machine learning algorithm. Before training , first i need to split the data into two- one for training and one for testing. Can someone please help me out with this problem?
  댓글 수: 2
Sargondjani
Sargondjani 2023년 1월 22일
Please be more precie what your problem is. I mean, can you import the data? And when you import the data how do you want to split the data set? Basically you just have to split your matrix in two. What is your problem there?
Bidyarani
Bidyarani 2023년 1월 22일
@Sargondjani i have a dataset in .mat format . I have gone through many tutorial for data splitting but found that most of the tutorial are using dataset in csv file format. Since my dataset is in mat format and every variables have different dimensions , i am not able to understand it. Can you please help me splitting this data for training machine learning model . i am not able attached the file since the file is too big. i will attached the link below. https://github.com/Saad7861004/Machine-Learning-For-Wireless-Cellular-Networks.

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

채택된 답변

the cyclist
the cyclist 2023년 1월 22일
randsample, cvpartition, and randperm can all be useful for creating training/test splits. As @Sargondjani mentions, we need more info to give a more specific solution.
  댓글 수: 2
Bidyarani
Bidyarani 2023년 1월 22일
@the cyclist i have a dataset in .mat format for my research. I have gone through many tutorial for data splitting but found that most of the tutorial are using dataset in csv file format. Since my dataset is in mat format and every variables have different dimensions , i am not able to understand it. Can you please help me splitting this data for training machine learning model . i am not able attached the file since the file is too big. i will attached the link below. https://github.com/Saad7861004/Machine-Learning-For-Wireless-Cellular-Networks.
the cyclist
the cyclist 2023년 1월 22일
I did look at the data on the github repo. (For the sake of anyone else here, I have attached a screenshot of what the variable workspace looks like.)
Please think about this from our perspective. You have 27 variables, we have no idea what they all mean. (Of course, we can guess a little bit from the variable names and the github repo name.)
Unless you can be a lot more specific about exactly what you are trying to do, there is no chance that we can help you. We don't know what you are trying to predict. We don't know what the features are. (This would sometimes be called the response and explanatory variables.)
It is unusual that some of the variables are close -- but not exactly -- the same dimension. We can't figure that out for you.
If you just have one specific variable that you are trying to split into training and test sets, that is easy. But it seems you need more help than just that.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Support Vector Machine Regression에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by