ec.gp.sasc.util
Class OLSRegularized

java.lang.Object
  extended by ec.gp.sasc.util.OLSRegularized

public class OLSRegularized
extends Object


Constructor Summary
OLSRegularized()
           
 
Method Summary
static void main(String[] args)
           
static double[][] OLSCoefficients(double[][] y, double[][] x, double lambda)
          Calcula os coeficientes por Mínimos Quadrados Regularizados Calcula os coeficientes w da equação matricial (x'x + lambda*I)w = x'y ou aw=b, onde a=(x'x + lambda*I) e b= x'y
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OLSRegularized

public OLSRegularized()
Method Detail

main

public static void main(String[] args)

OLSCoefficients

public static double[][] OLSCoefficients(double[][] y,
                                         double[][] x,
                                         double lambda)
Calcula os coeficientes por Mínimos Quadrados Regularizados Calcula os coeficientes w da equação matricial (x'x + lambda*I)w = x'y ou aw=b, onde a=(x'x + lambda*I) e b= x'y

Parameters:
y - Vetor com o valor da variável target
x - Matriz com as observações das variáveis explicativas
lambda - Parâmetro de regularização
Returns:
Retorna o valor dos coeficientes