My final goal was to compute N separate Means after vectorizing a CircularBuffer Matrix and update the means after a certain number of steps of the Circular buffer. I know how to get separate calculations using LinearAlgebra.eachrow or LinearAlgebra.eachcol from a Matrix, but it appears that this solution doesn’t work for Matrix with dimensions (n,1)
using OnlineStats, LinearAlgebra, DataStructures
mat = rand(10,5)
resh = reshape(mat, (size(mat,1) * size(mat,2), 1))
g = length(resh) * Mean()
fit!(g, LinearAlgebra.eachrow(resh))
In this example, the Means() end up taking 50 inputs each instead of 1