Skip to content

Why do unsupervised transformers only update on predict and not also on learn? #542

Answered by MaxHalford
TheRisenPhoenix asked this question in Q&A
Discussion options

You must be logged in to vote

It's a good question and comes up a lot.

The reason why we update the transformers in predict_one is because we have all the information we need at that point, and it performs better to update the transformers as soon as possible. This is especially true for transformers. If we update the transformers in learn_one, we could be updating them twice, which is not desirable.

Indeed the current way to do pretraining is to predict_one before learn_one. I understand it's not ideal. What we could do is add a learn_unsupervised boolean parameter to the learn_one method.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@TheRisenPhoenix
Comment options

@MaxHalford
Comment options

Answer selected by TheRisenPhoenix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants