The Fundamentals of Machine Learning : A New Beginning

Photo by Pietro Jeng on Unsplash

The Fundamentals of Machine Learning : A New Beginning

This blog is my humble attempt at spreading knowledge regarding a vast topic known as "Machine Learning".

Definition of Machine Learning

  • Machine learning is a subfield of artificial intelligence that focuses on developing algorithms and statistical models that enable computers to perform tasks that would normally require human intelligence, such as recognizing patterns, making predictions, and taking decisions. The ultimate goal of machine learning is to create models that can learn from and make predictions about data, without being explicitly programmed to perform these tasks.

  • Here is an even simpler definition:

    Machine learning is a type of artificial intelligence that allows computer systems to automatically improve their performance on a task, by learning from data and examples, without being explicitly programmed for each situation. It involves developing algorithms and statistical models that enable computers to learn patterns and make predictions or decisions based on data inputs.

Differences between AI, ML and DL

Applications of Machine Learning

  1. Image Recognition:- Image recognition is one of the most common applications of machine learning. It is used to identify objects, persons, places, digital images, etc. The popular use case of image recognition and face detection is the Automatic friend tagging suggestion. Facebook provides us with a feature of auto friend tagging suggestions. Whenever we upload a photo with our Facebook friends, then we automatically get a tagging suggestion with a name, and the technology behind this is machine learning's face detection and recognition algorithm.

  2. Speech Recognition:- While using Google, we get an option of "Search by voice," it comes under speech recognition, and it's a popular application of machine learning. Speech recognition is a process of converting voice instructions into text, and it is also known as "Speech to Text", or "Computer Speech Recognition". At present, machine learning algorithms are widely used in various applications of speech recognition. Google Assistant, Siri, Cortana, and Alexa are using speech recognition technology to follow voice instructions.

  3. Traffic Prediction:- If we want to visit a new place, we take the help of Google Maps, which shows us the correct path with the shortest route and predicts the traffic conditions. It predicts the traffic conditions such as whether traffic is cleared, slow-moving, or heavily congested with the help of two ways:
    Real-Time location of the vehicle from Google Maps app and sensors and Average time taken on past days at the same time. Everyone who is using Google Maps is helping this app to make it better. It takes information from the user and sends it back to its database to improve performance.

  4. Product Recommendation:- Machine learning is widely used by various e-commerce and entertainment companies such as Amazon, Netflix, etc., for product recommendations to the user. Whenever we search for some product on Amazon, then we started getting an advertisement for the same product while internet surfing on the same browser and this is because of machine learning.

  5. Automatic Vehicles:- One of the most exciting applications of machine learning is Automatic Vehicles. Machine learning plays a significant role in automatic vehicles. Tesla, the most popular car manufacturing company is working on an automatic car. It is using unsupervised learning method of machine learning to train the car models to detect people and objects while driving.

  6. Spam Filtering:- Whenever we receive a new email, it is filtered automatically as important, normal, and spam. We always receive important mail in our inbox with the important symbol and spam emails in our spam box, and the technology behind this is Machine learning. Below are some spam filters used by Gmail: Content Filter, Header filter, General blacklists filter, Rules-based filters, and Permission filters. Some machine learning algorithms such as Multi-Layer Perceptron, Decision tree, and Naïve Bayes classifier are used for email spam filtering and malware detection.

  7. Online Fraud Detection:- Machine learning is making our online transactions safe and secure by detecting fraudulent transactions. Whenever we perform some online transaction, there may be various ways that a fraudulent transaction can take place such as fake accounts, fake ids, and stealing money in the middle of a transaction. So to detect this, the Feed Forward Neural network helps us by checking whether it is a genuine transaction or a fraud transaction. For each genuine transaction, the output is converted into some hash values, and these values become the input for the next round. For each genuine transaction, there is a specific pattern that gets changed for the fraud transaction hence, it detects it and makes our online transactions more secure.

  8. Stock Market Trading:- Machine learning is widely used in stock market trading. In the stock market, there is always a risk of up and downs in shares, so for this machine learning's long short-term memory neural network is used for the prediction of stock market trends.

  9. Medicinal Diagnosis:- In medical science, machine learning is used for disease diagnoses. With this, medical technology is growing very fast and can build 3D models that can predict the exact position of lesions in the brain. It helps in finding brain tumours and other brain-related diseases easily.

  10. Automatic Language Translation:- Nowadays, if we visit a new place and we are not aware of the language then it is not a problem at all, as for this also machine learning helps us by converting the text into our known languages. Google's GNMT (Google Neural Machine Translation) provides this feature, which is Neural Machine Learning that translates the text into our familiar language, and it is called automatic translation. The technology behind the automatic translation is a sequence-to-sequence learning algorithm, which is used with image recognition and translates the text from one language to another language.

Basics to learn Machine Learning

To learn machine learning, you need to have a good understanding of the following basics:

  1. Mathematics: Linear algebra, calculus, and probability.

  2. Programming: Python and/or R are the most popular programming languages for machine learning.

  3. Statistics: Understanding of statistical concepts such as hypothesis testing, regression, and distribution.

  4. Data Preprocessing: Ability to clean and prepare data for use in machine learning algorithms.

  5. Algorithms: Knowledge of supervised and unsupervised learning algorithms, including regression, decision trees, and neural networks.

  6. Frameworks: Familiarity with popular machine learning libraries such as TensorFlow, PyTorch, and scikit-learn.

  7. Model evaluation: Understanding of performance metrics such as accuracy, precision, recall, and F1 score.

  8. Overfitting: Understanding the concept of overfitting and how to avoid it.

  9. Bias and fairness: Awareness of bias in machine learning models and techniques to mitigate it.

  10. Experimentation: Ability to iteratively design experiments, test hypotheses, and refine models.

