Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Installation of Packages

First install packages like numpy, scikit-learn, matplotlib

Complex Numbers

A complex number zz is represented by z=x+j∗yz = x + j* y, where xx and yy are real numbers.

Absolute value

Absolute value of a complex number z=x+j∗yz = x + j* y is obtained by the formula (x2+y2)\sqrt {(x^2 + y^2)}

Another way is to use the function abs()abs().

Evenly spaced numbers

Mean

Arithmetic mean

If a1,a2,…,ana_1, a_2, \ldots, a_n are numbers, then the arithmetic mean is obtained by:

A=1n∑i=1nai=a1+a2+⋯+annA=\frac{1}{n}\sum_{i=1}^n a_i=\frac{a_1+a_2+\cdots+a_n}{n}

Geometric Mean

If a1,a2,…,ana_1, a_2, \ldots, a_n are numbers, then the geometric mean is obtained by:

(∏i=1nai)1n=a1a2⋯ann\left(\prod_{i=1}^n a_i\right)^\frac{1}{n} = \sqrt[n]{a_1 a_2 \cdots a_n}

If a1,a2,…,ana_1, a_2, \ldots, a_n are numbers, then the harmonic mean is obtained by:

H=n1a1+1a2+⋯+1an=n∑i=1n1ai=(∑i=1nai−1n)−1.H = \frac{n}{\frac1{a_1} + \frac1{a_2} + \cdots + \frac1{a_n}} = \frac{n}{\sum\limits_{i=1}^n \frac1{a_i}} = \left(\frac{\sum\limits_{i=1}^n a_i^{-1}}{n}\right)^{-1}.

Harmonic Mean

Classification

Understanding IRIS dataset

Importation of packages

We import the necessary packages

Load Dataset

We load the necessary IRIS dataset.

Description of the Dataset

Input features

Target feature

Verify number of records

Visulizing the dataset

Training

Standardization of features

Classification report

Confusion matrix