alualu628628 / Gaussian-Process-Incremental-Sample-Consensus-GP-INASC

an implementation of GP-INSAC algorithm to achieve the driving region on 3D point clouds
34 stars 11 forks source link

二维输入 #5

Open z0v0z opened 1 year ago

z0v0z commented 1 year ago

您好! 我看您写的GP的输入是一维的输入,也就是输入的是distancec,输出的结果是z的预测,但是如果我的输入是多维的该怎么办?比如说是二维的输入。 如果您能帮我修改一下的话,我会非常感激您

z0v0z commented 1 year ago

void INSAC::ToAddTrainSamples(MatrixXr & vTrainFeaVec, MatrixXr & vTrainTruVec, const std::vector & vFeatures) {

//clearand prepare
vTrainFeaVec.resize(1, m_vNewSeedIdx.size());    //种子点的个数
vTrainTruVec.resize(1, m_vNewSeedIdx.size());

//to each new seed
for (int i = 0; i != m_vNewSeedIdx.size(); ++i) {
    //get the feature value(s)
    vTrainFeaVec(i) = vFeatures[m_vNewSeedIdx[i]].fDis;    //距离
    //...........add 2...3...4dimension

    //get the corresponding truth value(s)
    vTrainTruVec(i) = vFeatures[m_vNewSeedIdx[i]].fElevation;  
    //...........add 2...3...4dimension
}

//clear old data
//m_vNewSeedIdx.clear();

} 这里的话vTrainFeaVec如果我是要二维那是vTrainFeaVec.resize(2, m_vNewSeedIdx.size());这样子改吗?那这样的话是同一行是代表一个特征维度?而不是每一列代表一个特征维度?