4
$\begingroup$

I need some help with a single layered perceptron with multiple classes.

What I need to do is classify a dataset with three different classes, by now I just learnt how to do it with two classes, so I have no really a good clue how to do it with three.

The dataset have three different classes: Iris-setosa, Iris-versicolor and Iris-versicolor.

The url with the dataset and the information is in : http://ftp.ics.uci.edu/pub/machine-learning-databases/iris/iris.data.

I really appreciate any help anyone can give to me.

Thanks a lot!

$\endgroup$
5
$\begingroup$

The standard way to do this is called 'one versus all'... you train three perceptrons. First 1 target = is class a?, 2nd perceptron target = is class b? 3rd = is class c. You just train each perceptron separately, and then take max of the three perceptrons to decide class

$\endgroup$
2
$\begingroup$

Well , When it comes to AI I am an absolute beginner but here is my answer to your question based on my understandings :

a perceptron has only one activation function, therefore it can return only the values of true and false (in most cases true=0 and false=1), so because of that, I don't think that you will be able to accomplish your goal using only one perceptron but you can absolutely do it using multiple perceptrons which essentially is a neural networks, of course training the network would be a lot harder than calculating the changes of weights as you do in perceptrons, You are gonna have to take advantage of a training algorithm such as backpropagation and a sigmoid activation function. I hope my answer was helpful.

$\endgroup$
2
$\begingroup$

Perceptrons, strictly speaking, are binary classifiers.

To make a multi-class classifier, you should switch to a standard feed-forward neural net with a softmax output layer. Without any hidden layers this is equivalent to multinomial logistic regression.

You can also do the one-vs-all trick as @seanv507 suggests. This often works well in practice but there's no strong basis for it in theory, and the true multi-class version is easier conceptually and practically in this case.

$\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.