ML Definitions and Concepts
- Overview
Machine Learning (ML) is a subfield of Artificial Intelligence (AI) where computers learn to perform tasks by analyzing large datasets, identifying patterns, and improving their performance over time without explicit programming, essentially mimicking how humans learn from experience; allowing them to make predictions or classifications on new data based on the patterns learned from the training data.
In simpler terms, ML enables computers to learn from data and make decisions or predictions without being explicitly programmed to do so. At its core, machine learning is all about creating and implementing algorithms that facilitate these decisions and predictions.
Please refer to the following for more details:
- Wikipedia: Machine Learning
- Wikipedia: Outline of Machine Learning
- The Evolution of Machine Learning
Biological evolution inspires machine learning (ML). Evolution allows life to explore almost limitless diversity and complexity. Scientists hope to recreate such open-endedness in the laboratory or in computer simulations, but even sophisticated computational techniques like ML and AI can't provide the open-ended tinkering associated with evolution.
The earliest computers were designed to perform complex calculations, and their architecture allowed for the storage of not only data but also the instructions as to how to manipulate that data. This evolved to the point where the computer processed data according to a structure model of the real world, expressible in mathematical terms. The computer did not learn but was merely following instructions.
The next step was to create a set of instructions that would allow the computer to learn from experience, i.e., to extract its own rules from large amounts of data and use those rules for classification and prediction. This was the beginning of ML and has led to the field that is collectively defined as AI.
A major breakthrough came with the implementation of algorithms that were loosely modeled on brain architecture, with multiple interconnecting units sharing weighted puts among them, organized in computational layers (deep learning).
- Evolution over the Years
ML techniques have been around since 1952. It has changed dramatically over the past decade and went through several transition periods in the mid-90s. Data-driven ML methods emerged in the 1990s.
From 1995 to 2005, there was a lot of focus on natural language, search, and information retrieval. In those days, ML tools were more straightforward than those used today.
Popularized in the 80s, neural networks are a subset of ML, which are computer systems modeled after the human brain and nervous system. Neural networks started making a comeback around 2005. It has become one of the trending technologies of the current decade.
Does ML require coding? Yes, ML requires a programming language. First, understanding ML involves algorithms. Mathematics is a required course for learning the concept of algorithms. But when you're implementing ML to solve real-world problems, you do need to code. Python and R are the programming languages of choice in AI and data science.
- Key Concepts in ML
Key concepts in Machine Learning (ML) include: supervised learning, unsupervised learning, reinforcement learning, data preprocessing, feature engineering, algorithms, overfitting, deep learning, computer vision, recommender systems, and model evaluation, with the core idea being that machines can learn from data to make predictions or decisions without explicit programming.
Breakdown of key concepts in ML:
- Supervised Learning: Training a model on labeled data where the correct output is known for each input, allowing the model to learn patterns and predict outcomes on new data.
- Unsupervised Learning: Discovering patterns in unlabeled data without known outcomes, often used for clustering or anomaly detection.
- Deep Learning: A subset of machine learning that uses artificial neural networks with multiple layers to extract complex features from data, often achieving high accuracy in tasks like image recognition and natural language processing.
- Reinforcement Learning: Learning through trial and error, where an agent receives feedback (rewards or penalties) for its actions in an environment, allowing it to adjust its behavior to maximize rewards.
- Data Preprocessing: Cleaning, transforming, and preparing data to be suitable for machine learning algorithms.
- Feature Engineering: Creating new features from existing data to improve the model's ability to learn patterns.
- Algorithms: The mathematical equations and procedures used by a machine learning model to learn from data, like decision trees, linear regression, or neural networks.
- Overfitting: When a model learns the training data too well, resulting in poor performance on new data.
- Classification: Predicting a categorical label for new data (e.g., classifying emails as spam or not spam).
- Regression: Predicting a continuous value (e.g., predicting house prices based on features).
- Unsupervised Learning: Where the model is trained on unlabeled data, discovering patterns and relationships within the data without explicit guidance.
- Clustering: Grouping data points into similar clusters based on their features.
- Dimensionality Reduction: Reducing the number of features in a dataset while preserving important information.
- Computer Vision: Applying machine learning to analyze visual data like images and videos to recognize objects, detect patterns, and understand scenes.
- Recommender Systems: Using machine learning to predict which items a user might like based on their past behavior, commonly seen in e-commerce and streaming platforms.
- Model Evaluation: Assessing the performance of a trained machine learning model using metrics like accuracy, precision, recall, and F1-score
- When To Use Machine Learning
It’s important to remember that ML can’t solve every type of problem. In some cases, powerful solutions can be developed without using ML techniques.
For example, ML is not required if you can determine a target value by using simple rules, calculations, or predetermined steps that can be programmed without any data-driven learning.
Use ML when:
- You can't write rules: Many human tasks (such as identifying whether an email is spam) cannot be adequately addressed using simple (deterministic), rules-based solutions. There are many factors that may affect the answer. It quickly becomes difficult for humans to accurately encode rules when they depend on too many factors and many of them overlap or require very fine tuning. You can use ML to effectively solve this problem.
- You can't scale: You might be able to manually identify a few hundred emails and determine if they are spam. However, with millions of emails, this task becomes tedious. Machine learning solutions can effectively handle large-scale problems.
- The Complete ML Solution
The following is a complete ML solution, which contains a real-world process that allows you to understand how all the parts are put together.
- Data cleaning and formatting
- Exploratory data analysis
- Feature engineering and selection
- Compare several machine learning models on a performance metric
- Perform hyperparameter tuning on the best model
- Evaluate the best model on the testing set
- Interpret the model results
- Draw conclusions and document work
[More to come ...]