public Algorithm_(int k, List <winequalityRed> train, List <winequalityRed> wineSet) { this.kNN = k; //k neighbor this.trainset = train; //trainset this.wineSet = wineSet; //customer this.totalTrainset = train.Count; //total of wine distances = new Distance [this.totalTrainset]; //get max value of each column need to normalize MaxinumValue maximum = new MaxinumValue(train); maximum.findAllMax(); MAXfixedAcidity = maximum.getFixedAcidity(); MAXvolatileAcidity = maximum.getVolatileAcidity(); MAXcitricAcid = maximum.getCitricAcid(); MAXresidualSugar = maximum.getResidualSugar(); MAXchlorides = maximum.getChlorides(); MAXfreeSulfurDioxide = maximum.getFreeSulfurDioxide(); MAXtotalSulfurDioxide = maximum.getTotalSulfurDioxide(); MAXdensity = maximum.getDensity(); MAXpH = maximum.getPH(); MAXsulphates = maximum.getSulphates(); MAXalcohol = maximum.getAlcohol(); MAXquality = maximum.getQuality(); }
public Algorithm( int k, List <Customer> train, List <Customer> customer ) { this.kNN = k;//k neighbor this.trainset = train;//trainset this.customerset = customer;//customer this.totalTrainset = train.Count;//total of customer distances = new Distance [this.totalTrainset]; //get max value of each column need to normalize MaxinumValue maximum = new MaxinumValue(train); maximum.findAllMax(); maxAge = maximum.getMaxAge(); maxIncome = maximum.getMaxIncome(); maxNumCard = maximum.getMaxNumCard(); }
public Algorithm(int k, List <Customer> train, List <Customer> customer) { this.kNN = k; //k neighbor this.trainset = train; //trainset this.customerset = customer; //customer this.totalTrainset = train.Count; //total of customer distances = new Distance [this.totalTrainset]; //get max value of each column need to normalize MaxinumValue maximum = new MaxinumValue(train); maximum.findAllMax(); maxAge = maximum.getMaxAge(); maxIncome = maximum.getMaxIncome(); maxNumCard = maximum.getMaxNumCard(); }