[Quantproject-developers] QuantProject/b7_Scripts/WalkForwardTesting/LinearRegression/InSampleChoos
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2012-05-01 00:05:02
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/LinearRegression/InSampleChoosers/FitnessEvaluation
In directory vz-cvs-3.sog:/tmp/cvs-serv32444/b7_Scripts/WalkForwardTesting/LinearRegression/InSampleChoosers/FitnessEvaluation
Modified Files:
LinearRegressionFitnessEvaluator.cs
Log Message:
The method
protected virtual double getFitnessValue( ILinearRegression linearRegression )
has been added, so that it can be overridden and an alternative fitness can be used (by default, CenteredRSquare is used, but for instance CenteredPSquared can be used now, overriding this method)
Index: LinearRegressionFitnessEvaluator.cs
===================================================================
RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/LinearRegression/InSampleChoosers/FitnessEvaluation/LinearRegressionFitnessEvaluator.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** LinearRegressionFitnessEvaluator.cs 3 Aug 2011 22:33:27 -0000 1.5
--- LinearRegressionFitnessEvaluator.cs 1 May 2012 00:04:58 -0000 1.6
***************
*** 74,78 ****
}
! public string Description
{
get
--- 74,78 ----
}
! public virtual string Description
{
get
***************
*** 129,132 ****
--- 129,138 ----
#region getFitnessValue
+
+ protected virtual double getFitnessValue( ILinearRegression linearRegression )
+ {
+ double fitnessValue = linearRegression.CenteredRSquare;
+ return fitnessValue;
+ }
private double getFitnessValue( LinearRegressionTestingPositions testingPositions )
***************
*** 134,145 ****
QuantProject.ADT.Econometrics.ILinearRegression linearRegression =
this.SetUpAndRunLinearRegression( testingPositions );
! double fitnessValue = linearRegression.CenteredRSquare;
return fitnessValue;
- //
- // double fitnessValue;
- // fitnessValue = this.getFitnessValue(
- // testingPositions.TradingPortfolio ,
- // testingPositions.SignalingPortfolios );
- // return fitnessValue;
}
#endregion getFitnessValue
--- 140,146 ----
QuantProject.ADT.Econometrics.ILinearRegression linearRegression =
this.SetUpAndRunLinearRegression( testingPositions );
! // double fitnessValue = linearRegression.CenteredRSquare;
! double fitnessValue = this.getFitnessValue( linearRegression );
return fitnessValue;
}
#endregion getFitnessValue
|