Skip to content

Commit

Permalink
Scale pos and neg intervals individually
Browse files Browse the repository at this point in the history
* not symmetric around 0
  • Loading branch information
olas committed Aug 25, 2010
1 parent fdde686 commit 0f5ee3b
Showing 1 changed file with 9 additions and 5 deletions.
Expand Up @@ -367,12 +367,16 @@ private double scaleDerivative(Double currentDeriv) {
//so cut away anything below or above this
if (currentDeriv<=getLowPercentileDeriv())
return -1;

if (currentDeriv>=getHighPercentileDeriv())
else if (currentDeriv>=getHighPercentileDeriv())
return 1;

return currentDeriv/getHighPercentileDeriv();

else if (currentDeriv==0)
return 0;

//Since not symmetric around 0, scale pos and neg intervals individually
if (currentDeriv<0)
return currentDeriv/getLowPercentileDeriv();
else
return currentDeriv/getHighPercentileDeriv();
}

//Below are model-specific
Expand Down

0 comments on commit 0f5ee3b

Please sign in to comment.