gleam_synapses/model/encoding/attribute/attribute

Types

pub type Attribute {
  Discrete(key: String, values: ZList(String))
  Continuous(key: String, min: Float, max: Float)
}

Constructors

  • Discrete(key: String, values: ZList(String))
  • Continuous(key: String, min: Float, max: Float)

Functions

pub fn decode(attribute: Attribute, encoded_values: ZList(Float)) -> String
pub fn encode(attribute: Attribute, value: String) -> ZList(Float)
pub fn parse(s: String) -> Float
pub fn updated(attribute: Attribute, datapoint: Map(
    String,
    String,
  )) -> Attribute