diff --git a/mlpp/knn/knn.cpp b/mlpp/knn/knn.cpp index 6139ef4..104a887 100644 --- a/mlpp/knn/knn.cpp +++ b/mlpp/knn/knn.cpp @@ -61,10 +61,6 @@ real_t MLPPKNN::score() { return util.performance_pool_int_array_vec(model_set_test(_input_set), _output_set); } -MLPPKNN::MLPPKNN(std::vector> inputSet, std::vector outputSet, int k) { - _k = k; -} - MLPPKNN::MLPPKNN() { _k = 0; } @@ -171,7 +167,7 @@ void MLPPKNN::_bind_methods() { ClassDB::bind_method(D_METHOD("get_k"), &MLPPKNN::get_k); ClassDB::bind_method(D_METHOD("set_k", "value"), &MLPPKNN::set_k); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "k"), "set_k", "get_k"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "k"), "set_k", "get_k"); ClassDB::bind_method(D_METHOD("model_set_test", "X"), &MLPPKNN::model_set_test); ClassDB::bind_method(D_METHOD("model_test", "x"), &MLPPKNN::model_test); diff --git a/mlpp/knn/knn.h b/mlpp/knn/knn.h index 534c750..5fd4836 100644 --- a/mlpp/knn/knn.h +++ b/mlpp/knn/knn.h @@ -32,8 +32,6 @@ public: int model_test(const Ref &x); real_t score(); - MLPPKNN(std::vector> inputSet, std::vector outputSet, int k); - MLPPKNN(); ~MLPPKNN();