Skip to content

Commit

Permalink
Merge pull request #36 from BBVA/develop
Browse files Browse the repository at this point in the history
4.1 version
  • Loading branch information
SIPVZ authored Sep 2, 2020
2 parents 76641ac + e3aa8f0 commit 0ff5c67
Show file tree
Hide file tree
Showing 29 changed files with 741 additions and 222 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ COPY ./ /app
COPY ./requirements.txt /tmp/
COPY ./config/timeout.conf /etc/nginx/conf.d/

RUN pip install mxnet==1.4.1 gluonts && apt-get update && apt-get install -y redis-server python3-celery python-celery-common python3-redis && rm -rf /var/lib/apt/lists/* && pip3 install numpy pandas && pip3 install --requirement /tmp/requirements.txt && pip3 install fbprophet && chmod -R g=u /etc/passwd /app && pip install --upgrade pyflux && pip install --upgrade numpy && rm -fr /root/.cache/pip && service redis-server start
RUN pip install mxnet==1.4.1 gluonts && apt-get update && apt-get install -y redis-server python3-celery python-celery-common python3-redis && rm -rf /var/lib/apt/lists/* && pip3 install numpy pandas && pip3 install --requirement /tmp/requirements.txt && pip3 install fbprophet && chmod -R g=u /etc/passwd /app && pip install --upgrade pyflux && pip install --upgrade numpy && pip install nbeats-keras && pip install -U tensorflow && rm -fr /root/.cache/pip && service redis-server start
65 changes: 62 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ To use TIMECOP engine you will need to send a univariate or multivariate time se
#### Secondary Features
- [x] Delta / Full timesteps upload
- [x] Train / Use best known model in production envirotnment
- [x] Python API for easy integration in notebooks / python apps
- [x] Backend Database
- [x] Python API for easy integration in notebooks / python apps
- [x] Backend Database



Expand All @@ -48,9 +48,11 @@ To use TIMECOP engine you will need to send a univariate or multivariate time se
- [x] Gluon-ts
- [x] Holtwinters
- [x] ARIMA
- [x] N-beats
- [x] Temporal Convolutional Network
- [ ] TBATS


#### Multivariate
- [x] Long Short Term Memory networks
- [x] vector autoregression
Expand All @@ -70,6 +72,63 @@ To use TIMECOP engine you will need to send a univariate or multivariate time se
- [x] ChangePoints
- [ ] Confidence interval

## Installation
To use timecop the easiest way is to deploy the docker image made with the last version. The steps to use the docker images are:

## Install docker

Download timecop docker image:
```
docker pull trakuo/timecop:devel
```

Execute a container with the timecop image:

```
docker run --name timecoprunning -p 3000:80 trakuo/timecop:devel
```

Open web test page to test timecop is running
```
http://localhost:3000/static/index.html
```

## pip python package
A python package to invoke Timecop from any python code, using the RESTful Web Server API for you.
For more information, go to the [pip module](https://pypi.org/project/timecopts/)

###### UNIVARIATE

```
import timecopts as tc
TS=[1,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9]
URL = 'URL_timecop_server'
output_json = tc.timecop_univariate(URL,name='test_timeseries', TS, train=True, restart=True)
```

###### MULTIVARIATE


```
import timecopts as tc
TS_main=[1,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9]
TS_timeseries= []
temp = {}
temp['data'] = [1,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9]
TS_timeseries.append(temp)
temp2 = {}
temp2['data'] = [1,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9,2,3,4,5,6,7,8,9]
TS_timeseries.append(temp2)
URL = 'URL_timecop_server'
output_json = tc.timecop_multivariate(URL,name='test_timeseries', TS_main,TS_timeseries, train=True, restart=True)
```



## Web test page

to use timecop there is another option, a web page that you can use locally and test timecop from CSV files before integrating it into any application
Expand Down
Binary file added Timecop_modelsv1.db
Binary file not shown.
Loading

0 comments on commit 0ff5c67

Please sign in to comment.