Polynomial regression: Difference between revisions
Content added Content deleted
(→{{header|Raku}}: rationale) |
(→{{header|Raku}}: use the same formula as in the explanation) |
||
Line 2,138: | Line 2,138: | ||
constant $y = [+] @y Z* @e; |
constant $y = [+] @y Z* @e; |
||
my $J = $x1 ∧ $x2; |
|||
my $I = $x0 ∧ $J; |
|||
my $I2 = ($I*$I).Real; |
|||
.say for |
.say for |
||
$y∧$x1∧$x2/($x0∧$x1∧$x2), |
|||
$y∧$x2∧$x0/($x1∧$x2∧$x0), |
|||
$y∧$x0∧$x1/($x2∧$x0∧$x1); |
|||
(($y ∧ ($x0 ∧ $x1))*$I)/$I2;</syntaxhighlight> |
|||
</syntaxhighlight> |
|||
{{out}} |
{{out}} |
||
<pre>1 |
<pre>1 |