<div dir="auto">Hi Sarah, I have some reflection questions. You don't need to answer  all of them :) how many categories (approximately) do you have in each of those 20M categorical variables? How many samples do you have? Maybe you should consider different encoding strategies such as binary encoding. Also, this looks like a big data problem. Have you considered using distributed computing? Also, do you really need to use all of those 20M variables in your first approach? Consider using feature selection techniques. I would suggest that you start with something simpler with less features and that run more easily in your machine. Then later you can starting adding more complexity if necessary. Keep in mind that if the number of samples is lower than the number of columns after one hot encoding, you might face overfitting. Try to always have less columns than the number of samples. </div><div class="gmail_extra"><br><div class="gmail_quote">On Aug 2, 2018 12:53, "Sarah Wait Zaranek" <<a href="mailto:sarah.zaranek@gmail.com">sarah.zaranek@gmail.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Joel -</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Are you sure?  I ran it and it actually uses bit more memory instead of less, same code just run with a different docker container. </div><div class="gmail_default"><br></div><div class="gmail_default">Max memory used by a single task: 50.41GB  <br></div><div class="gmail_default">vs</div><div class="gmail_default">Max memory used by a single task: 51.15GB<br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Cheers,<br>Sarah</div></div><div class="elided-text"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 1, 2018 at 7:19 PM, Sarah Wait Zaranek <span dir="ltr"><<a href="mailto:sarah.zaranek@gmail.com" target="_blank" rel="noreferrer">sarah.zaranek@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">In the developer version, yes? Looking for the new memory savings :)</div><br><div class="gmail_quote"><div dir="ltr">On Wed, Aug 1, 2018, 17:29 Joel Nothman <<a href="mailto:joel.nothman@gmail.com" target="_blank" rel="noreferrer">joel.nothman@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Use OneHotEncoder</div>
</blockquote></div>
</blockquote></div><br></div>
_______________________________________________<br>
scikit-learn mailing list<br>
<a href="mailto:scikit-learn@python.org" target="_blank" rel="noreferrer">scikit-learn@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/scikit-learn" rel="noreferrer noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/scikit-learn</a><br>
</div></blockquote></div><br></div>