Machine learning- what classifier to use to classify: object 1, object 2, object 3, none of those 3?

asked 2017-09-20 13:49:09 -0500

linengmiao gravatar image

updated 2017-09-20 14:13:32 -0500

I am working on a project based on object recognition. I have 3 types of objects. I am always able to detect them but unable to correctly classify the using an SVM. Very often an "unknown" object is classified as eg object 1 with a very high certitude. My svm only contains 3 classes actually: object 1,2 and 3. I dont have any data about the "unknown" object when training. When the object s features don t correspond to any of the 3 objects, it should be classified as "unknown". What classifier would be the most suited for this?

I was eventually thinking about random forest, but not sure.

Thanks

EDIT:

My software contains an option "disable object 2 and 3", which means that in that case the classifie should be able to classify the object as object 1 or unknown.

edit retag flag offensive close merge delete

Comments

it might be, you're chasing a chimera.

classifiers just take "the closest" from the trained set, and return it. there's no notion of an "unknown" class here.

"none of those" would be a 4th class, but what would you train it on ? whatever you come up with, it'll only "smear" your valid predictions.

again, you'll have to accept the limitations of the underlying idea.

berak gravatar imageberak ( 2017-09-20 13:52:54 -0500 )edit

@berak indeed, that's what I thought. In that case what solution/work around do I have?

linengmiao gravatar imagelinengmiao ( 2017-09-20 13:58:31 -0500 )edit

there is no workaround.

say, what you mean, mean, what you say.

if you specify: "there are 3 classes", it will just do that (and nothing else)

(it's also not limited to certain ml algos, but a general problem)

berak gravatar imageberak ( 2017-09-20 14:02:37 -0500 )edit

@berak , this might sound stupid but: regarding random forests it basically is just a successions of if statements. Wouldn't it be possible to tweak/paramtrize it, so that if one of the conditional branches is false it goes to an "else statement" which in my case I could then interprete as "unknown"?

linengmiao gravatar imagelinengmiao ( 2017-09-20 14:10:27 -0500 )edit

none of it matters.

berak gravatar imageberak ( 2017-09-20 14:11:04 -0500 )edit

ah, wait. we're talking about a "multi-class-problem" here.

it will all look different, if you make it a "one-vs-all-others" problem for each class involved.

then, indeed, you can have the case of: "none of them triggered"

berak gravatar imageberak ( 2017-09-20 14:16:46 -0500 )edit

@berak , what classifier do you think would be the most suited then? SVM, random forest, ...?

linengmiao gravatar imagelinengmiao ( 2017-09-20 14:25:29 -0500 )edit

it does not matter. (choose the one, you're most familiar with)

berak gravatar imageberak ( 2017-09-20 14:26:53 -0500 )edit

@berak , I tried using 200 pictures per person. But hte issue is still the same and still unsolved. I tried a one-vs-rest architecture of non-linear svms. What would you suggest?

linengmiao gravatar imagelinengmiao ( 2017-09-26 06:28:59 -0500 )edit

oh, if it's an SVM, try a linear one, and playing with the params: C, gamma, p

berak gravatar imageberak ( 2017-09-26 07:05:20 -0500 )edit