blog posts

What Is Machine Learning And What Does It Do?

Machine Learning is a subset of artificial intelligence, thanks to which we can have systems that learn and develop automatically and without explicit planning.

Machine Learning, The question may be whether computers can learn from the data provided to them.

We have to say yes. Computers can receive new data in new situations and adapt to it, learn from previous calculations, and make repeatable decisions.

In the following, we are going to talk a little more about machine learning or machine learning.

What is machine learning?

Machine Learning is a subset of artificial intelligence, thanks to which we can have systems that learn and develop automatically and without explicit planning.

Machine learning essentially focuses on the development of computer programs that can access and learn data on their own.

The learning process begins with observations or data such as examples, direct experiences, structures, etc., and in this data we seek to find patterns that help us make better decisions in the future.

The main purpose of machine learning is to allow computers to automatically learn and set actions without human intervention or assistance.

Classification of machine learning methods

Learning machine with supervisor

In this category, the system can apply what it has already learned to the future and predict future events by tagging data and samples. In fact, the system starts with analyzing known data and eventually generates a learning algorithm and inferred function to predict output values.

Even this algorithm can compare its outputs with the correct ones to find out how accurate its operation is and get its error rate.


Unsupervised learning machine

In this way, our data is not categorized and tagged. Unsupervised machine learning studies how the system can infer a function that can find hidden structures from unlabeled data. However, these algorithms cannot detect the correct output.

Semi-supervised machine learning

These machine learning algorithms are something between observer and non-observer modes that use both labeled and unlabeled data to learn. Usually in this method, a small amount of data is labeled and a large amount of it is unlabeled.

Systems that use this method can significantly increase the accuracy of learning. This method is usually used in situations where obtaining labeled data requires relevant skills and resources.


Reinforcement machine learning

This method is a machine learning method that uses trial and error to strengthen and improve its performance. In fact, in this method, the system communicates with the environment and uses the feedback it receives to improve itself.

In this way, the machine or software automatically finds the ideal behavior to maximize its performance. Then In fact, these feedbacks are reinforcing signals.


Machine learning applications

Machine learning in various fields such as weather forecasting, medical diagnostics, data analysis, surveillance of CCTV and network cameras, use in social networks (for personalizing news feeds, targeted advertising, etc.), filtering malware and … is applicable.

Algorithms For Machine learning explained

The Machine learning uses algorithms to turn a data set into a model. Which algorithm works best depends on the problem

Supervised learning vs. unsupervised learning

Independent of these divisions, there are another two kinds of machine learning algorithms: supervised and unsupervised. In supervised learning, you provide a training data set with answers, such as a set of pictures of animals along with the names of the animals. The goal of that training would be a model that could correctly identify a picture (of a kind of animal that was included in the training set) that it had not previously seen.

In unsupervised learning, the algorithm goes through the data itself and tries to come up with meaningful results. The result might be, for example, a set of clusters of data points that could be related within each cluster. That works better when the clusters don’t overlap.

Training and evaluation turn supervised learning algorithms into models by optimizing their parameters to find the set of values that best matches the ground truth of your data. The algorithms often rely on variants of steepest descent for their optimizers, for example stochastic gradient descent (SGD), which is essentially steepest descent performed multiple times from randomized starting points. Common refinements on SGD add factors that correct the direction of the gradient based on momentum or adjust the learning rate based on progress from one pass through the data (called an epoch) to the next.

Data cleaning for machine learning

There is no such thing as clean data in the wild. To be useful for machine learning, data must be aggressively filtered. For example, you’ll want to:

  1. Look at the data and exclude any columns that have a lot of missing data.
  2. Look at the data again and pick the columns you want to use for your prediction. (This is something you may want to vary when you iterate.)
  3. Exclude any rows that still have missing data in the remaining columns.
  4. Correct obvious typos and merge equivalent answers. For example, U.S., US, USA, and America should be merged into a single category.
  5. Exclude rows that have data that is out of range. For example, if you’re analyzing taxi trips within New York City, you’ll want to filter out rows with pick-up or drop-off latitudes and longitudes that are outside the bounding box of the metropolitan area.

There is a lot more you can do, but it will depend on the data collected. This can be tedious, but if you set up a data-cleaning step in your machine learning pipeline you can modify and repeat it at will.

Data encoding and normalization for machine learning

To use categorical data for machine classification, you need to encode the text labels into another form. There are two common encodings.

One is label encoding, which means that each text label value is replaced with a number. The other is one-hot encoding, which means that each text label value is turning into a column with a binary value (1 or 0). Most machine learning frameworks have functions that do the conversion for you. In general, one-hot encoding is prefer, as label encoding can sometimes confuse the machine learning algorithm into thinking that the encoded column is ordered.

To use numeric data for machine regression, you usually need to normalize the data. Otherwise, the numbers with larger ranges may tend to dominate the Euclidian distance between feature vectors, their effects can be magnified at the expense of the other fields, and the steepest descent optimization may have difficulty converging. There are a number of ways to normalize and standardize data for ML, including min-max normalization, mean normalization, standardization, and scaling to unit length.