Python for AI and Machine Learning

Study Python for AI and Machine Learning with full lessons, revision notes and quick reference, across 30 lessons.

10 modules. 30 lessons. Self-paced.

Roles this course prepares you for

Course curriculum

No exam weights apply. Lessons follow practical prerequisites, from setting up Python through the language, files and tests, NumPy, pandas and charts to scikit-learn workflows and reusable model code.

Free to read: 5 lessons, no account needed

Start Here (2 lessons)
  1. How this course works (read now)

    • Describe what the course covers, what it excludes and how the three study views are used.
    • Check readiness by predicting the result of a short procedure written as numbered steps.
  2. Set up your Python project (read now)

    • Install a supported Python version and create the course environment with six pinned libraries.
    • Run a script and a supplied test inside the environment, and recreate the environment from requirements.txt.
Python Essentials (6 lessons)
  1. Values, types and strings (read now)

    • Use numbers, strings, booleans and None, and convert between types deliberately.
    • Format results with f-strings and read the last line of a TypeError or ValueError.
  2. Work with lists, tuples, dictionaries and sets (read now)

    • Choose a list, tuple, dictionary or set for a piece of data, with a reason.
    • Index, slice, add, update, look up and test membership in each collection.
  3. Loops, conditions and comprehensions (read now)

    • Control a program with if, elif and else, for and while loops, enumerate and zip.
    • Rewrite a filtering loop as a comprehension and confirm both give the same result.
  4. Write functions

    • Write functions with parameters, defaults, keyword arguments, return values, type hints and docstrings.
    • Use a supplied pytest file to check a function and read which test failed.
  5. Organise code in modules

    • Import functions from your own module into another script and into tests.
    • Keep demonstration code from running on import with if __name__ == "__main__".
  6. Objects and shared references

    • Use methods and attributes, and predict when two names refer to the same object.
    • Make an independent copy when a function must not change its input.

With course access: 25 lessons

Files, Errors and Tests (4 lessons)
  1. Read and write files

    • Build paths with pathlib and list files with glob.
    • Read JSON files and write a CSV summary, always with encoding="utf-8".
  2. Handle errors and read tracebacks

    • Read a traceback from the bottom up to find the failing line and its caller.
    • Handle expected exceptions with try and except, and raise clear errors for bad input.
  3. Test code with pytest

    • Write tests with assert, pytest.raises, pytest.approx and parametrize.
    • Test file-handling code in a temporary folder with tmp_path.
  4. Debug a failing function

    • Use a failing test and its traceback to locate a bug.
    • Fix the bug and add a test that would have caught it.
Compute With NumPy (2 lessons)
  1. NumPy arrays and indexing

    • Create arrays and read their shape and data type.
    • Index, slice and filter arrays with Boolean masks.
  2. Broadcasting and vectorisation

    • Combine arrays of different shapes with broadcasting and aggregate along an axis.
    • Replace a loop with vectorised code, confirm identical results and time both.
Work With Tables in pandas (6 lessons)
  1. Load and inspect tables

    • Read a CSV file into a DataFrame and inspect its shape, columns and data types.
    • Recognise pandas 3's str data type for text columns.
  2. Select and filter rows

    • Select rows and columns with loc, iloc and Boolean conditions.
    • Combine conditions and use isin for membership.
  3. Clean messy data

    • Find and handle missing values and inconsistent text.
    • Change DataFrames with loc and explain why chained assignment never works in pandas 3.
  4. Work with text and dates

    • Parse text dates into datetimes and extract date parts.
    • Clean and test text columns with the .str accessor.
  5. Group and aggregate

    • Group rows and compute several aggregates per group.
    • Derive new columns before grouping.
  6. Join and reshape tables

    • Merge two tables with a validated relationship.
    • Reshape between long and wide forms with pivot_table and melt.
Visualise Data (2 lessons)
  1. Plot with Matplotlib

    • Create line, scatter, histogram and bar charts with labelled axes.
    • Save charts to PNG files with the Agg backend and print the values they show.
  2. Choose a chart for the question

    • Choose a chart type that answers a stated question.
    • Describe in one sentence what a chart shows and what it does not.
