Commit ccf3b12b authored by Ravindu Nethsara's avatar Ravindu Nethsara

Merge branch 'DemandForecastModelChanges' into 'master'

DemandForecastModelChangesAdded

See merge request !15
parents c8f87b2e ada99de6
...@@ -67,7 +67,7 @@ def EmployeeStatus_Update(request): ...@@ -67,7 +67,7 @@ def EmployeeStatus_Update(request):
form = MyForm3() form = MyForm3()
return render(request, 'Admin/EmployeeStatus_Update.html', {'form':form}); return render(request, 'Admin/EmployeeStatus_Update.html', {'form':form});
# Demand Forecasting # Demand Forecasting History
def PurchaseHistory(request): def PurchaseHistory(request):
data = pd.read_csv('Data/Purchasefile.csv') data = pd.read_csv('Data/Purchasefile.csv')
finalpt = data.head(121) finalpt = data.head(121)
...@@ -77,9 +77,7 @@ def PurchaseHistory(request): ...@@ -77,9 +77,7 @@ def PurchaseHistory(request):
context = {'d': arr} context = {'d': arr}
return render(request, 'Admin/PurchaseHistory.html',context); return render(request, 'Admin/PurchaseHistory.html',context);
# start Demand Forecasting Machine Learning Model
# start Admin ML
def Forecasting(request): def Forecasting(request):
if request.method == 'POST': if request.method == 'POST':
myForm = MyForm4(request.POST) myForm = MyForm4(request.POST)
...@@ -101,7 +99,7 @@ def Forecasting(request): ...@@ -101,7 +99,7 @@ def Forecasting(request):
df.set_index('Month', inplace=True) df.set_index('Month', inplace=True)
df.describe() df.describe()
test_result = adfuller(df['CALTEX Delo Gold Ultra']) adfuller(df['CALTEX Delo Gold Ultra'])
test_result2 = adfuller(df['Price1']) test_result2 = adfuller(df['Price1'])
def adfuller_test(Product1): def adfuller_test(Product1):
...@@ -112,10 +110,6 @@ def Forecasting(request): ...@@ -112,10 +110,6 @@ def Forecasting(request):
def adfuller_test2(Price1): def adfuller_test2(Price1):
result2 = adfuller(Price1) result2 = adfuller(Price1)
labels = ['ADF Test Statistic', 'p-value', '#Lags Used', 'Number of Observations Used']
for value, label in zip(result2, labels):
print(label + ' : ' + str(value))
adfuller_test(df['CALTEX Delo Gold Ultra']) adfuller_test(df['CALTEX Delo Gold Ultra'])
adfuller_test2(df['Price1']) adfuller_test2(df['Price1'])
##Differencing ##Differencing
...@@ -191,7 +185,7 @@ def Forecasting(request): ...@@ -191,7 +185,7 @@ def Forecasting(request):
form = MyForm4() form = MyForm4()
#returning form #returning form
return render(request, 'Admin/Forecasting.html', {'form':form}); return render(request, 'Admin/Forecasting.html', {'form':form});
# end Admin ML # End Demand Forecasting Machine Learning Model
def AdminLogin(request): def AdminLogin(request):
......
No preview for this file type
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<div class="container" style="overflow-x:auto;"> <div class="container" style="overflow-x:auto;">
<center>CALTEX Delo Gold Ultra DATATABLE </center> <center><b>CALTEX Delo Gold Ultra Engine Oil </b></center>
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> SERVPORT | Your Service Station Partner </title> <title> SERVPORT | VEHICLE SERVICE AUTOMATION </title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment