Statistical Learning
How to Interpret Machine Learning Models with Python -- Part 1 (easy)
In this article, I will try to interpret the Linear Regression, Lasso, and Decision Tree models which are inherently interpretable. I will analyze global interpretability -- which analyzes the most important feature for prediction in general and local interpretability -- which explains individual prediction results. Machine learning models are used in applications such as fraud and risk detection in bank transactions, voice assistants, recommendation systems, chatbots, self-driving cars, social network analysis, etc. However, sometimes it is difficult to interpret them because the algorithm represents a black box(e.g. So we need additional techniques to analyze black box decisions.
Logistic Regression in Machine Learning (from Scratch !!)
In this blog post, I would like to continue my series on "building from scratch." I will discuss a linear classifier called Logistic Regression. After the discussion of the theoretical concepts we will dive into the code. So, without a further adieu let's start the discussion with the basics of a classifier. A classifier is an estimator that assigns a class label to the input data point.
Representing Mixtures of Word Embeddings with Mixtures of Topic Embeddings
Wang, Dongsheng, Guo, Dandan, Zhao, He, Zheng, Huangjie, Tanwisuth, Korawat, Chen, Bo, Zhou, Mingyuan
A topic model is often formulated as a generative model that explains how each word of a document is generated given a set of topics and document-specific topic proportions. It is focused on capturing the word co-occurrences in a document and hence often suffers from poor performance in analyzing short documents. In addition, its parameter estimation often relies on approximate posterior inference that is either not scalable or suffers from large approximation error. This paper introduces a new topic-modeling framework where each document is viewed as a set of word embedding vectors and each topic is modeled as an embedding vector in the same embedding space. Embedding the words and topics in the same vector space, we define a method to measure the semantic difference between the embedding vectors of the words of a document and these of the topics, and optimize the topic embeddings to minimize the expected difference over all documents. Experiments on text analysis demonstrate that the proposed method, which is amenable to mini-batch stochastic gradient descent based optimization and hence scalable to big corpora, provides competitive performance in discovering more coherent and diverse topics and extracting better document representations.
Geometric reconstructions of density based clusterings
Garcia-Pulido, A. L., Samardzhiev, K. P.
DBSCAN* and HDBSCAN* are well established density based clustering algorithms. However, obtaining the clusters of very large datasets is infeasible, limiting their use in real world applications. By exploiting the geometry of Euclidean space, we prove that it is possible to systematically construct the DBSCAN* and HDBSCAN* clusters of a finite $X\subset \mathbb{R}^n$ from specific subsets of $X$. We are able to control the size of these subsets and therefore our results make it possible to cluster very large datasets. To illustrate our theory, we cluster the Microsoft Building Footprint Database of the US, which is not possible using the standard implementations.
Soft-margin classification of object manifolds
A neural population responding to multiple appearances of a single object defines a manifold in the neural response space. The ability to classify such manifolds is of interest, as object recognition and other computational tasks require a response that is insensitive to variability within a manifold. Linear classification of object manifolds was previously studied for max-margin classifiers. Soft-margin classifiers are a larger class of algorithms and provide an additional regularization parameter used in applications to optimize performance outside the training set by balancing between making fewer training errors and learning more robust classifiers. Here we develop a mean-field theory describing the behavior of soft-margin classifiers applied to object manifolds. Analyzing manifolds with increasing complexity, from points through spheres to general manifolds, a mean-field theory describes the expected value of the linear classifier's norm, as well as the distribution of fields and slack variables. By analyzing the robustness of the learned classification to noise, we can predict the probability of classification errors and their dependence on regularization, demonstrating a finite optimal choice. The theory describes a previously unknown phase transition, corresponding to the disappearance of a non-trivial solution, thus providing a soft version of the well-known classification capacity of max-margin classifiers.
Sampling Bias Correction for Supervised Machine Learning: A Bayesian Inference Approach with Practical Applications
Given a supervised machine learning problem where the training set has been subject to a known sampling bias, how can a model be trained to fit the original dataset? We achieve this through the Bayesian inference framework by altering the posterior distribution to account for the sampling function. We then apply this solution to binary logistic regression, and discuss scenarios where a dataset might be subject to intentional sample bias such as label imbalance. This technique is widely applicable for statistical inference on big data, from the medical sciences to image recognition to marketing. Familiarity with it will give the practitioner tools to improve their inference pipeline from data collection to model selection.
Generalized Spectral Clustering for Directed and Undirected Graphs
Sevi, Harry, Jonckheere, Matthieu, Kalogeratos, Argyris
Spectral clustering is a popular approach for clustering undirected graphs, but its extension to directed graphs (digraphs) is much more challenging. A typical workaround is to naively symmetrize the adjacency matrix of the directed graph, which can however lead to discarding valuable information carried by edge directionality. In this paper, we present a generalized spectral clustering framework that can address both directed and undirected graphs. Our approach is based on the spectral relaxation of a new functional that we introduce as the generalized Dirichlet energy of a graph function, with respect to an arbitrary positive regularizing measure on the graph edges. We also propose a practical parametrization of the regularizing measure constructed from the iterated powers of the natural random walk on the graph. We present theoretical arguments to explain the efficiency of our framework in the challenging setting of unbalanced classes. Experiments using directed K-NN graphs constructed from real datasets show that our graph partitioning method performs consistently well in all cases, while outperforming existing approaches in most of them.
Accelerating Stochastic Probabilistic Inference
Recently, Stochastic Variational Inference (SVI) has been increasingly attractive thanks to its ability to find good posterior approximations of probabilistic models. It optimizes the variational objective with stochastic optimization, following noisy estimates of the natural gradient. However, almost all the state-of-the-art SVI algorithms are based on first-order optimization algorithm and often suffer from poor convergence rate. In this paper, we bridge the gap between second-order methods and stochastic variational inference by proposing a second-order based stochastic variational inference approach. In particular, firstly we derive the Hessian matrix of the variational objective. Then we devise two numerical schemes to implement second-order SVI efficiently. Thorough empirical evaluations are investigated on both synthetic and real dataset to backup both the effectiveness and efficiency of the proposed approach.
Phenomenology of Double Descent in Finite-Width Neural Networks
Singh, Sidak Pal, Lucchi, Aurelien, Hofmann, Thomas, Schölkopf, Bernhard
`Double descent' delineates the generalization behaviour of models depending on the regime they belong to: under- or over-parameterized. The current theoretical understanding behind the occurrence of this phenomenon is primarily based on linear and kernel regression models -- with informal parallels to neural networks via the Neural Tangent Kernel. Therefore such analyses do not adequately capture the mechanisms behind double descent in finite-width neural networks, as well as, disregard crucial components -- such as the choice of the loss function. We address these shortcomings by leveraging influence functions in order to derive suitable expressions of the population loss and its lower bound, while imposing minimal assumptions on the form of the parametric model. Our derived bounds bear an intimate connection with the spectrum of the Hessian at the optimum, and importantly, exhibit a double descent behaviour at the interpolation threshold. Building on our analysis, we further investigate how the loss function affects double descent -- and thus uncover interesting properties of neural networks and their Hessian spectra near the interpolation threshold.
The TAP free energy for high-dimensional linear regression
The analysis of high-dimensional probability distributio ns is a central challenge in modern Statistics and Machine Learning. This i s particularly true in the context of Bayesian Statistics, where scientists carry out inferen ce based on the posterior distribution. In modern applications, the posterior distribution is typi cally high-dimensional, and analytically intractable. V ariational Inference (VI) has emerge d as an attractive option to approximate these intractable distributions, facilitating fast, parallel computations in state-of-the-art applications [ 32, 10 ]. In this approach, the distribution of interest is approxi mated (in KL divergence) by distributions from a pre-specified, more tract able collection. The simplest version of VI is the Naive Mean-field approximation (NMF), where the distribution of interest is approximated by a product distribution.