Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to draw R language ggplot2 to show the correlation coefficient between multivariate pairwise

2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article shows you how to draw R language ggplot2 to show the correlation coefficient between multiple variables, the content is concise and easy to understand, it can definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

Introduce the implementation method of the following figure

Image.png

The data set used is the data set of wheat seeds. Seven indexes of three varieties of wheat seeds were measured in the laboratory to explore whether the varieties of wheat seeds can be distinguished according to these indexes.

An area B perimeter C compactness LK length WK width A_coef skewness coefficient LKG groin length

Image.png

The last variable, target, is the kind of wheat to which it belongs, which is 0prime1 and 2 respectively.

The dataset is downloaded from the kaggle website. You can download the dataset yourself or leave a message at the end of the article.

The ggpairs () function in the GGally package is used to implement the diagram mentioned at the beginning of the article, and the corresponding help document is https://ggobi.github.io/ggally/reference/ggpairs.html

The first is to read in the data seed

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 216

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report