Get score of classifier
(double[] data)
| 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 |