Super learner
This user is a Super Learner. To become a Super Learner, you need to reach Level 8.
Posted on:

05 Oct 2024

0

Comments about practice exam #3

Hi Viktor, I have some comments about the exercises in practice exam #3.
 
Regarding question 2, at least in NumPy version 1.26.4 they work the same (giving in all cases the minimum value for each column of text_1 separately):
np.min(text_1, axis=0); np.minimum.reduce(text_1, axis=0); and np.minimum.reduce(text_1).
So there would be two correct answers and not just one.

And regarding the statement of question 6, say that if the 1-D array 'correct_questions' contains the number of correct answers for each student, then the number of students is 35 and not 25 as indicated in the statement. It does not affect the answer to question 6 but it does affect the logic of the statement and the correspondence with the data.
And I add for the 6th, just as a side comment since it is understood that the idea is to practice statistics with NumPy, that using the concept learned in chapter 4, conditional slicing, you can get to the answer with:
correct_questions[(correct_questions >= 28) & (correct_quesitions < 28)].size
correct_questions[(correct_questions >= 10) & (correct_questions < 16)].size
Or with np.sort(correct_questions) and counting the occurrences within the limits, or with the previously mentioned conditional slicing without the .size attribute and also counting the occurrences.
0 answers ( 0 marked as helpful)

Submit an answer