commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (MATH-1206) Cost in least-squares fitting
Date Thu, 26 Feb 2015 14:53:04 GMT

     [ https://issues.apache.org/jira/browse/MATH-1206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gilles updated MATH-1206:
-------------------------
    Attachment: MATH-1206.patch

The (attached) patch causes many tests to now fail:

{noformat}
Failed tests: 
  GaussianCurveFitterTest.testFit01:188 expected:<3496978.1837704973> but was:<3496976.3496594895>
  GaussianCurveFitterTest.testFit04:262 expected:<233003.2967252038> but was:<233002.8643516898>
  GaussianCurveFitterTest.testFit05:275 expected:<283863.81929180305> but was:<283863.7943168686>
  GaussianCurveFitterTest.testFit06:288 expected:<285250.66754309234> but was:<285250.6769121677>
  GaussianCurveFitterTest.testFit07:301 expected:<3514384.729342235> but was:<3514384.6669300473>
  GaussianCurveFitterTest.testMath519:347 expected:<53.1572792> but was:<26.0>
  GaussianCurveFitterTest.testMath798:375 expected:<420.8397296167364> but was:<420.8397358396097>
  GaussianCurveFitterTest.testWithMaxIterations1:204 expected:<3496978.1837704973> but
was:<3496978.800406003>
  GaussianCurveFitterTest.testWithStartPoint:229 expected:<3496978.1837704973> but was:<3496978.800406003>
  HarmonicCurveFitterTest.testNoError:57 expected:<0.2> but was:<0.1999955548978442>
  PolynomialCurveFitterTest.testFit:56 best != coeff
 Elements at index 0 differ.  expected = 12.9 observed = -1.0E-20
 Elements at index 1 differ.  expected = -3.4 observed = 3.0E15
 Elements at index 2 differ.  expected = 2.1 observed = -5.0E25
  SimpleCurveFitterTest.testPolynomialFit:57 best != coeff
 Elements at index 0 differ.  expected = 12.9 observed = -1.0E20
 Elements at index 1 differ.  expected = -3.4 observed = 3.0E15
 Elements at index 2 differ.  expected = 2.1 observed = -5.0E25
  EvaluationTest.testComputeCost:175 Kirby2 expected:<3.9050739624> but was:<15.249602651743004>
  EvaluationTest.testComputeSigma:206 Kirby2, parameter #0 expected:<0.087989634338>
but was:<0.17387860547376632>
  LevenbergMarquardtOptimizerTest.testControlParameters:116->checkEstimate:155 null
  MinpackTest.testMinpackBard:180->minpackTest:524 expected:<-1.58848033259565E8>
but was:<-2.281145030247444E16>
  MinpackTest.testMinpackBox3Dimensional:327->minpackTest:523 expected:<0.0> but
was:<0.0030343448521943407>
  MinpackTest.testMinpackBrownAlmostLinear:407->minpackTest:523 expected:<0.0> but
was:<0.003621421870604769>
  MinpackTest.testMinpackBrownDennis:343->minpackTest:523 expected:<292.954288244866>
but was:<292.9544389375816>
  MinpackTest.testMinpackChebyquad:374->minpackTest:523 expected:<1.88424820499347>
but was:<1.18088726698391731E18>
  MinpackTest.testMinpackFreudensteinRoth:152->minpackTest:524 expected:<11.4124844654993>
but was:<11.412121480926384>
  MinpackTest.testMinpackHelicalValley:132->minpackTest:523 expected:<0.0> but was:<6.274776288270002E-4>
  MinpackTest.testMinpackKowalikOsborne:196->minpackTest:523 expected:<0.017535837721129>
but was:<0.03846867874661756>
  MinpackTest.testMinpackOsborne1:476->minpackTest:523 expected:<0.00739249260904843>
but was:<0.007723842649443106>
  MinpackTest.testMinpackOsborne2:487->minpackTest:523 expected:<0.20034404483314>
but was:<0.23226823584082015>
  MinpackTest.testMinpackPowellSingular:142->minpackTest:523 expected:<0.0> but was:<0.003097797251086307>
  MinpackTest.testMinpackRosenbrok:122->minpackTest:523 expected:<0.0> but was:<0.1732616669375091>
  MinpackTest.testMinpackWatson:266->minpackTest:523 expected:<0.0011831145921242>
but was:<0.0033222964745821893>
{noformat}


> Cost in least-squares fitting
> -----------------------------
>
>                 Key: MATH-1206
>                 URL: https://issues.apache.org/jira/browse/MATH-1206
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.3, 3.4, 3.4.1
>            Reporter: Gilles
>            Assignee: Gilles
>             Fix For: 4.0
>
>         Attachments: MATH-1206.patch
>
>
> In {{org.apache.commons.math4.fitting.leastsquares.AbstractEvaluation}}, the value returned
by the "getCost" method is not consistent with the definition of "cost" in a least-squares
problem: It is the sum of the squares of the residuals, but the method returns the square-root
of that quantity.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message