LoslegenKostenlos starten

Leistung eines logistischen Modells messen

Eine Konfusionsmatrix als Tabellenobjekt zu haben, ist okay, aber etwas umständlich fürs Programmieren. Wenn du sie in ein yardstick-Konfusionsmatrix-Objekt umwandelst, bekommst du Methoden zum Plotten und zum Auslesen von Leistungskennzahlen.

Die Konfusionsmatrix outcomes liegt als Tabellenobjekt vor. ggplot2 und yardstick sind geladen, und die Option yardstick.event_first ist auf FALSE gesetzt.

Diese Übung ist Teil des Kurses

<Kurs>Einführung in Regression mit R</Kurs>
Kurs ansehen

Übungsanweisungen

  • Wandle outcomes in eine yardstick-Konfusionsmatrix um. Weisen sie confusion zu.
  • Plotte confusion automatisch.
  • Hole Leistungskennzahlen aus confusion und denke daran, dass die positive Antwort in der zweiten Spalte steht.

Interaktive praktische Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# Convert outcomes to a yardstick confusion matrix
confusion <- ___

# Plot the confusion matrix
___

# Get performance metrics for the confusion matrix
___
Code bearbeiten und ausführen