#Can logistic regression be used for image classification?
1 messages · Page 1 of 1 (latest)
I guess it depends on the problem? Theoretically, if you can make a machine learning algorithm produce meaningful extrapolations for your particular problem, it's going to work
Logistic regression is basically just linear regression but with something like a threshold thingy at the end
What are you going to put inside? It definitely won't just be the pixels, because whether the 32nd pixel in the 10th row of your cat image is white makes very little difference to what kind of cat breed it is in isolation
I guess if you were able to compute the size of the eyes or nose or something from other models or computer vision stuff then that could make sense
CNNs lead image classification but they do a lot of work under the hood that you'd presumably have to do yourself with a thinner and more hand-made model (and you probably won't get as good results unless the problem is very specific because you can't do as much tedious work as state-of-the-art DNs)
If you could elaborate on what kind of images you're classifying and for what reason I could give a less generic response maybe
for example, digit recognition
I see. In that case you'll still have to hand-pick what each digit looks like and maybe produce a score for different features
I mean this is not the only way to do it
But if you don't have pattern recognition on the model's end, you'll have to decide yourself what the model is like (i.e. learn something else than the whole image class basically)
I'm p sure classical algorithms would have been built for this but just as an example if you're classifying 0s and 1s you could do edge detection and then pass the contour size through logistic regression
but how about the neighboring pixels in the image? I don't think logistic regression is able to hold that information
Can logistic regression be used for image classification?
Yeah, which is why I mentioned you could do edge detection and see how tall and wide the object is, and then pass the width and height through logistic regression
You won't pass the raw pixels of course as I mentioned
is the width and height only already enough?
I mean it may not be, but this is just an example
oh
Probably for 0s and 1s it'd be pretty accurate
But that's not an exceedingly hard problem
And even a simple CNN would outperform us easily
It's more about appropriateness than whether a technique 'can' be used basically
I see
Yeah this question delved into some of the 'definition' of AI / ML / computer vision and stuff, so probably you'd like to read up on why and how ML algorithms work the way they do. It's in the introduction of most books
The theoretical bases of AI are very interesting and can provide insight into why things were built they way they were, which is necessary for the skill of hand-picking algorithms for new tasks
Is deep learning not just layered logistic regression with an activation function? Smaller vision models have logistic activation anyway...
Ye exactly, but it's layered so it has the capacity to learn things that we'd have to extract using other techniques ye
But yeah I think that's a better way to put it