这些数据以((n_bands x n_timesteps), height, width)形状的地质数据形式存储。我需要为ML模型训练重塑数组,其中图像中的每个像素都是“样本”。因此,训练数组将是形状(n_samples x n_timesteps x n_bands)。height = x.shape</e
我使用一个阈值向量在2d numpy数组行中创建二进制值。示例代码如下:x = np.random.rand(100000, 200)x = np.array([[1 if x[i,j]>=coef[j] else 0 for j in range(x.shape[1])] for i in range(x.shape</em