I have a MATLAB dataset and I want to extract the numbers only without reading the headers. Is there any straightforward way to do that?
I HAVE THIS:
MeanOfTrainingMSE MeanOfTestMSE
Naive Regression 26.291 26.327
Linear Regression (attribute 400) 1.2466 1.2592
Linear Regression (attribute 357) 1.214 1.2356
Linear Regression (attribute 440) 1.1494 1.1562
Linear Regression (attribute 404) 1.0072 1.0111
Linear Regression (attribute 238) 0.92402 0.93002
Linear Regression (attribute 473) 0.89838 0.90397
Linear Regression (all attributes) 4.1155e-07 877.58
Ridge Regression 2.9044e-10 0.2533
Kernel Ridge Regression 1054.8 1023.2
I WANT TO GET THIS:
26.291 26.327
1.2466 1.2592
1.214 1.2356
1.1494 1.1562
1.0072 1.0111
0.92402 0.93002
0.89838 0.90397
4.1155e-07 877.58
2.9044e-10 0.2533
1054.8 1023.2
If your dataset is named
aFile, for example, you can retrieve the values of those columns of interest byEdit to answer your comment:
There may be a better way, but you could do something like:
Of course this assumes each column in your data is numeric.