- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Gaurav Kumar has Published 49 Articles
Gaurav Kumar
119 Views
Yes, we can also implement a K-means clustering algorithm by splitting the random data in 3 clusters. Let us understand with the example below −Example#importing the required Python libraries: import numpy as np from numpy import vstack, array from numpy.random import rand from scipy.cluster.vq import whiten, kmeans, vq from pylab ... Read More
Gaurav Kumar
294 Views
K-means clustering algorithm, also called flat clustering, is a method of computing the clusters and cluster centers (centroids) in a set of unlabeled data. It iterates until we find the optimal centroid. The clusters, we might think of a group of data points whose inter-point distances are small as compared ... Read More
Gaurav Kumar
465 Views
The scipy.cluster.hierarchy module provides functions for hierarchical clustering and its types such as agglomerative clustering. It has various routines which we can use to −Cut hierarchical clustering into the flat clustering.Implement agglomerative clustering.Compute statistics on hierarchiesVisualize flat clustering.To check isomorphism of two flat cluster assignments.Plot the clusters.The routine scipy.cluster.hierarchy.fcluster is ... Read More
Gaurav Kumar
280 Views
The linear function named scipy.linalg.solve_banded is used to solve the banded matrix equation. The form of this function is as follows −scipy.linalg.solve_banded(l_and_u, ab, b, overwrite_ab=False, overwrite_b=False, debug=None, check_finite=True)This linear function will solve the equation ax = b for x where a is a banded matrix.The banded matrix a is stored ... Read More
Gaurav Kumar
1K+ Views
scipy.cluster.hierarchy.fcluster(Z, t, criterion=’inconsistent’depth=2, R=None, monocrat=None)− The fcluster() method forms flat clusters from the hierarchical clustering. This hierarchical clustering is defined by the given linkage matrix, identifying a link between clustered classes.Below is given the detailed explanation of its parameters −ParametersZ− ndarrayIt represents the hierarchical clustering which is encoded with the ... Read More
Gaurav Kumar
142 Views
The linear function named scipy.linalg.solveh_banded is used to solve the banded matrix equation. In the below given example we will be solving the banded system Hx = b where −$$\mathrm{H} = \begin{bmatrix} 8 & 2-1j&0 &0 \ 2+1j & 5& 1j & -2-1j0\ 0 & -1j& 9& \ 0 & ... Read More
Gaurav Kumar
323 Views
The linear function named scipy.linalg.solveh_triangular is used to solve the banded matrix equation. In the below given example we will be solving the triangular system ax = b where −$$\mathrm{a} = \begin{bmatrix} 3 & 0 & 0 & 0\ 2 & 1 & 0 & 0\ 1 &0 &1 &0 ... Read More
Gaurav Kumar
193 Views
SciPy library has scipy.linalg.inv() function for finding the inverse of a square matrix. Let’s understand how we can use this function to calculate the inverse of a matrix −ExampleInverse of a 2 by 2 matrix#Importing the scipy package import scipy.linalg #Importing the numpy package import numpy as np ... Read More
Gaurav Kumar
280 Views
To successfully build a machine learning project, loading data properly is one of the most important as well as challenging tasks. CSV is the most common format for machine learning projects. It is a simple format which is used to store tabular data.Followings are the three most common approaches in ... Read More
Gaurav Kumar
660 Views
In reinforcement learning methods, a trained agent interacts with a specific environment and takes actions based upon the current state of that environment.The working of reinforcement learning is as follows −First you need to prepare an agent with some specific set of strategies.Now leave the agent to observe the current ... Read More