DAE/SDAE's `transform` changes the input dataframe
jeongyoonlee opened this issue · 0 comments
jeongyoonlee commented
From the comment by Bruce Harold at Kaggle:
Thank you for sharing both your utility code and this example. I tried using your SDAE with logistic regression and it helped significantly. I look forward to trying some of your other tools as well.
But I found one thing that surprised me: two different runs of the transform function on the same array yielded two different results. It turns out that this method is changing the data passed into it.
Here is an example:
trans_test_1 = sdae.transform(tr2_X)
print(tr2_X.iloc[0:3, 72:], '\n\n')
trans_test_2 = sdae.transform(tr2_X)
print(tr2_X.iloc[0:3, 72:])
Output
feature_72 feature_73 feature_74
2 0 7 6
3 4 13 6
4 0 7 6
feature_72 feature_73 feature_74
2 0 9 8
3 4 15 8
4 0 9 8
I assume that this is an oversight and that you would like to change this behavior.