Predictive Models
Published: 2023-07-21 16:38:24

Predictive models are like tools or functions. 

You give inputs and it gives outputs. But the outputs are based on that function, that is the model. The way you build your function, its going to give outputs accordingly. And to build that function you need to make relation between your parameters. This depends on the datas that has been inputted previously, that is the historical data.
Let's understand this through example.

1️⃣ Suppose you inputted the total class attended of 100 
   students and the their results of final exam in a software.

2️⃣ Then the software found that the relation between the class 
   attended and the final score is, **final score = 0.25*class 
   attended + 5.[y=0.25*x+5]**

3️⃣ Now, if you ask the software randomly, if a student attended 
   25 classes than what would be his probable final test score?

4️⃣ The software would give the answer following the model that 
    is the formula which is the relation between the parameters, 
    final score and class attended. Just put the value of x.

The first point describes the first thing to create a model that is inputting the **Historical data**. 
Then considering necessary features  that is **Feature Selection**(here are only two features, class attended and exam score. You might need to consider multiple features or select the relevant features out of many according to the context).
After that, finding the relation between the features through the most suitable approach that is **Model Selection**(our model y=0.25*x+5 is a straight line, but to get that we need a certain approach or algorithm which depends on the given and expected data).
Then comes **Model Training**.
After training the model with the historical data regarding the features we find our predictive model.( Here it is the straight line formula)
But we need to check how accurate the model is with the prediction.(We found the model but we need to check that if that actually is a good one. Because straight line have slopes and constant which is the m and c in the formula y=mx+c, we need to find the best suitable m and c for our data) So we run accuracy test that is **Model Evaluation**.
Checking to find the best model.(Finding the right m and c for the formula. Here the best model we found is y=0.25*x+5)
When we are satisfied with the accuracy of our model, we **Predict**
![Predictive Model Mindmap](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5neq2tqlx2522ifxt9pb.png)

These are the main steps for creating a predictive model. But there  are many sub points and lots of forms or options in each step. The choices depend on the nature of the data, the problem being addressed, and the desired accuracy and interpretability of the predictions. For example, the numerical data and the categorical data have different approaches in creating model and predicting. The depth is unceasing...the more you gain knowledge the better you get in dealing with wide range of datas..

The goal of a predictive model is-

- to analyze patterns, relationships, and trends in the available data

- to make predictions about future events or outcomes.

To sum up, Predictive models learn from historical data by identifying relevant features and building a mathematical framework or algorithm that captures the underlying patterns and relationships in the data. Once trained, the model can then be used to make predictions on new, unseen data. Predictive models are widely used in various applications, such as weather forecasting, stock market prediction, customer churn prediction, fraud detection, healthcare diagnostics, and many others.