ट्रांसफ़ॉर्म किए गए रेडियली सेपरेबल डेटा का विज़ुअलाइज़ेशन
इस अभ्यास में, आप इस अध्याय में पहले बनाए गए radially separable डेटासेट को ट्रांसफ़ॉर्म करेंगे और उसे x1^2-x2^2 प्लेन में विज़ुअलाइज़ करेंगे. याद दिलाने के लिए, डेटा की separation boundary सर्कल x1^2 + x2^2 = 0.64 है (radius = 0.8 units). डेटासेट आपके लिए data frame df में लोड कर दिया गया है.
यह अभ्यास पाठ्यक्रम का हिस्सा है
R में Support Vector Machines
अभ्यास निर्देश
- डेटा को x1^2-x2^2 प्लेन में ट्रांसफ़ॉर्म करें.
- ट्रांसफ़ॉर्म्ड coordinates के रूप में डेटा को विज़ुअलाइज़ करें.
- ट्रांसफ़ॉर्म्ड coordinates के संदर्भ में एक linear boundary जोड़ें.
इंटरैक्टिव व्यावहारिक अभ्यास
इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।
#transform data
df1 <- data.frame(x1sq = df$x1^2, x2sq = ___, y = df$y)
#plot data points in the transformed space
plot_transformed <- ggplot(data = df1, aes(x = ___, y = x___, color = y)) +
geom_point()+ guides(color = "none") +
scale_color_manual(values = c("red", "blue"))
#add decision boundary and visualize
plot_decision <- plot_transformed + geom_abline(slope = -1, intercept = ___)
plot_decision