Fixing missing bias term from model visualisation.

This commit is contained in:
Matt Graham 2016-11-05 22:21:44 +00:00
parent 905545fd23
commit 60edabd261

View File

@ -257,6 +257,7 @@
"ax = fig.add_subplot(1, 1, 1)\n", "ax = fig.add_subplot(1, 1, 1)\n",
"for weight, centre in zip(weights, centres):\n", "for weight, centre in zip(weights, centres):\n",
" ys += weight * basis_function(xs, centre, scale)\n", " ys += weight * basis_function(xs, centre, scale)\n",
"ys += bias\n",
"ax.plot(xs, ys)\n", "ax.plot(xs, ys)\n",
"ax.set_xlabel('Input', fontsize=14)\n", "ax.set_xlabel('Input', fontsize=14)\n",
"ax.set_ylabel('Output', fontsize=14)" "ax.set_ylabel('Output', fontsize=14)"