From 7d1d55b676021a3a6fe2fc1eb9654e27a42790cc Mon Sep 17 00:00:00 2001 From: Prabhu Ramachandran Date: Thu, 18 Jul 2019 10:02:49 +0530 Subject: Update slides. --- cbse/stats_plots.ipyml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cbse/stats_plots.ipyml b/cbse/stats_plots.ipyml index 90c67e9..d56ba29 100644 --- a/cbse/stats_plots.ipyml +++ b/cbse/stats_plots.ipyml @@ -417,6 +417,19 @@ cells: * Use `deg=2` for quadratic functions. * ... +- code: | + # Showing the results + res = np.polyfit(x1, y1, deg=1) + # or + # scipy.stats.linregress(x1, y1) + plot(x1, y1, 'o') + plot(x1, res[0]*x1 + res[1]); + + metadata: + slideshow: + slide_type: slide + + # The lines below here may be deleted if you do not need them. # --------------------------------------------------------------------------- -- cgit