Changes

Jump to navigation Jump to search
Line 72: Line 72:     
== Least squares fit ==
 
== Least squares fit ==
The table below present four fit results. This compares the Ciqual ingredients against the OFF median ingredients. And for the product itself and the calculated expected product.  
+
=== Adrian Stoll site ===
 +
The table below present four fit results using [https://adrianstoll.com/post/least-squares-calculator/ this]. This compares the Ciqual ingredients against the OFF median ingredients. And for the product itself and the calculated expected product.  
    
The calculated results are pretty good.
 
The calculated results are pretty good.
Line 90: Line 91:  
|-
 
|-
 
| Calculated+Median || 0.27 || 0.23 || 0.25 || 0.25
 
| Calculated+Median || 0.27 || 0.23 || 0.25 || 0.25
 +
|}
 +
 +
=== R studio ===
 +
The table below present four fit results using [https://adrianstoll.com/post/least-squares-calculator/ this]. This compares the Ciqual ingredients against the OFF median ingredients. And for the product itself and the calculated expected product.
 +
 +
 +
{| class="wikitable"
 +
|+ Fitting results
 +
|-
 +
! model !! Walnuts !! Hazelnuts !! Cashews !! Almonds
 +
|-
 +
| lm || 0.88 || -0.85 || -0.25 || 1.02
 +
|-
 +
| lm forced intercept || 0.89 || -0.69 || -0.19 || 1.02
 +
|-
 +
| nnls || 0.305 || 0.00 || 0.00 || 0.715
 +
|-
 +
| glmnet || 0.240 || 0.072 || 0.000 || 0.709
 
|}
 
|}
5,553

edits

Navigation menu