data-science-from-scratch
data-science-from-scratch copied to clipboard
code for Data Science From Scratch book
Added headers=None argument to on_error method of MyStreamer. Without this, one gets the error `TypeError: on_error() takes 3 positional arguments but 4 were given` whenever on_error is called
fix issue #85 by adding the missing 'girl_with_book.jpg' file used in the example.
fix issue #77 where the URL for the article 'What is data science?' has changed as well as the page structure.
Just a minor comment extending the reason of using `grad = [2 * error * x, 2 * error]` in function `linear_gradient` ("Chapter 8. Gradient Descent" section "Using Gradient Descent...
I've got your book and I'm working through it. I download the whole repo to folder c:\data-science-from-scratch on Windows. There is the following code in chapter "statistics" `from scratch.linear_algebra import...
I get the error: TypeError: can't multiply sequence by non-int of type 'float' On line 102 of scratch/neural_networks.py https://github.com/joelgrus/data-science-from-scratch/blob/d5d0f117f41b3ccab3b07f1ee1fa21cfcf69afa1/scratch/neural_networks.py#L102C5-L103C67 
the median function raise "IndexError" while pass an empty list as an argument to function. place this lines correct the issue: elif n == 0: return "The list is empty"...
Chapter 10 Section dimensionality reduction , Page 143, according to code provided, the results is `[0.8482572475712299, -0.5295844049279409]` for the first principal component, not book says `[0.924, 0.383]`
the code I cannot run is from typing import List from collections import Counter def raw_majority_vote(labels: List[str]) -> str: votes = Counter(labels) winner, _ = votes.most_common(1)[0] return winner assert raw_majority_vote(['a',...
Hello, The code in Chapter 20 Clustering has redundant line 57 https://github.com/joelgrus/data-science-from-scratch/blob/master/scratch/clustering.py ``` self.means = cluster_means(self.k, inputs, assignments) ``` This line is repeated with line 47 and can be deleted....