1
$\begingroup$

The focus of this question is: What components should I keep?

There is a dataset with the following structure, which will be the input values for a neural network.

enter image description here Each row is associated with an image in a directory. The Confidence variable is a dummy value that is always 1.

The purpose of this dataset is to train it to a convolutional neural network to detect a particular object. That is why the network defines as input only 4 coordinates where the object is identified with the columns XMin, XMax, YMin, YMax.

The names of the image features are: IsOccluded, IsTruncated, IsGroupOf, IsDepiction, IsInside.

So I made a correlation table, you see that the 4 coordinates have high correlation with each other.

enter image description here

I have a question here: How to interpret this correlation table to know if it is correct to continue with the analysis?

Assuming that the result of that matrix is necessary to do the analysis, then a table is made with the main components and their relationship of variance explained as shown below.

enter image description here

After that, use sklearn's PCA and it shows the number of components and their cumulative explanatory variance.

enter image description here

From all this, I interpret that the 4 coordinates are totally necessary and I can discard the characteristics.

¿Why are the 4 coordinates are necessary? Because those columns will be the input for a dataset to an CNN.

What could be improved from the interpretation? Any help is welcome

$\endgroup$

1 Answer 1

0
$\begingroup$

I would like to comment on two issues here.

First, we may ask "how many" components should keep instead of "what components". This because PCA is doing a linear transformation of the original feature space. So after transformation, we do not have the original components and we can only select how many to keep, or what to keep in terms of first, second principle component...

Second, I guess you goal is trying to build a classification model using CNN. But note that, PCA is a "unsupervised method", which means it is just trying to keep as much information as possible to the data, with out considering the label. In other words, it is possible we you only select 1 component but get excellent classification results and keeping all components will still not able to do classification well.

Detailed discussion can be found here: How to decide between PCA and logistic regression?

$\endgroup$
1
  • $\begingroup$ Being an unsupervised method, what do you recommend to do? Can this method be applied to supervised methods? If so, with the graphs I have mentioned, would it be enough to use only the components of the coordinates for the model? I only did this to justify because I am using the coordinates and not the other features. $\endgroup$
    – Sebastián
    Commented May 11, 2020 at 5:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.