The trainer is defined as a microservice so that it is easy to be run and deployed in any use case and infrastructure. In addition, it is fully configurable and adaptable for scenario.
With the data produced by the sensors every day, a database is collected for every entity/id so that a predictive model can be produced for each entity. This model will recognize and detect the patterns in the data so that it is able to forecast (predict), considering some context input data, the next value(s) of the time series; or to estimate the value of a specific target feature.
In order to train the model, an Elasticsearch database is used to obtain the data. Models are also stored in Elasticsearch so that they can be loaded from other microservices.
There are several parameters that can be modified to change how the system learns. These parameters are enclosed in the file ./config/config.ini, and are explained here:
INFERENCE section:
timeseries or features and stands for the type of the data to train the model. If the datatype is features, the next two parameters are ignored.timeseries.ML section:
The format for time_window parameters follows Date Math from elasticsearch API.
ELASTIC section:
DATA section:
timestampELK section
9200 (default of elasticsearch)MINIO section
DEFAULT section
Use this command to launch the container:
docker run synchronicityiot/trainer-estimation-generic:@tag -e MINIO_HOST='@minio_host' -e MINIO_PORT='@minio_port' -e MINIO_ACCESS_KEY='@minio_access' -e MINIO_SECRET_KEY='@minio_secret' -e ELASTIC_HOST='@elastic_host' -e ELASTIC_PORT='@elastic_port' -v ./config/:/usr/src/app/config -p 5006:5006
Note that you must specify at least @tag (for example :v1.0) and the folder that contains the configuration file as a volume (config.ini). You can specify environment variables for the elasticsearch host (@elastic_host) and the elasticsearch port (@elastic_port), if you do not provide them, the ones in the config.ini file will be used. You should also open the port used in the trainer (5006 or the port you selected).
In case you might want to include the engine in your docker-compose file, we provide here the code needed to launch it (please configure properly the docker image tag, the elasticsearch environment variables and the port of the trainer environment variable):
networks:
ioelab-network:
driver: bridge
volumes:
aimodelsdata:
driver: local
services:
iot-ai-engine:
image: ioelab/trainer-estimation-generic:v1.0
container_name: trainer-estimation-generic
hostname: trainer-estimation-generic_host
volumes:
- ./config/config.ini:/usr/src/app/config/config.ini
environment:
NODE_ENV: development
ELASTIC_HOST: 127.0.0.1
ELASTIC_PORT: 9200
MINIO_HOST: 127.0.0.1
MINIO_PORT: 9200
TRAINER_PORT: 5006
MINIO_ACCESS_KEY: {MINIO_ACCESS_KEY}
MINIO_SECRET_KEY: {MINIO_SECRET_KEY}
ports:
- 5006:5006
networks:
ioelab-network:
aliases:
- trainer-estimation-generic_host
Content type
Image
Digest
Size
693.8 MB
Last updated
over 6 years ago
docker pull synchronicityiot/trainer-estimation-generic:2.1