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

25 Ansichten (letzte 30 Tage)
Bidyarani
Bidyarani am 22 Jan. 2023
Kommentiert: the cyclist am 22 Jan. 2023
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 Kommentare
Sargondjani
Sargondjani am 22 Jan. 2023
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 am 22 Jan. 2023
@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.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

the cyclist
the cyclist am 22 Jan. 2023
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 Kommentare
Bidyarani
Bidyarani am 22 Jan. 2023
@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 am 22 Jan. 2023
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.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by