How AI works
Train, test and measure a real model on your laptop. No heavy math and no GPU.
How to use the lab files
The zip keeps the files of each lesson apart, and the lessons work in one flat folder. After you unzip it, sh kr-lab.sh LESSON FOLDER builds that folder as it stands after a lesson, for example sh kr-lab.sh 00-set-up-your-lab ~/krlab/how-ai-works.
You will build
You need
A computer with Linux, macOS, or Windows with WSL. No GPU, no cloud account and no paid tool.
Next course
- 00Set up your lab for How AI worksCreate a folder and a virtual environment for the courseSet-up20 min
- 01Train your first model and ask it for a predictionTrain a model on a few hand-made examples35 min
- 02Read a dataset as examples, features and labelsLoad the digits dataset and read one sample as numbers35 min
- 03Split your data and score a model honestlySplit a dataset into a training part and a test part35 min
- 04Train without labels and from a reward, and ask what each one trustsGroup data without labels with KMeans and say who must name the groups30 min
- 05Fine-tune a model and average three sites, and ask what each one trustsFine-tune a trained model and measure what it forgets30 min
- 06Measure a model with precision, recall and a confusion matrixRead a confusion matrix and a per-class report40 min
- 07Spot overfitting with a decision treeShow the gap between a training score and a test score40 min
- 08Train a small neural network and watch its loss fallDescribe layers, weights and a loss in plain words40 min
- 09Turn text into vectors and search by meaningTurn short texts into vectors with TfidfVectorizer and TruncatedSVD40 min
- 10Clean a data feed and measure what each step doesSort files into structured, semi-structured and unstructured data and load each kind45 min
- 11Record where your data came from and catch a silent changeWrite a record of the source, the steps and the hash of a data file35 min
- 12Build a phishing text classifierBuild, train and measure a text classifier with a PipelineBuild55 min
- 13Review a login-attack classifier before it goes liveFind the flaws in a model that reports a high accuracyTest60 min
Work roles
Work roles this course supports
The course helps you to prepare for these roles of the NICE Workforce Framework for Cybersecurity (NIST SP 800-181 Rev. 1). No single course covers a whole role, and KaliRange is not a certification body.
- Data Analysis
IO-WRL-001a supporting skillYou train and measure models on data and judge a detector with precision and recall.