0
$\begingroup$

I have a dataset of shape edges, that I am trying to make a model for with sklearn. I'm new to the machine learning world, so I am struggling to create a good model. Using SVM, I was able to get a supposed 81% precision, but when I feed it an image outside the training or test set, it consistently returns the wrong prediction, almost every time.

enter image description here

enter image description here

Question: Is there is a better way of doing this than using SVM? Or are these shapes too similar? I have 90 images in the training set.

Here is a link to my ML code.

$\endgroup$
1

1 Answer 1

0
$\begingroup$

That sounds like you're suffering from overfitting, probable duo the "curse of dimensionality", which means 2 things.

  1. When trying to measure distance between two points in high dimensional space and trying to interpret this data, the difference between the longest and the shortest distance get's less meaningful.

  2. Trying to train an algorithm with way less samples then features, like in your case, will cause that the algorithm will memorize your samples.

I see 3 options. Getting more data, reduce your feature set or try greater values for C. C will regularize the decision boundary.

More to read:

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.