Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Least Square
learnbirt
Hi Michael,
I have the following code to calculate the value of R2.
i am not able to understand the purpose of this code and what is R2,please explain as i would be needing it.
name="beforeFactory"><![CDATA[LeastSquare = new Packages.LeastSquares2();]]
name="beforeOpen"><![CDATA[R2=0;
FlagCounter =0;
MaxX =0;
MaxY =0;
var y=0;
name="beforeClose"><![CDATA[importPackage(Packages.java.lang);
importPackage(Packages.java.text);
R2 =0;
if(FlagCounter>0) {
R2 = LeastSquare.R2();
LeastSquare.CalculateScales();
}
reportContext.setPersistentGlobalVariable("R2",new Float(R2));]]>
name="onFetch"><![CDATA[importPackage(Packages.java.lang);
y=row.FirstValue;
x=row.SecondValue;
if(x!=null && y!=null){
if(x>MaxX)
MaxX = x;
if(y>MaxY)
MaxY = y;
LeastSquare.addPoint(x,y);
FlagCounter++;
}
Thanks
birtq
Find more posts tagged with
Comments
mwilliams
Hi birtq,
Can you explain a little further your issue and what you're looking for? Thanks.