LoslegenKostenlos loslegen

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

Einführung in Regression mit R

Kurs anzeigen

Anleitung zur Übung

  • 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 Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

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

# Plot the confusion matrix
___

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