增加VAVG 移除分类

pull/31/head
thenk008 5 years ago
parent 9aed49c620
commit 7b83664028

@ -66,6 +66,15 @@ public class TempleConfig {
private int featureNub = 4;//聚类特征数量 private int featureNub = 4;//聚类特征数量
private Knn knn;//KNN分类器 private Knn knn;//KNN分类器
private int knnNub = 3;//KNN投票人数 private int knnNub = 3;//KNN投票人数
private Matrix backGround;//背景
public Matrix getBackGround() {
return backGround;
}
public void setBackGround(Matrix backGround) {
this.backGround = backGround;
}
public Knn getKnn() { public Knn getKnn() {
return knn; return knn;

@ -19,6 +19,10 @@ public class VectorK {
return matrixK; return matrixK;
} }
public void removeType(int typeId) {
matrixK.remove(typeId);
}
public void insertMatrix(int type, Matrix matrix) throws Exception { public void insertMatrix(int type, Matrix matrix) throws Exception {
if (matrix.isRowVector() && matrix.getY() == length) { if (matrix.isRowVector() && matrix.getY() == length) {
if (matrixMap.containsKey(type)) { if (matrixMap.containsKey(type)) {

@ -43,13 +43,12 @@ public class FoodTest {
public static void test() throws Exception { public static void test() throws Exception {
TempleConfig templeConfig = new TempleConfig(); TempleConfig templeConfig = new TempleConfig();
Picture picture = new Picture(); Picture picture = new Picture();
templeConfig.isShowLog(true); templeConfig.isShowLog(true);//是否打印日志
templeConfig.setMaxRain(320); templeConfig.setMaxRain(320);//切割阈值
templeConfig.setFeatureNub(3); templeConfig.setFeatureNub(3);
templeConfig.sethTh(0.88); templeConfig.sethTh(0.88);
templeConfig.setPoolSize(2); templeConfig.setPoolSize(2);
templeConfig.setSensoryNerveNub(3); //templeConfig.setRegionNub(100);
templeConfig.setStudyPoint(0.01);
templeConfig.setClassifier(Classifier.VAvg); templeConfig.setClassifier(Classifier.VAvg);
templeConfig.init(StudyPattern.Cover_Pattern, true, 400, 400, 3); templeConfig.init(StudyPattern.Cover_Pattern, true, 400, 400, 3);
Operation operation = new Operation(templeConfig); Operation operation = new Operation(templeConfig);

Loading…
Cancel
Save