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

Method predict

csharp_package/brainflow/brainflow/ml_model.cs:129–144  ·  view source on GitHub ↗

Get score of classifier

(double[] data)

Source from the content-addressed store, hash-verified

127 /// Get score of classifier
128 /// </summary>
129 public double[] predict (double[] data)
130 {
131 double[] val = new double[input_params.max_array_size];
132 int[] val_len = new int[1];
133 int res = MLModuleLibrary.predict (data, data.Length, val, val_len, input_json);
134 if (res != (int)BrainFlowExitCodes.STATUS_OK)
135 {
136 throw new BrainFlowError (res);
137 }
138 double[] result = new double[val_len[0]];
139 for (int i = 0; i < val_len[0]; i++)
140 {
141 result[i] = val[i];
142 }
143 return result;
144 }
145
146 /// <summary>
147 /// get version

Callers

nothing calls this directly

Calls 1

predictMethod · 0.65

Tested by

no test coverage detected