3
$\begingroup$

I'm trying to predict whether a drawing matches a "trained" drawing. The drawings are black on white background images (32 x 32). More specifically I'd like to check if a new example is relatively close enough to the trained examples or completely different. The trained drawings would be different for each user that tests this.

The requirement that I've set for myself is that I only have 3 training examples of what is the drawing. What are some recommended learning algorithms that work with little data, and can help in this scenario?

Here's examples of some training data:

enter image description here

What I've tried:

One-Class SVM with non-linear kernel (Novelty Detection)
Specifically I used RBF kernel with values 0.1 for nu and gamma. As you can see from the graph below it classifies anomalies and non-anomalous test examples as acceptable, except I don't know how to split the data between the red and the green.

enter image description here

I also tried using a sigmoid kernel, but as you can see it now misses everything:

enter image description here

I've also used Logistic Regression using a regularization parameter of 100. I fed it 3 negative classes that I made (Maybe not the best idea since I don't know what their drawing will be in advance:

enter image description here

At the most it gets as good as 75% accuracy and at worst (blank drawing) 63%. Precision: 0.666667 | Recall: 1.000000 | F-Score: 0.800000.

I've heard of boosting a class, but I'm wondering how do I do that when I have only one class (positive examples)?

$\endgroup$
  • $\begingroup$ Distance to nearest neighbor? $\endgroup$ – Anony-Mousse Sep 27 '15 at 4:31
1
$\begingroup$

I think you might first look here for dealing with small sample sizes... Good classifiers for small training sets

However, I think you should consider using data augmentation methods to increase your training set size. There are a few good write-ups from Kaggle competitions where the winners used this technique. I think the one closest to your problem is from the Plankton challenge. Look at their data augmentation steps, summarized below:

  • rotation: random with angle between 0° and 360° (uniform)
  • translation: random with shift between -10 and 10 pixels (uniform)
  • rescaling: random with scale factor between 1/1.6 and 1.6 (log-uniform)
  • flipping: yes or no (bernoulli)
  • shearing: random with angle between -20° and 20° (uniform)
  • stretching: random with stretch factor between 1/1.3 and 1.3 (log-uniform)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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