In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article is about how to use scatterplotMatrix in R language to draw scatter map matrix, the editor thinks it is very practical, so I share it with you. I hope you can get something after reading this article. Let's take a look at it.
Before using R software to do correlation coefficient matrix heat map, see using corrplot in R language to draw correlation coefficient matrix heat map, now to introduce the use of R language scatterplotMatrix to draw scatter plot matrix, a relatively simple command can be applied to the analysis of multivariables.
Take the house price data of Boston in Boston as an example, which is commonly used in data mining and machine learning. It can be downloaded from UCI's machine learning database: https://archive.ics.uci.edu/ml/machine-learning-databases/housing/housing.data
The dataset has 506 observation samples and 14 variables:
Image
First, import the data into the R software:
> mydata summary (mydata)
Next, install the car package and analyze the scatter matrix:
> install.packages ("car")
> library (car)
ScatterplotMatrix (mydata,spread=FALSE,lty.smooth=2,main= "Scatter Plot Matrix")
The result is shown in the figure:
Image
From the scatter chart, we can see that the line of MEDV and the variable MEDV have a linear trend, including: ZN, RM, BRATIO, LSTAT.
The above is how to use scatterplotMatrix in R language to draw scatter matrix. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
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: 0
*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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.