I'm doing a data analysis on data with more than 100 dimensions.
After that different ML-Algorithms like NN are applied to it.
When I do a PCA in the first place to reduce dimensionality to somewhat like 3-10, I persistently get better results (as in less miss-predictions) than without it.
My thought was that PCA should just speed up NN, etc, but not make them better?
Is this improvement realistic or did I make a mistake with my PCA?
This is how I´m doing it concretely:
Data; % training input
Test_Data; % test input
pca_size = 3; % pca size
%Scaling and Centering of Data
Scaled = (Data - mean(Data))./std(Data);
coeff = pca(Scaled);
Data_Reduced = Data * coeff(:, 1:pca_size);
Test_Data_Reduced = Test_Data * coeff(:, 1:pca_size);