Correlation matrix की गणना
Correlation matrix दो वैरिएबल के बीच correlation की धारणा का सामान्यीकरण है। जब आप बहुत सारे वैरिएबल देखते हैं, तो वैरिएबल्स की आपसी निर्भरता समझने के लिए correlation matrix को visualize करना भी उपयोगी होता है।
यह अभ्यास पाठ्यक्रम का हिस्सा है
R में Multivariate Probability Distributions
अभ्यास निर्देश
- wine डेटा से Alcohol, Malic, Ash, और Alcalinity वैरिएबल्स की correlation matrix निकालिए.
- correlation matrix के मानों को दो दशमलव स्थान तक round कीजिए.
- correlation matrix को visualize करने के लिए
corrplot()फंक्शन का उपयोग कीजिए.
इंटरैक्टिव व्यावहारिक अभ्यास
इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।
# Calculate the correlation matrix
cor.wine <- ___
# Round the matrix to two decimal places
___
# Plot the correlations
corrplot(___, method = "ellipse")