Giter Club home page Giter Club logo

Comments (3)

nalimilan avatar nalimilan commented on May 18, 2024 2

The docs are right, but the behavior of this function appears to be inconsistent with that of the rest of the API (which treats columns as observations). That's why I said the docs could be improved, by making them more explicit about this exception.

from multivariatestats.jl.

nalimilan avatar nalimilan commented on May 18, 2024

The docs say: "Here, y can be either a vector, or a matrix where each column is a response vector." So that means features are in columns, and therefore observations are in rows. This goes against the rule stated in documentation index.

I guess the most immediate fix is to make the documentation more explicit. Would you care to make a pull request? Then whether the behavior of the function should be changed to match that of other functions is another issue.

from multivariatestats.jl.

jeffwong avatar jeffwong commented on May 18, 2024

The docs look right to me. The issue that may be confusing is the phrase "each column is a response vector". This is not the same as "each column is a feature vector". The author is referring to the case that multiple y's are being modeled using the same feature matrix X, for example y might be income and experience level, both being predicted using birthday and city.

Indeed rows are supposed to be observations and columns are features for an observation. The reason someone might write the doc like this is because the solution for llsq is

pinv(X'X) times X'y

Whether y is a single variable that is being modeled, or a whole matrix, the formula is still the same. We can accommodate multiple ys by reusing the computation for inv(X'X) times X'.

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.