Machine Learning Tutorials

Dive into the fascinating realm of Machine Learning with LabEx's curated tutorials. Enhance your skills through interactive exercises and practical applications.

Regularization Path of L1-Logistic Regression
Regularization Path of L1-Logistic Regression
The L1-Logistic Regression model is a binary classification method that uses L1 regularization to induce sparsity in the model. The regularization path of this model shows the coefficients of the model as regularization strength increases. In this lab, we will use the Iris dataset to train L1-penalized logistic regression models and plot their regularization paths.
Machine Learningscikit-learn
Matplotlib Data Visualization Tutorial
Matplotlib Data Visualization Tutorial
This tutorial introduces the basic usage of Matplotlib library in Python, which is a popular data visualization tool in Python. Matplotlib is a library that allows users to create visualizations such as line plots, scatter plots, bar plots, and many more.
MatplotlibPython
Matplotlib: Error Bar Rendering on Polar Axis
Matplotlib: Error Bar Rendering on Polar Axis
In data visualization, error bars are used to indicate the uncertainty or variability of data points. Matplotlib is a popular data visualization library in Python that provides built-in support for error bars. In this lab, we will learn how to create error bar plots in polar coordinates using Matplotlib.
PythonMatplotlib
Python Date and Time Manipulation
Python Date and Time Manipulation
In this lab, you will learn how to use the `datetime` module in Python to calculate the date of a specified number of days ago from the current date.
Python
Connecting Matplotlib Figure Events
Connecting Matplotlib Figure Events
Matplotlib is a popular data visualization library in Python. In this tutorial, you will learn how to connect events that occur when a figure closes. This is useful when you want to perform an action after closing a figure.
MatplotlibPython
Pandas DataFrame Ne Method
Pandas DataFrame Ne Method
In this tutorial, we will learn about the ne() method in pandas DataFrame. The ne() method is used to compare a DataFrame with other data structures element-wise, and it returns a DataFrame of bool values that represent the result of the comparison.
Python
Digit Classification With RBM Features
Digit Classification With RBM Features
This lab focuses on the use of Bernoulli Restricted Boltzmann Machine (RBM) for classification of handwritten digits. The RBM feature extractor is combined with a logistic regression classifier to predict the digits. The dataset used is a greyscale image data where pixel values can be interpreted as degrees of blackness on a white background.
Machine Learningscikit-learn
Vector Quantization With KBinsDiscretizer
Vector Quantization With KBinsDiscretizer
This lab demonstrates how to use KBinsDiscretizer from the Scikit-learn library to perform vector quantization on a sample image of a raccoon face. Vector quantization is a technique to reduce the number of gray levels used to represent an image. We will use KBinsDiscretizer to perform vector quantization on the raccoon face image. We will use 8 gray levels to represent the image, which can be compressed to use only 3 bits per pixel. We will compare the uniform and k-means clustering strategies to map the pixel values to the 8 gray levels.
Machine Learningscikit-learn
Recursive Feature Elimination With Cross-Validation
Recursive Feature Elimination With Cross-Validation
In this lab, we will go through a step-by-step process of implementing Recursive Feature Elimination with Cross-Validation (RFECV) using scikit-learn. RFECV is used for feature selection, which is the process of selecting a subset of relevant features for use in model construction. We will use a classification task with 15 features, out of which 3 are informative, 2 are redundant, and 10 are non-informative.
Machine Learningscikit-learn
Dimensionality Reduction With Pipeline and GridSearchCV
Dimensionality Reduction With Pipeline and GridSearchCV
This lab demonstrates the use of Pipeline and GridSearchCV in scikit-learn to optimize over different classes of estimators in a single CV run. We will be using a support vector classifier to predict hand-written digits from the popular MNIST dataset.
Machine Learningscikit-learn
Capitalize First Letter In Words
Capitalize First Letter In Words
In Python, we can capitalize the first letter of every word in a string using a built-in function. In this challenge, you will be asked to write a function that takes a string as an argument and returns a new string with the first letter of every word capitalized.
Python
Plotting Histograms With Matplotlib
Plotting Histograms With Matplotlib
Matplotlib is a popular data visualization library in Python. One of the most common ways to visualize data distributions is by using histograms. In this lab, we will learn how to create histograms with Matplotlib and explore different customization options.
PythonMatplotlib
Sum of powers
Sum of powers
In this challenge, you are required to write a Python function that calculates the sum of the powers of all the numbers from start to end (both inclusive).
Python
Key of Max Value
Key of Max Value
In Python, dictionaries are a useful data structure that allows you to store key-value pairs. Sometimes, you may need to find the key of the maximum value in a dictionary. In this challenge, you will write a function that takes a dictionary as an argument and returns the key of the maximum value in the dictionary.
Python
A First Program
A First Program
This section discusses the creation of your first program, running the interpreter, and some basic debugging.
Python
Find All Matching Indexes
Find All Matching Indexes
In this lab, you will learn how to use the `enumerate()` function and list comprehension in Python to find the indexes of all elements in a list that satisfy a given testing function.
Python
All Indexes of Value
All Indexes of Value
In Python, a list is a collection of items that are ordered and changeable. Sometimes, we need to find all the indexes of a specific value in a list. In this challenge, you will create a function that returns a list of indexes of all the occurrences of an element in a list.
Python
Mapped List Average
Mapped List Average
In this lab, we explore the use of the `map()` and `sum()` functions in Python to calculate the average of a list of elements after applying a provided mapping function to each element.
Python
  • Prev
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • ...
  • 80
  • Next