https://github.com/janopig/hroch
Extremly fast c++/python symbolic regression library based on parallel local search.
https://github.com/janopig/hroch
classification deep-learning equation-discovery explainable-ai fuzzy hroch machine-learning physics symbolic-regression
Last synced: 3 months ago
JSON representation
Extremly fast c++/python symbolic regression library based on parallel local search.
- Host: GitHub
- URL: https://github.com/janopig/hroch
- Owner: janoPig
- License: mit
- Created: 2022-04-24T22:20:34.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-05T15:40:51.000Z (8 months ago)
- Last Synced: 2025-02-16T23:04:23.558Z (3 months ago)
- Topics: classification, deep-learning, equation-discovery, explainable-ai, fuzzy, hroch, machine-learning, physics, symbolic-regression
- Language: Python
- Homepage: https://janopig.github.io/HROCH/
- Size: 15.4 MB
- Stars: 14
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Symbolic regression and classification library
[](https://opensource.org/licenses/MIT) [](https://badge.fury.io/py/HROCH) [](https://pepy.tech/project/hroch) [](https://github.com/janoPig/HROCH/actions/workflows/codeql.yml) [](https://github.com/janoPig/HROCH/actions/workflows/unittests.yml) [](https://github.com/janoPig/HROCH/actions/workflows/pages/pages-build-deployment)[](https://github.com/janoPig/HROCH/actions/workflows/python-publish.yml)
**High-Performance python symbolic regression library based on parallel local search**
- Zero hyperparameter tunning.
- Accurate results in seconds or minutes, in contrast to slow GP-based methods.
- Small models size.
- Support for regression, classification and fuzzy math.
- Support 32 and 64 bit floating point arithmetic.
- Work with unprotected version of math operators (log, sqrt, division)
- Speedup search by using feature importances computed from bbox model|**Supported instructions**||
| ----------- | ----------- |
|**math**|add, sub, mul, div, pdiv, inv, minv, sq2, pow, exp, log, sqrt, cbrt, aq|
|**goniometric**|sin, cos, tan, asin, acos, atan, sinh, cosh, tanh|
|**other**|nop, max, min, abs, floor, ceil, lt, gt, lte, gte|
|**fuzzy**|f_and, f_or, f_xor, f_impl, f_not, f_nand, f_nor, f_nxor, f_nimpl|## Sources
C++20 source code available in separate repo [sr_core]()
## Dependencies
- AVX2 instructions set(all modern CPU support this)
- numpy
- sklearn## Installation
```sh
pip install HROCH
```## Usage
[Symbolic_Regression_Demo.ipynb](https://github.com/janoPig/HROCH/blob/main/examples/Symbolic_Regression_Demo.ipynb) [](https://colab.research.google.com/github/janoPig/HROCH/blob/main/examples/Symbolic_Regression_Demo.ipynb)
[Documentation](https://janopig.github.io/HROCH/HROCH.html)
```python
from HROCH import SymbolicRegressorreg = SymbolicRegressor(num_threads=8, time_limit=60.0, problem='math', precision='f64')
reg.fit(X_train, y_train)
yp = reg.predict(X_test)
```## Changelog
### v1.4
- Sklearn compatibility
- Classificators:
- NonlinearLogisticRegressor for a binary classification
- SymbolicClassifier for multiclass classification
- FuzzyRegressor for a special binary classification
- Xi corelation used for filter unrelated featuresOlder versions
### v1.3
- Public c++ sources
- Commanline interface changed to cpython
- Support for classification score logloss and accuracy
- Support for final transformations:
- ordinal regression
- logistic function
- clipping
- Acess to equations from all paralel hillclimbers
- User defined constants### v1.2
- Features probability as input parameter
- Custom instructions set
- Parallel hilclimbing parameters
### v1.1- Improved late acceptance hillclimbing
### v1.0
- First release
## SRBench
[*full results*](https://github.com/janoPig/HROCH/blob/main/benchmarks/SRBench.md)
![]()