Mutable Binary Behaviour Dataset

This feature is part of the MLDB Pro Plugin and so can only be used in compliance with the trial license unless a commercial license has been purchased

The Mutable Behaviour Dataset is used to store pure binary behavioural data. It can only store the value 1, but is extremely efficient for working with lots of rows and columns. It records timestamps with a resolution of one second.

It is designed for the following situations:

It stores its data in memory, and allows full random access to both the matrix and its inverse. It is quite efficient in memory usage. It can be simultaneously read from and updated.

This dataset type is read-write. It cannot be committed; it will always keep its contents in memory; calling commit() on the dataset will simply make it immutable, which speeds up access but makes any further modifications fail. It can, however, be saved (see below).

Configuration

A new dataset of type beh.binary.mutable named <id> can be created as follows:

mldb.put("/v1/datasets/"+<id>, {
    "type": "beh.binary.mutable",
    "params": {
        "dataFileUrl": <Url>,
        "timeQuantumSeconds": <float>
    }
})

with the following key-value definitions for params:

Field, Type, DefaultDescription

dataFileUrl
Url

URL of the data file (with extension '.beh') from which to load the dataset.

timeQuantumSeconds
float
1.0

a number that controls the resolution of timestamps stored in the dataset, in seconds. 1 means one second, 0.001 means one millisecond, 60 means one minute. Higher resolution requires more memory to store timestamps.

Routes

This dataset inherits the saves route from the beh.binary dataset type which can be used to save the data to a .beh file.

Note that currently, an (unfortunate) side effect of the saving process is to make the dataset immutable.

See also