Logical Computations with Neurons | Deep learning

Warren McCulloch and Walter Pitts proposed a very simple model of the biological neuron, which later became known as an artificial neuron: it has one or more binary (on/off) inputs and one binary output. The artificial neuron simply activates its output when more than a certain number of its inputs are active. McCulloch and Pitts … Read more

SQL Advanced | Wildcards

SQL Webp

SQL Wildcard Examples We have the following “Persons” table: Using the % Wildcard Now we want to select the persons living in a city that starts with “sa” from the “Persons” table. We use the following SELECT statement: The result-set will look like this: Next, we want to select the persons living in a city … Read more

Beautiful Days at the Movies | Hackerrank Solutions

Lily likes to play games with integers. She has created a new game where she determines the difference between a number and its reverse. For instance, given the number 12, its reverse is 21. Their difference is 9 . The number 120 reversed is 21, and their difference is 89. She decides to apply her game to decision making. She will … Read more

What is Stochastic Gradient Descent?

Stochastic Gradient Descent (SGD) is an optimization algorithm commonly used in machine learning for training models, particularly in large-scale and online learning settings. It is an iterative optimization algorithm that aims to minimize a cost or loss function by adjusting the model parameters. Here’s an overview of how SGD works: Basic Concept: Advantages and Considerations: … Read more

How to Extract Code from a Screenshot with 100% Accuracy?

Did you like an image containing code & take its screenshot? Now you want to copy the code from that screenshot, right? Panic not, because I’ve got you covered. In this handy guide, I’ll provide you with some simple steps so that you can extract code from a screenshot efficiently. This guide is your go-to … Read more

Quintile Analysis: Bringing it all togetherand making decisions

Introduction Quintile analysis is a statistical method used to divide a data set into five equal parts, each representing 20% of the total observations. This method is often used in finance, economics, and sociology to analyze distributions, rankings, or performance. Quintile Analysis: with random data Quintile analysis is a common framework for evaluating the efficacy … Read more

SQL | The BETWEEN Operator

SQL Webp

BETWEEN Operator Example The “Persons” table: Now we want to select the persons with a last name alphabetically between “Hansen” and “Pettersen” from the table above. We use the following SELECT statement: The result-set will look like this: P_Id LastName FirstName Address City1 Hansen Ola Timoteivn 10 Sandnes The BETWEEN operator is treated differently in … Read more

SQL | The IN Operator

SQL Webp

The IN operator allows you to specify multiple values in a WHERE clause. SQL IN Syntax: IN Operator Example The “Persons” table: Now we want to select the persons with a last name equal to “Hansen” or “Pettersen” from the table above. We use the following SELECT statement: The result-set will look like this:

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