All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.actelion.research.calc.regression.knn.ParameterKNN Maven / Gradle / Ivy

There is a newer version: 2024.11.2
Show newest version
package com.actelion.research.calc.regression.knn;

import com.actelion.research.calc.regression.ConstantsRegressionMethods;
import com.actelion.research.calc.regression.ParameterRegressionMethod;

import java.io.File;
import java.io.IOException;
import java.util.List;

/**
 * ParameterKNN
 * 

Modest v. Korff

*

* Created by korffmo1 on 06.12.18. */ public class ParameterKNN extends ParameterRegressionMethod { public static final String TAG_NEIGHBOURS="Neighbours"; private int neighbours; public ParameterKNN() { super(ConstantsRegressionMethods.MODEL_KNN); setNeighbours(KNNRegression.NEIGHBOURS); } public ParameterKNN(int neighbours) { super(ConstantsRegressionMethods.MODEL_KNN); setNeighbours(neighbours); } public int getNeighbours() { return neighbours; } public void setNeighbours(int neighbours) { this.neighbours = neighbours; properties.setProperty(TAG_NEIGHBOURS, Integer.toString(neighbours)); } @Override public int compareTo(ParameterRegressionMethod o) { int cmp = 0; ParameterKNN parameterKNN = (ParameterKNN)o; if(neighbours>parameterKNN.neighbours) { cmp=1; }else if(neighbours





© 2015 - 2024 Weber Informatics LLC | Privacy Policy