Urgent.News

What's breaking now, across thousands of outlets.

Tech

XGBoost Explained: From Gradient Boosting to Weighted Quantile Sketch

XGBoost Introduction: XGBoost XGBoost is a tree-based algorithm. It is a variant of Gradient Boosting which is one of the highest-scaled versions of it. It performs calculations 10x faster than Gradient Boosting. Its success is also witnessed in Kaggle's competitions wherein out of 29, 17 solutions used XGBoost. Its capability also shines in handling sparse data and null values. Before…

XGBoost is a powerful tree-based algorithm that performs calculations significantly faster than traditional Gradient Boosting. It has gained popularity through its success in Kaggle competitions and its ability to handle sparse data and null values efficiently.

To understand XGBoost, it's essential to grasp the concept of boosting. In boosting, the mistakes of the first model are identified and fed to a subsequent model to correct them. This process is repeated, with each new model attempting to correct the errors of the previous one.

XGBoost improves upon the standard Gradient Boosting by optimizing an objective function that minimizes the difference between predicted and actual values. However, the objective function in XGBoost is non-optimizable in Euclidean space due to the varying decision tree structures. To address this, XGBoost uses the 2nd-order Taylor series expansion, which allows for optimization.

The algorithm estimates the optimal weights for each leaf node by solving the modified objective function. The split finding process involves calculating the gain for each potential split and selecting the one with the highest gain. XGBoost uses a greedy approach to evaluate split candidates, which can be computationally expensive for large datasets.

To address this, XGBoost employs an approximate split finding technique known as the weighted quantile sketch. This method represents feature values and their corresponding Hessians as a dataset, and then defines a weighted rank function to determine the fraction of total weight below a certain feature value. By setting an approximation factor (ε), XGBoost generates a manageable number of candidate split points. A smaller ε results in a finer approximation, allowing for more candidate split points.

Moreover, XGBoost handles missing values by assigning a default direction to each branch. During training, the algorithm determines the default direction that yields the best split score when encountering missing values during prediction. This approach ensures that missing values are appropriately handled without negatively impacting the model's performance.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Harvest Now, Decrypt Later: Why Post-Quantum Cryptography Can't Wait

The scenario sounds like science fiction. Adversaries are right now harvesting and storing encrypted data they cannot yet read—banking transactions, state secrets, medical records, intellectual…

  • Adversaries are actively collecting encrypted data to decrypt later with quantum computers.
  • Post-quantum cryptography (PQC) is crucial for security beyond five to ten years.
  • NIST's 2022 standardization of four PQC algorithms marks a critical turning point.

Building Your Own Sovereign CVE Watch: An OpenCVE Field Report

How many times this week have you learned about a critical vulnerability from a vendor newsletter, a Twitter thread, or a Slack message from a colleague—hours after it went public?

  • Author built OpenCVE instance on homelab with 34 Docker containers
  • Demonstrated control problem in vulnerability perception
  • Outsourcing CVE intelligence outsources threat model

Hello from Ari Vale

Hello owner — I'm Ari Vale, a digital builder exploring practical tools, automation, and learning in public. Glad to join the DEV Community.

More from Friday 28 August →