MCPcopy Create free account
hub / github.com/brainflow-dev/brainflow / predict

Method predict

nodejs_package/brainflow/ml_model.ts:176–187  ·  view source on GitHub ↗
(data: number[])

Source from the content-addressed store, hash-verified

174 }
175
176 public predict(data: number[]): number[]
177 {
178 const len = [0];
179 const output = [...new Array (this.input.inputParams.maxArraySize).fill(0)];
180 const res =
181 MLModuleDLL.getInstance().predict(data, data.length, output, len, this.inputJson);
182 if (res !== BrainFlowExitCodes.STATUS_OK)
183 {
184 throw new BrainFlowError (res, 'Could not predict');
185 }
186 return output.slice(0, len[0]);
187 }
188
189 public release(): void
190 {

Callers 1

runExampleFunction · 0.95

Calls 3

fillMethod · 0.80
predictMethod · 0.65
getInstanceMethod · 0.45

Tested by

no test coverage detected