Posts

Showing posts with the label Tutorial

File Handling with Python || Python programming tutorial

Image
In File Handling,  we will be working on a file in our computer and doing various operations on it. Check out my previous blog on Python programming if you want to learn from scratch. Let us say we have a file name poem.txt and we need to perform various operations on that file. Reading the whole file and printing it First, we need to open that text file in our python program using a function  open(). The  open()  function will take two arguments filename and set our intentions. Now, you must be wondering about the second argument i.e. we need to specify our purpose of using that file  Read, Write  and  Append Above all operations can be specified by with different alphabets: Read - 'r' Write - 'w' Append - 'a' Now we will implement programs with this knowledge Program -  f = open("poem.txt", "r") f.read() Counting Number of Lines in our file We will divide this process into various steps : To read a single line of a file we can use readlin...

Implementing Hierarchical Clustering - In Python Programming language

Image
Introduction to Hierarchical Clustering Unsupervised learning  is a type of Machine learning in which we use unlabeled data and we try to find a pattern among the data. Clustering algorithms  falls under the category of unsupervised learning. In these algorithms, we try to make different clusters among the data. Hierarchical Clustering  algorithms build a hierarchy of clusters where each node is a cluster consisting of the clusters of its children node. fig. 1 Check out my blog on Hierarchical Clustering - An Unsupervised learning Algorithm  to learn more about it. Implementing it with Python and SciKit-Learn We will use the python programming language for its implementation. In python language, we will be using SciKit-Learn library. So let's start with implementation - We will be using our own dataset which will be generated by us.     1.  Importing necessary Libraries - To create a machine learning model we will use SciKit-Learn (sklearn) librar...

Hierarchical Clustering - An Unsupervised Learning Algorithm

Image
Introduction Unsupervised learning  is a type of Machine learning in which we use unlabeled data and we try to find a pattern among the data. Clustering algorithms falls under the category of unsupervised learning. In these algorithms, we try to make different clusters among the data. Hierarchical Clustering algorithms build a hierarchy of clusters where each node is a cluster consisting of the clusters of its children node. To check it's implementation in Python  CLICK HERE There are various strategies in Hierarchical Clustering such as : Divisive Agglomerative This type of diagram is called  Dendrogram. Divisive - It is a Top-down approach. So we start with all observations in a large cluster and break it down into smaller ones. Agglomerative - It is the opposite of Divisive as it is a Bottom-Up approach. Here, each observation starts in its cluster and pairs of the cluster are merged as they move up the hierarchy.  (Generally, Agglomerative is used more as compa...

What is Python ?? || Introduction to Python programming

Image
Source What is Programming?👀💻   In simple language, we can say programming is a technique through which we instruct the computer to perform various tasks .     To instruct computer we need to communicate with a computer and for communication, we need a language as a medium. So programming language serves as a medium of communication between the user and a computer. But, as we know computer only understand binary language and it is practically not possible for us to use binary language with only 0s and 1s.    To solve this problem we need some translator called the compiler. The compiler will compile the code and generate a binary file of it which will be understood by the computer. So this is a complete process of how a computer can be programmed to perform a certain task. Besides compiler there is also an Interpreter. What is Python?🐍   Python is a high level programming language . Designed by Guido Van Rossum. Now a days python is majorly used for Dat...

Popular posts from this blog

Pose Estimation || Application of Computer Vision and Deep Learning

Implementing Hierarchical Clustering - In Python Programming language

Hierarchical Clustering - An Unsupervised Learning Algorithm