Giter Club home page Giter Club logo

Comments (9)

cossio avatar cossio commented on May 20, 2024 1

It would be nice to have functions like skewness(A; dims) taking a dims keyword to reduce over, where A can be a general N-dimensional Array. Any plans to implement this?

from statsbase.jl.

bjarthur avatar bjarthur commented on May 20, 2024

+1 if you mean something like this:

StatsBase.trimmean{T}(v::AbstractArray{T}, p, region) = mapslices(x->trimmean(x,p), v, region)

from statsbase.jl.

jamblejoe avatar jamblejoe commented on May 20, 2024

Any progress on this?

from statsbase.jl.

nalimilan avatar nalimilan commented on May 20, 2024

Now that Julia provides these, it is probably be better to use e.g. skewness.(eachrow(x)) and skewness.(eachcol(x)). The dims=1/dims=2 approach requires adjusting lots of methods and is less explicit.

from statsbase.jl.

kleinschmidt avatar kleinschmidt commented on May 20, 2024

@cossio There's a PR to add a generic eachslice iterator to Base: JuliaLang/julia#32310; it's been under review for a while but there's recent activity...

from statsbase.jl.

nilshg avatar nilshg commented on May 20, 2024

This is now merged, time to close this issue?

from statsbase.jl.

jamblejoe avatar jamblejoe commented on May 20, 2024

skewness(rand(10,10), dims=1) doesn't work on 1.9rc1 and latest StatsBase

from statsbase.jl.

bjarthur avatar bjarthur commented on May 20, 2024

@jamblejoe but you can use eachslice on julia 1.8 to achieve the same:

julia> skewness.(eachslice(rand(10,10), dims=1))
10-element Vector{Float64}:
 -0.357654736525527
 -0.06636393783605732
 -0.20782459433865907
  1.25151036890323
  0.13408296667729347
 -0.4302398373636257
 -0.14363707095203634
 -0.00889806440269636
 -0.6370034546305223
  0.5832296811450159

from statsbase.jl.

jamblejoe avatar jamblejoe commented on May 20, 2024

@bjarthur works thanks! Can be closed from my side

from statsbase.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.