{"id":13474646,"url":"https://github.com/joelgrus/data-science-from-scratch","last_synced_at":"2025-05-15T05:05:37.661Z","repository":{"id":39749265,"uuid":"26382146","full_name":"joelgrus/data-science-from-scratch","owner":"joelgrus","description":"code for Data Science From Scratch book","archived":false,"fork":false,"pushed_at":"2023-11-09T21:18:24.000Z","size":769,"stargazers_count":8958,"open_issues_count":81,"forks_count":4579,"subscribers_count":644,"default_branch":"master","last_synced_at":"2025-04-14T08:07:22.818Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joelgrus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2014-11-09T02:31:24.000Z","updated_at":"2025-04-13T09:36:09.000Z","dependencies_parsed_at":"2023-01-19T19:33:55.899Z","dependency_job_id":"5b170f9e-cd49-4c36-8286-46f285f82349","html_url":"https://github.com/joelgrus/data-science-from-scratch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelgrus%2Fdata-science-from-scratch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelgrus%2Fdata-science-from-scratch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelgrus%2Fdata-science-from-scratch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelgrus%2Fdata-science-from-scratch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joelgrus","download_url":"https://codeload.github.com/joelgrus/data-science-from-scratch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254276446,"owners_count":22043866,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T16:01:13.805Z","updated_at":"2025-05-15T05:05:37.639Z","avatar_url":"https://github.com/joelgrus.png","language":"Python","funding_links":[],"categories":["Python","Please find below the links to awesome cheat-sheet and resources:","Data Science \u0026 Machine Learning","Table of Contents","others","A01_机器学习教程"],"sub_categories":["Machine-Learning/Data Science/AI/DL:","Sample Code"],"readme":"Data Science from Scratch\n=========================\n\nHere's all the code and examples from the second edition of my book _Data Science from Scratch_. They require at least Python 3.6.\n\n(If you're looking for the code and examples from the first edition, that's in the `first-edition` folder.)\n\nIf you want to use the code, you should be able to clone the repo and just do things like\n\n```\nIn [1]: from scratch.linear_algebra import dot\n\nIn [2]: dot([1, 2, 3], [4, 5, 6])\nOut[2]: 32\n```\n\nand so on and so forth.\n\nTwo notes:\n\n1. In order to use the library like this, you need to be in the root directory (that is, the directory that contains the `scratch` folder). If you are in the `scratch` directory itself, the imports won't work.\n\n2. 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 \n\n```\nexport PYTHONPATH=/path/to/where/you/cloned/this/repo\n```\n\n(substituting in the real path, of course).\n\nIf you are on Windows, it's [potentially more complicated](https://stackoverflow.com/questions/3701646/how-to-add-to-the-pythonpath-in-windows-so-it-finds-my-modules-packages).\n\n## Table of Contents\n\n1. Introduction\n2. A Crash Course in Python\n3. [Visualizing Data](https://github.com/joelgrus/data-science-from-scratch/blob/master/scratch/visualization.py)\n4. [Linear Algebra](https://github.com/joelgrus/data-science-from-scratch/blob/master/scratch/linear_algebra.py)\n5. [Statistics](https://github.com/joelgrus/data-science-from-scratch/blob/master/scratch/statistics.py)\n6. [Probability](https://github.com/joelgrus/data-science-from-scratch/blob/master/scratch/probability.py)\n7. [Hypothesis and Inference](https://github.com/joelgrus/data-science-from-scratch/blob/master/scratch/inference.py)\n8. [Gradient Descent](https://github.com/joelgrus/data-science-from-scratch/blob/master/scratch/gradient_descent.py)\n9. [Getting Data](https://github.com/joelgrus/data-science-from-scratch/blob/master/scratch/getting_data.py)\n10. [Working With Data](https://github.com/joelgrus/data-science-from-scratch/blob/master/scratch/working_with_data.py)\n11. [Machine Learning](https://github.com/joelgrus/data-science-from-scratch/blob/master/scratch/machine_learning.py)\n12. [k-Nearest Neighbors](https://github.com/joelgrus/data-science-from-scratch/blob/master/scratch/k_nearest_neighbors.py)\n13. [Naive Bayes](https://github.com/joelgrus/data-science-from-scratch/blob/master/scratch/naive_bayes.py)\n14. [Simple Linear Regression](https://github.com/joelgrus/data-science-from-scratch/blob/master/scratch/simple_linear_regression.py)\n15. [Multiple Regression](https://github.com/joelgrus/data-science-from-scratch/blob/master/scratch/multiple_regression.py)\n16. [Logistic Regression](https://github.com/joelgrus/data-science-from-scratch/blob/master/scratch/logistic_regression.py)\n17. [Decision Trees](https://github.com/joelgrus/data-science-from-scratch/blob/master/scratch/decision_trees.py)\n18. [Neural Networks](https://github.com/joelgrus/data-science-from-scratch/blob/master/scratch/neural_networks.py)\n19. [Deep Learning]\n20. [Clustering](https://github.com/joelgrus/data-science-from-scratch/blob/master/scratch/clustering.py)\n21. [Natural Language Processing](https://github.com/joelgrus/data-science-from-scratch/blob/master/scratch/nlp.py)\n22. [Network Analysis](https://github.com/joelgrus/data-science-from-scratch/blob/master/scratch/network_analysis.py)\n23. [Recommender Systems](https://github.com/joelgrus/data-science-from-scratch/blob/master/scratch/recommender_systems.py)\n24. [Databases and SQL](https://github.com/joelgrus/data-science-from-scratch/blob/master/scratch/databases.py)\n25. [MapReduce](https://github.com/joelgrus/data-science-from-scratch/blob/master/scratch/mapreduce.py)\n26. Data Ethics\n27. Go Forth And Do Data Science\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoelgrus%2Fdata-science-from-scratch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoelgrus%2Fdata-science-from-scratch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoelgrus%2Fdata-science-from-scratch/lists"}