Machine Learning Programming
Machine Learning is a subset of artificial intelligence which provides machine the ability to learn automatically and improve from experiences without being explicitly programmed. The concept is to make a computer learn, capable of using experiences and we need not program it again and again.
In traditional programming, we provide input associated with a program and obtain output. The input is processed using the program(set of rules) we provided at input end which gives the output. We can say, it is logic driven.
In Machine Learning programming, the input and output both are provided to the machine. So that, machine can learn from the dataset. Learning simply means the development of program or set of rules within itself. A machine becomes capable of processing new data using its set of rules.
Steps in Machine Learning:
1. Select and prepare training dataset.
2. Choose an algorithm for training on dataset
3. Train algorithm to create a Model
4. Use and improve the Model
It is done by use of labeled datasets to train algorithms to classify data or predict outcomes. The training dataset includes Input and Output(Labels). It means the data has the labels that machine the machine is build to determine or classify. Regression and Classification problems can be performed using supervised learning algorithms.
Regression: It is used to understand the relationship between dependent and independent variables. Dependent variable is the one that is to be predicted and independent variable is the one that holds the features that helps decide the prediction. It is prediction on continuous data.
For example: House Price Prediction, the dependent variable is price and independent can be area. Using the training data the projections can be pulled out to predict the house price.
Classification: Using an algorithm to classify or accurately assign the data into specific categories. It is prediction on discrete data.
For example: We have three types of fruits- Apple, Orange, Guava. We trained our model with the training data having labels -Apple, Orange, Guava. When that model is tested against test data, particular fruit will be assigned into either of the three labeled categories.
Unsupervised learning uses unlabeled data. It requires larger amount of training data than that of required in supervised learning because unsupervised learning focuses on the pattern detection and association within the data. It discovers pattern from data which is used to solve clustering and association problems.
Clustering: Using an algorithm to create clusters in such a way that similar objects are grouped in same clusters. Algorithms such as K-means clustering, Mean Shift clustering, Agglomerative hierarchical clustering, etc. can be used.
Clustering can be used in places such as fraud detection: The pattern of a fraud from the data can be used to detect fraud and non-fraud transactions.
Association: Find some interesting relations or associations among the variables of dataset. Algorithms such as Apriori algorithm can be used.
For example: In e-commerce , we receive recommendations when we purchase an item. Suppose, the computer has seen a pattern a lot that when someone buys a laptop, the person has bought a laptop bag too. The association is found between the laptop and laptop bag. When someone buys a laptop, he gets a recommendation for a laptop bag. In similar way, associations can be find among different kinds of data.
Learning from feedback and past experiences. It is about taking suitable actions to maximize rewards in a situation. It work on trial and error to get the maximum efficiency of the function. Reinforcing and improving itself until the required optimization is achieved. Reinforcement learning can be used in different scenarios such as Robotics, Gaming, Trading, etc.
For example: In robotics, the algorithm/ learning agent performs actions in an environment and it receives rewards which may be a positive or negative reward. On the basis of reward the agent learns by determining the effect of action in the situation/environment. The agent changes its policy, that is, decides which action benefits and which doesn’t.