Mathematical & Statistical Methods
Top Stories, May 10-16: Essential Linear Algebra for Data Science and Machine Learning - KDnuggets
Increase your data science and machine learning productivity with these Chrome extensions. Data Science Books You Should Start Reading in 2021, by Przemek Chojecki How to organize your data science project in 2021, by Benjamin Obi Tayo Data Preparation in SQL, with Cheat Sheet!, by Stan Pugsley Charticulator: Microsoft Research open-sourced a game-changing Data Visualization platform, by Josh Taylor Data Scientist vs Machine Learning Engineer – what are their skills?, by Matthew Przybyla Data Scientist vs Machine Learning Engineer – what are their skills?, by Matthew Przybyla Data Science Books You Should Start Reading in 2021, by Przemek Chojecki How to organize your data science project in 2021, by Benjamin Obi Tayo Data Scientist vs Machine Learning Engineer – what are their skills?, by Matthew Przybyla Essential Linear Algebra for Data Science and Machine Learning, by Benjamin Obi Tayo Top 10 Must-Know Machine Learning Algorithms for Data Scientists – Part 1, by Matthew Mayo Data Scientist vs Machine Learning Engineer – what are their skills?, by Matthew Przybyla
A Short Machine Learning Explanation -- in terms of Linear Algebra, Probability and Calculus
In some cases we will need an array with more than two axes. In the general case, an array of numbers arranged on a regular grid with a variable number of axes is known as a tensor. Tensors and Multidimensional arrays are different types of object, the first is a type of function, the second is a data structure suitable for representing a tensor in a coordinate system. A scalar is just a single number, in contrast to most of the other objects studied in linear algebra, which are usually arrays of multiple numbers. In terms of tensor -- A tensor that contains only one number is called a Scalar(or scalar tensor, or 0-dimensional tensor, or 0D tensor).
Gaussian processes (1/3) - From scratch
This post explores some concepts behind Gaussian processes, such as stochastic processes and the kernel function. We will build up deeper understanding of Gaussian process regression by implementing them from scratch using Python and NumPy. This post is followed by a second post demonstrating how to fit a Gaussian process kernel with TensorFlow probability . In what follows we assume familiarity with basic probability and linear algebra especially in the context of multivariate Gaussian distributions. Have a look at this post if you need a refresher on the Gaussian distribution.
Escaping Saddle Points with Compressed SGD
Avdiukhin, Dmitrii, Yaroslavtsev, Grigory
Stochastic Gradient Descent (SGD) and its variants are the main workhorses of modern machine learning. Distributed implementations of SGD on a cluster of machines with a central server and a large number of workers are frequently used in practice due to the massive size of the data. In distributed SGD each machine holds a copy of the model and the computation proceeds in rounds. In every round, each worker finds a stochastic gradient based on its batch of examples, the server averages these stochastic gradients to obtain the gradient of the entire batch, makes an SGD step, and broadcasts the updated model parameters to the workers. With a large number of workers, computation parallelizes efficiently while communication becomes the main bottleneck [Chilimbi et al., 2014, Strom, 2015], since each worker needs to send its gradients to the server and receive the updated model parameters. Common solutions for this problem include: local SGD and its variants, when each machine performs multiple local steps before communication [Stich, 2018]; decentralized architectures which allow pairwise communication between the workers [McMahan et al., 2017] and gradient compression, when a compressed version of the gradient is communicated instead of the full gradient [Bernstein et al., 2018, Stich et al., 2018, Karimireddy et al., 2019]. In this work, we consider the latter approach, which we refer to as compressed SGD. Most machine learning models can be described by a d-dimensional vector of parameters x and the model quality can be estimated as a function f(x).
Learning a Latent Simplex in Input-Sparsity Time
Bakshi, Ainesh, Bhattacharyya, Chiranjib, Kannan, Ravi, Woodruff, David P., Zhou, Samson
We consider the problem of learning a latent $k$-vertex simplex $K\subset\mathbb{R}^d$, given access to $A\in\mathbb{R}^{d\times n}$, which can be viewed as a data matrix with $n$ points that are obtained by randomly perturbing latent points in the simplex $K$ (potentially beyond $K$). A large class of latent variable models, such as adversarial clustering, mixed membership stochastic block models, and topic models can be cast as learning a latent simplex. Bhattacharyya and Kannan (SODA, 2020) give an algorithm for learning such a latent simplex in time roughly $O(k\cdot\textrm{nnz}(A))$, where $\textrm{nnz}(A)$ is the number of non-zeros in $A$. We show that the dependence on $k$ in the running time is unnecessary given a natural assumption about the mass of the top $k$ singular values of $A$, which holds in many of these applications. Further, we show this assumption is necessary, as otherwise an algorithm for learning a latent simplex would imply an algorithmic breakthrough for spectral low rank approximation. At a high level, Bhattacharyya and Kannan provide an adaptive algorithm that makes $k$ matrix-vector product queries to $A$ and each query is a function of all queries preceding it. Since each matrix-vector product requires $\textrm{nnz}(A)$ time, their overall running time appears unavoidable. Instead, we obtain a low-rank approximation to $A$ in input-sparsity time and show that the column space thus obtained has small $\sin\Theta$ (angular) distance to the right top-$k$ singular space of $A$. Our algorithm then selects $k$ points in the low-rank subspace with the largest inner product with $k$ carefully chosen random vectors. By working in the low-rank subspace, we avoid reading the entire matrix in each iteration and thus circumvent the $\Theta(k\cdot\textrm{nnz}(A))$ running time.
Automatic Sudoku (Number Place) Solver with Digit Recognition and Integer Linear Programming
Sudoku is a logic-based number placement puzzle that consists of 81 cells which are divided into 9 columns, rows and blocks. The goal of this game is to fill out each cells with numbers 1–9 so that there are no repeating numbers in each row, column and blocks. In this post, I aim to introduce a digit recognition and integer linear programming based automatic sudoku solver that uses the following: Keras (based on the MNIST database [1]) and OpenCV for digit recognition and PuLP for integer linear programming. The database is also widely used for training and testing in the field of machine learning. In this section, I explain the overview of image processing for digit recognition.
Hello World of Programming with Linear Algebra
Imagine this simplified code for inventory modeling. We're using floats for prices (bad), we store the data in global state, the architecture is far from even a simple web application. But the model is familiar enough to a typical software developer.) This (imaginary) application exists to track sales. A customer puts the desired products into a cart, we calculate the total price, and, later, perform the delivery.
Photonic co-processors in HPC: using LightOn OPUs for Randomized Numerical Linear Algebra
Hesslow, Daniel, Cappelli, Alessandro, Carron, Igor, Daudet, Laurent, Lafargue, Raphaël, Müller, Kilian, Ohana, Ruben, Pariente, Gustave, Poli, Iacopo
Randomized Numerical Linear Algebra (RandNLA) is a powerful class of methods, widely used in High Performance Computing (HPC). RandNLA provides approximate solutions to linear algebra functions applied to large signals, at reduced computational costs. However, the randomization step for dimensionality reduction may itself become the computational bottleneck on traditional hardware. Leveraging near constant-time linear random projections delivered by LightOn Optical Processing Units we show that randomization can be significantly accelerated, at negligible precision loss, in a wide range of important RandNLA algorithms, such as RandSVD or trace estimators.
Physics-informed Spline Learning for Nonlinear Dynamics Discovery
Sun, Fangzheng, Liu, Yang, Sun, Hao
Dynamical systems are typically governed by a set of linear/nonlinear differential equations. Distilling the analytical form of these equations from very limited data remains intractable in many disciplines such as physics, biology, climate science, engineering and social science. To address this fundamental challenge, we propose a novel Physics-informed Spline Learning (PiSL) framework to discover parsimonious governing equations for nonlinear dynamics, based on sparsely sampled noisy data. The key concept is to (1) leverage splines to interpolate locally the dynamics, perform analytical differentiation and build the library of candidate terms, (2) employ sparse representation of the governing equations, and (3) use the physics residual in turn to inform the spline learning. The synergy between splines and discovered underlying physics leads to the robust capacity of dealing with high-level data scarcity and noise. A hybrid sparsity-promoting alternating direction optimization strategy is developed for systematically pruning the sparse coefficients that form the structure and explicit expression of the governing equations. The efficacy and superiority of the proposed method has been demonstrated by multiple well-known nonlinear dynamical systems, in comparison with a state-of-the-art method.