SONUB home

Only our team reads this. Don't include passwords or card numbers.

Thank you! We read every message and use it to decide what to improve next.

Close Send
EN English 한국어 日本語 简体中文 繁體中文 हिन्दी বাংলা اردو Español Português Français Deutsch Русский العربية Bahasa Indonesia Tiếng Việt ไทย Türkçe

How to enable notifications

Notifications are unavailable in this browser or on this address. Try a supported browser on the secure SONUB site.

If notifications are blocked, allow them in your browser settings.

  1. Open the site controls beside the address bar, or your browser’s site settings. Set Notifications for this site to Allow.
  2. In your device settings, allow notifications for your browser and check Do Not Disturb or Focus.
  3. Return to SONUB and reload the page. Once notifications are on, the bell disappears.

On iPhone or iPad, add SONUB to your Home Screen, open it there, then allow notifications.

Build AI in five steps

Every project goes through the same five steps: preparation, & visualization, data , and model evaluation. Build a small spam filter in your and walk through all five.

Messy pieces of writing go into a filter machine, duplicates and scraps fall out, and a neat stack of clean data comes out

The five steps

Whatever you build, a spam filter, a or a , the work follows the same five steps. The size of the and the changes; the order of the work does not.

In this course you build a small AI that tells spam messages from normal ones. The data comes from three different places, each in a different format. You will join them, look at them, clean them, teach a model and then score it honestly.

Each step is one short notebook in JupyterLab, right on this page. You run the cell by cell, read what it prints and change it. Each notebook reads the files that the step before it made, and writes new files for the next step.

The five steps

  1. Data preparation 1-prepare.ipynb
  2. & visualization 2-analyze.ipynb
  3. Data 3-preprocess.ipynb
  4. Model 4-train.ipynb
  5. Model evaluation 5-evaluate.ipynb

Back to step 1 when the evaluation shows what to fix

The steps make a . After the evaluation you look at the wrong answers, decide on one thing to change, and go round again. You change only one thing per round, so you know what made the score better or worse.

Workflow — what each step makes and when to move on

Move to the next step only when the in the last column is true. If it is not, the problem is in this step, not in a later one.

Workflow — what each step makes and when to move on
Step Makes Move on when
Data preparation 1-prepare.ipynb data/all.csv The total equals the rows of the three raw files
Data analysis & visualization 2-analyze.ipynb notes.md The cleaning rules are written in notes.md
Data preprocessing 3-preprocess.ipynb data/train.csv · valid.csv · test.csv · vocab.json No text is in two parts (overlap 0)
Model training 4-train.ipynb model.json The went down and model.json is saved
Model evaluation 5-evaluate.ipynb — The scores, the comparison and one next change are written

The project folder

Everything happens in one folder, basic/, in JupyterLab. The raw data in assets/ and one notebook per step are ready when JupyterLab opens. Each notebook holds the finished code of its step, split into cells: run a cell, read what it prints, then change it and run it again.

basic/
├── assets/              raw data (do not edit)
│   ├── sms.csv          message,is_spam (1 / 0)
│   ├── mail.tsv         body⇥category (spam / ham)
│   └── chat.jsonl       {"text": …, "label": "yes" / "no"}
├── data/                files your programs make
├── 1-prepare.ipynb      ①
├── 2-analyze.ipynb      ②
├── 3-preprocess.ipynb   ③
├── 4-train.ipynb        ④
└── 5-evaluate.ipynb     ⑤

Why only plain Python

This course uses only the Python (csv, , random, math and collections), so every line runs in the Python inside your and you can see each calculation.

In real projects the same five steps are done with tools: pandas and for data, seaborn and matplotlib for charts, for splitting and classic models, and Keras or for . Each step below shows which tool does the same job, so you can switch to the tools once you understand the .

Type and try

JupyterLab opens next to the lessons (below them on a narrow screen). Look at the raw data first: in the file browser, open basic/assets and double-click each file. Notice that each file stores the text and the answer (spam or not) in a different way.

Done when

You can name the five steps in order, and you can say which file each step makes. You have opened all three raw files in JupyterLab.

If you get stuck

If JupyterLab stays blank, wait a few seconds: Python is downloaded the first time (about 30 ). If you cannot see basic/, click the folder icon at the top left. Never edit the files in assets/: they are the original data, and every step reads from them again when you change something.

Booking time has passed