Skip to main content

README.md

Project description

Group Method of Data Handling (GMDH) - the family of deep learning algorithms.

GMDH is a Python module that implements algorithms for the group method of data handling.

Read the Python module documentation.

About GMDH

GMDH is a machine learning Python module (API) based on C++ library for fast calculations. It realized the Group Method of Data Handling. It is a set of several algorithms for different machine learning tasks solution.

It was developed with a focus on providing fast experimentations and studing.

The gmdh module implements 4 popular varieties of algorithms from the family of GMDH algorithms (COMBI, MULTI, MIA, RIA), designed to solve problems of data approximation and time series prediction. The library also includes auxiliary functionality for basic data preprocessing and saving already trained models.

Short theory

Group Method of Data Handling was applied in a great variety of areas for deep learning and knowledge discovery, forecasting and data mining, optimization and pattern recognition. Inductive GMDH algorithms give possibility to find automatically interrelations in data, to select an optimal structure of model or network and to increase the accuracy of existing algorithms.

You can read the detailed theory at gmdh.net.


Installation

To install gmdh package you need run command:

pip install gmdh

Using:

import gmdh

First contact with gmdh

Let's consider the simplest example of using the basic combinatorial COMBI algorithm from the gmdh module.

To begin with, we import the Combi model and the split_data function from the module to split the source data into training and test samples:

from gmdh import Combi, split_data

Let's create a simple dataset in which the target values of the matrix y will simply be the sum of the corresponding pair of values x1 and x2 of the matrix X:

X = [[1, 2], [3, 2], [7, 0], [5, 5], [1, 4], [2, 6]]
y = [3, 5, 7, 10, 5, 8]

Let's divide our data into training and test samples:

x_train, x_test, y_train, y_test = split_data(X, y)

# print result arrays
print('x_train:\n', x_train)
print('x_test:\n', x_test)
print('\ny_train:\n', y_train)
print('y_test:\n', y_test)

Output:

x_train:
 [[1. 2.]
 [3. 2.]
 [7. 0.]
 [5. 5.]
 [1. 4.]]
x_test:
 [[2. 6.]]

y_train:
 [ 3.  5.  7. 10.  5.]
y_test:
 [8.]

Let's create a Combi model, train it using training data by the fit method and then predict the result for the test sample using the predict method:

model = Combi()
model.fit(x_train, y_train)
y_predicted = model.predict(x_test)

# compare predicted and real value
print('y_predicted: ', y_predicted)
print('y_test: ', y_test)

Output:

y_predicted:  [8.]
y_test:  [8.]

The predicted result coincided with the real value! Now we will output a polynomial that displays the pattern found by the model:

model.get_best_polynomial()

Output:

'y = x1 + x2'

For more in-depth tutorials about gmdh you can check our online GMDH_book.


Documentation

Read the C++ library documentation.

Read the Python module documentation.


License

This project is licensed under the Apache 2.0 License.


Release notes

This is a bachelor's diploma project. It was written by students of the Bauman Moscow State Technical University (BMSTU). The last version 1.0.3 is released in PyPI. This version is the final one for the graduation project, but the project itself and the repository can continue to grow and improve. We will be glad to new ideas and suggestions.

All the release branches can be found on GitHub.

All the release binaries can be found on PyPI.


Opening an issue and a PR

You can also post bug reports and feature requests in GitHub issues. We welcome contributions!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gmdh-1.0.3.tar.gz (14.4 MB view hashes)

Uploaded Source

Built Distributions

gmdh-1.0.3-cp311-cp311-win_amd64.whl (365.2 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

gmdh-1.0.3-cp311-cp311-manylinux1_x86_64.whl (875.1 kB view hashes)

Uploaded CPython 3.11

gmdh-1.0.3-cp310-cp310-win_amd64.whl (365.0 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

gmdh-1.0.3-cp310-cp310-manylinux1_x86_64.whl (875.3 kB view hashes)

Uploaded CPython 3.10

gmdh-1.0.3-cp39-cp39-win_amd64.whl (361.0 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

gmdh-1.0.3-cp39-cp39-manylinux1_x86_64.whl (875.2 kB view hashes)

Uploaded CPython 3.9

gmdh-1.0.3-cp38-cp38-win_amd64.whl (369.4 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

gmdh-1.0.3-cp38-cp38-manylinux1_x86_64.whl (875.1 kB view hashes)

Uploaded CPython 3.8

gmdh-1.0.3-cp37-cp37m-win_amd64.whl (365.4 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

gmdh-1.0.3-cp37-cp37m-manylinux1_x86_64.whl (879.2 kB view hashes)

Uploaded CPython 3.7m

gmdh-1.0.3-cp36-cp36m-win_amd64.whl (365.4 kB view hashes)

Uploaded CPython 3.6m Windows x86-64

gmdh-1.0.3-cp36-cp36m-manylinux1_x86_64.whl (879.3 kB view hashes)

Uploaded CPython 3.6m

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page