Feyn Documentation

Feyn Documentation

  • Learn
  • Guides
  • Tutorials
  • API Reference
  • FAQ

›Getting Started

Getting Started

  • Quick start
  • Using Feyn
  • Installation
  • What is the QLattice?

Essentials

  • Auto Run
  • Summary plot
  • Plot response
  • Splitting a dataset
  • Seeding a QLattice
  • Predicting with a model
  • Saving and loading models
  • Categorical features

Evaluate Regressors

  • Regression plot
  • Residuals plot

Evaluate Classifiers

  • ROC curve
  • Confusion matrix
  • Plot probability scores

Understand Your Models

  • Plot response 1D
  • Plot response 2D
  • Model signal
  • Segmented loss
  • Interactive flow

Primitive Operations

  • Using the primitives
  • Updating priors
  • Sample models
  • Fitting models
  • Pruning models
  • Visualise a model
  • Diverse models
  • Updating a QLattice
  • Validate data
  • Semantic types

Advanced

  • Converting a model to SymPy
  • Logging in Feyn
  • Setting themes
  • Saving a graph as an image
  • Using the query language
  • Estimating priors
  • Filtering models
  • Model parameters
  • Model complexity

Privacy & Commercial

  • Privacy
  • Community edition
  • Commercial use
  • Transition to Feyn 3.0

Quick start

by: Kevin Broløs & Tom Jelen
(Feyn version 3.0 or newer)


A Feyn tour around the block

Welcome to this quick guided tour. We'll get you set up and taking advantage of a QLattice in no time.

Installation

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.

Instantiate a QLattice

If you're using a community QLattice then get started with it by:

import feyn

ql = feyn.QLattice()

If you have paid for a license to use the QLattice then here's a guide on how to set it up instead of using the community version.

Auto run

The quickest way to get started is to use the auto_run function on the QLattice. Below you can see how to use auto_run function in a regression or a classification problem.


Regression
Classification

Regression

We can make a regression problem using feyn.datasets.make_regression. Then we use the auto_run function to find models for the dataset.

from feyn.datasets import make_regression

train, test = make_regression()
models = ql.auto_run(train, output_name = 'y')

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 with plot_regression.

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

Classification

We can make a classification problem using feyn.datasets.make_classification. Then we use the auto_run function to find models for the dataset. We use the kind parameter to tell the auto_run function we want classifier models.

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)

Of course we've got way more in store for you, so take a dive off the deep end of the pool with the rest of our documentation.

Using Feyn →
  • A Feyn tour around the block
  • Installation
  • Instantiate a QLattice
  • Auto run
    • Regression
    • Evaluate
    • Classification
    • Evaluate

Subscribe to get news about Feyn and the QLattice.

You can opt out at any time, and you can read our privacy policy here.

Copyright © 2024 Abzu.ai - Feyn license: CC BY-NC-ND 4.0
Feyn®, QGraph®, and the QLattice® are registered trademarks of Abzu®