SQL | The INSERT INTO AND UPDATE Statement

The second form specifies both the column names and the values to be inserted: SQL INSERT INTO Example We have the following “Persons” table: Now we want to insert a new row in the “Persons” table.We use the following SQL statement: The “Persons” table will now look like this: Insert Data Only in Specified Columns … Read more

Tokenization in NLP

Word Level Tokenzation Splitting text into individual words “the quick brown fox” -> [“the”,”quick”,”brown”,”fox”] BUT Character Level Tokenization Splitting text into individual characters “the quick brown fox” -> [“t”,”h”,”e”,” “,”q”,”u”,”i”,”c”,”k”, …] But N-GRAM MODELS Splitting text into groups of consecutive words. N is the no. of words in a token. For a trigram model, “the … Read more

What is Exploratory Data Analysis (EDA)?

Exploratory Data Analysis

Exploratory Data Analysis (EDA) is an essential step in any data science project. It involves investigating and analyzing datasets to understand their characteristics, identify patterns, detect outliers, and uncover relationships between variables. EDA helps in gaining initial insights into the data before diving into more complex analyses. The Foremost Goals of EDA Types of EDA … Read more

Anomaly Detection using Gaussian Mixtures

Introduction Anomaly detection (also called outlier detection) is the task of detecting instances that deviate strongly from the norm. These instances are of course called anomalies or outliers, while the normal instances are called inliers. Anomaly detection is very useful in a wide variety of applications, for example in fraud detection, or for detecting defective … Read more

A Journey From Biological to Artificial Neurons

Surprisingly, ANNs have been around for quite a while: they were first introduced back in 1943 by the neurophysiologist Warren McCulloch and the mathematician Walter Pitts. In their landmark paper, “A Logical Calculus of Ideas Immanent in Nervous Activity,”. McCulloch and Pitts presented a simplified computational model of how biological neurons might work together in … Read more

Bayesian Gaussian Mixture Models

Rather than manually searching for the optimal number of clusters, it is possible to use instead the BayesianGaussianMixture class which is capable of giving weights equal (or close) to zero to unnecessary clusters. Just set the number of clusters n_components to a value that you have good reason to believe is greater than the optimal … Read more

SQL | Alias Operator

SQL Webp

SQL Alias Syntax for Columns: Also read Alias Example Assume we have a table called “Persons” and another table called “Product_Orders”. We will give the table aliases of “p” and “po” respectively. Now we want to list all the orders that “Ola Hansen” is responsible for. We use the following SELECT statement: The same SELECT … Read more

SQL | The LIKE Operator

SQL Webp

SELECT column_name(s) FROM table_name WHERE column_name LIKE pattern LIKE Operator Example The “Persons” table: Now we want to select the persons living in a city that starts with “s” from the table above. We use the following SELECT statement: SELECT * FROM Persons WHERE City LIKE ‘s%’ The “%” sign can be used to define … Read more

Understanding DBSCAN Clustering Algorithm: Implementation in Python

Before we move on to Gaussian mixture models, let’s take a look at DBSCAN, another popular clustering algorithm that illustrates a very different approach based on local density estimation. This approach allows the algorithm to identify clusters of arbitrary shapes. Understanding DBSCAN Clustering Algorithm DBSCAN (Density-Based Spatial Clustering of Applications with Noise) is a popular … Read more

Using Clustering for Semi-Supervised Learning

Another use case for clustering is in semi-supervised learning, when we have plenty of unlabeled instances and very few labeled instances. Let’s train a logistic regression model on a sample of 50 labeled instances from the digits dataset: n_labeled = 50 log_reg = LogisticRegression() log_reg.fit(X_train[:n_labeled], y_train[:n_labeled]) What is the performance of this model on the … Read more

Using clustering for image segmentation

Image segmentation is the task of partitioning an image into multiple segments. In semantic segmentation, all pixels that are part of the same object type get assigned to the same segment. For example, in a self-driving car’s vision system, all pixels that are part of a pedestrian’s image might be assigned to the “pedestrian” segment … Read more

Accelerated K-Means and Mini-batch K-Means

Introduction Another important improvement to the K-Means algorithm was proposed in a 2003 paper by Charles Elkan. It considerably accelerates the algorithm by avoiding many unnecessary distance calculations: this is achieved by exploiting the triangle inequality (i.e., the straight line is always the shortest) and by keeping track of lower and upper bounds for distances … Read more

Implementation of K-Means Clustering in Machine Learning

Consider the unlabeled dataset represented in Figure below: you can clearly see 5 blobs of instances. The K-Means algorithm is a simple algorithm capable of clustering this kind of dataset very quickly and efficiently, often in just a few iterations. It was proposed by Stuart Lloyd at the Bell Labs in 1957 as a technique … Read more

What is Stacking of Models in Machine Learning?

The last Ensemble method we will discuss in this series is called stacking (short for stacked generalization). It is based on a simple idea: instead of using trivial functions (such as hard voting) to aggregate the predictions of all predictors in an ensemble, why don’t we train a model to perform this aggregation? Figure below … Read more

Locally linear Embedding For Dimensionality Reduction in Machine Learning

Locally Linear Embedding (LLE) is another very powerful nonlinear dimensionality reduction (NLDR) technique. It is a Manifold Learning technique that does not rely on projections like the previous algorithms. In a nutshell, LLE works by first measuring how each training instance linearly relates to its closest neighbors (c.n.), and then looking for a low-dimensional representation … Read more

Web Development Project Guide for Freshers

Web Development Project Guide for Freshers Starting your journey as a web developer can be both exciting and challenging. To make the process smoother, here’s a detailed guide to beginner-friendly projects that will help you gain hands-on experience with full-stack development. Each project leverages modern technologies and includes step-by-step instructions to guide you through the … Read more