ADS Phase2
ADS Phase2
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:
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)
print(Y_Train)
print(Y_Test)
import pickle
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)
#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.