Exemplo n.º 1
0
        public double[] GetMachineInputs(FeatureExtractor <T> extractor, PreprocessorCoefficients?coefficients = null)
        {
            extractor.Reset(); // If it's an integrator type, we'll need this to make any sense of the results.
            var extractedSequence = extractor.ExtractSeq(SourcePath);

            return(Accord.Math.Matrix.Merge(extractor.Preprocess(extractedSequence, coefficients), extractor.Dimensions));
        }
Exemplo n.º 2
0
 public FeatureDblIntegrator(FeatureExtractor <T> sourceExtractor)
 {
     SourceExtractor = sourceExtractor;
     Dimensions      = sourceExtractor.Dimensions;
     CumulativeValue = Enumerable.Repeat(0.0, Dimensions).ToArray();
     CurrentMomentum = Enumerable.Repeat(0.0, Dimensions).ToArray();
 }
Exemplo n.º 3
0
        public FeatureAxisSelector(int selectedAxis, FeatureExtractor <T> sourceExtractor)
        {
            if (selectedAxis >= sourceExtractor.Dimensions)
            {
                throw new ArgumentException($"Cannot take the {selectedAxis}th axis of an extractor which produces only {sourceExtractor.Dimensions} dimensions.");
            }
            SelectedAxis    = selectedAxis;
            SourceExtractor = sourceExtractor;

            // By definition this extractor returns a single dimensional object.
            Dimensions = 1;
        }
Exemplo n.º 4
0
 protected static void DefineExtractor(string name, FeatureExtractor <DatapointKitchenSink> extractor)
 {
     extractor.Name = name;
     AllExtractors.Add(name, extractor);
 }