linear regression with 3-dimensional points I've been hunting around looking for a way to do this problem. I need to create a program to calculate linear regression for 100 3-dimensional points. I also have the matching outcomes of the points, so it's like a training set rather than a testing set.
I'm also instructed to consider the bias term, but I'm not sure what that means.
I can find good documentation for 2-dimensional points, but not for 3 dimensions. Since there's so many equations for doing XY data points, surely there's a similar equation set for XYZ points. I'm not really desiring to be given the equation outright, but more interested in an understanding of the function and how it works, as well as how it's determined. Thanks to anyone who read and who can help me with this problem.
 A: When expressed as a matrix equation, the Normal Equation is the same for any dimension. See. 
A: I actually discussed this yesterday.
The matrix equations Dave31415 are essentially your solution, but depending on how much data you have you may need to use some linear algebra tricks to make the problem tractable, as one of the matrices you will need to invert may be ill-conditioned.
A: QPSO would solve this; its essentially a parameter optimization problem in 3 dimensions.  I've used QPSO for as many as 15 parameters. 
There are several 3rd party implementations in Python, for example a black box version here:
https://pypi.org/project/qpso/
But it is not too hard to write QPSO for something like this w/ a simple "for loop" in the language of your choice.  More or less you're making small random change (+/- up to 5%) to each of your 3 parameters respectively... if least sum squares is smaller than previous (gradient descent) save the new parameter list as "best" and recalculate with new random steps (drunk walk) from there.   Else, return to previous "best" parameter list and attempt a new random set of changes for each parameter.   Iteratively, you soon approach a solution.  In 3D it should be very quick for a linear relationship.  
QPSO would also allow you to optimize with different equations; potentially with more parameters should you decide the relationship is not best described linearly.  For higher dimensional problems there are additional methods to speed the gradient descent; simulated annealing, elitist breeding, keeping tally of best synapses (neuroplasticity), stochastic dual coordinate descent (SDCA); etc.
