DEV Community

AK
AK

Posted on

What, Why, Types, Challanges.... ML.

What is Machine Learning?
Machine learning is the science of programming computers to learn from data without explicit programming. A machine learning system learns from experience (data) with respect to some task (T) and some performance measure (P). It's performance on T, as measured by P, improves with experience E.

"A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P, if its performance at tasks in T, as measured by P, improves with experience E." - Tom Mitchell, 1997

This definition highlights three crucial components of machine learning:

Data (Experience): The foundation for any ML system. Algorithms learn from data, identifying patterns and building predictive models. Simply downloading Wikipedia articles doesn't make a computer smarter; it needs to process and learn from that information.

Task (T): The specific problem the ML system aims to solve, like classifying emails as spam or predicting housing prices.

Performance Measure (P): The metric used to evaluate the effectiveness of the ML system, such as accuracy in classification tasks.

Why Use Machine Learning?
Machine learning excels in scenarios where traditional programming techniques fall short:

Complex Problems: For problems where manual rule-creation is impractical, like speech recognition or image classification, ML algorithms can learn patterns from vast datasets.

Dynamic Environments: ML systems can adapt to changing data patterns, constantly updating themselves with new information, unlike static rule-based systems. An example is a spam filter automatically adapting to new spam techniques.

Data Mining and Insights: ML can uncover hidden patterns and correlations within large datasets, providing valuable insights and aiding human understanding.

Types of Machine Learning Systems
ML systems can be categorised based on several criteria:

  1. Training Supervision:
    Supervised Learning: The algorithm is provided with labelled data, meaning each training example has a corresponding target value or class. Examples include spam filtering (classification) and predicting house prices (regression).
    Unsupervised Learning: The algorithm receives unlabelled data and must discover patterns independently. Examples include clustering (grouping similar data points) and dimensionality reduction (simplifying data representation).
    Semi-Supervised Learning: A mix of labelled and unlabelled data is used, leveraging the benefits of both supervised and unsupervised learning. Example: photo-hosting services that learn to recognise faces with minimal user input.
    Self-Supervised Learning: This approach generates labelled data from unlabelled data, often by masking or modifying parts of the data and training the model to recover the original. This technique is often used as pre-training for deep neural networks.
    Reinforcement Learning: An agent learns to interact with an environment by taking actions and receiving rewards or penalties. The goal is to develop a policy that maximises rewards over time. Example: training an AI to play games.

  2. Learning Approach:
    Instance-Based Learning: Predictions are made by comparing new data points to known data points. Example: k-nearest neighbors algorithm.
    Model-Based Learning: A model is built from the training data and used to make predictions. Example: Linear regression.

  3. Learning Strategy:
    Batch Learning: The model is trained on the entire dataset at once. This is resource-intensive and typically done offline.
    Online Learning: The model is trained incrementally, processing data in small batches as it arrives. This allows for continuous learning and adaptation.

Main Challenges in Machine Learning
Insufficient Data: Many ML algorithms require substantial amounts of data to perform well.

Nonrepresentative Data: Training data must accurately reflect the real-world scenarios to which the model will be applied. Sampling bias can lead to inaccurate generalisations.

Poor-Quality Data: Errors, outliers, and noise in the data can hinder pattern recognition and degrade performance.
Irrelevant Features: Using irrelevant features can confuse the algorithm and lead to poor predictions. Feature selection and engineering are crucial.

Overfitting the Training Data: A model that learns the training data too well may fail to generalise to new data. This is a common problem and requires careful model selection and regularisation techniques.

Conclusion
Understanding these fundamental concepts is crucial for successfully navigating the machine learning landscape. The document highlights the importance of data quality, choosing the right type of ML system for the task at hand, and being aware of potential pitfalls.

Top comments (0)