Annex v0.2.1 Annex.Data.DMatrix View Source

A 2D Matrix Annex.Data that uses the Tensor library as the underlying data structure.

For the purpose of Dense Matrices it seems to be slower than a flat list or a list of lists.

Link to this section Summary

Link to this section Types

Link to this type

op() View Source
op() :: :dot | :add | :subtract | :multiply

Link to this type

t() View Source
t() :: %Annex.Data.DMatrix{tensor: tensor()}

Link to this section Functions

Link to this function

add(d, n) View Source
add(t(), number() | t()) :: t()

Link to this function

build(data) View Source
build([float(), ...] | [[float(), ...], ...]) :: Annex.Data.DMatrix.t()

Link to this function

build(data, rows, columns) View Source
build([float(), ...], non_neg_integer(), pos_integer()) :: t()

Link to this function

dot(left, right) View Source
dot(t(), t()) :: t()

Link to this function

multiply(d, n) View Source
multiply(t(), t() | number() | [float(), ...]) :: t()

Link to this function

new_random(rows, columns) View Source
new_random(rows(), columns()) :: t()

Link to this function

subtract(left, right) View Source
subtract(t(), number() | t()) :: t()

Link to this function

tensor(d_matrix) View Source
tensor(t()) :: any()

Link to this function

to_list_of_lists(dmatrix) View Source
to_list_of_lists(t()) :: [[float(), ...], ...]

Link to this function

transpose(d) View Source
transpose(t()) :: t()