Commit 984efa97 authored by Alex Fout's avatar Alex Fout

debugged pca mode of embedding

parent 842f9596
......@@ -2,14 +2,15 @@ from sklearn.decomposition import PCA
class Embedding(object):
def __init__(self, type="pca", ):
def __init__(self, type="pca", **kwargs):
self.type = type
self.n_components = kwargs["n_components"]
def train(self, train_data):
if self.type == "pca":
pca = PCA()
pca = PCA(n_components=self.n_components)
pca.fit(train_data)
self.pca= pca
self.pca = pca
def embed(self, train_data):
if self.type == "pca":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment