Reverse, flatten, convert to a dictionary, and more

Python List is one of the most important data structures. Python list can contain sub-list within itself too. That’s called a nested list.

While working with the python nested list, I came across some scenarios. I have shared those in this article. …


Copying Python List

In this article, I have covered different ways to copy lists in python.

1. Assignment Operation

We can copy the list using assignment operation =

copied_list=original_list

Both original_list and copied_list will point to the same list object.


Total number of parameters, output shape in the Convolution layer

In this article, we will go through two important concepts in the convolution layer.

  1. How to calculate the number of parameters?
  2. How the shape of output is calculated?

First, let’s understand the important terms used in the convolution layer.

Important terms

1. input_shape

input_shape = (batch_size, height, width, depth)
batch_size= number of training examples in…


Assumptions of linear regression, residuals, Q-Q plot

Residual Analysis in Linear Regression

Assumptions in Linear regression are about residuals. Let’s learn about residuals and assumptions in linear regression about residuals.

Residuals:

Residuals in Linear Regression are the difference between the actual value and the predicted value.


String Methods

In this article, let's cover the string operations that can be performed on pandas dataframe.

  1. Converting to uppercase/lowercase/titlecase — str. upper, str. lower, str. title
  2. strip,lstrip, rstrip
  3. split
  4. replace
  5. startswith,endswith, contains

1. Converting to uppercase/lowercase/title case

Example 1: Converting strings in a column in pandas dataframe to uppercase

s1=pd.read_csv("s1.csv")
s1.head()


sorted() function

There are many ways to sort a python dictionary. Let’s look at 5 different ways to sort a python dictionary in this article.

  1. Using sorted() function

2. Sorting using reverse parameter

3. Sorting using the key parameter

4.Using sorted function in a dictionary comprehension

5. Using Counter

1. Using sorted() function

sorted() function is…


Ensemble Technique- Bagging

Decision Trees

Decision trees are supervised machine learning algorithm that is used for both classification and regression tasks.

In this article, I have covered the following concepts.

  • How to build a decision tree? What criteria are used to split the decision tree?
  • How to overcome overfitting in the decision trees?
  • What is…


Statistics and Probability Concepts

In machine learning, statistics and probability play an important role. Whenever we infer population parameters from sample statistics, we associate a probability to it. While prediction, probability plays an important role. Statistics and probability go hand in hand.

While learning statistics for machine learning, I came across many important terms…

Indhumathy Chelliah

Machine Learning | Artificial Intelligence | Python |Become a Medium Member by Clicking here: https://indhumathychelliah.medium.com/membership

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store