<jupyter_start><jupyter_text>Main Machine Learning LibrariesNotebook inspired from : https://www.geeksforgeeks.org/best-python-libraries-for-machine-learning/   NumpyLarge mult-dimensional array and matrix processing. Used internally by TensorFlow and other high level libraries.<jupyter_code># Python program using NumPy
# for some basic mathematical
# operations
 
import numpy as np
 
# Creating two arrays of rank 2
x = np.array([[1, 2], [3, 4]])
y = np.array([[5, 6], [7, 8]])
 
# Creating two arrays of rank 1
v = np.array([9, 10])
w = np.array([11, 12])
 
# Inner product of vectors
print(np.dot(v, w), "\n")
 
# Matrix and Vector product
print(np.dot(x, v), "\n")
 
# Matrix and matrix product
print(np.dot(x, y))<jupyter_output><empty_output><jupyter_text>ScipyContains different modules for optimization, linear algebra, integration and statistics.<jupyter_code># As an example, create a Voronoi diagram from twenty random points:
# Source: https://phoenixnap.com/kb/scipy-tutorial
from scipy.spatial import Voronoi
import numpy as np
points = np.random.rand(20,2)
voronoi = Voronoi(points)
from scipy.spatial import voronoi_plot_2d
fig = voronoi_plot_2d(voronoi,show_vertices=False)<jupyter_output><empty_output><jupyter_text>Scikit-LearnSkikit-learn is one of the most popular ML libraries for classical ML algorithms. It is built on top of two basic Python libraries, viz., NumPy and SciPy. Scikit-learn supports most of the supervised and unsupervised learning algorithms. Scikit-learn can also be used for data-mining and data-analysis, which makes it a great tool who is starting out with ML.<jupyter_code># Python script using Scikit-learn
# for Decision Tree Classifier

# Sample Decision Tree Classifier
from sklearn import datasets
from sklearn import metrics
from sklearn.tree import DecisionTreeClassifier

# load the iris datasets
dataset = datasets.load_iris()

# fit a CART model to the data
model = DecisionTreeClassifier()
model.fit(dataset.data, dataset.target)
print(model)

# make predictions
expected = dataset.target
predicted = model.predict(dataset.data)

# summarize the fit of the model
print(metrics.classification_report(expected, predicted))
print(metrics.confusion_matrix(expected, predicted))<jupyter_output><empty_output>
StarcoderdataJupyterStructuredCleanDedup