Nested Lists in Python

Nested Lists in Python

Nested Lists in Python List in Python is a powerful data structure and it allows arbitrary numbers of nested lists in Python.  However, problems you will face to access them using loops. In this post, I have explained how to access nested list of elements. Suppose you have a nested list a=[3,5,8,4,15,34,[5,8,[-4,-8],9,3], 8,9,[6,9],12,7]. To understand … Read more Nested Lists in Python

Principal Component Analysis(PCA)

Principal Component Analysis(PCA)

Principal Component Analysis(PCA) Principal Component Analysis (PCA) is an unsupervised machine learning feature reduction technique for high-dimensional and correlated data sets. Images and text documents have high dimensional data sets which requires unnecessary computation power and storage. Basic goal of PCA is to select features which have high variance. High variance of a feature indicates … Read more Principal Component Analysis(PCA)

Insertion Sort in Python

Insertion Sort in Python

Insertion Sort in Python Insertion sort examine the previously sorted sub-array and insert an element at its proper position. If you have an array a[0], a[1], a[2], a[3],……….a[n]. Then in insertion sort a[0] trivially sorted sub-array. Again compare a[0] to a[1] and if a[0]> a[1] exchange it. Now sub-array a[0],a[1] is sorted again compare a[2] … Read more Insertion Sort in Python

Inheritance in Object Oriented Programming using Python

Inheritance in Object Oriented Programming using Python

Inheritance in Object Oriented Programming Inheritance is the process of acquiring properties from a father class into a child class. Suppose there are two classes A and B, then if B acquires properties of A i.e variables and methods then B inherits A and this process is called inheritance.   Inheritance in Python Here a … Read more Inheritance in Object Oriented Programming using Python

Computer Vision in Python using OpenCV | Read an Image using OpenCV

OpenCV in Python

Computer Vision- Computer Vision refers to enable computers to understand digital images and videos. Mathematical and signal processing knowledge can help a lot to understand computer vision study field. The computer vision study field requires acquiring information from digital videos and analyzing them using using machine learning, deep learning and other techniques. Moreover, Computer Vision … Read more Computer Vision in Python using OpenCV | Read an Image using OpenCV

Selection Sort in Python

Selection Sort Selection sort uses statistical technique which finds minimum/maximum from a list and puts it at appropriate position. If you consider ascending order the smallest element will be placed at the first position, the second smallest element will be placed at the second position and the third smallest element will be placed at the … Read more Selection Sort in Python

Binary Search in Python

Binary Search in Python

Binary Search Basic idea behind binary search is to divide sorted array in two parts, and check whether the element which divides the array is desired element . And if the desired element is found then stop the search, otherwise further divide the array until the desired element is not found. Step-Wise Pictorial Demonstration of … Read more Binary Search in Python

Classes and Objects in Python

Classes and Objects in Python

Classes and Objects in Python Class In object oriented programming, a class contains procedures and data members. And treated as an abstract data type. Object An object is an instance of a class.   In this post, I will discuss about classes and objects in Python programming. Let us start with creating a simple Python’s … Read more Classes and Objects in Python

User Defined Functions in Python

User Defined Functions in Python

Function- A function is a self-contained block of statement to perform a specific task. Basically, there are two types of function Library Functions These functions are are provided by a Python’s package and a user only need to call it in your program. User Defined Functions in Python As name indicates that a user will … Read more User Defined Functions in Python