Introduction to Machine Learning

Farshid CheraghchianFarshid Cheraghchian
Introduction to Machine Learning

So, you want to know about machine learning! Well, Machine Learning (ML) is a part of Artificial Intelligence (AI) that uses various algorithms to learn patterns from input data to perform tasks—and even improve its efficiency—without being explicitly programmed step by step. Cool, isn’t it?

Instead of predicting all possible situations, we feed the machine data; this data can be images, text, audio, numbers, and many other types. The machine then figures out the patterns, rules, and structures automatically—or sometimes with human guidance.

This is what sets Machine Learning apart from traditional programming: the ability to learn from experience (data) and generalize to unseen data.


Technically

Machine Learning is the study of computer algorithms that improve automatically through experience and by using data.
— Tom Mitchell, Machine Learning (1997)

By “experience,” we mean data; by “improvement,” we mean the ability to make better decisions or predictions over time.


Traditional Programming vs. Machine Learning

Traditional programming:

  • Static structure based on rules:
    Input + Rules (programmed) → Output
  • Every rule is defined by the developer.
  • Suitable for simple, repetitive tasks.
  • Not suitable for complex, dynamic environments.

Machine Learning:

  • Input + Output → Machine learns the rules
  • We provide inputs and corresponding outputs to teach the machine.
  • The system figures out the rules automatically.
  • Ideal for complex tasks like image recognition, self-driving cars, etc.

Core Concepts in Machine Learning

  1. Data
    Raw information collected from the environment or generated. It can be text, numbers, audio, images, etc. Higher-quality and larger datasets typically lead to better models and results.

  2. Features
    Measurable properties or characteristics of the data.
    Example: To predict house prices, features might include size, number of bedrooms, and age of the house.
    Tip: Feature engineering can greatly improve model performance.

  3. Labels (for supervised learning)
    In supervised learning, labels are the correct answers used to guide the training process.
    Example:

    • “Win a million dollars!” → spam
    • “Meeting tomorrow at 9 AM” → not spam
  4. Model
    The “brain” of the system that makes predictions using algorithms or mathematical structures.
    Examples:

    • A Decision Tree separates decisions by questions like “Does this animal have wings?”
    • A Neural Network learns pixel relationships to identify skin lesion borders.
  5. Training
    We show the model many input-output examples so it can learn patterns.

    Steps during training:

    • Make predictions
    • Compare predictions to labels (correct answers)
    • Update internal parameters to improve
  6. Testing / Validation
    After training, we test the model with new, unseen data to evaluate generalization.

    • Training set: data the model learns from
    • Validation set: data used to tune the model
    • Test set: final data to evaluate performance
  7. Loss Function
    Measures how wrong the model’s predictions are compared to the correct labels.
    Example: True price = $400,000; predicted price = $420,000 → loss = $20,000 difference.

  8. Optimization
    The process by which the model adjusts its parameters to reduce the loss.
    Common algorithms: Gradient Descent, Adam.

  9. Overfitting & Underfitting

    • Overfitting: Model memorizes training data but fails on new data.
    • Underfitting: Model is too simple to learn meaningful patterns.
  10. Generalization
    The ability of the model to perform well on unseen data—not just the training data.


Conclusion

Machine learning opens the door to a world where computers can uncover insights, make predictions, and even solve problems we never imagined. While it may seem complex at first, every small step you take builds your intuition and skill. Stay curious, experiment boldly, and remember — the journey into ML is just as rewarding as the destination.