Wednesday , January 19 2022
Home / Machine Learning

Machine Learning

Hierarchical Clustering

2 – Hierarchical Clustering Hierarchical Clustering Analysis¶Clustering is the most common form of unsupervised learning, a type of machine learning algorithm used to draw inferences from unlabeled data. Hierarchical clustering, also known as hierarchical cluster analysis, is an algorithm that groups similar objects into groups called clusters. The endpoint is …

Read More »

K-Means Clustering

1 K-Means Clustering Introduction to K-means Clustering¶K-means clustering is a type of unsupervised learning, which is used when you have unlabeled data (i.e., data without defined categories or groups). The goal of this algorithm is to find groups in the data, with the number of groups represented by the variable …

Read More »

Real Stock Data Plotting using Matplotlib

9. Real Stock Data Quandl API to Plot Real Time Stock Data¶ https://www.quandl.com/ The premier source for financial, economic and alternative datasets, serving investment professionals. In [ ]: pip install quandl In [2]: import quandl data = quandl.get("BSE/BOM539678", authtoken="x8VdDXzBty3iGsaRLTVs") data Out[2]: Open High Low Close WAP No. of Shares No. of Trades Total …

Read More »

Sub Plot using Matplotlib

8 Subplot Plot a Sub Plot in Matplotlib¶With the subplots() function you can draw multiple plots in one figure: The subplots() function takes three arguments that describes the layout of the figure. The layout is organized in rows and columns, which are represented by the first and second argument. The …

Read More »

Histogram using Matplotlib

7 Histogram Plot a Histogram Plot using Matplotlib¶A histogram is a graphical representation of a set of data points arranged in a user-defined range. Similar to a bar chart, a bar chart compresses a series of data into easy-to-interpret visual objects by grouping multiple data points into logical areas or …

Read More »

Stack Plot using Matplotlib

6 Stack Plot Plot a Stack Plot using Matplotlib¶Stack Plots are used to visualize multiple linear plots, stacked on top of each other. With a regular line plot, you’d plot the relationship between X and Y. Here, we’re plotting multiple Y features on a shared X-axis, one on top of …

Read More »

Scatter Plot using Matplotlib

5. Scatter Plot Plot Scatter Plot Using Matplotlib¶With Pyplot, you can use the scatter() function to draw a scatter plot. The scatter() function plots one dot for each observation. It needs two arrays of the same length, one for the values of the x-axis, and one for values on the …

Read More »

Pie Plot using Matplotlib

4. Pie Plot Plot a Pie Chart using Matplotlib¶Pie charts represent data broken down into categories/labels. They’re an intuitive and simple way to visualize proportional data – such as percentages. To plot a pie chart in Matplotlib, we can call the pie() function of the PyPlot or Axes instance. The …

Read More »

Line Plot using Matplotlib

2. Line Plot Plot a Line Plot Using Matplotlib¶To plot a line plot in Matplotlib, you use the generic plot() function from the PyPlot instance. There’s no specific lineplot() function – the generic one automatically plots using lines or markers. In [2]: import matplotlib.pyplot as plt X = [2,4,6,8,10] Y = …

Read More »

Bar Plot using Matplotlib

3 Bar Plot Plot a Bar Plot Using Matplotlib¶Plotting a Bar Plot in Matplotlib is as easy as calling the bar() function on the PyPlot instance, and passing in the categorical and numerical variables that we’d like to visualize. In [2]: import matplotlib.pyplot as plt x = ['A', 'B', 'C'] y …

Read More »