| 176 | } |
| 177 | |
| 178 | int testKNNValidatorNoLabels() { |
| 179 | |
| 180 | Specification::Model m1; |
| 181 | |
| 182 | KNNValidatorTests::generateInterface(m1); |
| 183 | |
| 184 | auto *nnModel = m1.mutable_knearestneighborsclassifier(); |
| 185 | KNNValidatorTests::setNumberOfNeighbors(nnModel, 3, true); |
| 186 | |
| 187 | KNNValidatorTests::addDataPoints(nnModel); |
| 188 | |
| 189 | Result res = validate<MLModelType_kNearestNeighborsClassifier>(m1); |
| 190 | ML_ASSERT_BAD(res); |
| 191 | |
| 192 | return 0; |
| 193 | |
| 194 | } |
| 195 | |
| 196 | int testKNNValidatorWrongNumberOfLabels() { |
| 197 |
nothing calls this directly
no test coverage detected