Edited, memorised or added to reading queue

on 09-Nov-2025 (Sun)

Do you want BuboFlash to help you learning these things? Click here to log in or create user.

Flashcard 7768434937100

Tags
#tensorflow #tensorflow-certificate
Question
[...] matrix
x-axis -> predicted label
Answer
Confusion

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Parent (intermediate) annotation

Open it
Confusion matrix x-axis -> predicted label

Original toplevel document

TfC_02_classification-PART_2
leads to less false negatives. Tradeoff between recall and precision. F1-score Combination of precision and recall, ususally a good overall metric for classification models. keyboard_arrow_down <span>Confusion matrix Can be hard to use whith large numbers of classes. y-axis -> true label x-axis -> predicted label # Create confusion metrics from sklearn.metrics import confusion_matrix y_preds = model_8.predict(X_test) confusion_matrix(y_test, y_preds) important: This time there is a problem with loss function. In case of categorical_crossentropy the labels have to be one-hot encoded In case of labels as integeres use SparseCategorica







#pytest #python #unittest
Beware of float return values!
0.1 + 0.1 + 0.1 == 0.3 Sometimes false
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Open it
Beware of float return values! 0.1 + 0.1 + 0.1 == 0.3 Sometimes false assert 0.1 + 0.1 + 0.1 == 0.3, "Usual way to compare does not always work with floats!" Instead use: assert 0.1 + 0.1 + 0.1 == pytest.approx(0.3)




Flashcard 7768438607116

Tags
#pytest #python #unittest
Question

Beware of float return values!
0.1 + 0.1 + 0.1 == 0.3 Sometimes false

assert 0.1 + 0.1 + 0.1 == 0.3, "Usual way to compare does not always work with floats!"

Instead use:

assert 0.1 + 0.1 + 0.1 == [...].approx(0.3)

Answer
pytest

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Open it
are of float return values! 0.1 + 0.1 + 0.1 == 0.3 Sometimes false assert 0.1 + 0.1 + 0.1 == 0.3, "Usual way to compare does not always work with floats!" Instead use: assert 0.1 + 0.1 + 0.1 == <span>pytest.approx(0.3) <span>