Build Models With scikit-learn (4 lessons)
  1. Train your first scikit-learn model

    • Separate features and target, split data into training and test sets, and fit a model.
    • Compare the model with a dummy baseline on the same test data.
  2. Preprocess data with pipelines

    • Scale numeric columns, impute missing values and one-hot encode categories in a ColumnTransformer.
    • Combine preprocessing and a model in one Pipeline and inspect its output.
  3. Evaluate classification and regression models

    • Compute and interpret a confusion matrix, precision and recall.
    • Evaluate a regression model with mean absolute error against a baseline.
  4. Cross-validate and tune without leakage

    • Use cross-validation and a grid search over pipeline settings with a chosen scoring metric.
    • Keep the test set for one final evaluation and spot leakage in a workflow.
Reuse Model Code (2 lessons)
  1. Save and load models

    • Save a fitted pipeline and its library versions, and load it in a new process.
    • Explain why only trusted model files may be loaded.
  2. Build a command-line tool

    • Build train and predict commands with argparse from tested functions.
    • Organise a small project into a module, a command-line entry point and tests.
Final Project (1 lessons)
  1. Final project: predict equipment failures

    • Complete an end-to-end project from messy generated records to a saved, tested prediction tool, using only taught skills.
    • Explain each decision and report results against a baseline.
Optional: Notebooks (1 lessons)
  1. Optional: from notebook to script

    • Install JupyterLab and explore data in a notebook.
    • Run a notebook from the command line and move its working code into a tested script.

Study views

  • Full Course
  • Revision
  • Quick Reference

Who this is for

For developers, analysts and students who know basic programming ideas and want to write Python for data and machine learning work.

Before you begin

  • Understand variables, conditions, loops and functions in any language; use a terminal and text editor.
  • Python 3.12 to 3.15 with the documented NumPy, pandas, scikit-learn, Matplotlib, joblib and pytest dependencies.

What you will learn

  • Write and test Python functions, modules and file-processing programs.
  • Prepare arrays and tables, handle missing values and explain useful charts.
  • Build, evaluate and save a machine learning pipeline without leaking test data.

Unlock all 30 lessons

Course access opens every lesson and adds revision notes, the Quick Reference, saved progress, bookmarks and your own notes.

INR 199 plus 18% GST. 90 days of online access. No auto-renewal.

Know what is included

Independent learning material from Vectametric. Not affiliated with or endorsed by the organisations behind the tools it teaches. Practice exams and projects are separate. Completing a course is not a professional certification.

Questions about courses

Are these video courses or reading courses?

The current courses use written lessons, examples and diagrams. Full Course, Revision and Cheat Sheet or Quick Reference views cover the same learning sequence at different levels of detail.

Which course should I start with?

Choose a Certification Course for a named exam, a Career Path Course for a role-led sequence, or a Skill Course for a focused subject. Read its level, prerequisites and curriculum before enrolling.

Do revision notes replace the full lessons?

No. Start with the full explanations, then use revision notes to refresh your understanding. Cheat sheets are concise study references, not a substitute for learning or permission to use notes during an official exam.

Are practice exams and projects included?

No. Course access, practice-exam bundles and project access are separate. An official certification, exam booking or voucher is not included.

How long do I have access?

The course page and checkout show the current online access period and price, including free enrollment where offered. Access starts when enrollment is confirmed and does not auto-renew.

Can I read lessons before enrolling?

Yes. Each course opens its first lessons to read without an account, and some courses are open in full. The course curriculum marks the lessons you can read now. Course access adds the remaining lessons, the Revision and Cheat Sheet or Quick Reference views, saved progress, bookmarks and personal notes.

Review the Terms and No-Refund Policy before confirming access. All sales are final; Vectametric does not offer refunds.

This website is operated by VECTAMETRIC EDTECH (OPC) PRIVATE LIMITED, operating as Vectametric.

Corporate Identity Number (CIN): U85499KA2026OPC229822. GSTIN: 29AAMCV8281D1ZS. Registered office: RS NO/38/2A/1 BASTAND, ROAD MAHANTESH NAGAR, Ramdurg, Ramdurg, Belgaum- 591123, Karnataka.

Queries and grievances: Prajval Honnungar, Grievance Officer and Data Protection Contact.

Telephone: +91 94800 09310. Support: support@vectametric.com. Grievances: support@vectametric.com.

Copyright 2026 VECTAMETRIC EDTECH (OPC) PRIVATE LIMITED. All rights reserved.

Vectametric home · Roadmaps · Vecta IT Exams · Vecta Government Exams · Vecta Banking & Finance Exams · Vecta Entrance Exams · About us · Contact · Privacy Policy · Terms and Conditions · No-Refund Policy