เริ่มต้นใช้งานเริ่มต้นใช้งานได้ฟรี

Imbalanced class distribution

The dataset transfers contains credit transfers and some of them were recorded as fraud. The column fraud_flag indicates whether the transaction is fraudulent (fraud_flag = 1) or not (fraud_flag = 0).

Since fraud is typically very rare, it is important to take the large imbalance between the number of fraudulent cases and regular cases into account. Let's check the fraction of legitimate and fraudulent cases and visualize the imbalance with a pie chart.

The dataset transfers is loaded in your workspace. The visualization part has been defined for you, as data visualization in general is out of the scope of this course.

แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร

Fraud Detection in R

ดูคอร์ส

แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ

ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์

# Print the first 6 rows of the dataset
___(transfers)
แก้ไขและรันโค้ด