小编Jac*_*ner的帖子

如何在dplyr中进行连接操作?

dplyr(版本0.4.1)打印执行连接的colnames.是否可以关闭此选项?

R代码:

library(dplyr)
a=data.frame(x=1,y=2)
b=data.frame(x=1,z=10)
aa=inner_join(a,b)
Run Code Online (Sandbox Code Playgroud)

对于最后一行,dplyr打印:

Joining by: "x"
Run Code Online (Sandbox Code Playgroud)

这对于交互式工作很有用,但是我在Rscript中运行并且所有这些线都堵塞了我的屏幕.

r dplyr

22
推荐指数
1
解决办法
6375
查看次数

imblearn 管道是否会关闭采样以进行测试?

让我们假设以下代码(来自管道上的 imblearn 示例

...    
# Instanciate a PCA object for the sake of easy visualisation
pca = PCA(n_components=2)

# Create the samplers
enn = EditedNearestNeighbours()
renn = RepeatedEditedNearestNeighbours()

# Create the classifier
knn = KNN(1)

# Make the splits
X_train, X_test, y_train, y_test = tts(X, y, random_state=42)

# Add one transformers and two samplers in the pipeline object
pipeline = make_pipeline(pca, enn, renn, knn)

pipeline.fit(X_train, y_train)
y_hat = pipeline.predict(X_test)
Run Code Online (Sandbox Code Playgroud)

我希望在执行时就能确定pipeline.predict(X_test)的抽样程序ennrenn不会被执行(但当然pca必须执行)。 …

python machine-learning imblearn

6
推荐指数
1
解决办法
486
查看次数

标签 统计

dplyr ×1

imblearn ×1

machine-learning ×1

python ×1

r ×1