glimpse.models

DEFAULT_MODEL_NAME

Model name used by GetModelClass(), MakeModel(), and MakeParams() when no name is supplied. This should not be “base”.

GetModelClass(name=None)

Lookup a Glimpse model class by name.

Parameters:name (str) – The name of the model. This corresponds to the model’s package name. The default is read from the GLIMPSE_MODEL environment variable, or is DEFAULT_MODEL_NAME if this is not set.

Examples:

Create a new instance of the ‘ml’ model:

>>> ModelClass = GetModelClass("ml")
>>> assert(ModelClass == glimpse.ml.Model)
MakeParams(name=None, **kw)

Create parameters for the given model.

MakeModel(*args)

Create an instance of the given model.

Usage:

model = MakeModel(name) model = MakeModel(params) model = MakeModel(name, params)

Parameters:
  • name (str) – The name of the model.
  • params – Parameters for the given model.
Returns:

Created model instance.

Table Of Contents

Previous topic

glimpse.backends

Next topic

glimpse.models.base

This Page