Talk:Multiple regression: Difference between revisions
Content added Content deleted
imported>Stevegt m (simplify clarification) |
imported>Stevegt (add history of early error that led to most examples being translated from an incorrect early example) |
||
Line 1: | Line 1: | ||
= Examples are not multiple regression = |
= Examples are not multiple regression = |
||
Many if not most of the examples on this page were apparently translated blindly from a single incorrect example |
Many if not most of the examples on this page were apparently translated blindly from a single incorrect example -- the height/weight examples in particular are all single-axis. Regression of a single X axis is not multiple regression -- see References below. Much of the confusion in this discussion, and many of the suggestions for merging with [[Polynomial Fitting]], stem from that error. |
||
Multiple regression, as mentioned in the description, is where the X input is a N-dimensional array; a matrix of two or more |
Multiple regression, as mentioned in the description, is where the X input is a N-dimensional array; a matrix of two or more columns, not a list. |
||
== History of error == |
|||
* The very first example, [https://rosettacode.org/wiki/Multiple_regression?oldid=121951 Ruby], was incorrect -- it only used a single-axis X input, when the task description clearly said "x is given to you as a two-dimensional array". |
|||
* The next example added, [https://rosettacode.org/wiki/Multiple_regression?oldid=121955 Tcl], introduced the single-axis height/weight example. Things sort of went all to heck from there, with other languages cargo-culting the incorrect example from Tcl. |
|||
== Examples of multiple regression == |
|||
Think of multiple regression as "surface fitting" rather than curve fitting. Some examples: |
Think of multiple regression as "surface fitting" rather than curve fitting. Some examples: |
||
Line 10: | Line 17: | ||
== Summary for clarification: == |
== Summary for clarification: == |
||
* '''Examples on this page must support a two-dimensional matrix as the X input''', as mentioned in the |
* '''Examples on this page must support a two-dimensional matrix as the X input''', as mentioned in the task description. |
||
* |
* The single-regression examples need to be removed or replaced, including those that predict a weight from a height. They do not belong on a page about multiple regression. I've flagged C, Go, and Python as incorrect; that should help start the process. |
||
== References: == |
== References: == |