0

I have a data with FloatLabel and FloatFeatureVector. FeatureVector size is variable. Once the model is trianed on traindata from a csv file,i want to run it on testdata that i generate on the fly.

Each csv file is simply the sensor data from each pump in the plant. so the featurevector is variable(since some pumps will not have all the sensors.) I can load the csv file, do feature selection and build a model on it and get the score values(regression). Next, I want to run it on testdata in a matrix form of double()() that i am generating.

The feature size in the testdata is the same as traindata. I am using the mlcontext.data.Loadfromenumerable. For the class that is required by the enumerable, i am using the one below.

private const int FeatureLength = 10;
public class FloatLabelFloatFeatureVectorSample
        {
            public float Label;
            [VectorType(FeatureLength)]
            public float[] Features;
        }

it errors if the featurelength is not a constant. Answers I saw elsewhere were vague/inconsistent (see link: https://github.com/dotnet/machinelearning/issues/164)

I am using ml.net 0.11

Tamara Koliada
  • 1,200
  • 2
  • 14
  • 31

0 Answers0