How to get sample names from scatter plot in classification learner

15 次查看(过去 30 天)
Hi All:
I am training a model using classification learner, sometimes, the training results of some samples are inconsistent with their labels.
In order to analyze the reason, I need to find out the sample who's label is not consistent with its prediction
My current approach is: get the first feature, and then find out which sample this feature belongs to
I think this is error-prone and time-consuming.
So, how should i improve or does matlab provide a convenient way that i don't kown. Thanks

采纳的回答

KSSV
KSSV 2022-8-18
编辑:KSSV 2022-8-18
If you have feature1, feature2 in hand, you can use knnsearch to get the index and then check the sample name.
If you are having the validation data in hand, and you want to see which are not predicted right, note that you have the output in hand already and you can see it's one-to-one correspondence.
  2 个评论
yingbo
yingbo 2022-8-19
编辑:yingbo 2022-8-19
Thanks for reply.
Unfortunately, I find out that the best model for the samples is Weighted KNN.
For this model, most circumstances, the training accuracy is 95%, for example, the test accuracy may be 100%, even on the same samples.
And what I export is compact model that without training data.

请先登录,再进行评论。

更多回答(1 个)

Image Analyst
Image Analyst 2022-8-19
Not sure what you're doing exactly. Did you make up a table variable with your predictors (features)? Then did you make up a variable with the ground truth "answers" (responses)? If so you just specify those as inputs and tell it to train. Then select a model and export the compact model. I don't see any need, after the model has been generated, to scatter one predictor variable against another, unless you're just curious. You won't be doing anything with that. You'll just be plugging in unknown data and getting out a predicted response.
If you have any more questions, let me make the model for you. Attach your predictor variables, and your ground truth (answers) variable so I can make the model for you.

Community Treasure Hunt

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

Start Hunting!

Translated by