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

Diverse models

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


The number of potential models that can explain a dataset can vary. The function get_diverse_models finds the best performing Models from a list that have evolved independently in the QLattice.

This allows you to filter down the list of possible models to choose from, and only look at the ones that are most likely to be structurally or behaviourally different.

Example

Continuing from the previous sections, we now add the get_diverse_models 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)

models = feyn.get_diverse_models(
    models=models,
    n=10
)

Parameters of get_diverse_models

models

The list of models to find the diverse models from. The function expects the list to be sorted by some metric, such as the loss.

n

The maximum amount of models to return from the list.

← Visualise a modelUpdating a QLattice →
  • Example
  • Parameters of get_diverse_models
    • models
    • n

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®