增加分段回归

This commit is contained in:
lidapeng 2020-09-08 15:45:03 +08:00
parent cdeea5bcec
commit 01564d389f

View File

@ -22,6 +22,13 @@ public class Knn {//KNN分类器
featureMap.remove(type);
}
public void revoke(int type, int nub) {//撤销一个类别最新的
List<Matrix> list = featureMap.get(type);
for (int i = 0; i < nub; i++) {
list.remove(list.size() - 1);
}
}
public void insertMatrix(Matrix vector, int tag) throws Exception {
if (vector.isVector() && vector.isRowVector()) {
if (featureMap.size() == 0) {