Current section
Files
Jump to
Current section
Files
src/gleam_synapses@stats.erl
-module(gleam_synapses@stats).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]).
-export([rmse/1, score/1]).
-file("/home/dimos/Projects/Gleam/gleam_synapses/src/gleam_synapses/stats.gleam", 18).
-spec rmse(gleam@iterator:iterator({list(float()), list(float())})) -> float().
rmse(Output_pairs) ->
_pipe = Output_pairs,
_pipe@1 = gleam@iterator:map(
_pipe,
fun(T) ->
{Y_hat, Y} = T,
Y_hat_zls = gleam_zlists:of_list(Y_hat),
Y_zls = gleam_zlists:of_list(Y),
{Y_hat_zls, Y_zls}
end
),
gleam_synapses@model@mathematics:root_mean_square_error(_pipe@1).
-file("/home/dimos/Projects/Gleam/gleam_synapses/src/gleam_synapses/stats.gleam", 47).
-spec score(gleam@iterator:iterator({list(float()), list(float())})) -> float().
score(Output_pairs) ->
_pipe = Output_pairs,
_pipe@1 = gleam@iterator:map(
_pipe,
fun(T) ->
{Y_hat, Y} = T,
Y_hat_zls = gleam_zlists:of_list(Y_hat),
Y_zls = gleam_zlists:of_list(Y),
{Y_hat_zls, Y_zls}
end
),
gleam_synapses@model@mathematics:accuracy(_pipe@1).