Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What exactly do transform(X) method? #1

Open
FarshidShekari opened this issue Jul 28, 2019 · 8 comments
Open

What exactly do transform(X) method? #1

FarshidShekari opened this issue Jul 28, 2019 · 8 comments

Comments

@FarshidShekari
Copy link

FarshidShekari commented Jul 28, 2019

I applied on my dataset and that's shape changed to (K, N), that k is input to your model and n is my X_train data features number. I supposed transform method is like dimensions reduction transform methods.

@mfbalin
Copy link
Owner

mfbalin commented Jul 28, 2019

K is the number of features you want to select, and so after you transform, what you get is the input with only the selected features.

@FarshidShekari
Copy link
Author

FarshidShekari commented Jul 28, 2019

this is my code:

selector.fit(X_tr, Y_tr, X_va, Y_va)
X_tr = selector.transform(X_tr)
print(X_tr.shape)

My trainning data has 20000 sample and 250 features, but after transform I get X_tr with shape (k,250) and not (20000,k), what's the problem?

@mfbalin
Copy link
Owner

mfbalin commented Jul 29, 2019

Can you confirm that X_tr has the shape (20000, 250)?

@mfbalin
Copy link
Owner

mfbalin commented Jul 29, 2019

Actually, I looked at the code and there is a bug, you can use this instead:
X_tr[:, selector.get_support(indices=true)]

@FarshidShekari
Copy link
Author

Can you confirm that X_tr has the shape (20000, 250)?

Yes

@FarshidShekari
Copy link
Author

Actually, I looked at the code and there is a bug, you can use this instead:
X_tr[:, selector.get_support(indices=true)]

I want to transform my data to new feature space because I want to feed it to my DNN.

@nasimulhasan
Copy link

@FarshidShekari could you find a solution to transform your data into a new feature space?

@dcorr039
Copy link

dcorr039 commented Dec 6, 2021

Hello I have a question about figure 1 from your paper. How is reconstruction supposed to be done? I only understand up to
part c where k=20 can be used to mask the original image. How is it you can reconstruct image as in part d.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants