Thanks to visit codestin.com
Credit goes to github.com

Skip to content

warning into TreeSurvival::computePredictionAccuracyInternal() method #239

@Tigroux

Description

@Tigroux

Hi

in the method TreeSurvival::computePredictionAccuracyInternal(), Visual Studio give a warning on the line:

sum_chf.push_back(std::accumulate(chf[terminal_nodeID].begin(), chf[terminal_nodeID].end(), 0));

because the last argument is a integer. So the result of this accumulation is trunk to an integer.
If the expected result must not be trunked, the line must be

sum_chf.push_back(std::accumulate(chf[terminal_nodeID].begin(), chf[terminal_nodeID].end(), 0.0));

Best regards

Remi

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions