0% found this document useful (0 votes)
22 views2 pages

ADS Phase2

The project focuses on predicting future sales through a data-driven approach that includes data collection, preprocessing, feature engineering, model selection, evaluation, deployment, and continuous improvement. It utilizes historical sales data and machine learning techniques, specifically linear regression, to create a predictive model. The ultimate goal is to enhance business operations and drive growth in the retail industry.

Uploaded by

Captain Marvel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views2 pages

ADS Phase2

The project focuses on predicting future sales through a data-driven approach that includes data collection, preprocessing, feature engineering, model selection, evaluation, deployment, and continuous improvement. It utilizes historical sales data and machine learning techniques, specifically linear regression, to create a predictive model. The ultimate goal is to enhance business operations and drive growth in the retail industry.

Uploaded by

Captain Marvel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

FUTURE SALES PREDICTION

Project Scope: The scope of this project includes:

 Data collection: Gathering historical sales data, including factors such as time, location, product categories, pricing,
promotions, and more.
 Data preprocessing: Cleaning and transforming the data to make it suitable for analysis.
 Feature engineering: Creating relevant features that may impact sales predictions.
 Model selection: Identifying and implementing the most appropriate machine learning and statistical models for sales
prediction.
 Evaluation: Assessing model accuracy and performance using appropriate metrics.
 Deployment: Integrating the developed model into the company's decision-making processes.
 Continuous improvement: Updating the model as new data becomes available and refining predictions over time.

The project will employ a data-driven approach, involving the following steps:

a. Data collection and integration.

b. Data preprocessing and cleaning.

c. Feature engineering to create relevant predictive variables.

d. Model selection and development.

e. Model evaluation and validation using appropriate metrics.

f. Deployment of the model into decision-making processes.

g. Continuous monitoring and model updates.

DATA SOURCE :
Dataset Link: https://www.kaggle.com/datasets/chakradharmattapalli/future-sales-prediction

PROGRAM :
#Library used for Data set

import pandas as pd
#Library used for Split the Train and Test data
from sklearn.model_selection import train_test_split
#Used to claculate the Linear value i.e bias and weight
from sklearn.linear_model import LinearRegression
#To calculate r square
from sklearn.metrics import r2_score
#File Handling
import pickle
#Visulaization
import matplotlib.pyplot as mtp

dataset=pd.read_csv('Sales.csv')
print(dataset)
independent_input=dataset[["TV"]]
print(independent_input)

dependent_output=dataset[["Sales"]]
print(dependent_output)

from sklearn.model_selection import train_test_split


X_Train,X_Test,Y_Train,Y_Test=train_test_split(independent_input,dependent_output,test_size=0.30,random_state=0)
print(X_Train)
print(X_Test)

print(Y_Train)
print(Y_Test)

from sklearn.linear_model import LinearRegression

from sklearn.metrics import r2_score

import pickle

import matplotlib.pyplot as mtp

regressor=LinearRegression()
regressor.fit(X_Train,Y_Train)
print(regressor.fit(X_Train,Y_Train)) #Linear Regression

bais=regressor.intercept_
print(bais)

#Prediction
y_pred=regressor.predict(X_Test)

#Find R Square
r_score=r2_score(Y_Test,y_pred)

print(r_score)

#if r2 Near 1 => It is Good Model Else Bad Modelk

#Save the Model


filename="Final_Model_Linear.sav"
pickle.dump(regressor,open(filename,"wb"))

#open the File


load_model=pickle.load(open("Final_Model_Linear.sav",'rb'))

#Final Result
n=int(input("Enter the Year "))
result=load_model.predict([[n]])
print(result)

weight=regressor.coef_
print(weight)

CONCLUSION:

Predicting future sales is essential for the growth and success of [Your Company or Retail Store Name]. This project represents a proactive step in
harnessing data-driven insights to optimize business operations, enhance customer experiences, and drive sustainable growth in the retail industry.

You might also like