calculate metric from data :param data: input array :type data: NDArray[Shape["*"], Float64] :return: metric value :rtype: List
(self, data)
| 272 | raise BrainFlowError('unable to release classifier', res) |
| 273 | |
| 274 | def predict(self, data) -> List: |
| 275 | """calculate metric from data |
| 276 | |
| 277 | :param data: input array |
| 278 | :type data: NDArray[Shape["*"], Float64] |
| 279 | :return: metric value |
| 280 | :rtype: List |
| 281 | """ |
| 282 | output = numpy.zeros(self.model_params.max_array_size).astype(numpy.float64) |
| 283 | output_len = numpy.zeros(1).astype(numpy.int32) |
| 284 | res = MLModuleDLL.get_instance().predict(data, data.shape[0], output, output_len, self.serialized_params) |
| 285 | if res != BrainFlowExitCodes.STATUS_OK.value: |
| 286 | raise BrainFlowError('unable to calc metric', res) |
| 287 | return output[0:output_len[0]] |
no test coverage detected