Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/73.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
与R过采样代码混淆_R_Sample_Oversampling - Fatal编程技术网

与R过采样代码混淆

与R过采样代码混淆,r,sample,oversampling,R,Sample,Oversampling,下面的代码是关于对超过10个房间的房屋进行过采样的,请问prob=ifelse(housing.df$rooms>10,0.9,0.01)的意思是什么?非常感谢 s <- sample(row.names(housing.df), 5, pro = ifelse(housing.df$ROOMS>10, 0.9, 0.01)) housing.df[s.] s10.9,0.01) 住房.df[s.] 我想这个ccode的目的是首先检查数据集中给定的房子是否有十个房间。如果是这种情况

下面的代码是关于对超过10个房间的房屋进行过采样的,请问
prob=ifelse(housing.df$rooms>10,0.9,0.01)
的意思是什么?非常感谢

s <- sample(row.names(housing.df), 5, pro = ifelse(housing.df$ROOMS>10, 0.9, 0.01))
housing.df[s.]
s10.9,0.01)
住房.df[s.]

我想这个ccode的目的是首先检查数据集中给定的房子是否有十个房间。如果是这种情况,则概率为90%,否则概率为10%

sample
使用此关联概率从给定的房屋名称中抽取样本,从而在抽样时有利于拥有10间以上房间的房屋。这会造成您的过度采样


这就是你的意思吗?

你有没有看帮助页面
?如果没有