0% found this document useful (0 votes)
121 views19 pages

ML Libraries

Uploaded by

elbarkanima
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
121 views19 pages

ML Libraries

Uploaded by

elbarkanima
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

OVERVIEW OF POPULAR

MACHINE
LEARNING LIBRARIES SUCH AS
SCIKIT-LEARN,
AND PYTORCH
MACHINE LEARNING
LIBRARY???
When writing a program, rather than beginning with a
blank slate each time, programming libraries allow you
to start out with some of the code already written for
you. This ability means that rather than spending time
working on the necessary but basic algorithms, you
can instead focus your efforts on the more complex
details of the project.
MACHINE
LEARNING
LIBRARIES

Utilizing machine learning libraries is useful when developing


machine learning models, saving you time while writing code
and debugging and allowing you to create several types of
applications. You have several options available to you based
on the specific needs and purpose of the machine learning
model you’re building and the programming language you’re
using.
Library Highlights

• KEY LIBRARIES OVERVIEW

Two pivotal machine learning libraries:


Scikit-learn, PyTorch. Each serves unique
use cases and offers distinct features.
Selecting the right library can
significantly boost your ML projects.
TensorFlow Sci-Kit Learn PyTorch
MACHINE
An open-source
machine learning
A machine learning
library for Python that is
The PyTorch machine
learning library allows
LEARNING
library, you can use
TensorFlow to build
also accessible with
C++, Sci-Kit Learn is
you to use Python to
build deep learning
LIBRARIES
machine learning excellent when working models. One reason for
models, specializing in with standard machine PyTorch's popularity
developing neural learning algorithms, among machine
networks and deep including clustering, learning professionals is
learning applications. linear and logistic its support for
Although initially regression, and prototyping, allowing
designed for Python, classification. You can you to quickly
you can access use Sci-Kit Learn experiment with
TensorFlow when alongside other Python different ideas. Another
programming in Python, machine learning feature of PyTorch is its
C++, and JavaScript. libraries as well, in ability to support C++
Another benefit of addition to offering a application
TensorFlow is its large community you development. Use
scalability, allowing you can turn to for support if cases for PyTorch
to develop sizable you ever run into include language
applications. problems. processing and image
recognition.
Scikit-learn is ideal for traditional machine learning
tasks, while PyTorch excels in deep learning applications.
Complexity: Scikit-learn is generally easier to use for
beginners due to its straightforward API, whereas PyTorch
requires a deeper understanding of neural network
concepts.

6
Select a
Performance
measure
Typical performance regression problem is: Root mean
Square Error (RMSE)
Exp: an RMSE equal to 50000 means that 68% predictions
fall within $50000 of the actual value. And 95% of the
predictions fall within 100000
Practice

Which performance measure are


you considering for the model used
in your project
Explain!!
Scikit-learn Features MAIN FEATURES
USER-FRIENDLY API Scikit-learn provides various algorithms for
It is designed with an easy-to-use API that classification, regression, clustering, and
supports efficient model building, evaluation, dimensionality reduction, making it versatile
and tuning, making it accessible for both for data analysis tasks.
beginners and experts.
This Photo by Unknown Author is licensed under CC BY

This Photo by Unknown Author is licensed under CC BY


ALGORITHMS &
THEIR PARAMETERS
We also cannot expect that the default parameters of the different learning
algorithms provided by software libraries are optimal for our specific
problem task. Therefore, we will make frequent use of hyperparameter
optimization techniques that help us to fine-tune the performance of our
model.
We can think of those hyperparameters as parameters that are not learned
from the data but represent the knobs of a model that we can turn to
improve its performance.

13
PREDICTIVE
MODELING
WORKFLOW
EVALUATING MODELS
AND PREDICTING
UNSEEN DATA
INSTANCES
After we have selected a model that has been fitted on the training dataset, we can use the test dataset

To estimate how well it performs on this unseen data to estimate the so-called generalization error. If

We are satisfied with its performance, we can now use this model to predict new, future data. It is
important to note that the parameters for the previously mentioned procedures, such as feature scaling

And dimensionality reduction, are solely obtained from the training dataset, and the same parameters

Are later reapplied to transform the test dataset, as well as any new data instances—the performance

Measured on the test data may be overly optimistic otherwise.

15
PyTorch Overview DYNAMIC COMPUTATION GRAPHS

PyTorch features dynamic computation graphs,


allowing for more intuitive model creation and
debugging, fostering experimentation.

WIDE ADOPTION IN RESEARCH

It's widely used in academia for research due to


its flexibility and has gained traction in
industries for building deep learning solutions.
Comparison Table

Library Key Features Best For

Scikit-learn Versatile algorithms, Easy API Traditional ML applications

PyTorch Dynamic graphs, Custom models Deep learning research and applications

Keras High-level API, Fast prototyping Getting started with neural networks

TensorFlow Large-scale ML, Deployment tools Production ML systems

XGBoost Boosting algorithms, Efficiency Gradient boosting tasks


Use Cases

SCIKIT-LEARN PYTORCH KERAS

Ideal for data preprocessing, model Widely used for NLP tasks, computer Perfect for rapid prototyping and
selection, and evaluation. Commonly used vision, and deep learning model experimentation, used in image
in fraud detection and recommendation development. Excellent for academic recognition, and simple neural networks
systems. research-to-practice transitions. for beginners.
Conclusion
SUMMARY AND TRENDS

The landscape of machine learning libraries continues to

& Future evolve. Staying updated with the latest features and
developments is crucial for effective ML implementation.

Trends

You might also like