Types of Machine Learning algorithms

To generalize, there are three major classifications of machine learning algorithms. They are :

  • Supervised learning: In this type of learning, the algorithm is trained on labelled data, to make predictions about unseen data. Examples include linear regression, logistic regression, decision trees, and neural networks.

  • Unsupervised learning: In this type of learning, the algorithm is trained on unlabeled data, to find patterns or relationships in the data. Examples include clustering, dimensionality reduction, and anomaly detection.

  • Reinforcement learning: In this type of learning, an agent learns to make decisions by interacting with an environment, to maximize a reward signal. This type of learning is commonly used in robotics, gaming, and autonomous systems.

These are the broad classifications of machine learning algorithms. There are several other algorithms such as:

  • Semi-supervised Learning: In this type of learning, the model is trained using both labelled and unlabeled data. The goal is to leverage large amounts of unlabeled data to improve the model's performance on the labelled data. This type of learning is commonly used in Image Classification, Natural Language Processing, Anamoly Detection, etc.

  • Transfer Learning: In transfer learning, the pre-trained model on the first task is often fine-tuned using a small set of labelled data for the second task, so that the model can adapt to the new task and learn task-specific features. This type of learning is used for computer vision, speech recognition, and recommender systems.

  • Deep Learning: Deep learning is a subfield of machine learning that uses artificial neural networks (ANNs) to model and solve complex problems. It is called "deep" learning because the neural networks have many layers, compared to traditional machine learning algorithms that typically have only one or two layers. The additional layers allow the model to learn hierarchical representations of the data, capturing increasingly complex features and patterns. Deep learning algorithms include convolutional neural networks (CNNs), recurrent neural networks (RNNs), and generative adversarial networks (GANs), among others. These algorithms are implemented using frameworks such as TensorFlow, PyTorch, and Caffe.

I hope that you were able to grasp everything so far. Let us dive deep and take a look at basic algorithms used in machine learning:

Basic Algorithms in Machine Learning

  1. Linear Regression: A basic algorithm for modelling the relationship between a dependent variable and one or more independent variables. It is commonly used in regression analysis to predict numerical values.

  2. Logistic Regression: A type of regression analysis used for binary classification problems, where the goal is to predict a binary outcome.

  3. Decision Trees: A tree-based model where decisions or predictions are represented in a tree-like structure. Each internal node represents a test on an attribute, each branch represents an outcome of the test, and each leaf node represents a class label.

  4. Random Forest: An ensemble learning algorithm that combines multiple decision trees to make predictions. The final prediction is made by combining the outputs of multiple trees.

  5. k-Nearest Neighbours: A non-parametric method for classification and regression, where the prediction for a given instance is based on the majority vote of its k nearest neighbours in the training data.

  6. Naive Bayes Classifier: A probabilistic algorithm that makes predictions based on Bayes' theorem, which states that the probability of an event is proportional to the prior probability of the event and the likelihood of the evidence given the event.

    P(A|B) = [P(B/A).P(A)] / P(B).

  7. Support Vector Machines (SVMs): A linear model used for binary classification and regression, where the goal is to find the hyperplane that maximizes the margin between the two classes.

  8. Gradient Boosting: An ensemble learning algorithm that combines multiple weak models to make predictions. The algorithm adjusts the weights of the weak models at each iteration to correct the errors made by the previous models.

  9. Neural Networks: A type of model inspired by the structure and function of the brain, where processing units are organized into layers and connections between units are weighted.

Limitations in Machine Learning

  1. Overfitting: Machine learning models can sometimes memorize the training data instead of generalizing it to new data, leading to poor performance on unseen data.

  2. Bias and fairness: The training data and algorithms used can introduce biases(unfairness) into the models, leading to unfair or discriminatory outcomes.

  3. Lack of interpretability: Some machine learning models, such as deep neural networks, can be difficult to interpret, making it hard to understand how they make predictions.

  4. Requires large amounts of data: Machine learning models often require large amounts of high-quality training data to perform well.

  5. Sensitivity to irrelevant features: During training, not every feature is necessary to be learned. Machine learning models can be sensitive to irrelevant features in the data, leading to poor performance.

  6. Limited to the problem it was trained on: A machine learning model can only make predictions for problems it was specifically trained on, and cannot be easily adapted to new problems.

  7. Lack of common sense: Machine learning models lack common sense knowledge and can make mistakes in reasoning or make decisions based on unexpected patterns in the data.

Conclusion and Future Scope

I hope you were able to understand everything so far and were able to find what you were searching for. Last but not the least, this isn't everything machine learning is about. Comparatively, machine learning is an ocean and what I represented was a bucket of water. The applications of machine learning are limitless and let us look at the future scope of this subject:

  1. Artificial General Intelligence: Machine learning has the potential to be developed into AGI (Artificial General Intelligence), which would enable machines to perform a wide range of tasks that currently require human intelligence.

  2. Autonomous Systems: Machine learning can be used to develop autonomous systems such as self-driving cars, drones, and robots that can make decisions and perform tasks without human intervention.

  3. Healthcare: Machine learning has the potential to revolutionize the healthcare industry by enabling early diagnosis, personalized treatments, and improved disease management.

  4. Natural Language Processing: Advancements in NLP (Natural Language Processing) will continue to improve the ability of machines to understand, interpret, and generate human language.

  5. Predictive Maintenance: Machine learning can be used to predict when equipment will fail, enabling organizations to perform maintenance before a failure occurs, improving efficiency and reducing downtime.

  6. Fraud Detection: Machine learning algorithms can be trained to detect patterns of fraud in data, improving the accuracy and speed of fraud detection and reducing false alarms.

  7. Recommender Systems: Machine learning can be used to build recommendation systems that suggest products, content, or services based on a user's preferences and behaviour.

References