Snapshots

class jamie.snapshots.ModelSnapshot(instance, root=None)

Represents a single model Snapshot

property data

Data corresponding to model snapshot. Returned as a dict:

  • model: The model object itself

  • scores: pd.DataFrame corresponding to best scores

features(index: str)

Returns features at index

model(index: str)

Returns model at index

class jamie.snapshots.ModelSnapshotCollection(root=None, startswith='', endswith='')

Model SnapshotCollection, with subpath=models

SnapshotClass

alias of ModelSnapshot

class jamie.snapshots.PredictionSnapshot(instance, root=None)

Prediction Snapshot class

property data

Returns data as dataframe

partition_jobs(n_each_class=None, random_state=100)

Partition jobs into positive and negative class based on probability

class jamie.snapshots.PredictionSnapshotCollection(root=None, startswith='', endswith='')

Prediction SnapshotCollection, with subpath=predictions

SnapshotClass

alias of PredictionSnapshot

class jamie.snapshots.ReportSnapshot(instance, root=None)

Represents a single report Snapshot

property data

Returns index.html of the report

class jamie.snapshots.ReportSnapshotCollection(root=None, startswith='', endswith='')

Training SnapshotCollection, with subpath=reports

SnapshotClass

alias of ReportSnapshot

class jamie.snapshots.Snapshot(instance, root=None)

Base class for a snapshot instance.

subpath

This is set to the subfolder under the root snapshot folder in the derived classes.

Type

str

Parameters
  • instance (str) – Name of instance

  • root (str) – Root path of snapshots (default : None)

create()

Create instance location if it does not exist

property data

Data corresponding to the snapshot

exists()

Returns whether instance exists

property metadata

Snapshot metadata

property name

Snapshot name

property path

Path to snapshot instance

class jamie.snapshots.SnapshotCollection(root=None, startswith='', endswith='')

Base class for collection of snapshots. Instances of derived class represent a collection of snapshots.

Parameters
  • root (str, optional) – Root path of snapshots, uses default config to find if not specified

  • startswith (str, optional) – If specified, restricts collection to instances that start with this string

  • endswith (str, optional) – If specified, restricts collection to instances that end with this string

latest()

Returns latest instance in collection using lexicographical sorting

property list

List of instances in collection

class jamie.snapshots.TrainingSnapshot(instance, root=None)

Represents a single training Snapshot

property data

Returns DataFrame corresponding to training snapshot

reliability()

Converts ratings into numerical scale for inter-rater reliability analysis

class jamie.snapshots.TrainingSnapshotCollection(root=None, startswith='', endswith='')

Training SnapshotCollection, with subpath=training

SnapshotClass

alias of TrainingSnapshot

jamie.snapshots.main(kind, instance=None)

CLI interface for snapshots.

Parameters
  • kind (str) – Should be one of models/snapshots. Specifies which collection one wishes to show.

  • instance (str, optional) – If specified, show a particular instance