Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 06:17
    shamzos commented #25492
  • 06:14
    vitaliset review_requested #25209
  • 06:01
    jjerphan commented #25097
  • 06:01
    jjerphan commented #25097
  • 06:00
    jjerphan commented #25097
  • 05:02
    vitaliset synchronize #25209
  • 04:53
    vitaliset synchronize #25209
  • 03:32
    scikit-learn-bot commented #25117
  • 02:55
    vitaliset synchronize #25209
  • 02:54
    vitaliset synchronize #25209
  • 01:21
    vitaliset synchronize #25209
  • 01:04
    Micky774 synchronize #24698
  • 01:04
    Micky774 edited #24686
  • 01:03
    Micky774 synchronize #25538
  • 01:03
    Micky774 synchronize #24701
  • 00:56
    Micky774 synchronize #24701
  • 00:50
    Micky774 synchronize #24701
  • 00:41
    Micky774 commented #24698
  • 00:40
    Micky774 commented #24879
  • 00:40
    Micky774 closed #24879
Ghost
@ghost~5bc98094d73408ce4fabf741
Thanks @rahulunair your response is much appreciated, I will take a look at it.
lesshaste
@lesshaste
if you are doing image classification using scikit learn, do you have to convert the images into 1d arrays first?
Guillaume Lemaitre
@glemaitre
yes
lesshaste
@lesshaste
@glemaitre hmm... that seems to lose some vital information
i..e that pixels next to each other are related
Guillaume Lemaitre
@glemaitre
you can look at an example of load_digits to see that the 8x8 images are transformed to 1d 64 arrays
Olivier Grisel
@ogrisel
you can use a pre-trained convolutional neural network to extract interesting features
or you can use scikit-image HoG features for instance. Depending on the kinds of images, it might be enough.
Guillaume Lemaitre
@glemaitre

you can use a pre-trained convolutional neural network to extract interesting features

which a much better approach

lesshaste
@lesshaste
HoG features?
Histogram of Oriented Gradients ?
Olivier Grisel
@ogrisel
Histogram of Oriented Gradients
yes
lesshaste
@lesshaste
all very interesting thanks. It seems a weakness somehow in the general non-NN classification model that it can't take advantage of 2d data
Guillaume Lemaitre
@glemaitre
I think that I have 2 quick examples showing a bit how things can be connected:
lesshaste
@lesshaste
I suppose even in 1d random forests etc are invariant to permutations of the input array
@glemaitre thanks
Olivier Grisel
@ogrisel
yes, you have to do feature engineering first. You can consider the 2D conv layers before the final flatten / global average pooling as a feature extractor and the last fully connected layers as a standard classifier. It's just that both the feature extraction and the classifier are trained end-to-end together
lesshaste
@lesshaste
it's only really the convolutions that take advantage of the neighborhood of pixels I suppose
@ogrisel right.
Olivier Grisel
@ogrisel
but nowawdays, (convolutional) neural networks are almost always the good solution for image classification, unless you have very specific prior knowledge on the image you want to classify.
lesshaste
@lesshaste
I wonder if random forests could be changed to take arrays of pairs, say, as inputs
@ogrisel that's true but I am also thinking of time series data
where it makes a big difference if two values are from successive times or not
Olivier Grisel
@ogrisel

it's only really the convolutions that take advantage of the neighborhood of pixels I suppose

No: if you have deep conv layers with downsampling (strides or max pooling for instance) the conv layers can capture large high level complex patterns that span a large receptive field.

lesshaste
@lesshaste
@ogrisel you said No but I read your answer as yes :)
Olivier Grisel
@ogrisel
we need an example of some standard feature engineering you can do on time windows for time series forecasting / classification.
lesshaste
@lesshaste
@ogrisel that would be good to see
Olivier Grisel
@ogrisel
I misread the original quote, then yes.
But what I meant is that deep conv net can model non-local patterns
lesshaste
@lesshaste
@ogrisel yes . What I meant is that without any convolutions you don't get to see local patterns
on an NN topic, is there software to give you a good guess at a reasonable architecture for a classification task? I saw autokeras but it's pretty heavy.
Olivier Grisel
@ogrisel
if you really want to use decision trees for image classification you might be interested in https://arxiv.org/abs/1905.10073 but this is not (and will not) be implemented in scikit-learn ;)
lesshaste
@lesshaste
@ogrisel thanks! Why won't it be implemented? Because it doesn't work or coding resources?
Olivier Grisel
@ogrisel
I don't know what is the practical state of the art for architecture search for image classification
lesshaste
@lesshaste
really I am secretly interested in time series
Olivier Grisel
@ogrisel
because it is not a standard, established method.
lesshaste
@lesshaste
@ogrisel got you
image classification was just interesting because the data is in 2d
lesshaste
@lesshaste
but even in 1d it seems unclear to me what the right thing to do is
@ogrisel I have read those guidelines! They seem very sensible to me
lesshaste
@lesshaste
I greatly admire how scikit learn is run in general
@ogrisel I read that second link too :)
Joseph Daudi
@josedaudi
hi