简体   繁体   English

随机森林回归的 3D 输入

[英]3D Inputs for Random Forest Regression

Problem问题

Looking at examples of Sklearn's random forest regression, such as with the IRIS dataset, the inputs are vectors of size [n_samples, n_features] :查看 Sklearn 的随机森林回归示例,例如IRIS数据集,输入是大小为[n_samples, n_features]向量:

slen   swid    plen    pwid
5.1     3.5     1.4     0.2 
4.9     3.0     1.4     0.2

For my data, however, I have multiple values per feature:但是,对于我的数据,每个功能都有多个值:

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]

Is it still possible to use Sklearn's RFR with this kind of dataset?这种数据集是否仍然可以使用 Sklearn 的 RFR?

The input is now [n_samples, n_values_per_feature, n_features] .输入现在是[n_samples, n_values_per_feature, n_features] Note that for my data, the order of the matrices, like [2,5,1] , matters.请注意,对于我的数据,矩阵的顺序(如[2,5,1] )很重要。

it is possible just to make then all a one有可能只是使然后全部成为一个

 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]

it is possible to scroll the values over some spots.可以在某些点上滚动值。 and interchange the positions.并互换位置。 I guess it will average up.我想它会平均起来。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM