joelgrus/data-science-from-scratch
joelgrus/data-science-from-scratch has 9,770 GitHub stars and 4,715 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-08 05:13 UTC. Last push 2023-11-09.
code for Data Science From Scratch book
Measured star growth
- in 24h
- 0
- in 7 days
- Update delayed
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalData Science from Scratch
Here's all the code and examples from the second edition of my book Data Science from Scratch. They require at least Python 3.6.
(If you're looking for the code and examples from the first edition, that's in the first-edition folder.)
If you want to use the code, you should be able to clone the repo and just do things like
In [1]: from scratch.linear_algebra import dot
In [2]: dot([1, 2, 3], [4, 5, 6])
Out[2]: 32
and so on and so forth.
Two notes:
In order to use the library like this, you need to be in the root directory (that is, the directory that contains the
scratchfolder). If you are in thescratchdirectory itself, the imports won't work.It's possible that it will just work. It's also possible that you may need to add the root directory to your
PYTHONPATH, if you are on Linux or OSX this is as simple as
export PYTHONPATH=/path/to/where/you/cloned/this/repo
(substituting in the real path, of course).
If you are on Windows, it's potentially more complicated.
Table of Contents
- Introduction
- A Crash Course in Python
- Visualizing Data
- Linear Algebra
- Statistics
- Probability
- Hypothesis and Inference
- Gradient Descent
- Getting Data
- Working With Data
- Machine Learning
- k-Nearest Neighbors
- Naive Bayes
- Simple Linear Regression
- Multiple Regression
- Logistic Regression
- Decision Trees
- Neural Networks
- [Deep Learning]
- Clustering
- Natural Language Processing
- Network Analysis
- Recommender Systems
- Databases and SQL
- MapReduce
- Data Ethics
- Go Forth And Do Data Science
Explore related projects
Asabeneh/30-Days-Of-Python
The 30 Days of Python programming challenge is a step-by-step guide to learn the Python programming language in 30 days. This challenge may take more than 100 days. Follow your own pace. These videos may help too: https://www.youtube.com/channel/UC7PNRuno1rzYPb1xLa4yktw
78,370 starsgrafana/grafana
The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
77,763 starsredis/redis
For developers, who are building real-time data-driven applications, Redis is the preferred, fastest, and most feature-rich cache, data structure server, and document and vector query engine.
77,288 starsapache/superset
Apache Superset is a Data Visualization and Data Exploration Platform
75,453 stars