Codec

case class Codec(attributes: LazyList[Attribute])

The methods of a codec.

Encode a data point:

codec.encode(Map("petal_length" -> "1.5","species" -> "setosa"))

Decode a data point:

codec.decode(List(0.0, 1.0, 0.0))

Get the JSON representation of the codec:

codec.json()
Companion
object
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

def decode(encodedValues: List[Double]): Map[String, String]

Decodes a data point.

Decodes a data point.

Value Params
encodedValues

An encoded data point as a list of numbers between 0.0 and 1.0.

Returns

The decoded data point as a map of strings.

def encode(datapoint: Map[String, String]): List[Double]

Encodes a data point.

Encodes a data point.

Value Params
datapoint

A data point as a map of strings.

Returns

The encoded data point as a list of numbers between 0.0 and 1.0.

def json(): String

The JSON representation of the codec.

The JSON representation of the codec.

Returns

The JSON representation of the codec.

Inherited methods

def productElementNames: Iterator[String]
Inherited from
Product
def productIterator: Iterator[Any]
Inherited from
Product