MisterZurg / Fedot.Industrial

🖼️ Python framework for automated time series classification, object recognition and anomaly detection

Home Page:https://fedotindustrial.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fedot Industrial logo


Code
CI/CD
Docs & Examples Documentation Status binder
Downloads
Downloads
Support
Languages
Funding

Fedot.Ind is a automated machine learning framework designed to solve industrial problems related to time series forecasting, classification, and regression. It is based on the AutoML framework FEDOT and utilizes its functionality to build and tune pipelines.

Installation

Fedot.Ind is available on PyPI and can be installed via pip:

pip install fedot_ind

To install the latest version from the main branch:

git clone https://github.com/aimclub/Fedot.Industrial.git
cd FEDOT.Industrial
pip install -r requirements.txt
pytest -s test/

How to Use

Fedot.Ind provides a high-level API that allows you to use its capabilities in a simple way. The API can be used for classification, regression, and time series forecasting problems, as well as for anomaly detection.

To use the API, follow these steps:

  1. Import FedotIndustrial class
from fedot_ind.api.main import FedotIndustrial

2. Initialize the FedotIndustrial object and define the type of modeling task. It provides a fit/predict interface:

  • FedotIndustrial.fit() begins the feature extraction, optimization and returns the resulting composite pipeline;
  • FedotIndustrial.predict() predicts target values for the given input data using an already fitted pipeline;
  • FedotIndustrial.get_metrics() estimates the quality of predictions using selected metrics.

NumPy arrays or Pandas DataFrames can be used as sources of input data. In the case below, x_train / x_test, y_train / y_test are pandas.DataFrame() and numpy.ndarray respectively:

dataset_name = 'Epilepsy'
industrial = FedotIndustrial(problem='classification',
                             metric='f1',
                             timeout=5,
                             n_jobs=2,
                             logging_level=20)

train_data, test_data = DataLoader(dataset_name=dataset_name).load_data()

model = industrial.fit(train_data)

labels = industrial.predict(test_data)
probs = industrial.predict_proba(test_data)
metrics = industrial.get_metrics(target=test_data[1],
                                 rounding_order=3,
                                 metric_names=['f1', 'accuracy', 'precision', 'roc_auc'])

More information about the API is available in the documentation section.

Documentation and examples

The comprehensive documentation is available on readthedocs.

Useful tutorials and examples can be found in the examples folder.

Topic Example
Time series classification Basic and Advanced
Time series regression Basic, Advanced, Multi-TS
Forecasting SSA example
Anomaly detection soon will be available
Computer vision Classification, Object detection
Model ensemble Notebook

Real world cases

Building energy consumption

Link to the dataset on Kaggle

Full notebook with solution is here

The challenge is to develop accurate counterfactual models that estimate energy consumption savings post-retrofit. Leveraging a dataset comprising three years of hourly meter readings from over a thousand buildings, the goal is to predict energy consumption (in kWh). Key predictors include air temperature, dew temperature, wind direction, and wind speed.

building target

building results

Results:

Algorithm RMSE_average
FPCR 455.941
Grid-SVR 464.389
FPCR-Bs 465.844
5NN-DTW 469.378
CNN 484.637
Fedot.Industrial 486.398
RDST 527.927
RandF 527.343

Permanent magnet synchronous motor (PMSM) rotor temperature

Link to the dataset on Kaggle

Full notebook with solution is here

This dataset focuses on predicting the maximum recorded rotor temperature of a permanent magnet synchronous motor (PMSM) during 30-second intervals. The data, sampled at 2 Hz, includes sensor readings such as ambient temperature, coolant temperatures, d and q components of voltage, and current. These readings are aggregated into 6-dimensional time series of length 60, representing 30 seconds.

The challenge is to develop a predictive model using the provided predictors to accurately estimate the maximum rotor temperature, crucial for monitoring the motor's performance and ensuring optimal operating conditions.

rotor temp

solution

Results:

Algorithm RMSE_average
Fedot.Industrial 1.158612
FreshPRINCE 1.490442
RIST 1.501047
RotF 1.559385
DrCIF 1.594442
TSF 1.684828

R&D plans

– Expansion of anomaly detection model list.

– Development of new time series forecasting models.

– Implementation of explainability module (Issue)

Citation

Here we will provide a list of citations for the project as soon as the articles are published.

@article{REVIN2023110483,
title = {Automated machine learning approach for time series classification pipelines using evolutionary optimisation},
journal = {Knowledge-Based Systems},
pages = {110483},
year = {2023},
issn = {0950-7051},
doi = {https://doi.org/10.1016/j.knosys.2023.110483},
url = {https://www.sciencedirect.com/science/article/pii/S0950705123002332},
author = {Ilia Revin and Vadim A. Potemkin and Nikita R. Balabanov and Nikolay O. Nikitin
}

About

🖼️ Python framework for automated time series classification, object recognition and anomaly detection

https://fedotindustrial.readthedocs.io

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 100.0%