An exploration of a fundamental numerical optimization technique, with a focus on its geometrical interpretation Gradient descent is widely regarded as one of the fundamental numerical optimization techniques, and the Newton-Raphson method stands out as a significant component within this domain. This method possesses notable qualities in terms of its simplicity, elegance, and computational power, warranting an in-depth exploration.
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Articles by Saupin Guillaume
XGBoost: How Deep Learning Can Replace Gradient Boosting and Decision Trees - Part 2: Training Original
In a previous article: you have learned about rewriting decision trees using a Differentiable Programming approach, as suggested by the NODE paper. The idea of this paper is to replace XGBoost by a Neural Network.
XGBoost: How Deep Learning Can Replace Gradient Boosting and Decision Trees
If you have read my previous articles on Gradient Boosting and Decision Trees, you are aware that Gradient Boosting, combined with Ensembles of Decision Trees, has achieved excellent performance in classification or regression tasks involving tabular data. However, despite the efforts made by XGBoost, LightGBM, or CatBoost to enhance the construction of Ensemble of Decision Trees, training such a model still relies on a brute force approach.
Native support of categories in XGBoost: how does it work?
As shown in the figure below, decision trees base their decision on comparison: For instance, in this simple example, if the input is a row of data, with two columns A=21 and B=111, then the output value will be the weight 4. The limitation of this kind of decision tree is that it can only handle numbers as features. However, it is ubiquitous in data science to be confronted with features that are categorical. Let’s see what are the options at hand.
XGBoost Now Supports MAE as an Objective
How is that possible, when MAE is non-smooth? When working on a model based on Gradient Boosting, a key parameter to choose from is the objective. Indeed, the whole building process of the decision tree derives from the objective and its first and second derivatives. XGBoost has recently introduced support for a new kind of objective: non-smooth objectives with no second derivative. Amongst them, the famous MAE (mean absolute error) is now natively activable inside XGBoost.
XGBoost Now Supports MAE as an Objective
How is that possible, when MAE is non-smooth? When working on a model based on Gradient Boosting, a key parameter to choose from is the objective. Indeed, the whole building process of the decision tree derives from the objective and its first and second derivatives. XGBoost has recently introduced support for a new kind of objective: non-smooth objectives with no second derivative. Amongst them, the famous MAE (mean absolute error) is now natively activable inside XGBoost.
How Does XGBoost Handle Multiclass Classification?
How Does XGBoost Handle Multiclass Classification? It’s crucial to understand the underlying workings of classification using this kind of model, as it impacts performance. Photo by Andrew Coop on Unsplash In this article, we are going to see how the ensemble of decision trees trained using Gradient Boosting libraries like XGBoost, LightGBM and CatBoost performs multiclass…
Transfer business knowledge using monotonic constraints
A few days ago, I was discussing with a good friend of mine, Julia Simon, about taking into account business knowledge in a decision tree-based model. She had in mind a very simple problem, where the value to predict was strictly increasing with a given feature. She wanted to know if it was possible to force the model to ensure this constraint.
XGBoost: Cardinality, the crucial HyperParameter that is always under-considered
When using XGBoost, CatBoost, or LightGBM it’s absolutely crucial to remember that all these libraries rely on decision trees, whose leaf contains only constant values (Unless you have enabled linear trees for LightGBM. See my other article on the subject.) Simply put, this means that a given model can only predict a discrete number of values. Other models like Gaussian Processes or basic linear models for instance can predict an infinite number of values.
Building an iterative solver for linear optimization under constraints using geometry
Optimization is a common tool in data science, and one of the most frequently used approach is the linear one. Even though not every optimization problem can be formulated in a linear way, in many cases, it’s possible to rewrite it using a linear formulation. In this post, we are going to write from scratch a solver for linear optimization under constraints, using an iterative method.
Optimizing the number of clusters with splines To define intelligence, we often refer to the capacity to weave links between different knowledge or subjects. It is then a question of the brain abstracting itself from the specific in order to step back and highlight the genericity that links these different elements. This ability is of course sought after in artificial intelligence, and this is precisely the purpose of the clustering methods we will discuss here.
Visually understand XGBoost, LightGBM and CatBoost Regularization Parameters
Photo by Ricardo Gomez Angel on Unsplash When considering a data science problem, a good data scientist should have some insight into the main feature that will drive the performance of its model. Even though theoretically speaking it would be better to trust auto ml, auto featuring, auto hyper parameters tuning, it is often much more time- and energy-efficient to rely on human expertise to drive model tuning. Combining human intuition and computer science horsepower is very powerful.
XGBoost for time series: lightGBM is a bigger boat!
Photo by William Daigneault on Unsplash When dealing with time series, it is crucial to be able to handle extrapolation. Without extrapolation, handling trends is not possible. Mathematically speaking, this means that the underlying model must integrate at least a linear part in its formulas. In a previous article, I show that one of the most important limitations of XGBoost is that it cannot, by construction, extrapolate.
XGBoost for time series: lightGBM is a bigger boat!
When dealing with time series, it is crucial to be able to handle extrapolation. Without extrapolation, handling trends is not possible. Mathematically speaking, this means that the underlying model must integrate at least a linear part in its formulas. In a previous article, I show that one of the most important limitations of XGBoost is that it cannot, by construction, extrapolate. This is fairly restrictive, as in many ML situations you need to be able to extrapolate.
SHAP for XGBoost: From NP-completeness to polynomial time
There are some good articles on the web that explain how to use and interpret Shapley values for machine learning. See for instance the article of Dr. Dataman : However, there are not so many papers that detail how these values are computed. This is, however, a pretty interesting subject, as computing Shapley values is an np-complete problem, but some libraries like shap can compute them in a glitch even for very large tree-based XGBoost models with hundreds of features. How is that possible?
SHAP for XGBoost: From NP-completeness to polynomial time
The underlying idea that motivates the use of Shapley values is that the best way to understand a phenomenon is to build a model for it. Once you have the model you can play with it, mathematically analyse it, simulate it, understand the relation between the input variables, the inner parameters and the output. In a word, explain it.
Practical Transfer Learning with PyTorch
Photo by Omar Flores on Unsplash In a previous post, I explained how PyTorch and XGBoost can be combined to perform transfer learning. This was quite an unconventional way of transferring learning, mixing deep neural networks and gradient Booted trees. To illustrate the method, I explain how the knowledge acquired by AlexNet for categorizing images from the ILSVRC dataset can be transferred to another use case with XGBoost: identify handwritten digits.
Transfer learning with XGBoost and PyTorch: hack Alexnet for MNIST dataset
Initially, Alexnet has been trained on the ImageNet Large Scale Visual Recognition Challenge (ILSVRC) on a subset of 1000 classes. Given an image, this network is able to classify it on one of the 1000 classes. The complete list of these classes can be found here. The original paper is worth reading and can be found here. Before transferring the knowledge acquired by the training of the Alexenet deep neural network, we are going to remind ourselves how to use it.
Hacking HP Tuning to perform Automatic Model Selection
Hyper Parameters Tuning’s (HPT, sometimes also referred as Hyper Parameters Optimisation, HPO) goal is to find the configuration that maximises or minimizes a given objective. There are various ways to perform Hyper Parameter Tuning: Brute force, Random Search, Bayesian Search, or model-based methods. I’ve previously advocated for the use of model-based methods, which turned out to be very efficient on some problems I encountered.
Tuning XGBoost with XGBoost: Writing your own Hyper Parameters Optimization engine
As you probably know if you are familiar with Data Science, Machine Learning, Toward Data Science or my previous post on the subject, fine-tuning your model is crucial for getting the best performances. You simply cannot rely on default values. As Satyam Kumar states in his last article, several methods exist to perform this optimization. They range from manual tuning, random search, brute force to bayesian search. Each of these methods has its advantages and drawbacks.
SMAC: AutoML for fast Hyperparameters tuning in Python
Photo by blueberry Maki on Unsplash Generating a first model for a given data science problem can be pretty straightforward. Building an efficient model, offering a high level of precision, is much harder. Data Scientists have to clean data, refine features, find the right metrics, find the right validation strategy, build test and training sets correctly, and fine-tune the chosen model's parameters. Most of these steps benefit from the experience of the data scientist, and can hardly be automated.
XGBoost for Time Series: You’re gonna need a bigger boat
XGBoost has even been used profitably for forecasting time series here and here for instance. The secret is to feed it with time-related features: lag, frequencies, wavelet coefficients, periods… As XGBoost is very good at identifying pattern in data, if you have enough temporal features describing your dataset, it will provide very decent predictions. However, XGBoost lacks an essential feature, that is absolutely critical for time series.
Computational physics
Understanding the physical laws that inspired the movie Arrival using Data Science tools Image from the motion picture Arrival. The principle of stationary action has inspired the author of the book. A few days after seeing the motion picture Arrival, while working on my previous paper Differentiable Programming, I discovered that the authors of JAX, a library implementing Automatic Differentiation, recommend the reading of Structure and Interpretation of Classical Mechanics.
Point-Voxel Feature Set Abstraction for 3D Object Detection
3D object detection has been receiving increasing attention from both industry and academia thanks to its wide applications in various fields such as autonomous driving and robotics. LiDAR sensors are widely adopted in autonomous driving vehicles and robots for capturing 3D scene information as sparse and irregular point clouds, which provide vital cues for 3D scene perception and understanding.
Confidence intervals for XGBoost
Building a regularized Quantile Regression objective Gradient Boosting methods are a very powerful tool for performing accurate predictions quickly, on large datasets, for complex variables that depend non linearly on a lot of features. Moreover, it has been implemented in various ways: XGBoost, CatBoost, GradientBoostingRegressor, each having its own advantages, discussed here or here. Something these implementations all share is the ability to choose a given objective for training to minimize.
Show More
loading
Actions
Is this you?
As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.Get in touch with Saupin
Contact Saupin, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack