Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
21_22-J 31
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
21_22-J 31
21_22-J 31
Commits
ada99de6
Commit
ada99de6
authored
Jan 08, 2022
by
Ravindu Nethsara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DemandForecastModelChangesAdded
parent
c8f87b2e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
12 deletions
+6
-12
User/views.py
User/views.py
+4
-10
db.sqlite3
db.sqlite3
+0
-0
templates/Admin/PurchaseHistory.html
templates/Admin/PurchaseHistory.html
+1
-1
templates/Admin/Sidebar2.html
templates/Admin/Sidebar2.html
+1
-1
No files found.
User/views.py
View file @
ada99de6
...
...
@@ -67,7 +67,7 @@ def EmployeeStatus_Update(request):
form
=
MyForm3
()
return
render
(
request
,
'Admin/EmployeeStatus_Update.html'
,
{
'form'
:
form
});
# Demand Forecasting
# Demand Forecasting
History
def
PurchaseHistory
(
request
):
data
=
pd
.
read_csv
(
'Data/Purchasefile.csv'
)
finalpt
=
data
.
head
(
121
)
...
...
@@ -77,9 +77,7 @@ def PurchaseHistory(request):
context
=
{
'd'
:
arr
}
return
render
(
request
,
'Admin/PurchaseHistory.html'
,
context
);
# start Admin ML
# start Demand Forecasting Machine Learning Model
def
Forecasting
(
request
):
if
request
.
method
==
'POST'
:
myForm
=
MyForm4
(
request
.
POST
)
...
...
@@ -101,7 +99,7 @@ def Forecasting(request):
df
.
set_index
(
'Month'
,
inplace
=
True
)
df
.
describe
()
test_result
=
adfuller
(
df
[
'CALTEX Delo Gold Ultra'
])
adfuller
(
df
[
'CALTEX Delo Gold Ultra'
])
test_result2
=
adfuller
(
df
[
'Price1'
])
def
adfuller_test
(
Product1
):
...
...
@@ -112,10 +110,6 @@ def Forecasting(request):
def
adfuller_test2
(
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_test2
(
df
[
'Price1'
])
##Differencing
...
...
@@ -191,7 +185,7 @@ def Forecasting(request):
form
=
MyForm4
()
#returning form
return
render
(
request
,
'Admin/Forecasting.html'
,
{
'form'
:
form
});
#
end Admin ML
#
End Demand Forecasting Machine Learning Model
def
AdminLogin
(
request
):
...
...
db.sqlite3
View file @
ada99de6
No preview for this file type
templates/Admin/PurchaseHistory.html
View file @
ada99de6
...
...
@@ -35,7 +35,7 @@
<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"
>
<thead>
...
...
templates/Admin/Sidebar2.html
View file @
ada99de6
...
...
@@ -3,7 +3,7 @@
<head>
<meta
charset=
"UTF-8"
>
<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"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment