FeatureRecord

class vallenae.io.FeatureRecord(trai: int, features: Dict[str, float])[source]

Transient feature record in trfdb.

__init__()

Methods

__init__()

count(value, /)

Return number of occurrences of value.

from_sql(row)

Create FeatureRecord from SQL row.

index(value[, start, stop])

Return first index of value.

Attributes

features

Feature dictionary (feature name -> value)

trai

Transient recorder index

trai: int

Transient recorder index

features: Dict[str, float]

Feature dictionary (feature name -> value)

classmethod from_sql(row)[source]

Create FeatureRecord from SQL row.

Parameters:

row (Dict[str, Any]) – Dict of column names and values

Return type:

FeatureRecord

count(value, /)

Return number of occurrences of value.

index(value, start=0, stop=9223372036854775807, /)

Return first index of value.

Raises ValueError if the value is not present.