3
votes

I just want to know if a neural network can be trained with a single class of data set. I have a set of data that I want to train a neural network with. After training it, I want to give new data(for testing) to the trained neural network to check if it can recognize it as been similar to the training sample or not.

Is this possible with neural network? If yes, will that be a supervised learning or unsupervised.

I know neural networks can be used for classification if there are multiple classes but I have not seen with a single class before. A good explanation and link to any example will be much appreciated. Thanks

3
were you able to achieve itkRazzy R

3 Answers

5
votes

Of course it can be. But in this case it will only recognize this one class that you have trained it with. And depending on the expected output you can measure the similarity to the training data.

An NN, after training, is just a function. For classification problems you can imagine it as a function that takes data as input and returns an integer indicating to which class it belongs to. That being said, if you have only one class that can be represented by an integer value 1, and if training data is not similar to that class, you will get something like 1.555; It will not tel you that it belongs to another class, because you have introduced only one, but it will definitely give you a hint about its similarity.

NNs are considered to be supervised learning, because before training you have to provide both input and target, i. e. the expected output.

2
votes

If you train a network with only a single class of data then It is popularly known as One-class Classification. There are various algorithms developed in the past like One-class SVM, Support Vector Data Description, OCKELM etc. Tax and Duin developed a MATLAB toolbox for this and it supports various one-class classifiers.

DD Toolbox

One-class SVM

Kernel Ridge Regression based or Kernelized ELM based or LSSVM(where bias=0) based One-class Classification

1
votes

There is a paper Anomaly Detection Using One-Class Neural Networks which combines One-Class SVM and Neural Networks.

Here is source code. However, I've had difficulty connecting the source code and the paper.