# Ensemble

The Ensemble object represents a collection of data generated from a single Definition.

The GET endpoint of an Ensemble is the canonical resource for a collection of cases, with the data stored in the hypervectors attribute.

# Object

ensemble = hypervector.Ensemble.get("ENSEMBLE_UUID")

After edits, you can ensure a local Ensemble is up-to-date with:

ensemble.refresh()

Endpoint

GET /v1/ensemble/<ensemble_uuid>

# Overview

{
  "ensemble_name": "eagle-top-arty-door",
  "ensemble_uuid": "0f3959db-9c42-4ca2-8c0f-a2064662c1f2",
  "definition_uuid": "f9bd49e3-8b2f-487d-848f-3855da2df162",
  "added": "Mon, 08 Mar 2021 22:14:56 GMT",
  "size": 1000,
  "benchmarks": [...]
}

# Attributes

  • ensemble_name: Name of Ensemble
  • ensemble_uuid: Identifier of Ensemble
  • definition_uuid: Name of parent Definition
  • size: Number of cases included in Ensemble (== no. rows in hypervectors)
  • hypervectors: Data generated for Ensemble
  • benchmarks: List of Benchmarks associated with Ensemble

# Methods

# All Ensembles (of a Definition)

definition.ensembles

Endpoint

GET /v1/definition/<definition_uuid>/ensembles

Retrieves list of all Ensembles associated with a parent Definition

# New Ensemble

hypervector.Ensemble.new(
    definition_uuid="DEFINITION_UUID",
    ensemble_name="New ensemble"
    size=10000
)

Endpoint

POST /v1/definition/<definition_uuid>/ensembles/add

Creates a new Ensemble, associated with a parent Definition

# Parameters

  • ensemble_name (Optional): Name of Ensemble
  • size: Integer number of cases in Ensemble (min 1, max 10000)

# Get Hypervectors (data)

ensemble.hypervectors()

Endpoint

GET /v1/ensemble/<ensemble_uuid>/data

Retrieves data generated from this Ensemble

{
  "hypervectors": [
    [10.8947, 95, "FALSE"],
    [8.77408, 63, "FALSE"],
    [10.7390, 82, "FALSE"],
    [11.1828, 69, "null"],
    [7.4220, 53, "TRUE"],
    [11.9604, 65, "FALSE"],
    ...],
}

# Delete Ensemble

hypervector.Ensemble.delete("ENSEMBLE_UUID")

Endpoint

DELETE /v1/ensemble/<ensemble_uuid>/delete

Deletes an existing Ensemble