r/stackoverflow • • Sep 08 '19

Unanswered Python3 & Matplotlib question: Help is greatly appreciated!

https://stackoverflow.com/q/57840758/7913301

I have implemented multivariate linear regression, where parameters theta0 (intersect), theta1, theta2 are optimized by minimizing MSE loss, chosen with line search in gradient descent. How do I visually illustrate the mathematical property that the direction of steepest descent (negative gradient) of successive steps are orthogonal? I'm trying to generate a contour map similar to this image: Plot, but with respect to 2 parameters instead of 1 (if it's not possible, 2 separate plots would also be great).

Also, I originally wanted to perform multivariate linear regression with 4 features, but ultimately decided to use only the 2 most strongly correlated ones (after comparing their PCC) in order to be able to plot a graph. Although I'm not aware of any way to plot 4-dimensional data, does anyone know if this is possible and how?

2 Upvotes

2 comments sorted by

View all comments

Show parent comment

1

u/WikiTextBot Sep 11 '19

Double-barreled question

A double-barreled question (sometimes, double-direct question) is an informal fallacy. It is committed when someone asks a question that touches upon more than one issue, yet allows only for one answer. This may result in inaccuracies in the attitudes being measured for the question, as the respondent can answer only one of the two questions, and cannot indicate which one is being answered.Many double-barreled questions can be detected by the existence of the grammatical conjunction "and" in them. This is not a foolproof test, as the word "and" can exist in properly constructed questions.


[ ^PM | Exclude ^me | Exclude from ^subreddit | FAQ / ^Information | ^Source ] Downvote to remove | v0.28