MVLR | Multivariate Linear Regression Calc | Machine Learning library
kandi X-RAY | MVLR Summary
kandi X-RAY | MVLR Summary
Multivariate Linear Regression MVLR1.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of MVLR
MVLR Key Features
MVLR Examples and Code Snippets
Community Discussions
Trending Discussions on MVLR
QUESTION
This SO answer describes how to find the point closest to multiple lines in n-dimensional space using the least-squares method. Is there any existing implementation of this, but for the point closest to multiple m-flats in n-dimensional space?
My use case is that I used Multivariate Linear Regression to determine a relationship between an independent variable vector x and a dependent variable vector y, and now I'd like to find x that would make the stochastic process output values as closes as possible to experimental data y_exp. Since running MvLR yields a set of n-dimensional equations like so...
...and I have experimental values for y_1
, ... y_q
, each of these equations represents the intersection between two (n-1)-flat in n-dimensional space (one described by equation (1), and the other by y_1 = y_exp_1
), which should yield an (n-2)-flat.
Is there an existing implementation to find a good set of x_1
, ... x_p
that gets me closest to these (n-2)-flats?
ANSWER
Answered 2020-Dec-02 at 16:58Rather than interpreting the set of equations like that, you could see it as a simple set of q
linear equations with p
variables -- in which case the problem has a much easier solution!
This set of equations is 100% equivalent to...
where:
In which case the least squares approximation method yields...
Assuming the rank of matrix A is equal to q (i.e., you have enough linearly independent equations to solve the problem, which is probably respected if your data is experimental), then this is equivalent to:
For an explanation on this, see this excellent video.
Python code:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install MVLR
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page