I am an educator and I love mathematics and data science!
Calculating Pearson Correlation Coefficient in Python with Numpy
This article is an introduction to the Pearson Correlation Coefficient, its manual calculation and its computation via Python's numpy module. The Pearson correlation coefficient measures the linear association between variables. Its value can be interpreted like so: +1 - Complete positive correlation +0.8 - Strong positive correlation +0.6...
Gradient Descent in Python: Implementation and Theory
This tutorial is an introduction to a simple optimization technique called gradient descent, which has seen major application in state-of-the-art machine learning models. We'll develop a general purpose routine to implement gradient descent and apply it to solve different problems, including classification via supervised learning. In this process, we'll gain...
Generating Synthetic Data with Numpy and Scikit-Learn
In this tutorial, we'll discuss the details of generating different synthetic datasets using Numpy and Scikit-learn libraries. We'll see how different samples can be generated from various distributions with known parameters. We'll also discuss generating datasets for different purposes, such as regression, classification, and clustering. At the end we'll see...
Kernel Density Estimation in Python Using Scikit-Learn
This article is an introduction to kernel density estimation using Python's machine learning library scikit-learn. Kernel density estimation (KDE) is a non-parametric method for estimating the probability density function of a given random variable. It is also referred to by its traditional name, the Parzen-Rosenblatt Window method, after its discoverers....
Java: Convert Array to Stream
In this tutorial, we'll be converting a Java Array into a Java Stream for primitive types, as well as objects. This can be done either via Arrays.stream(), as well as Stream.of(). Arrays.stream() A good way to turn an array into a stream is to use the Arrays...
Java: Convert Stream to Array
In this tutorial, we'll be converting a Java Stream into a Java Array for primitive types, as well as objects. Stream.toArray() The toArray() method is a built-in method from the Stream class which is really convenient to use when converting from a Stream to an array. It works for...