Shape classification algorithm 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.







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.
That sounds like you're suffering from overfitting, probable duo the "curse of dimensionality", which means 2 things. 


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.
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: 


Curse of dimensionality
n >> p