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)); }
public FeatureDblIntegrator(FeatureExtractor <T> sourceExtractor) { SourceExtractor = sourceExtractor; Dimensions = sourceExtractor.Dimensions; CumulativeValue = Enumerable.Repeat(0.0, Dimensions).ToArray(); CurrentMomentum = Enumerable.Repeat(0.0, Dimensions).ToArray(); }
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; }
protected static void DefineExtractor(string name, FeatureExtractor <DatapointKitchenSink> extractor) { extractor.Name = name; AllExtractors.Add(name, extractor); }