Skip to main content

Feyn is a symbolic regression package named after Richard Feynman, that uses the QLattice as a simulator to generate models.

Project description

Feyn

Quick start

Feyn is available as Python3.8+ package through pip. You can install it with the following command:

richard@feyn:~$ pip3 install feyn

Once installed, go to your preferred Python environment and follow along with this example.

Running a QLattice

If you're using the community edition of a QLattice then you can instantiate it by:

import feyn

ql = feyn.QLattice()

Auto run

The quickest way to get started is to use the auto_run function on the QLattice. First we will make a classification problem with feyn.datasets.make_classification.

from feyn.datasets import make_classification

train, test = make_classification()
models = ql.auto_run(train, output_name = 'y', kind = 'classification')

This returns a list of fitted models that are the best the QLattice has sampled, sorted by ascending loss.

Evaluate

The model with the lowest loss is models[0]. We can evaluate that model with the plot function and it's ROC curve.

best = models[0]
best.plot(train, test)
best.plot_roc_curve(test)

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

feyn-3.2.0-cp312-cp312-win_amd64.whl (228.0 kB view hashes)

Uploaded CPython 3.12 Windows x86-64

feyn-3.2.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (325.3 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

feyn-3.2.0-cp312-cp312-macosx_11_0_arm64.whl (224.3 kB view hashes)

Uploaded CPython 3.12 macOS 11.0+ ARM64

feyn-3.2.0-cp312-cp312-macosx_10_14_x86_64.whl (224.4 kB view hashes)

Uploaded CPython 3.12 macOS 10.14+ x86-64

feyn-3.2.0-cp311-cp311-win_amd64.whl (227.9 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

feyn-3.2.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (324.8 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

feyn-3.2.0-cp311-cp311-macosx_11_0_arm64.whl (224.3 kB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

feyn-3.2.0-cp311-cp311-macosx_10_14_x86_64.whl (224.3 kB view hashes)

Uploaded CPython 3.11 macOS 10.14+ x86-64

feyn-3.2.0-cp310-cp310-win_amd64.whl (227.9 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

feyn-3.2.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (318.8 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

feyn-3.2.0-cp310-cp310-macosx_11_0_arm64.whl (224.2 kB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

feyn-3.2.0-cp310-cp310-macosx_10_14_x86_64.whl (224.3 kB view hashes)

Uploaded CPython 3.10 macOS 10.14+ x86-64

feyn-3.2.0-cp39-cp39-win_amd64.whl (227.9 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

feyn-3.2.0-cp39-cp39-win32.whl (223.9 kB view hashes)

Uploaded CPython 3.9 Windows x86

feyn-3.2.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (317.7 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

feyn-3.2.0-cp39-cp39-macosx_11_0_arm64.whl (224.2 kB view hashes)

Uploaded CPython 3.9 macOS 11.0+ ARM64

feyn-3.2.0-cp39-cp39-macosx_10_14_x86_64.whl (224.3 kB view hashes)

Uploaded CPython 3.9 macOS 10.14+ x86-64

feyn-3.2.0-cp38-cp38-win_amd64.whl (228.0 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

feyn-3.2.0-cp38-cp38-win32.whl (223.9 kB view hashes)

Uploaded CPython 3.8 Windows x86

feyn-3.2.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (320.4 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

feyn-3.2.0-cp38-cp38-macosx_11_0_arm64.whl (224.3 kB view hashes)

Uploaded CPython 3.8 macOS 11.0+ ARM64

feyn-3.2.0-cp38-cp38-macosx_10_14_x86_64.whl (224.3 kB view hashes)

Uploaded CPython 3.8 macOS 10.14+ x86-64

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