【发布时间】:2018-05-08 20:26:12
【问题描述】:
我正在尝试用最大值计算线性回归方程,但最大值无法求解线性系统:
Maxima 5.38.1 http://maxima.sourceforge.net
using Lisp GNU Common Lisp (GCL) GCL 2.6.12
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) e: sum((y[i] - (a*x[i]+b))^2, i, 1, n);
n
====
\ 2
(%o1) > (y - a x - b)
/ i i
====
i = 1
(%i2) dea: diff(e, a, 1);
n
====
\
(%o2) - 2 > x (y - a x - b)
/ i i i
====
i = 1
(%i3) deb: diff(e, b, 1);
n
====
\
(%o3) - 2 > (y - a x - b)
/ i i
====
i = 1
(%i4) linsolve([dea, deb], [a, b]);
(%o4) []
为什么是空的?据我所知,最大值无法解决与其他一些变量相加的变量。我该如何解决?我必须使用其他函数还是必须重新排序我的方程式?
【问题讨论】:
标签: maxima