Posts

Members

Info

·282d# Chapter 3

### problem with the code : Chapter 3 exercise 14

#### Here is my code. I don't know what the error in this is. The error message simply says: test failed. import numpy as np from io import StringIO …

0

·333d# Chapter 3

### Odds and probability

#### In this section you say that 3:1 would be three chances of winning the bet and one of losing. May be different across countries but in the UK 3:1 would mean the reverse. 100:1 would, for example, be a very long shot. The course is really interesting though, especially the use of…

9

### Chapter 3, Exercise 10: Bayes rule (part 1 of 2)

#### In Helsinki, the chances of having a cloudy morning on a rainy day are 9 out of 10. Therefore, the odds for rain having observed clouds in the morning should logically be 9:1, and the prior odds for rains of 206:159 ideally should have no relevance. what do you think, friends?

17

### Exercise 18: TF-IDF Advanced - AssertionError

#### AssertionError: "['(0, 1)', '(1, 0)']" not found in ['(0, 1)', '(1, 0)'] Test fails because print() adds double quotes to the output and the test check doesn't have double quotes. Very frustrating.

9

·344d# Chapter 3

### What the heck is this equation

#### tf - idf = tf * log(1/df) This is seen in the working with words section about the tf-idf method. Now I totally understand the method but this just caught me off guard. I spent some time trying to mathematically prove this statement, then I gave up, plugging it into wolfram…

3

### Exercise 14 - main.main does not exist - problem. Any help?

#### Test is passed but when submitting, I get error mentioned below. I certainly have both def main(): ... …

1