Every thing about Machine Learning🤖

Every thing about Machine Learning🤖

·

12 min read

1. What is machine learning ? 🙄🙄

In simple words, Machine learning is a subset of Artificial Intelligence (AI) which provides machines the ability to learn automatically & improve from previous experience without being explicitly programmed. In the sense, it is the practice of getting Machines to solve problems by gaining the ability to think.

2. Machine Learning Definitions

What-Is-Machine-Learning-Introduction-To-Machine-Learning-Edureka.png

  • Algorithm: A Machine Learning algorithm is a set of rules and statistical techniques used to learn patterns from data and draw significant information from it. It is the logic behind a Machine Learning model. An example of a Machine Learning algorithm is the Linear Regression algorithm.

  • Model: A model is the main component of Machine Learning. A model is trained by using a Machine Learning Algorithm. An algorithm maps all the decisions that a model is supposed to take based on the given input, in order to get the correct output.

  • Predictor Variable: It is a feature(s) of the data that can be used to predict the output.

  • Response Variable: It is the feature or the output variable that needs to be predicted by using the predictor variable(s).

  • Training Data: The Machine Learning model is built using the training data. The training data helps the model to identify key trends and patterns essential to predict the output.

  • Testing Data: After the model is trained, it must be tested to evaluate how accurately it can predict an outcome. This is done by the testing data set.

3. How machine learning differ from AI, Deep learning(DL)

Artificial Intelligence is the main root under which Machine Learning and Deep Learning come. And you can also see in the diagram that even deep learning is a subset of Machine Learning. So all three of them AI, machine learning and deep learning are just the subsets of each other.

158-1585240_ai-ml-and-data-science-related-hd-png.png

4. Machine Learning Types

A machine can learn to solve a problem by following any one of the following three approaches. These are the ways in which a machine can learn:

  • Supervised Learning
  • Unsupervised Learning
  • Reinforcement Learning

Types-of-Machine-Learning-Waht-is-Machine-Learning-Edureka-2.png

4.1 Supervised Learning

Supervised learning is a technique in which we teach or train the machine using data which is well labeled.

Consider the figure. Here we’re feeding the machine images of Tom and Jerry and the goal is for the machine to identify and classify the images into two groups (Tom images and Jerry images). The training data set that is feed to the model is labeled, as in, we’re telling the machine, ‘this is how Tom looks and this is Jerry’. By doing so you’re training the machine by using labeled data. In Supervised Learning, there is a well-defined training phase done with the help of labeled data.

Supervised-Learning-Introduction-To-Machine-Learning-Edureka.png

4.2 Why this category of machine learning is termed as supervised learning?

This category is termed as supervised learning because the process of an algorithm learning from the training dataset can be as a teacher teaching his students. The algorithm continuously predicts the result on the basis of training data and is continuously corrected by the teacher. The learning continues until the algorithm achieves an acceptable level of performance and a well define accuracy.

  • Supervised Learning Usecases

Machine-Learning-Use-Case-What-is-Machine-Learning-Edureka-528x192.png

Cortana or any speech automated system in your mobile phone trains your voice and then starts working based on this training. This is an application of Supervised Learning.

Android-weather-widget.png

Predicts the upcoming weather by analyzing the parameters for a given time on some prior knowledge (when its sunny, temperature is higher; when its cloudy, humidity is higher, etc.).

4.3 Unsupervised Learning

Unsupervised learning involves training by using unlabeled data and allowing the model to act on that information without guidance.

Unsupervised-Learning-Introduction-To-Machine-Learning-Edureka.png

For example, it identifies prominent features of Tom such as ears, bigger size, color etc, to understand that this image is of type 1. Similarly, it finds such features in Jerry and knows that this image is of type 2. Therefore, it classifies the images into two different classes without knowing who is Tom or Jerry.

4.4 Why this category of machine learning is known as unsupervised learning?

This category of machine learning is known as unsupervised because unlike supervised learning there is no teacher. Algorithms are left on their own to discover and return the interesting structure in the data.

  • Unsupervised Learning Usecases

fsers.PNG

A friend invites you to his party where you meet totally strangers. Now you will classify them using unsupervised learning (no prior knowledge) and this classification can be on the basis of gender, age group, dressing, educational qualification or whatever way you would like. Since you didn’t have any prior knowledge about people and so you just classified them on real time situation.

shutterstock_581647756-528x297.png

