Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/286.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
Python 随机森林回归的三维输入 问题_Python_Machine Learning_Regression_Random Forest_Feature Selection - Fatal编程技术网

Python 随机森林回归的三维输入 问题

Python 随机森林回归的三维输入 问题,python,machine-learning,regression,random-forest,feature-selection,Python,Machine Learning,Regression,Random Forest,Feature Selection,查看Sklearn的随机森林回归示例,例如使用IRIS数据集,输入是大小向量[n_样本,n_特征]: slen swid plen pwid 5.1 3.5 1.4 0.2 4.9 3.0 1.4 0.2 但是,对于我的数据,每个功能有多个值: slen swid plen pwid [2,5,1] [4,2,3] [1,2,3] [4,3,2] [5,3,

查看Sklearn的随机森林回归示例,例如使用IRIS数据集,输入是大小向量
[n_样本,n_特征]

slen   swid    plen    pwid
5.1     3.5     1.4     0.2 
4.9     3.0     1.4     0.2
但是,对于我的数据,每个功能有多个值:

slen         swid         plen        pwid
[2,5,1]     [4,2,3]     [1,2,3]     [4,3,2] 
[5,3,2]     [7,3,1]     [3,2,1]     [1,5,2]
是否仍然可以将Sklearn的RFR用于此类数据集


现在输入为
[n\u样本,n\u值/n\u特征,n\u特征]
。请注意,对于我的数据,矩阵的顺序很重要,如
[2,5,1]

有可能只是把它们都变成一个

 slen1    slen2       swid1     swid2      plen1    plen2       pwid1     pwid2 
[2,5,1]  [5,3,2]     [4,2,3]   [7,3,1]    [1,2,3]  [3,2,1]     [4,3,2]   [1,5,2]
可以在某些点上滚动数值。交换位置。我想平均起来