CumulantsUpdates.DataMomentsType

mutable struct DataMoments{T <: AbstractFloat}

structure that stores data (X), array of moments (M) and parameters: d - maximal moment order b - a size of a block

CumulantsUpdates.cnormsMethod

cnorms(c::Vector{SymmetricTensor{T}})

Returns vector of Floats of norms of cumulants of order 3, ..., k , ..., m, normalsed by √||C₂||ᵏ .....

CumulantsUpdates.cums2momsMethod

cums2moms(cum::Vector{SymmetricTensor})

Returns vector of Symmetric Tensors of moments given vector of Symmetric Tensors of cumulants

CumulantsUpdates.cumulantsupdate!Method

function cumulantsupdate!(dm::DataMoments{T}, Xplus::Matrix{T}) where T <: AbstractFloat

updates the DataMoments structure in a sliding window, given an updat Xplus and returns cumululants of updated data.


julia> x = ones(10,2);

julia> s = DataMoments(x, 4, 2);

julia> y = zeros(4,2);

julia> cumulantsupdate!(s,y)[4]
SymmetricTensors{Float64,4}(Union{Array{Float64,4}, Void}[[0.0064 0.0064; 0.0064 0.0064]

[0.0064 0.0064; 0.0064 0.0064]

[0.0064 0.0064; 0.0064 0.0064]

[0.0064 0.0064; 0.0064 0.0064]], 2, 1, 2, true)
CumulantsUpdates.dataupdatMethod

dataupdat(X::Matrix{T}, Xplus::Matrix{T}) where T<:AbstractFloat

Returns Matrix{Float} of size(X), first u = size(Xup, 1) rows of X are removed and at the end the updat Xplus is appended.


julia> a = ones(4,4);

julia> b = zeros(2,4);

julia> dataupdat(a,b)
4×4 Array{Float64,2}:
 1.0  1.0  1.0  1.0
 1.0  1.0  1.0  1.0
 0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0
CumulantsUpdates.momentarrayMethod

momentarray(X::Matrix{Float}, m::Int, b::Int)

Returns an array of Symmetric Tensors of moments given data and maximum moment order - d

CumulantsUpdates.momentupdatMethod

momentupdat(M::Vector{SymmetricTensor{T}}, X::Matrix{T}, Xplus::Matrix{T})

Returns Vector{SymmetricTensor} of updated moments

CumulantsUpdates.momentupdatMethod
momentupdat(M::SymmetricTensor{Float, N}, X::Matrix, Xplus::Matrix)

Returns SymmetricTensor{Float, N} updated moment, given original moment, original data and update of data - dataup

julia> x = ones(6, 2);

julia> m = moment(x, 3);

julia> y = 2*ones(2,2);

julia> momentupdat(m, x, y)
SymmetricTensors.SymmetricTensor{Float64,3}(Union{Array{Float64,3}, Void}[[3.33333 3.33333; 3.33333 3.33333]
[3.33333 3.33333; 3.33333 3.33333]], 2, 1, 2, true)
CumulantsUpdates.moms2cums!Method

moms2cums!(M::Vector{SymmetricTensor})

Changes vector of Symmetric Tensors of moments to vector of Symmetric Tensors of cumulants


julia> m = momentarray(ones(20,3), 3);

julia> moms2cums!(m)

julia> m[3]

SymmetricTensors.SymmetricTensor{Float64,3}(Union{Array{Float64,3}, Void}[[0.0 0.0; 0.0 0.0]
[0.0 0.0; 0.0 0.0] #undef; #undef #undef]
CumulantsUpdates.repMethod

rep(ind::Tuple)

axiliary for cnorm count how many times a block should be counted

julia> rep((1,2,3))
6

julia> rep((1,2,2))
3

julia> rep((1,1,1))
1
CumulantsUpdates.savedmMethod

savedm(dm::DataMoments, str::String)

saves a DataMoment structure at a given direcory

LinearAlgebra.normMethod

norm(bt::SymmetricTensor{T, m}, p::Union{Float64, Int}=2) where {T<:AbstractFloat, m}

Returns Float, a p-norm of bt, supported for p ≠ 0


julia> te = [-0.112639 0.124715 0.124715 0.268717 0.124715 0.268717 0.268717 0.046154];

julia> st = convert(SymmetricTensor, (reshape(te, (2,2,2))));

julia> norm(st)
0.5273572868359742

julia> norm(st, 2.5)
0.4468668679541424

julia> norm(st, 1)
1.339089