我想为我的项目选择一个空目录/文件夹(不是任何文件)。我已经尝试过
from sklearn.gaussian_process import GaussianProcessRegressor
from sklearn.gaussian_process.kernels import RBF,WhiteKernel,ConstantKernel
kernel = ConstantKernel() * RBF() + ConstantKernel() * RBF( )
gp = GaussianProcessRegressor(kernel=kernel,n_restarts_optimizer=10)
import numpy as np
x = np.linspace(0,10,100)
y = 3*np.sin(x) + np.sin(x*5)
gp.fit(x.reshape(-1,1),y)
print(gp.kernel_)
# We can make predictions using both components of the kernel:
# is it possible to make predictions on each component
# individually?
y_hat = gp.predict(x.reshape(-1,1))
这将选择目录中的文件并显示所选的文件。
如果我选择一个空目录,由于其中没有文件,因此选择后会显示“未选择文件”
我只想选择一个空目录(不选择任何文件)。我该怎么解决?