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

com.actelion.research.calc.regression.linear.pls.boxcox.ParameterPLSBoxCox Maven / Gradle / Ivy

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

import com.actelion.research.calc.MatrixFunctions;
import com.actelion.research.calc.regression.ConstantsRegressionMethods;
import com.actelion.research.calc.regression.ParameterRegressionMethod;
import com.actelion.research.calc.regression.linear.pls.ParameterPLS;

import java.text.DecimalFormat;
import java.util.List;

/**
 * ParameterPLSBoxCox
 * 

Modest v. Korff

*

* Created by korffmo1 on 06.12.18. */ public class ParameterPLSBoxCox extends ParameterPLS { public static final double LAMBDA= 0.4; public static final String TAG_LAMBDA="Lambda"; private double lambda; public ParameterPLSBoxCox() { super(ConstantsRegressionMethods.MODEL_PLS_POWER, FACTORS); setLambda(LAMBDA); } public ParameterPLSBoxCox(int factors) { super(ConstantsRegressionMethods.MODEL_PLS_POWER, factors); } public ParameterPLSBoxCox(ParameterPLSBoxCox orig) { super(orig); copy(orig); } public void copy(ParameterPLSBoxCox orig){ super.copy(orig); setLambda(orig.getLambda()); } @Override public boolean equals(Object obj) { if(!(obj instanceof ParameterPLSBoxCox)){ return false; } boolean eq = super.equals(obj); ParameterPLSBoxCox p = (ParameterPLSBoxCox)obj; if(!MatrixFunctions.equals(getLambda(), p.getLambda())){ eq = false; } return eq; } public double getLambda() { return lambda; } public void setLambda(double lambda) { this.lambda = lambda; properties.put(TAG_LAMBDA, Double.toString(lambda)); } @Override public int compareTo(ParameterRegressionMethod o) { int cmp = 0; ParameterPLSBoxCox parameterPLSBoxCox = (ParameterPLSBoxCox)o; if(getFactors()>parameterPLSBoxCox.getFactors()) { cmp=1; } else if(getFactors()parameterPLSBoxCox.lambda){ cmp=1; }else if(lambda



© 2015 - 2024 Weber Informatics LLC | Privacy Policy