Giter Club home page Giter Club logo

Comments (5)

gdkrmr avatar gdkrmr commented on May 20, 2024 1

you should probably allow something like:

x = rand(3, 10)
z = fit(ZScoreTransform, x)
p = fit(PCA, transform(z, x))
transform((z, p), xnew)

or maybe even make the objects callable:

xnew |> z |>  p

and for the reconstruction:

y |> inv(p) |> inv(z)

from multivariatestats.jl.

wildart avatar wildart commented on May 20, 2024

Usually, you would standardize data prior to fitting and do not mix two operations together. It's better not to mix two operations together.

FYI, there is data transformation PR pending: JuliaStats/StatsBase.jl#85

from multivariatestats.jl.

gdkrmr avatar gdkrmr commented on May 20, 2024

What about the centering step, are you going to remove that?

from multivariatestats.jl.

wildart avatar wildart commented on May 20, 2024

What about the centering step, are you going to remove that?

No, not really.

Transformation and reconstructions are following:

x = rand(3, 10)
# standardize data
T = fit(ZScoreTransform, x)
xstd = transform(Z, x)
# perform PCA
M = fit(PCA, xstd)
ysub = transform(M, xstd)
# reconstruct to original space
ystd = reconstruct(M, ysub)
# reconstruct to original scale
y = reconstruct(T, ystd)
x  y

Even thought pipeline X |> ZScoreTransform |> PCA looks appealing. It is beyond the scope of this package.

from multivariatestats.jl.

gdkrmr avatar gdkrmr commented on May 20, 2024

What about the centering step, are you going to remove that?

No, not really.

This seems like an arbitrary choice.

from multivariatestats.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.