Data Science

Label Encoding and One Hot Encoding in Machine Learning

📘 Label Encoding and One-Hot Encoding Author: Bindeshwar Singh Kushwaha 🎯 Encoding Categorical Features 🔹 Label Encoding Assigns each category an integer value Suitable for ordinal data (e.g., size: small, medium, large) Tool: LabelEncoder from sklearn.preprocessing Example (Titanic): Encoding Sex as 0 (male), 1 (female) 🔹 One-Hot Encoding Converts categories into binary columns (one per […]

Label Encoding and One Hot Encoding in Machine Learning Read More »

K-Nearest Neighbors (KNN) Classifier and Imputation using KNN

K-Nearest Neighbors (KNN) Classifier and Imputation using KNN Author: Bindeshwar Singh Kushwaha What is K-Nearest Neighbors (KNN)? KNN is a supervised machine learning algorithm. It is easy to understand and does not involve complex math. Commonly used for classification tasks, especially with labeled data. We’ll use the Iris dataset, which has flower measurements. Iris Dataset

K-Nearest Neighbors (KNN) Classifier and Imputation using KNN Read More »

Handling Missing Data and Categorical Features

Handling Missing Data and Categorical Features By: Bindeshwar Singh Kushwaha Data Preprocessing Flow Raw Data → Handle Missing Values → Encode Categorical Variables → Feature Scaling → Preprocessed Data Overview of Data Preprocessing Load Titanic dataset from CSV file Handle missing values using various techniques Encode categorical data for machine learning Save the cleaned dataset

Handling Missing Data and Categorical Features Read More »

What is Data Preprocessing

What is Data Preprocessing? Why It Matters in Machine Learning! Author: Bindeshwar Singh Kushwaha Real-World Data Challenges Missing or incomplete values Inconsistent formatting and typos Mixed data types (text, numeric, dates) Categorical variables needing encoding Scale variations and outliers What is Data Preprocessing? A set of techniques to clean and prepare raw data Essential for

What is Data Preprocessing Read More »

Binomial Distribution Mean and Variance Related Problems| Data Sc. and A.I. Lect. Series

Binomial Distribution: Mean and Variance Problem 1: Mean = 3, Variance = 4? Given: Is it possible a binomial distribution has a mean of 3 and a variance of 4? Solution: Mean: \( \mu = np \) Variance: \( \sigma^2 = npq \), where \( q = 1 – p \) Given: \( np =

Binomial Distribution Mean and Variance Related Problems| Data Sc. and A.I. Lect. Series Read More »

Fitting Binomial Distribution | Data Science and A.I. Lecture Series

Fitting Binomial Distribution Introduction Fitting a binomial distribution involves comparing observed frequencies with expected frequencies derived from the binomial probability formula. The recurrence relation simplifies the process of finding probabilities. This technique is useful for testing if a dataset follows a binomial distribution. Binomial Probability Function The binomial probability function is: $$p(x) = {n \choose

Fitting Binomial Distribution | Data Science and A.I. Lecture Series Read More »

Moments of Binomial Distribution Video I Data Science and A.I. Lect. Series

  Moments of Binomial Distribution By Bindeshwar Singh Kushwaha — PostNetwork Academy Moment Definition Let \( X \sim B(n, p) \) be a binomial random variable. The \( r^\text{th} \) raw moment about origin: \( \mu_r’ = \mathbb{E}(X^r) = \sum_{x=0}^{n} x^r \cdot \mathbb{P}(X = x) \) First-order moment (mean): \( \mu_1′ = \mathbb{E}(X) \) Binomial

Moments of Binomial Distribution Video I Data Science and A.I. Lect. Series Read More »

Tensors in Pytorch

Understanding PyTorch: Tensors, Vectors, and Matrices

Understanding PyTorch: Tensors, Vectors, and Matrices By: Bindeshwar Singh Kushwaha Institute: PostNetwork Academy What is PyTorch? PyTorch is an open-source deep learning framework. It supports dynamic computation graphs. Designed to be Pythonic and flexible. Commonly used for research and production in AI/ML. Types of Tensors A scalar is a 0-dimensional tensor. A vector is a

Understanding PyTorch: Tensors, Vectors, and Matrices Read More »

Addition, Multiplication Theorem of Expectation and Covariance

Addition, Multiplication Theorem of Expectation and Covariance Data Science and A.I. Lecture Series By Bindeshwar Singh Kushwaha PostNetwork Academy Outline Introduction Addition Theorem of Expectation Proof of Addition Theorem Multiplication Theorem of Expectation Proof of Multiplication Theorem Covariance Introduction Expectation (or expected value) is a fundamental concept in probability and statistics. It provides a measure

Addition, Multiplication Theorem of Expectation and Covariance Read More »

©Postnetwork-All rights reserved.