sklearn and large datasets

前端 未结 4 1377
无人及你
无人及你 2021-01-30 09:11

I have a dataset of 22 GB. I would like to process it on my laptop. Of course I can\'t load it in memory.

I use a lot sklearn but for much smaller datasets.

In

4条回答
  •  时光说笑
    2021-01-30 09:32

    I think sklearn is fine for larger data. If your chosen algorithms support partial_fit or an online learning approach then you're on track. One thing to be aware of is that your chunk size may influence your success.

    This link may be useful... Working with big data in python and numpy, not enough ram, how to save partial results on disc?

    I agree that h5py is useful but you may wish to use tools that are already in your quiver.

    Another thing you can do is to randomly pick whether or not to keep a row in your csv file...and save the result to a .npy file so it loads quicker. That way you get a sampling of your data that will allow you to start playing with it with all algorithms...and deal with the bigger data issue along the way(or not at all! sometimes a sample with a good approach is good enough depending on what you want).

提交回复
热议问题