Basic of Machine Learning.


What is Machine Learning?

Machine Learning is a subset of Artificial Intelligence (AI) which provides machines the ability to learn automatically and improve from experience without being explicitly programmed. It is a process that involves building a Predictive model that can be used to find a solution for a Problem Statement.

Data---> Training the Machine---> Builing a Mode---> Predicting Outcome.

Need for Machine Learning:

  • Increase in Data Generation.
  • Uncover patterns and trends in data.
  • Improve Decision Making.
  • Solve complex problems.

Important Machine Learning definitions:

  • Algorithm: A set of rules and statistical techniques used to learn patterns from data.

  • Model: A model is trained by using a Machine Learning Algorithm.

  • 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.

  • Testing Data: The Machine Learning model is evaluated using the testing data.

     

    Weather Data

     import pandas as pd   
     pd.DataFrame({'Outlook': ['Sunny','Sunny','Overcast','Rain','Rain','Rain','Overcast','Sunny','Sunny'],   
            'Humidity': ['High','High','High','High','Normal','Normal','Normal','High','High'],  
            'Wind': ['Weak','Strong','Weak','Weak','Weak','Weak','Strong','Strong','Weak'],  
            'Play': ['No','No','Yes','Yes','Yes','No','Yes','No','Yes']},  
            index=['D1','D2','D3','D4','D5','D6','D7','D8','D9'])  
    

    Steps involved in solving a Machine Learning Problem.

    Step 1: Define the objective of the problem.

    Our objective in this problem is to predict the possibility of rain by studying the weather conditions. A few questions you should ask yourself, like:

    • What we are trying to predict?
    • What are the target features?
    • What is the input data?
    • What kind of problem are we facing?

    Step 2: Data Gathering.

    Data such as weather conditions, humidity level, temperature, pressure, etc are either collected manually or from the web.

    Step 3: Preparing the Data.

    Data Cleaning involves getting rid of inconsistencies in data such as missing values or redundant variables and transforming data into the desired format.

    Data Cleaning involves dealing with:

    • Missing values.
    • Corrupted Data.
    • Remove unnecessary data.

     Step 4: Exploratory Data Analysis.

    Data Exploration involves understanding the patterns and trends in the data. At this stage, all the useful insights are drawn and a correlation between the variables is understood.

    Step 5: Building a Machine Learning model.

    At this stage, a Predictive Model is built by using Machine Learning Algorithms such as Linear Regression, Decision Tree, Random Forest, etc. The Machine Learning model is built by using the training data set. The model is the Machine Learning Algorithm that predicts the output by using the data feed to it.

    Step 6: Model Evaluation and Optimization.

    The efficiency of the model is evaluated and further improvements in the model are implemented.

    • The Machine Learning model is evaluated by using the testing data set.
    • The accuracy of the model is calculated.
    • Further improvement in the model is done by using techniques like Parameter tuning.

    Step 7: Predictions.

    The final outcome is predicted after performing tuning and improving the accuracy of the model.

Post a Comment

Previous Post Next Post