Finding the Longest Palindromic Subsequence

Introduction: Dynamic Programming (DP) is a powerful algorithmic technique used to solve a variety of optimization problems. One classic problem where DP shines is in finding the longest palindromic subsequence in a given string. In this tutorial, we’ll delve into the intricacies of this problem and learn how to tackle it using DP. Problem Statement: … Read more

Titanic – Advanced Feature Engineering Tutorial

Introduction I decided to write this kernel because Titanic: Machine Learning from Disaster is one of my favorite competitions on Kaggle. This is a beginner level kernel which focuses on Exploratory Data Analysis and Feature Engineering. A lot of people start Kaggle with this competition and they get lost in extremely long tutorial kernels. This is a short kernel compared … Read more

Feature Engineering in Machine Learning

feature engineering Cover Pic

Introduction Feature engineering, often hailed as the cornerstone of machine learning, holds the power to transform raw data into actionable insights. In the realm of predictive modeling, where the quality of features can significantly influence model performance, mastering the art of feature engineering is indispensable. In this comprehensive guide, we’ll embark on a Titanic journey … Read more

Regression and Classification Multi Layer Perceptrons

Introduction In the dynamic landscape of machine learning, Multilayer Perceptrons (MLPs) emerge as formidable tools capable of handling both regression and classification tasks with finesse. Whether you’re predicting housing prices or sorting emails, understanding how to tailor MLP architectures and activations is pivotal for optimizing performance. Regression MLPs Crafting an MLP architecture for regression tasks … Read more

Find Kth Number Program in Python

Python Feature Image

Introduction: The task at hand is to implement a Python function that finds the kth lexicographically smallest integer in the range from 1 to n. To achieve this, we will use a depth-first search (DFS) approach, exploring the numbers in lexicographical order. Let’s dive into the implementation. Also checkout: Implementation: Explanation: Example: For n = … Read more

SQL ADVANCE | The TOP Clause

SQL Webp

SELECT TOP number|percent column_name(s) FROM table_name SQL SELECT TOP Equivalent in MySQL and Oracle: MySQL Syntax: SELECT column_name(s) FROM table_name LIMIT number Example: SELECT * FROM Persons LIMIT 5 Oracle Syntax SELECT column_name(s) FROM table_name WHERE ROWNUM <= number Example SELECT * FROM Persons WHERE ROWNUM <=5 SQL TOP Example The “Persons” table: Now we … Read more

SQL | The DELETE Statement

SQL Webp

DELETE FROM table_name WHERE some_column=some_value Note: Notice the WHERE clause in the DELETE syntax. The WHERE clause specifies which record or records that should be deleted. If you omit the WHERE clause, all records will be deleted! SQL DELETE Example The “Persons” table: Now we want to delete the person “Tjessem, Jakob” in the “Persons” … Read more

SQL The ORDER BY Keyword

SELECT column_name(s) FROM table_name ORDER BY column_name(s) ASC|DESC ORDER BY Example The “Persons” table: Now we want to select all the persons from the table above, however, we want to sort the persons by their last name.We use the following SELECT statement: The result-set will look like this: ORDER BY DESC Example Now we want … Read more

SQL WHERE Clause

SQL Webp

The “Persons” table: Now we want to select only the persons living in the city “Sandnes” from the table above. We use the following SELECT statement using Where clause: The result-set will look like this: Quotes Around Text Fields in SQL WHERE CLAUSE SQL uses single quotes around text values (most database systems will also … Read more

SQL Introduction

SQL Webp

SQL is a standard language for accessing databases. How to use SQL to access and manipulate data in: MySQL, SQL Server, Access, Oracle, Sybase, DB2, and other database systems. SQL Syntax: SELECT Company, Country FROM Customers WHERE Country <> ‘USA’ SQL Result: SQL is a “standard language for accessing and manipulating databases”. What Can SQL … Read more

Gaussian Mixtures Models in Machine Learning

A Gaussian mixture model (GMM) is a probabilistic model that assumes that the instances were generated from a mixture of several Gaussian distributions whose parameters are unknown. All the instances generated from a single Gaussian distribution form a cluster that typically looks like an ellipsoid. Each cluster can have a different ellipsoidal shape, size, density … Read more

Pyspark Questions and Answers

Q1: Write pyspark code to create dataframe and print with ‘color’ and ‘weight’ as separate columns. inventoryData = [ (‘Laptop’, 20, {‘color’: ‘silver’, ‘weight’: 2.5}), (‘Phone’, 50, {‘color’: ‘black’, ‘weight’: 0.5}), (‘Tablet’, 30, {‘color’: ‘white’, ‘weight’: 0.8}), (‘Chair’, 10, {‘color’: ‘brown’, ‘weight’: 3.0}), (‘Printer’, 15, {‘color’: ‘gray’, ‘weight’: 7.5}), ] schema =[“Product”, “Quantity”, “Properties”] Product … Read more

Kernel PCA in Machine Learning

The post discusses Kernel Principal Component Analysis (kPCA), highlighting its application in nonlinear dimensionality reduction and suggesting methods for selecting kernels and tuning hyperparameters through grid search and reconstruction pre-image error minimization.

Hierarchical Clustering in Machine Learning

Hierarchical-Clustering-Analysis.

The content discusses K-Means and Hierarchical Clustering algorithms. K-Means requires predefined clusters and is sensitive to initial centroids and outliers. Hierarchical Clustering offers an agglomerative and divisive approach without preset clusters. The document also explores various linkage methods, dendrograms for visualization, and the validity of clusters over time.