Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
22_23-J 21
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
0
Merge Requests
0
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
22_23-J 21
22_23-J 21
Commits
b9ac1201
Commit
b9ac1201
authored
Jan 24, 2023
by
Hirunika R.A.S.
Browse files
Options
Browse Files
Download
Plain Diff
Time series class added
parents
66534d3b
2a73121e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
80 additions
and
0 deletions
+80
-0
BackEnd/Test.txt
BackEnd/Test.txt
+0
-0
BackEnd/time_series_models_builder.py
BackEnd/time_series_models_builder.py
+76
-0
FrontEnd/Test.txt
FrontEnd/Test.txt
+0
-0
README.md
README.md
+4
-0
No files found.
BackEnd/Test.txt
0 → 100644
View file @
b9ac1201
BackEnd/time_series_models_builder.py
0 → 100644
View file @
b9ac1201
# -*- coding: utf-8 -*-
"""time_series_model_builder.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1AWprgehWA_xbBKM_Lr1rWc6wv2BxIhAZ
##Class
"""
import
pandas
as
pd
import
numpy
as
np
import
matplotlib.pyplot
as
plt
import
seaborn
as
sns
color_pal
=
sns
.
color_palette
()
plt
.
style
.
use
(
'fivethirtyeight'
)
import
xgboost
as
xgb
from
sklearn.metrics
import
mean_squared_error
class
TimeSeriesModel
:
def
__init__
(
self
,
dataset_link
,
model_name
):
self
.
dataset_link
=
dataset_link
self
.
model_name
=
model_name
self
.
train_test_split_date
=
'2021-08.-01'
self
.
feature_dataframes
=
{}
self
.
feature_train_dataframes
=
{}
self
.
features_test_dataframes
=
{}
self
.
train
=
None
self
.
test
=
None
self
.
ts_models
=
{}
self
.
model_x_tests
=
{}
print
(
" =========== {} Object Instantiated ==========="
.
format
(
self
.
model_name
))
def
set_details
(
self
,
split_date
):
'''
Provide the Date in format YYYY-MM-DD as a String
Example :- '2021-08.-01'
'''
self
.
train_test_split_date
=
split_date
def
read_data_to_df
(
self
):
import
pandas
as
pd
df
=
tempDF
=
pd
.
read_excel
(
self
.
dataset_link
)
self
.
df
=
df
print
(
" =========== Data Stored In a Pandas DataFrame ===========)"
)
print
(
" Number of Rows --> {}"
.
format
(
df
.
shape
[
0
]))
print
(
" Number of Columns --> {}"
.
format
(
df
.
shape
[
1
]))
def
handle_invalid_values
(
self
):
'''Convert all No Numeric Values to Nan '''
import
pandas
as
pd
for
column
in
self
.
df
.
columns
[
1
:]:
self
.
df
[
column
]
=
pd
.
to_numeric
(
self
.
df
[
column
]
,
errors
=
'coerce'
)
print
(
" =========== Non Numeric Values Set to Nan ==========="
)
\ No newline at end of file
FrontEnd/Test.txt
0 → 100644
View file @
b9ac1201
README.md
View file @
b9ac1201
...
...
@@ -73,7 +73,11 @@ Because of this, the gardener does not need to keep an eye on his crops constant
Here, by installing speakers at selected locations around the gardening, the security camera system can identify the relevant animal and
emit sounds necessary to drive away the relevant animal.
(Ex: making a blast sound to drive away animals like peacocks, monkeys, and pigs and making the sound of bees to drive away wild elephants)
<<<<<<< HEAD
This measure will be able to reduce the damage caused to crops, especially by animals like elephants, peacocks, monkeys, cows and
=======
This measure will be able to reduce the damage caused to crops, especially by animals like elephants, peacocks, monkeys, cows
>>>>>>> 2a73121ebbda9d8040172a86c2353eb1ec34d682
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