How to train single-class classification ?

20 views (last 30 days)
Hi All,
Could anyone share me a guide to train the machine learning/ deep learning model for single label?
I cannot do this with Deep learning toolbox with VGG16
I have 1 single label of 1 typle image.
I want to train a model to classify the image belong to this type of label or not.
Evaluate base on probaility
Thanks and Regard!
  1 Comment
Walter Roberson
Walter Roberson on 19 May 2023
Well, in theory you could train on a set of examples of features, and you could have the classifier reject an example if it was too many standard deviations outside the mean for the features. But this is a fairly weak classifier.
What would be much more common would be to train on one-versus-everything-else -- for example to identify stop signs, you would train with several examples of stop signs, and you would also include examples of other traffic signs... and of dalmations, and of blueberries, and of rivers, and of cereal boxes, and of sunsets, and of spectrograms... and so on.
The classification operation would then either predict class 1 (stop signs) or class 2 (image is something else that is not a stop sign).

Sign in to comment.

Accepted Answer

Ranjeet on 5 Jun 2023
Edited: Ranjeet on 5 Jun 2023
Hi Jenifer,
As per the description, it is a one-class classification task.
If the occurrence of the target image (the one class that is to be detected) is quite less frequent than all other classes, then the problem falls under anomaly detection. You should look at the following resources to get started:
  1. One class SVM for anomaly detection
  2. Detect Image Anomalies using Explainable FCDD Network
If the target class occurs equally frequently as all the other classes, you may formulate the problem as binary classification (target vs non-target class) and try the following examples:
  1. SVM for Binary Classification
  2. Create Simple Deep Learning Neural Network for Classification

More Answers (0)

Community Treasure Hunt

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

Start Hunting!