Let’s suppose you have never seen a Football match before and by chance watch a video on internet, now you can classify players on the basis of different criterion like Players wearing the same sort of kits are in one class, Players of one style are in one class (players, goalkeeper, referee), or on the basis of playing style(attacker or defender) or whatever way you would observe, you can classify it.

4.5 Reinforcement Learning

Reinforcement Learning is a part of Machine learning where an agent is put in an environment and he learns to behave in this environment by performing certain actions and observing the rewards which it gets from those actions.

Reinforcement-Training-Machine-Learning-Tutorial-Edureka.png

This type of Machine Learning is comparatively different. Imagine that today rain fall in your city or not?

The reinforcement learning algorithm is all about the interaction between the environment and the learning agent. The learning agent is based on exploration and exploitation.

Exploration is when the learning agent acts on trial and error and Exploitation is when it performs an action based on the knowledge gained from the environment. The environment rewards the agent for every correct action, which is the reinforcement signal. With the aim of collecting more rewards obtained, the agent improves its environment knowledge to choose or perform the next action.

4.6 Concept of labelled data & unlabelled data

  • Labeled data is data that’s subject to a prior understanding of the way in which the world operates. A human or automatic tagger must use their prior knowledge to impose additional information on the data. This knowledge is however not present in the measurements we perform.
  • Unlabeled data is, in the sense indicated above, the only pure data that exists. If we switch on a sensor, or if we open our eyes, and know nothing of the environment or the way in which the world operates, we then collect unlabeled data.

5. Different between Regression vs Classification vs Clustering

Regression-vs-Classification-vs-Clustering-Introduction-To-Machine-Learning-Edureka.png

  • Regression:

In this type of problem the output is a continuous quantity. So, for example, if you want to predict the speed of a car given the distance, it is a Regression problem. Regression problems can be solved by using Supervised Learning algorithms like Linear Regression.

  • Classification:

In this type, the output is a categorical value. Classifying emails into two classes, spam and non-spam is a classification problem that can be solved by using Supervised Learning classification algorithms such as Support Vector Machines, Naive Bayes, Logistic Regression, K Nearest Neighbor, etc.

  • Clustering:

This type of problem involves assigning the input into two or more clusters based on feature similarity. For example, clustering viewers into similar groups based on their interests, age, geography, etc can be done by using Unsupervised Learning algorithms like K-Means Clustering.

6. Some applications of Machine learning

  • Traffic Alerts (Maps)

google-maps-180x180.png

Now, Google Maps is probably the app we use whenever we go out and require assistance in directions and traffic. The other day I was traveling to another city and took the expressway and Maps suggested: “Despite the Heavy Traffic, you are on the fastest route“. It’s a combination of People currently using the service, Historic Data of that route collected over time and few tricks acquired from other companies. Everyone using maps is providing their location, average speed, the route in which they are traveling which in turn helps Google collect massive Data about the traffic, which makes them predict the upcoming traffic and adjust your route according to it.

  • Virtual Personal Assistants

As the name suggests, Virtual Personal Assistants assist in finding useful information, when asked via text or voice. Few of the major applications of Machine Learning here are:

  • Speech Recognition
  • Speech to Text Conversion
  • Natural Language Processing
  • Text to Speech Conversion

assistant-528x181.png

All you need to do is ask a simple question like “What is my schedule for tomorrow?” or “Show my upcoming Flights“. For answering, your personal assistant searches for information or recalls your related queries to collect info. Recently personal assistants are being used in Chatbots which are being implemented in various food ordering apps, online training websites and also in Commuting apps, websites.

  • Self Driving Cars

Tesla-logo-2003-2500x2500-180x180.png

Here is one of the coolest application of Machine Learning. It’s here and people are already using it. Machine Learning plays a very important role in Self Driving Cars and I’m sure you might have heard about Tesla. The leader in this business and their current Artificial Intelligence is driven by hardware manufacturer NVIDIA, which is based on Unsupervised Learning Algorithm.

  • Online Video Streaming (Netflix)

The Netflix algorithm constantly gathers massive amounts of data about users’ activities like:

Get-Free-Netflix-Account-2021.png

  • When you pause, rewind, or fast forward
  • What day you watch content (TV Shows on Weekdays and Movies on Weekends)
  • The Date and Time you watch
  • When you pause and leave content (and if you ever come back)
  • The ratings Given (about 4 million per day), Searches (about 3 million per day)
  • Browsing and Scrolling Behavior

And a lot more. They collect this data for each subscriber they have and use their recommender System and a lot of Machine Learning Applications. That’s why they have such a huge customer retention rate.

