Statistical Learning
How to Determine the Right Number of Clusters (with Code)
Clustering is a fundamental skill in your Data Science toolkit. It can solve a huge array of problems -- from user segmentation to anomaly detection -- and can help your team derive very interesting insights. Determining the right number of clusters for your project is a little more art than science. In this article, I will go over a few common ways to determine the right number of clusters. The objective of this metric is to find the "Elbow" of the WSS curve in order to determine the smallest number of clusters that captures the most amount of signal in your data.
Mathematics behind Gradient Descent..Simply Explained
So far we have discussed linear regression and gradient descent in previous articles. We got a simple overview of the concepts and a practical tutorial to understand how they work. In this article, we will see the mathematics behind gradient descent and how can an "optimizer" get the global minima point. If the term "optimizer" is new for you, it is simply the function that works to determine the global minima point which refers to the coefficients of best-fit line in linear regression algorithm. By the way, similar concepts are used in deep learning algorithms.
CS 229 - Unsupervised Learning Cheatsheet
Motivation The goal of unsupervised learning is to find hidden patterns in unlabeled data $\{x {(1)},...,x {(m)}\}$. Jensen's inequality Let $f$ be a convex function and $X$ a random variable. Latent variables Latent variables are hidden/unobserved variables that make estimation problems difficult, and are often denoted $z$. We note $c {(i)}$ the cluster of data point $i$ and $\mu_j$ the center of cluster $j$. Algorithm After randomly initializing the cluster centroids $\mu_1,\mu_2,...,\mu_k\in\mathbb{R} n$, the $k$-means algorithm repeats the following step until convergence: Algorithm It is a clustering algorithm with an agglomerative hierarchical approach that build nested clusters in a successive manner. In an unsupervised learning setting, it is often hard to assess the performance of a model since we don't have the ground truth labels as was the case in the supervised learning setting.
CS 229 - Supervised Learning Cheatsheet
Given a set of data points $\{x {(1)}, ..., x {(m)}\}$ associated to a set of outcomes $\{y {(1)}, ..., y {(m)}\}$, we want to build a classifier that learns how to predict $y$ from $x$. Hypothesis The hypothesis is noted $h_\theta$ and is the model that we choose. For a given input data $x {(i)}$ the model prediction output is $h_\theta(x {(i)})$. Loss function A loss function is a function $L:(z,y)\in\mathbb{R}\times Y\longmapsto L(z,y)\in\mathbb{R}$ that takes as inputs the predicted value $z$ corresponding to the real data value $y$ and outputs how different they are. Remark: Stochastic gradient descent (SGD) is updating the parameter based on each training example, and batch gradient descent is on a batch of training examples.
Gaussian Process Regression From First Principles
In this article, we'll discuss Gaussian Process Regression (GPR) from first principles, using mathematical concepts from machine learning, optimization, and Bayesian inference. We'll start with Gaussian Processes, use this to formalize how predictions are made with GPR models, and then discuss two crucial ingredients for GPR models: covariance functions and hyperparameter optimization. Finally, we'll build on our mathematical derivations below by discussing some intuitive ways to view GPR. If you'd also like to see these ideas presented as an academic-style paper, please check out this link here. Before we talk about GPR, let's first explore what a Gaussian Process is.
Visualizing Data Velocity using DSNE
We present a new technique called "DSNE" which learns the velocity embeddings of low dimensional map points when given the high-dimensional data points with its velocities. The technique is a variation of Stochastic Neighbor Embedding, which uses the Euclidean distance on the unit sphere between the unit-length velocity of the point and the unit-length direction from the point to its near neighbors to define similarities, and try to match the two kinds of similarities in the high dimension space and low dimension space to find the velocity embeddings on the low dimension space. DSNE can help to visualize how the data points move in the high dimension space by presenting the movements in two or three dimensions space. It is helpful for understanding the mechanism of cell differentiation and embryo development.
Feature selection for medical diagnosis: Evaluation for using a hybrid Stacked-Genetic approach in the diagnosis of heart disease
Abdollahi, Jafar, Nouri-Moghaddam, Babak
Background and purpose: Heart disease has been one of the most important causes of death in the last 10 years, so the use of classification methods to diagnose and predict heart disease is very important. If this disease is predicted before menstruation, it is possible to prevent high mortality of the disease and provide more accurate and efficient treatment methods. Materials and Methods: Due to the selection of input features, the use of basic algorithms can be very time-consuming. Reducing dimensions or choosing a good subset of features, without risking accuracy, has great importance for basic algorithms for successful use in the region. In this paper, we propose an ensemble-genetic learning method using wrapper feature reduction to select features in disease classification. Findings: The development of a medical diagnosis system based on ensemble learning to predict heart disease provides a more accurate diagnosis than the traditional method and reduces the cost of treatment. Conclusion: The results showed that Thallium Scan and vascular occlusion were the most important features in the diagnosis of heart disease and can distinguish between sick and healthy people with 97.57% accuracy.
Modeling Weather-induced Home Insurance Risks with Support Vector Machine Regression
Dey, Asim K., Lyubchich, Vyacheslav, Gel, Yulia R.
Insurance industry is one of the most vulnerable sectors to climate change. Assessment of future number of claims and incurred losses is critical for disaster preparedness and risk management. In this project, we study the effect of precipitation on a joint dynamics of weather-induced home insurance claims and losses. We discuss utility and limitations of such machine learning procedures as Support Vector Machines and Artificial Neural Networks, in forecasting future claim dynamics and evaluating associated uncertainties. We illustrate our approach by application to attribution analysis and forecasting of weather-induced home insurance claims in a middle-sized city in the Canadian Prairies.
Estimating the Long-Term Effects of Novel Treatments
Battocchi, Keith, Dillon, Eleanor, Hei, Maggie, Lewis, Greg, Oprescu, Miruna, Syrgkanis, Vasilis
Policy makers typically face the problem of wanting to estimate the long-term effects of novel treatments, while only having historical data of older treatment options. We assume access to a long-term dataset where only past treatments were administered and a short-term dataset where novel treatments have been administered. We propose a surrogate based approach where we assume that the long-term effect is channeled through a multitude of available short-term proxies. Our work combines three major recent techniques in the causal machine learning literature: surrogate indices, dynamic treatment effect estimation and double machine learning, in a unified pipeline. We show that our method is consistent and provides root-n asymptotically normal estimates under a Markovian assumption on the data and the observational policy. We use a data-set from a major corporation that includes customer investments over a three year period to create a semi-synthetic data distribution where the major qualitative properties of the real dataset are preserved. We evaluate the performance of our method and discuss practical challenges of deploying our formal methodology and how to address them.
Asymptotic Risk of Overparameterized Likelihood Models: Double Descent Theory for Deep Neural Networks
Nakada, Ryumei, Imaizumi, Masaaki
We investigate the asymptotic risk of a general class of overparameterized likelihood models, including deep models. The recent empirical success of large-scale models has motivated several theoretical studies to investigate a scenario wherein both the number of samples, $n$, and parameters, $p$, diverge to infinity and derive an asymptotic risk at the limit. However, these theorems are only valid for linear-in-feature models, such as generalized linear regression, kernel regression, and shallow neural networks. Hence, it is difficult to investigate a wider class of nonlinear models, including deep neural networks with three or more layers. In this study, we consider a likelihood maximization problem without the model constraints and analyze the upper bound of an asymptotic risk of an estimator with penalization. Technically, we combine a property of the Fisher information matrix with an extended Marchenko-Pastur law and associate the combination with empirical process techniques. The derived bound is general, as it describes both the double descent and the regularized risk curves, depending on the penalization. Our results are valid without the linear-in-feature constraints on models and allow us to derive the general spectral distributions of a Fisher information matrix from the likelihood. We demonstrate that several explicit models, such as parallel deep neural networks, ensemble learning, and residual networks, are in agreement with our theory. This result indicates that even large and deep models have a small asymptotic risk if they exhibit a specific structure, such as divisibility. To verify this finding, we conduct a real-data experiment with parallel deep neural networks. Our results expand the applicability of the asymptotic risk analysis, and may also contribute to the understanding and application of deep learning.