santara / ml-mooc-nptel Goto Github PK
View Code? Open in Web Editor NEWThis repository contains the Tutorials for the NPTEL MOOC on Machine Learning.
License: GNU General Public License v3.0
This repository contains the Tutorials for the NPTEL MOOC on Machine Learning.
License: GNU General Public License v3.0
lecture 1\ML-Anirban_Tutorial1.ipynb file is unable to open in JupyterNotebook.
Could you please fix that?
Thanks in advance
for the following line the below mentioned error occurs
plt.scatter(X_class0[:,0], X_class0[:,1],color='red')
ValueError Traceback (most recent call last)
in ()
27 Y_class1 = np.ones((X_class1.shape[0]),dtype=np.int)
28
---> 29 plt.scatter(X_class0[:,0], X_class0[:,1],color='red')
30 plt.scatter(X_class1[:,0], X_class1[:,1],color='blue')
31 plt.xlabel('sepal length')
~/anaconda3/envs/mlai/lib/python3.6/site-packages/matplotlib/pyplot.py in scatter(x, y, s, c, marker, cmap, norm, vmin, vmax, alpha, linewidths, verts, edgecolors, hold, data, **kwargs)
3468 vmin=vmin, vmax=vmax, alpha=alpha,
3469 linewidths=linewidths, verts=verts,
-> 3470 edgecolors=edgecolors, data=data, **kwargs)
3471 finally:
3472 ax._hold = washold
~/anaconda3/envs/mlai/lib/python3.6/site-packages/matplotlib/init.py in inner(ax, *args, **kwargs)
1853 "the Matplotlib list!)" % (label_namer, func.name),
1854 RuntimeWarning, stacklevel=2)
-> 1855 return func(ax, *args, **kwargs)
1856
1857 inner.doc = _add_data_doc(inner.doc,
~/anaconda3/envs/mlai/lib/python3.6/site-packages/matplotlib/axes/_axes.py in scatter(self, x, y, s, c, marker, cmap, norm, vmin, vmax, alpha, linewidths, verts, edgecolors, **kwargs)
4285 x, y, s, c, colors, edgecolors, linewidths =
4286 cbook.delete_masked_points(
-> 4287 x, y, s, c, colors, edgecolors, linewidths)
4288
4289 scales = s # Renamed for readability below.
~/anaconda3/envs/mlai/lib/python3.6/site-packages/matplotlib/cbook/init.py in delete_masked_points(*args)
1655 if isinstance(x, np.ma.MaskedArray):
1656 if x.ndim > 1:
-> 1657 raise ValueError("Masked arrays must be 1-D")
1658 else:
1659 x = np.asarray(x)
ValueError: Masked arrays must be 1-D
plt.scatter(X_class1[:,0], X_class1[:,1],color='blue')
should be
plt.scatter([X_class1[:,0]], [X_class1[:,1]],color='blue')
ans same for other red color
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.