2
$\begingroup$

I've already finished Andrew Ng's machine learning course and now working with textbook 'The Elements of Statistical Learning'. I'm successfully implementing equations and concepts described there using MATLAB, but I don't get all the things going on there with linear algebra, like why are degrees of freedom for ridge regression are defined that way or why can we write least squares fitted vector using singular value decomposition another way. I get common sense of that equations and understand where and for what reason they should be used, but I can't perform the same transformations of them, like where they come from.

Is it a big problem for beginning data scientist? I mean, does it appear in practice that junior data scientist should create some formula himself/herself? I know basics of linear algebra, but equations and transformations given there are far higher level than basic or intermediate.

$\endgroup$

closed as primarily opinion-based by AdamO, user158565, Michael Chernick, usεr11852, Peter Flom May 17 at 11:43

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    $\begingroup$ Only my opinion but if you understand what is happening and not LA technicalities you are MUCH better that 95% people I have seen that are called data scientist $\endgroup$ – statquant Mar 27 '16 at 14:54
  • 1
    $\begingroup$ Esl is not a good book for data scientists (it is aimed more at graduate students). You are better off looking at introduction to statistical learning.. And books on basic statistics and experimental design. $\endgroup$ – seanv507 Mar 27 '16 at 19:30
  • 5
    $\begingroup$ There is no world in which ESL is not a good book for data scientists. It's not necessary for some, but I'll take a data scientist that has read the ESL through the cross validation chapter over one who has not. $\endgroup$ – Matthew Drury Aug 31 '17 at 2:34
  • 2
    $\begingroup$ If you're satisfied with merely being a consumer of scientific software, you can skate by without much knowledge at all. But if you're curious and interested in really understanding what's going on when your script runs, knowledge of statistics, linear algebra, calculus and numerical optimization are essential; the more, the better. $\endgroup$ – Sycorax Aug 31 '17 at 3:54
  • 1
    $\begingroup$ re the title: I would like to suggest that everyone who thinks about data will benefit from being able to gain insight as well as simplify and clarify what they do by employing linear algebra as appropriate for the concepts and problems they encounter; but that nobody should aim to apply "complicated linear algebra" for its own sake. $\endgroup$ – whuber May 16 at 15:25
2
$\begingroup$

To add to what @Sycorax commented:

If you're satisfied with merely being a consumer of scientific software, you can skate by without much knowledge at all. But if you're curious and interested in really understanding what's going on when your script runs, knowledge of statistics, linear algebra, calculus and numerical optimization are essential; the more, the better.

So specifically linear algebra, what do you need to be a better user, understand software (and methods) better, and for modeling (but not being interested, at this moment at least, in writing software or proving theorems). The linear model is the backbone of much of statistics, so you need to understand that well. Since a linear model can be seen geometrically as a subspace of a certain linear space, and this is just the basics of linear algebra: spaces, subspaces, linear combinations, linear independence (and dependence). You need this to understand the specification of a linear model, and the various problems that can occur.

Then the basics of matrices, linear equations in matrix form, solutions, matrix inverses. And a lot of linear algebra this days in embedded in matrix factorizations, the spectral decomposition, the svd (see What is the intuition behind SVD?), the QR decomposition (see Understanding QR Decomposition.)

I found it useful to get a better intuition for matrix multiplication, see https://math.stackexchange.com/questions/198257/intuition-for-the-product-of-vector-and-matrices-xtax/198280#198280.

So where to learn this? Assuming you have learnt a little linalg in the past, I would start with some linear models book with an appendix an matrices. For instance Linear Regression Analysis (2nd Edition) by Seber and Lee but there are no lack of competition. And read Venables & Ripley MASS (the book, fourth edition) section 6.2 Model Formulae and Model Matrices.

$\endgroup$
1
$\begingroup$

I think linear algebra is absolutely essential to the data scientist. A card carrying data scientist should have more than just a comprehensive knowledge of what tools are out there, but he or she should also have the ability to compare them, to develop new tools, and, when a job simply can't be solved by any tool, be able to explain why.

Linear algebra (and calculus) is useful for the following essential tasks that a data scientist should be able to do:

  • Deriving first and second order derivatives and gradients for multivariate expressions
  • Solving complex systems of equations
  • Comparing the relative efficiency of two estimators
  • Showing that an estimator (of a parameter, of a density function) is minimax, unbiased, or consistent
  • Understanding the performance and behavior of nonlinear systems and their dependence on initial conditions
  • Showing that the inverse gamma prior is conjugate for a Bayesian linear regression
  • Showing the n-consistency of order-statistic estimators like the median

As a master level statistician, I have had to use algebra (maths and calculus included) to prove a few things:

  1. Derive a variance estimate for a marginal standardization estimate of relative risk from logistic regression
  2. Prove that the "information" of a clinical trial vis-a-vis blinded conditional power is the same as sample size.
  3. Derive an EM algorithm to maximize likelihood for truncated data and missing data
  4. Prove that a bootstrap combined with multiple imputation gives 95% CIS with accurate coverage
$\endgroup$
  • $\begingroup$ "Derive an EM algorithm to maximize likelihood for truncated data and missing data" - I envy your life. A typical data scientist will understand only the last two words of this phrase :) $\endgroup$ – Aksakal May 16 at 16:53
1
$\begingroup$

I worked with data scientists who do not know linear algebra. The field, which pretentiosly has "science" in its name, is so vast that there's something to do for everyone willing. It is somewhat similar to programmers not knowing electronics, and most of them have no clue. You can survive and even prosper without linear algebra but you will not be able to do certain things, and you'll be slower at certain tasks.

The main area where you will get hurt is research. Ng's lectures show a bit of internals, he often refers to papers, shows equations etc. If you're going to be implementing new algorithm that are just off the press, it would be very difficult without linear algebra to understand a lot of research papers. Here, it will be like coming with a knife to a gun fight, you'll be the dumbest guy in the room almost all the time. It would be depressing.

However, possibly 90% of work in data science is not of this nature. Most of the time you'll be asked to create reports, massage data, and maybe call libraries. This doesn't require any knowledge of anything. Any programmer could do it, if they wanted to spend a couple of weeks on learning the frameworks.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.