Visualize the maximal margin separator
In this exercise you will add the maximal margin separator to the scatter plot you created in an earlier exercise. The plot has been reproduced on the right.
แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร
Support Vector Machines in R
คำแนะนำการฝึกหัด
- Create a data frame called
separatorcontaining the maximal margin separator. This is available in the variablemm_separator(entermm_separatorto see it) - Use the data frame created to add the maximal margin separator to the sugar content scatterplot created in the earlier exercise and display the result.
แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ
ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์
#create data frame containing the maximum margin separator
separator <- data.frame(sep = ___)
#add ggplot layer
plot_sep <- plot_ + geom_point(data = ___, aes(x = ___, y = 0), color = "blue", size = 4)
#display plot
plot_sep