scikit-learn VS Pytorch

Compare scikit-learn vs Pytorch and see what are their differences.

scikit-learn

scikit-learn: machine learning in Python (by scikit-learn)

Pytorch

Tensors and Dynamic neural networks in Python with strong GPU acceleration (by pytorch)
Our great sponsors
  • Sonar - Write Clean Python Code. Always.
  • InfluxDB - Access the most powerful time series database as a service
  • SaaSHub - Software Alternatives and Reviews
scikit-learn Pytorch
64 257
53,503 64,111
1.5% 2.9%
9.9 10.0
1 day ago 6 days ago
Python C++
BSD 3-clause "New" or "Revised" License BSD 1-Clause License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

scikit-learn

Posts with mentions or reviews of scikit-learn. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-03-01.

Pytorch

Posts with mentions or reviews of Pytorch. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-03-23.
  • AI’s compute fragmentation: what matrix multiplication teaches us
    4 projects | news.ycombinator.com | 23 Mar 2023
    My claim is subjective of course, but the idea is that there aren't many distinct kernels used in machine learning. It's all tensor contractions and element-wise operations. I'd argue that this can be maintained by hand without need for automation or high level abstraction.

    Triton is used in a templated way for a very specific albeit pervasive hardware (PTX compatible GPUs), which is why it works so well. Here's some of the code: https://github.com/pytorch/pytorch/blob/a66625da3bcdf1e262dd...

    Generalized kernel generation (i.e. synthesis of optimal performance from non-expert user defined kernels and novel hardware) would be fantastic to have, but it just doesn't seem particularly necessary in the field.

  • Was just disqualified from a high school web design competition because our submission was too good
    2 projects | reddit.com/r/BestofRedditorUpdates | 19 Mar 2023
    If you only care about data science and machine learning, then I would learn scikit-learn and PyTorch. Most companies and research groups have switched from Tensorflow to PyTorch, and Tensorflow itself replaced a number of frameworks before it (e.g., Caffe, Theano). I would also recommend reading An Introduction to Statistical Learning to get a basic understanding of different methods.
  • [D] PyTorch 2.0 Native Flash Attention 32k Context Window
    4 projects | reddit.com/r/MachineLearning | 17 Mar 2023
    You might look into https://github.com/pytorch/pytorch/pull/95793.
    4 projects | reddit.com/r/MachineLearning | 17 Mar 2023
  • Torch 2.0 just went GA in the last day.
    4 projects | reddit.com/r/StableDiffusion | 16 Mar 2023
    When you said "build" pytorch I thought you meant(simplified): git clone https://github.com/pytorch/pytorch # get the source code
  • PyTorch 2.0 Release
    4 projects | news.ycombinator.com | 15 Mar 2023
    This is the master tracking list for MPS operator support: https://github.com/pytorch/pytorch/issues/77764
  • Apple Mac M1/M2 Pygmalion Support for oobabooga
    2 projects | reddit.com/r/PygmalionAI | 8 Mar 2023
    There is also some hope of things using the GPU on the M1/M2 as well. I did some testing and actually got it hooked up with some caveats. Not all PyTorch functions are mapped to work properly in the new MPS functionality Apple has provided so far. It looks like both PyTorch and Apple are working on things so this will improve. It also seems that the memory requirements of loading the models with GPU functionality are crazy high. That could be a side effect of the prototyping I did, but not sure. If you're interested, more detail can be found here.
  • Accelerating AI inference?
    4 projects | reddit.com/r/tensorflow | 2 Mar 2023
    Pytorch supports other kinds of accelerators (e.g. FPGA, and https://github.com/pytorch/glow), but unless you want to become a ML systems engineer and have money and time to throw away, or a business case to fund it, it is not worth it. In general, both pytorch and tensorflow have hardware abstractions that will compile down to device code. (XLA, https://github.com/pytorch/xla, https://github.com/pytorch/glow). TPUs and GPUs have very different strengths; so getting top performance requires a lot of manual optimizations. Considering the the cost of training LLM, it is time well spent.
  • Nope, idk.
    2 projects | reddit.com/r/ProgrammerHumor | 25 Feb 2023
  • Zero-Shot Image-to-Image Translation
    2 projects | news.ycombinator.com | 13 Feb 2023
    While your millage (clearly) varies from mine, Anaconda is a de facto standard way to go in deep learning (and, generally, in most of the Python data science ecosystem).

    For example, when you go to the front page of PyTorch (https://pytorch.org/), the default way to go is with Anaconda. It precisely makes it easy to install things regardless of the system and with matching versions. For example, out of box, it gives GPU support for Apple Silicon - not extra installation instructions.

    Pip installers don't work with non-Python dependencies. Of course, you can manually install things any way you like (including inside Docker), but it is up to you to make sure that all dependencies are compatible. And it is a non-trivial task, given frequent updates of all things involved (including CUDA kernels, Python versions, PyTorch/TF versions, and all libraries related to them one way or the other).

What are some alternatives?

When comparing scikit-learn and Pytorch you can also consider the following projects:

Flux.jl - Relax! Flux is the ML library that doesn't make you tensor

Keras - Deep Learning for humans

Prophet - Tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth.

Surprise - A Python scikit for building and analyzing recommender systems

mediapipe - Cross-platform, customizable ML solutions for live and streaming media.

tensorflow - An Open Source Machine Learning Framework for Everyone

Apache Spark - Apache Spark - A unified analytics engine for large-scale data processing

flax - Flax is a neural network library for JAX that is designed for flexibility.

gensim - Topic Modelling for Humans

H2O - H2O is an Open Source, Distributed, Fast & Scalable Machine Learning Platform: Deep Learning, Gradient Boosting (GBM) & XGBoost, Random Forest, Generalized Linear Modeling (GLM with Elastic Net), K-Means, PCA, Generalized Additive Models (GAM), RuleFit, Support Vector Machine (SVM), Stacked Ensembles, Automatic Machine Learning (AutoML), etc.

Pandas - Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more