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 priors

by: Kevin Broløs and Meera Machado
(Feyn version 3.0 or newer)


We can change the behaviour of how we sample Models from a QLattice by supplying prior probabilities for each input.

This can be used to inform a QLattice of our prior beliefs of the input variables. Inputs with higher prior values are more likely to appear in the sampled Models.

In short, a prior probability of an input x in the context of a QLattice denotes our prior belief of the importance of x in predicting the output.

If no priors are given, all inputs are equally likely to appear when sampling a Model.

Example

Here's an example of how to update the priors:

import feyn

priors = {"x1": 1., "x2": 0.99, "x3": 0.98, "x4": 0.97}

ql = feyn.QLattice()
ql.update_priors(priors, reset=True)

Calculating the priors

Refer to Estimating priors to see how the priors can be calculated based on the mutual information between each input variable and the output.


Parameters of update_priors

priors

A Dict object where the keys are the names of the input variables and the values are the relative weights associated to each input.

reset

Default: True

A boolean that determines whether the existing priors should be reset (True) or merged with the new priors (False) when updating the QLattice.

← Using the primitivesSample models →
  • Example
  • Calculating the priors
  • Parameters of update_priors
    • priors
    • reset

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®