Feyn Documentation

Feyn Documentation

  • Learn
  • Guides
  • Tutorials
  • API Reference
  • FAQ

›Advanced

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

Model complexity

by: Kevin Broløs
(Feyn version 2.0.0 or newer)


When relating to the models that come out of the QLattice, it is often useful to look at complexity. For instance, this is already a measure when we sample models (max_complexity), and it is indirectly used when calculating aic or bic for the models when trying to choose parsimonious models.

For that reason, it's of course useful to understand how we measure complexity and what it means for the models, given the restrictions and ways we build and compose them.

Model complexity is an exact one-to-one metric with the amount of edges in the resulting model graph. This is useful, as adding more edges of course also means adding more features or interactions, which also increases complexity.

It also means, that by having a set complexity or a defined max complexity, there's a limit to how many features can be included in the model, as the amount of edges have a direct relationship to the depth of a binary tree, and we never allow more than two inputs into each interaction.

Thus, the maximum amount of features that can be represented is the complexity divided by 2 (rounding up), and the most amount of interactions (given that you have only one feature) is the complexity minus 1. The most interactions you can have is thus the complexity minus the amount of features in the model.

Below, we have composed a little table that'll help you reason about how many features and interactions you can at maximum expect to be present in models of different complexities:

ComplexityMax FeaturesMax Interactions
110
211
321-2
421-3
532-4
632-5
743-6
843-7
954-8
1054-9
1165-10
1265-11
1376-12
1476-13
1587-14
1687-15
1798-16
1898-17
19109-18
20109-19
211110-20
221110-21
231211-22
241211-23
251312-24
261312-25
271413-26
281413-27
291514-28
301514-29
311615-30
← Model parametersPrivacy →

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®