ab4c3743ec1c77d67ddede9fb400b55b3778e39b,python/hypertools/reduce.py,,reducePCA,#Any#Any#,18
Before Change
m.fit(np.vstack(x))
r=[]
for i in x:
r.append(m.transform(i))
return r
////MAIN FUNCTION////
def reduce(arr,ndims=3, method="PCA"):
After Change
x_split= np.cumsum([i.shape[0] for i in x][:-1])
m = PPCA(np.vstack(x))
m.fit(d=ndim)
x_pca = m.transform()
return list(np.split(x_pca,x_split,axis=0))
else:
m=PCA(n_components=ndim, whiten=True)
m.fit(np.vstack(x))
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: ContextLab/hypertools
Commit Name: ab4c3743ec1c77d67ddede9fb400b55b3778e39b
Time: 2016-12-17
Author: andrew.heusser@gmail.com
File Name: python/hypertools/reduce.py
Class Name:
Method Name: reducePCA
Project Name: scikit-learn-contrib/sklearn-pandas
Commit Name: 8c4af33256305cb317a9e5601a051214b7b1b22b
Time: 2013-09-19
Author: paulgb@gmail.com
File Name: sklearn_pandas/__init__.py
Class Name: DataFrameMapper
Method Name: transform
Project Name: ContextLab/hypertools
Commit Name: 1430ab58648b4bd189f232ae2acc8b86ce2fd9aa
Time: 2016-12-17
Author: andrew.heusser@gmail.com
File Name: python/hypertools/reduce.py
Class Name:
Method Name: reducePCA