numerical-linear-algebra README

The project's README from github.com/fastai/numerical-linear-algebra. As one markdown file: README.md.

Computational Linear Algebra for Coders

This course is focused on the question: How do we do matrix computations with acceptable speed and acceptable accuracy?

This course was taught in the University of San Francisco's Masters of Science in Analytics program, summer 2017 (for graduate students studying to become data scientists). The course is taught in Python with Jupyter Notebooks, using libraries such as Scikit-Learn and Numpy for most lessons, as well as Numba (a library that compiles Python to C for faster performance) and PyTorch (an alternative to Numpy for the GPU) in a few lessons.

Accompanying the notebooks is a playlist of lecture videos, available on YouTube. If you are ever confused by a lecture or it goes too quickly, check out the beginning of the next video, where I review concepts from the previous lecture, often explaining things from a new perspective or with different illustrations, and answer questions.

Getting Help

You can ask questions or share your thoughts and resources using the Computational Linear Algebra category on our fast.ai discussion forums.

Table of Contents

The following listing links to the notebooks in this repository, rendered through the nbviewer service. Topics Covered:

0. Course Logistics (Video 1)

1. Why are we here? (Video 1)

We start with a high level overview of some foundational concepts in numerical linear algebra.

2. Topic Modeling with NMF and SVD (Video 2 and Video 3)

We will use the newsgroups dataset to try to identify the topics of different posts. We use a term-document matrix that represents the frequency of the vocabulary in the documents. We factor it using NMF, and then with SVD.

3. Background Removal with Robust PCA (Video 3, Video 4, and Video 5)

Another application of SVD is to identify the people and remove the background of a surveillance video. We will cover robust PCA, which uses randomized SVD. And Randomized SVD uses the LU factorization.

4. Compressed Sensing with Robust Regression (Video 6 and Video 7)

Compressed sensing is critical to allowing CT scans with lower radiation-- the image can be reconstructed with less data. Here we will learn the technique and apply it to CT images.

5. Predicting Health Outcomes with Linear Regressions (Video 8)

6. How to Implement Linear Regression(Video 8)

7. PageRank with Eigen Decompositions (Video 9 and Video 10)

We have applied SVD to topic modeling, background removal, and linear regression. SVD is intimately connected to the eigen decomposition, so we will now learn how to calculate eigenvalues for a large matrix. We will use DBpedia data, a large dataset of Wikipedia links, because here the principal eigenvector gives the relative importance of different Wikipedia pages (this is the basic idea of Google's PageRank algorithm). We will look at 3 different methods for calculating eigenvectors, of increasing complexity (and increasing usefulness!).

8. Implementing QR Factorization (Video 10)


Why is this course taught in such a weird order?

This course is structured with a top-down teaching method, which is different from how most math courses operate. Typically, in a bottom-up approach, you first learn all the separate components you will be using, and then you gradually build them up into more complex structures. The problems with this are that students often lose motivation, don't have a sense of the "big picture", and don't know what they'll need.

Harvard Professor David Perkins has a book, Making Learning Whole in which he uses baseball as an analogy. We don't require kids to memorize all the rules of baseball and understand all the technical details before we let them play the game. Rather, they start playing with a just general sense of it, and then gradually learn more rules/details as time goes on.

If you took the fast.ai deep learning course, that is what we used. You can hear more about my teaching philosophy in this blog post or this talk I gave at the San Francisco Machine Learning meetup.

All that to say, don't worry if you don't understand everything at first! You're not supposed to. We will start using some "black boxes" or matrix decompositions that haven't yet been explained, and then we'll dig into the lower level details later.

To start, focus on what things DO, not what they ARE.

numerical-linear-algebra (fastai/numerical-linear-algebra)

Searching Database…

这是什么?一套免费的 Jupyter 笔记本在线教科书,讲授计算线性代数,源自 2017 年旧金山大学分析学硕士项目开设的一门课程。
这是一个代码库还是一门课程?它是一组 Jupyter 笔记本,外加一个配套的 YouTube 讲座播放列表,按自顶向下的教科书/课程形式组织,而不是可安装的软件。
内容是如何组织的?我该从哪里开始?README 的目录按顺序链接了每个笔记本(通过 nbviewer 渲染),从“课程须知”一直到“实现 QR 分解”,与一个包含 8 个视频的讲座播放列表相对应;请从笔记本 0 开始,按顺序学习。
运行这些笔记本需要哪些库?主要是 Scikit-Learn 和 Numpy,部分课程使用 Numba 提升速度,另外几课则用 PyTorch 作为支持 GPU 的 Numpy 替代品。
开始之前我需要弄懂每一种方法吗?不需要——课程刻意在前期把一些矩阵分解当作“黑盒”来用,之后再解释底层细节,所以一开始不是什么都懂很正常。
这门课程适合谁?适合立志成为数据科学家的研究生,或任何熟悉 Python、想要一门实用且以应用为导向的线性代数课程的人。
为什么这门课程的教学顺序如此与众不同?它采用自顶向下的教学方式(类似 fast.ai 的深度学习课程),而不是典型的自底向上的数学路径——学生先在实际问题中应用这些分解,再逐步学习底层规则,从而保持学习动力并先看到整体图景。
课程用哪些现实问题来讲解线性代数?用 NMF/SVD 对新闻组帖子做主题建模,用 Robust PCA 从监控视频中去除背景,CT 扫描中的压缩感知,用线性回归预测健康结果,以及对维基百科链接数据做 PageRank 风格的特征分解。
有配套的视频讲座吗?有,YouTube 上有完整的讲座视频播放列表,与这些笔记本配套。
Creator
fastai
Size
62.5 MB
Stars
11K
Updated
CommitJul 28
Age
9y
Commits · 90 Days