Feyn Documentation

Feyn Documentation

  • Learn
  • Guides
  • Tutorials
  • API Reference
  • FAQ

›Primitive Operations

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

Updating a QLattice

by: Kevin Broløs & Chris Cave
(Feyn version 3.0 or newer)


A QLattice can be considered as a probability distribution of Model structures, that can be sampled from with the sample_model function. A structure is defined as the input names, function names and their combinations inside a Model. This excludes its weights and biases.

When you update the QLattice with a list of Models, the probability density function is updated to encourage those structures. Without updating, the QLattice will keep generating models with a random structure.

Example

Continuing from the previous sections, we now add the update function to our workflow.

import feyn
from feyn.datasets import make_classification

train, test = make_classification()

ql = feyn.QLattice()

models = ql.sample_models(train.columns, 'y', 'classification', max_complexity=10)

models = feyn.fit_models(models, train, 'binary_cross_entropy', 'bic', 4)

models = feyn.prune_models(models)

ql.update(
    models=models
)

Parameters of update

models

The list of Models to update the QLattice with.

← Diverse modelsValidate data →
  • Example
  • Parameters of update
    • models

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®