Annex v0.1.0 Annex.Utils View Source
This module holds functions that are not necessarily specific to one of Annex's other modules.
Link to this section Summary
Functions
Calculates the dot product which is the sum of element-wise multiplication of two enumerables.
Calculates the average.
Turns a list of floats into floats between 0.0 and 1.0 at their respective ratio.
Turns a list of floats into their proportions.
Generates a float between -1.0 and 1.0
Generates a list of n floats between -1.0 and 1.0.
Random unifmormly splits a given dataset into two datasets at a given frequency.
A strict zip function in which the two given enumerables must be the same size.
A strict zip-while-mapping function in which the two given enumerables must be the same size.
Link to this section Functions
dot(a, b) View Source
Calculates the dot product which is the sum of element-wise multiplication of two enumerables.
mean(items) View Source
Calculates the average.
normalize(data) View Source
Turns a list of floats into floats between 0.0 and 1.0 at their respective ratio.
proportions(data) View Source
Turns a list of floats into their proportions.
The sum of the output should be approximately 1.0.
random_float()
View Source
random_float() :: float()
random_float() :: float()
Generates a float between -1.0 and 1.0
random_weights(n)
View Source
random_weights(integer()) :: Annex.Data.float_data()
random_weights(integer()) :: Annex.Data.float_data()
Generates a list of n floats between -1.0 and 1.0.
split_dataset(dataset, frequency) View Source
Random unifmormly splits a given dataset into two datasets at a given frequency.
transpose(a) View Source
zip(a, b) View Source
A strict zip function in which the two given enumerables must be the same size.
zipmap(list1, list2, func) View Source
A strict zip-while-mapping function in which the two given enumerables must be the same size.