Giter Site home page Giter Site logo

janopig / hroch Goto Github PK

View Code? Open in Web Editor NEW
13.0 2.0 0.0 15.37 MB

Extremly fast c++/python symbolic regression library based on parallel local search.

Home Page: https://janopig.github.io/HROCH/

License: MIT License

Python 97.88% Shell 2.12%
fuzzy machine-learning symbolic-regression classification hroch explainable-ai deep-learning equation-discovery physics

hroch's Introduction

Symbolic regression and classification library

License: MIT PyPI version Downloads CodeQL Unittests pages-build-deploymentUpload Python Package

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

pip install HROCH

Usage

Symbolic_Regression_Demo.ipynb Colab

Documentation

from HROCH import SymbolicRegressor

reg = 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
Older 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

SRBench

hroch's People

Contributors

janopig avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

hroch's Issues

Add unittests

add tests for scikit-learn compatibility, random state and other

Fix unittests

<test.features_test.TestFeatures testMethod=test_random_state_mt>

random fail on windows. After adding the debug logs, the problem did not occur. Interesting.

feature names

UserWarning: X has feature names, but NonlinearLogisticRegressor was fitted without feature names

Const search space

v 1.3 Adding your own constant search space. The const_size parameter is now available to control the number of constants to use when searching hc. Added the ability to use a set of predefined immutable constants by the search process, even in combination with mutable constants.

Add srbench to CI

Add a short test (1s per sample), return a few relevant parameters, remove Strogatz and Feynman tests, keep only for windows.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.