I want to apply PCA on a data set where I have 20 time series as features for one instance. I have some 1000 instances of this kind and am looking for a way to reduce dimensionality. For every instance I have a pandas Data Frame, like:
import pandas as pd
import numpy as np
df = pd.DataFrame(data=np.random.normal(0, 1, (300, 20)))
Is there a way to use sklearn.fit on all instances with each having a set of time series as feature space. I mean I could apply sklearn.fit on all instances separatly, but I want the same principal components for all.
Is there a way? The only not satisfying idea I have by now is to append all those series of one instance to one, so that I have one time series for one instance.
from PCA with several time series as features of one instance with sklearn
0 komentar:
Posting Komentar