BiTree
  • Search For Lessons
  • Curriculum
  • Pricing
  • For Educators
  • Become a Tutor
  • About
  • Contact
Log InGet Started

Questions, concerns, bug reports, or suggestions? We read every message, write to us at [email protected].

More ways to reach us →
BiTree

Live coding lessons for aspiring developers and security professionals.

[email protected]

(201) 785-7951

Mon–Fri, 9 AM–5 PM EST

Learn

  • Search For Lessons
  • Curriculum
  • Pricing

Company

  • About
  • For Educators & Schools
  • Become a Tutor
  • Contact Us

Legal

  • Terms of Service
  • Privacy Policy
© 2026 BiTree. All rights reserved.
Curriculum/Artificial Intelligence/Machine Learning Fundamentals
45 minBeginner

Machine Learning Fundamentals

After this lesson, you will be able to: Understand how machines learn patterns from data, supervised, unsupervised, reinforcement.

Machine learning is the engine under modern AI. Instead of hand-writing rules, you give the machine data and a goal, it finds the pattern. This lesson covers the three flavors and the lifecycle of a real ML project.

Prerequisites:What is Artificial Intelligence?

Three types of ML

Supervised, labeled data. (Photos labeled 'cat'/'dog' → predict new photo.) Unsupervised, no labels. (Cluster customers by purchase patterns.) Reinforcement, agent acts in environment, gets rewards. (Chess, robot control.)

💡 Train / validate / test split

Split your data 70/15/15. Train teaches the model. Validate tunes hyperparameters. Test is held out, only used once at the end. Mixing them = overfitting + lying to yourself.

Your first ML model (Python + scikit-learn)

Predicting iris flower species, the 'hello world' of ML:

python
from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from sklearn.tree import DecisionTreeClassifier
from sklearn.metrics import accuracy_score
X, y = load_iris(return_X_y=True)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3)
model = DecisionTreeClassifier()
model.fit(X_train, y_train)
predictions = model.predict(X_test)
print(f'Accuracy: {accuracy_score(y_test, predictions):.2%}')

ML project lifecycle

  1. 1

    1. Define problem + success metric.

  2. 2

    2. Collect + clean data.

  3. 3

    3. Split train/val/test.

  4. 4

    4. Pick a model family.

  5. 5

    5. Train + tune.

  6. 6

    6. Evaluate on test.

  7. 7

    7. Deploy + monitor for drift.

Bias-variance tradeoff

Underfit (high bias), model too simple, misses pattern. Overfit (high variance), model memorizes training data, fails on new data. Most ML work is finding the sweet spot.

Sign in and purchase access to unlock this lesson.

Sign in to purchase
←What is Artificial Intelligence?
Back to Artificial Intelligence
Neural Networks and Deep Learning→