Problem with classification learner/export model
5 views (last 30 days)
Hi guys, I am new with machine learning. I use classification learner and then export as model. My training dataset consist of 53 columns from x1 to x53 and 53 responses. Each column have 386 cells of numerical datas. From the confusion matrix I see that the algorithms seperate correctly the predictors x1...x53 into my two classes. The problem starts when I am trying to test the algorithm, I export the model via classification learner and import the testing file and then run it. The testin dataset consist 53 columns with 386 rows each, above each column I write x1..x53. The problem is the algorithm return 386 responses but it must return only 53. I think the algorithm check/predict rows instead of columns.
Any idea how to fix this?
A small piece of my dataset is shown below, it continues like this for 53 columns and 386 rows.
Raunak Gupta on 13 Nov 2020
In general, the representation for dataset is such that rows represent the sample points and columns corresponding to a particular row depicts how many features each observation has. So, number of rows will be the number of datapoints you have in the data. The classification learner also follows this representation thus giving out 386 predictions. I will suggest checking how many datapoint you have in training data so that you can appropriately give the matrix in training.
For example, if you have only 53 features for any observation the testing results are correct. If you have 386 features for each observation, then you can give transpose of the testing matrix and it will return only 53 predictions.
Hope this clarifies!