Commit 7fbb2b4c authored by Cédric Traizet's avatar Cédric Traizet
Browse files

ENH: use float as label type for regression

No related merge requests found
Showing with 4 additions and 4 deletions
+4 -4
......@@ -25,11 +25,11 @@ namespace otb
namespace Wrapper
{
class TrainVectorRegression : public TrainVectorBase<float, int>
class TrainVectorRegression : public TrainVectorBase<float, float>
{
public:
typedef TrainVectorRegression Self;
typedef TrainVectorBase<float, int> Superclass;
typedef TrainVectorBase<float, float> Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
......
......@@ -306,9 +306,9 @@ TrainVectorBase<TInputValue, TOutputValue>
input->PushBack( mv );
if(cFieldIndex>=0 && ogr::Field(feature,cFieldIndex).HasBeenSet())
target->PushBack( feature.ogr().GetFieldAsInteger( cFieldIndex ) );
target->PushBack( feature.ogr().GetFieldAsDouble( cFieldIndex ) );
else
target->PushBack( 0 );
target->PushBack( 0. );
feature = layer.ogr().GetNextFeature();
goesOn = feature.addr() != 0;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment