_ | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁
FrontPage › ScatterPlot

Contents

1 pairs
2 smoothScatter
3 3D



library("GGally")
ggpairs(train[,3:13], aes(color = is_churn, alpha=0.2))+ theme_bw()

1 pairs #

library(car)
spm(~Sepal.Length + Sepal.Width + Petal.Length + Petal.Width | Species, data=iris)
spm.png

pairs(iris, col = c("red", "cornflowerblue", "purple")[iris$Species])
iris_scatter.png

2 smoothScatter #

朱朱 一(scatter plot)襯 蠏碁Μ覃 れ螻 螳.
plot(x,y)
smoothScatter01.png

蠏碁磯, 一危一 襷朱 螳 一危一 覿襯 蠍 企給. smoothScatter() 企 企れ 蠏豪概 蟆 螳 伎. 蠏碁殊 覲企 3螳 蟲一 蟆 .
library(graphics)
smoothScatter(x, y)
smoothScatter02.png

3 3D #

--https://www.google.com/search?q=pred.surf.3d&rlz=1C1GCEU_koKR892KR892&oq=pred.surf.3d&aqs=chrome..69i57.425j0j7&sourceid=chrome&ie=UTF-8
require(rgl)
pred.surf.3d <- function(df, x.nm,y.nm,z.nm, ...){
x <- df[,x.nm]; y <- df[,y.nm]; z<-df[,z.nm]
fit <- lm(z ~ x + y + x*y + x^2 + y^2)
xnew <- seq(range(x)[1],range(x)[2],len=20)
ynew <- seq(range(y)[1],range(y)[2],len=20)
df <- expand.grid(x=xnew, y=ynew)
df$z <- predict(fit, newdata=df)
with(df, surface3d(xnew, ynew, z=df$z, alpha=0.5))
}
plot3d(mydata$x, mydata$y, mydata$zl, col=rainbow(1000))
pred.surf.3d(mydata, "x", "y", "z")
蠍 蠍郁鍵..
企: : るジ讓曙 襦螻豺 企Ν 譯殊語. 襦螻豺
EditText : Print : Mobile : FindPage : DeletePage : LikePages : Powered by MoniWiki : Last modified 2021-02-24 10:03:49

螳 磯殊 蟆螻 . 豌 れ 讌襷 谿谿 襷讌.