7. Pavlov trained experiment his dog using reinforcement training

Pavlov-Training-Machine-Learning-Tutorial-Edureka.png

Pavlov divided the training of his dog into four stages.

In the first part, Pavlov gave meat to the dog, and in response to the meat, the dog started salivating.

In the next stage he created a sound with a bell, but this time the dogs did not respond anything.

In the third stage, he tried to train his dog by using the bell and then giving them food. Seeing the food the dog started salivating.

Eventually, the dogs started salivating just after hearing the bell, even if the food was not given as the dog was reinforced that whenever the master will ring the bell, he will get the food.

8. Maths for Machine Learning

Absolutely the machine learning is based on some mathematics approaches.

Our computers have become capable enough to do the math in split seconds where we would take minutes or hours to perform the calculations. But in reality, it’s not the ability to solve the math. Rather, it is the eye of how the math needs to be applied.You need to analyze the data and infer information so that you can create a model that learns from the data.

8.1 Application of Linear Algebra in Machine Learning

  • When you work with images, you can use the concepts of Linear Algebra to scale, smoothen, crop and much more. You have predefined operations or you can create such operations that can take care of all this. You can make use of NumPy arrays and load image data, later make use of the operations to do your work.

Scree-Plot-Principal-Component-Analysis-Edureka-397x300.png

  • Encoding Datasets is another application where Linear Algebra is used. You have in-built functions in many languages that help you encode strings to characters or something else. These functions are made using Linear Algebra.

  • You may know about optimizing the outputs so that we can get the most optimum values needed by our model. There is mostly the use of Multivariate Calculus but there are certain times when even Linear Algebra equations and more can be used to optimize our model and their weights that yield outputs.

  • Singular Value Decomposition (SVD) is another application which is of the same kind of PCA but for single dimensions. This helps in the reduction of noise, helps improve the quality of the information that is obtained from the dimension and so on. It uses EigenVectors and Matrix Factorizations (Matrix Operations) for the working.

  • images can be altered and new images can be made from them. We use the advanced concepts of Shadow, Projection etc. in a Neural Network that transforms the pixels to obtain alternate images of that image. It is capable of transforming 2D objects to 3D which requires Linear Algebra.
  • Latent Semantic Analysis uses Sparse Matrices Factorization with the SVD to give you the most important parts of the text document. These can be used for Natural Language Processing.

  • Deep Learning needs Linear Algebra because it works on optimizations and more to give the best possible output.

8.2 Application of Probability in Machine Learning

Hope all you have a clear idea of the impact Probability has on Machine Learning but the real question as always remains. How do we use this in real life that mention below.

  • Probability helps us optimize our model.
  • Classification by our algorithms requires Probability.
  • Loss can also be calculated using Probability.
  • Models are built on Probability.

Here is a practical application of Naive Bayes Classifier that requires Probability and how it helps us in making a good model. The graphic image below is another example of how the Naive Bayes Classifier works.

1_EIVtLAe05L4htlZeMc8OFA.jpeg

Face-King.png

8.3 What is Statistics?

  • Statistics is an area of applied mathematics concerned with data collection, analysis, visualizing data, interpretation, and presentation. It helps you in testing the effectiveness of your Hypothesis on the dataset that you have gathered. That makes it such an important factor in Machine Learning.

StatisticsUses.png

8.4 Why Statistics is necessary for Machine learning (ML)

  • Statistics is an important factor when it comes to Machine Learning. It is a approach that helps you to study, analyze and make work out of the Hypothesis you make that will be able to predict. By using statistics we can easily calculate the mean, median, mode , Variance and Standard Deviation of a particular dataset. This operations are important to make a dataset meaningful and easily understandable for non code developers. Not only that we can easily extract the important data from a particular dataset that increase the predicting accuracy of a machine learning model.

9. Is it necessary python as a programming language for machine learning ?

Yes it's necessary. You want to learn machine learning means you want to play with different types of data, models, validations, optimising hyper-parameters, visualize what's happening inside the algorithms, vectorise your variables etc. There are dedicated libraries for each of these tasks in Python.

10. Conclusion & Referances 🚩

That it for this blog. I hope you learn something new. Also in case i have missed something feel free to share your thought and feedback.

Feel free to reach out me 👀

🔗 Lindedin 🖱

🔗 Twitter 🖱

🔗 GitHub 🖱

Did you find this article valuable?

Support Hashnode by becoming a sponsor. Any amount is appreciated!