mirror of
https://gitee.com/dromara/easyAi.git
synced 2024-12-02 03:38:08 +08:00
增加分段回归
This commit is contained in:
parent
cdeea5bcec
commit
01564d389f
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user