---
title: "AI Notebooks - Tutorial - Build your spam classifier"
description: "Learn how to build a simple spam classifier with OVHcloud AI Notebooks."
url: https://docs.us.ovhcloud.com/en/public-cloud/ai-machine-learning/ai-notebooks-spam-classifier
lang: en
---
> For AI agents: the complete documentation index is available at https://docs.us.ovhcloud.com/en/llms.txt, the full documentation bundle is available at https://docs.us.ovhcloud.com/en/llms-full.txt.

# AI Notebooks - Tutorial - Build your spam classifier

**Learn how to build a simple spam classifier with OVHcloud AI Notebooks.**

You will be able to learn the concepts of logistic regression, dimension reduction, stop words, quantiles, and much more. A very simple Machine Learning model will be used: the **logistic regression**.

At the end of this tutorial, you will have learned the principal methods to build your own **spam classifier**.

**Note:**

We can create this model with the dataset **SMSSPamCollection**, which you can find on the SMS Spam Collection Dataset [link](https://archive.ics.uci.edu/ml/datasets/SMS+Spam+Collection).

 

## Requirements

- Access to the [OVHcloud Control Panel](https://manager.us.ovhcloud.com/)
- An AI Notebooks project created inside a [Public Cloud project](https://us.ovhcloud.com/public-cloud/) in your OVHcloud account
- A user for AI Notebooks

 

## Instructions

You can launch your notebook from the [OVHcloud Control Panel](https://manager.us.ovhcloud.com/) or via the [ovhai CLI](https://docs.us.ovhcloud.com/en/public-cloud/ai-machine-learning/cli-run-notebook.md).

 

### Launching a Jupyter notebook with "Miniconda" via UI

To launch your notebook from the [OVHcloud Control Panel](https://manager.us.ovhcloud.com/), use the following specifications when creating your AI Notebook.

 

#### Code editor

Choose the `Jupyterlab` code editor.

 

#### Framework

In this tutorial, the `Miniconda` framework is used.

**Warning:**

**NOTE:** With **Miniconda**, you will be able to set up your environment by installing the Python libraries you need.

You can choose the `conda` version you want.

**Note:**

The default version of `conda` is functional for this tutorial.

 

#### Resources

You can choose the number of CPUs or GPUs you want.

**Note:**

Here, using `4 CPU` is sufficient.

 

### Launching a Jupyter notebook with "Miniconda" via CLI

If you want to launch it with the CLI, choose the `jupyterlab` editor and the `conda` framework.

To access the different versions of `conda` available, run the following command.

```console
ovhai capabilities framework list -o yaml
```

**Note:**

If you do not specify a version, your notebook starts with the default version of `conda`.

Choose the number of CPUs (`<nb-cpus>`) to use in your notebook and use the following command.

```console
ovhai notebook run conda jupyterlab \
    --name <notebook-name> \
    --framework-version <conda-version> \
  --cpu <nb-cpus>
```

You can then reach your notebook’s URL once the notebook is running.

 

### Accessing the notebook

Once the repository has been cloned, find your notebook by following this path: `ai-training-examples` > `notebooks` > `natural-language-processing` > `text-classification` > `miniconda` > `spam-classifier` > `notebook-spam-classifier.ipynb`.

A preview of this notebook can be found on GitHub [here](https://github.com/ovh/ai-training-examples/blob/main/notebooks/natural-language-processing/text-classification/miniconda/spam-classifier/notebook-spam-classifier.ipynb).

 

## Go further

Browse all the [AI & Machine Learning guides](https://docs.us.ovhcloud.com/en/public-cloud/ai-machine-learning/landing-page-ai-machine-learning.md).

Browse the rest of the [OVHcloud US documentation](https://docs.us.ovhcloud.com/en/index.md) for guides on our other products and services.

Learn more about [AI & Machine Learning](https://us.ovhcloud.com/public-cloud/ai-machine-learning/) on the OVHcloud US website.

If you need training or technical assistance to implement our solutions, contact your sales representative or click on [this link](https://us.ovhcloud.com/professional-services/) to get a quote and ask our Professional Services experts for a custom analysis of your project.
