• Home
  • About Us
  • Privacy Policy
  • Contact Us
  • Disclaimer
  • Terms & Conditions
Journal Official
Advertisement
  • Home
  • Tech
    • All
    • Apps
    • Gadgets
    Google’s CFO just got promoted

    Google’s CFO just got promoted

    How Google’s latest AI model is generating music from your brain activity

    How Google’s latest AI model is generating music from your brain activity

    Easy Rider to Midnight Run, The Greatest Roadtrips Movies of All Time

    Easy Rider to Midnight Run, The Greatest Roadtrips Movies of All Time

    Three new Starfield animated shorts offer more glimpses of Bethesda’s new universe

    Three new Starfield animated shorts offer more glimpses of Bethesda’s new universe

    Some top AMD chips have a huge security flaw

    Some top AMD chips have a huge security flaw

    What is a Linux Bash Script and How Do You Build One?

    What is a Linux Bash Script and How Do You Build One?

    Trending Tags

    • Nintendo Switch
    • CES 2017
    • Playstation 4 Pro
    • Mark Zuckerberg
  • Entertainment
  • Sports
  • CryptoCurrency
  • Business
  • Health and Lifestyle
    • All
    • Food
    World IVF Day: Infertility is a silent epidemic – why is it important to tackle fertility problems?  experts tell

    World IVF Day: Infertility is a silent epidemic – why is it important to tackle fertility problems? experts tell

    What is ‘duck walk’ in old age?  Expert shares tips on maintaining normal mobility

    What is ‘duck walk’ in old age? Expert shares tips on maintaining normal mobility

    Radiohead brands portfolio expands with the launch of Hustle™ energy drink.  Unveiled through new campaign “Dreams are free, #HustleModeOn for everything else – Food Marketing Technology”

    Radiohead brands portfolio expands with the launch of Hustle™ energy drink. Unveiled through new campaign “Dreams are free, #HustleModeOn for everything else – Food Marketing Technology”

    From Chris Gayle to Virat Kohli: Most runs scored by players in India vs West Indies ODI series

    From Chris Gayle to Virat Kohli: Most runs scored by players in India vs West Indies ODI series

    Infertility Treatment: How Ayurveda Can Help Increase Fertility?  experts tell

    Infertility Treatment: How Ayurveda Can Help Increase Fertility? experts tell

    Ishant Sharma opens up about the truth behind Zaheer Khan’s Test retirement and the allegations against Virat Kohli

    Ishant Sharma opens up about the truth behind Zaheer Khan’s Test retirement and the allegations against Virat Kohli

    Trending Tags

    • Golden Globes
    • Game of Thrones
    • MotoGP 2017
    • eSports
    • Fashion Week
No Result
View All Result
  • Home
  • Tech
    • All
    • Apps
    • Gadgets
    Google’s CFO just got promoted

    Google’s CFO just got promoted

    How Google’s latest AI model is generating music from your brain activity

    How Google’s latest AI model is generating music from your brain activity

    Easy Rider to Midnight Run, The Greatest Roadtrips Movies of All Time

    Easy Rider to Midnight Run, The Greatest Roadtrips Movies of All Time

    Three new Starfield animated shorts offer more glimpses of Bethesda’s new universe

    Three new Starfield animated shorts offer more glimpses of Bethesda’s new universe

    Some top AMD chips have a huge security flaw

    Some top AMD chips have a huge security flaw

    What is a Linux Bash Script and How Do You Build One?

    What is a Linux Bash Script and How Do You Build One?

    Trending Tags

    • Nintendo Switch
    • CES 2017
    • Playstation 4 Pro
    • Mark Zuckerberg
  • Entertainment
  • Sports
  • CryptoCurrency
  • Business
  • Health and Lifestyle
    • All
    • Food
    World IVF Day: Infertility is a silent epidemic – why is it important to tackle fertility problems?  experts tell

    World IVF Day: Infertility is a silent epidemic – why is it important to tackle fertility problems? experts tell

    What is ‘duck walk’ in old age?  Expert shares tips on maintaining normal mobility

    What is ‘duck walk’ in old age? Expert shares tips on maintaining normal mobility

    Radiohead brands portfolio expands with the launch of Hustle™ energy drink.  Unveiled through new campaign “Dreams are free, #HustleModeOn for everything else – Food Marketing Technology”

    Radiohead brands portfolio expands with the launch of Hustle™ energy drink. Unveiled through new campaign “Dreams are free, #HustleModeOn for everything else – Food Marketing Technology”

    From Chris Gayle to Virat Kohli: Most runs scored by players in India vs West Indies ODI series

    From Chris Gayle to Virat Kohli: Most runs scored by players in India vs West Indies ODI series

    Infertility Treatment: How Ayurveda Can Help Increase Fertility?  experts tell

    Infertility Treatment: How Ayurveda Can Help Increase Fertility? experts tell

    Ishant Sharma opens up about the truth behind Zaheer Khan’s Test retirement and the allegations against Virat Kohli

    Ishant Sharma opens up about the truth behind Zaheer Khan’s Test retirement and the allegations against Virat Kohli

    Trending Tags

    • Golden Globes
    • Game of Thrones
    • MotoGP 2017
    • eSports
    • Fashion Week
No Result
View All Result
Journal Official
No Result
View All Result
Home Tech

Quantile Loss and Quantile Regression | by Vyacheslav Efimov

admin by admin
June 16, 2023
in Tech
0
Quantile Loss and Quantile Regression |  by Vyacheslav Efimov
0
SHARES
1
VIEWS
Share on FacebookShare on Twitter


News bulletin

Watch carefully.

subscribe

Learn how to adjust regression algorithms to predict any amount of data.

to data science

RInference is a machine learning task where the goal is to predict the true value based on a set of feature vectors. A large variety of regression algorithms exist: linear regression, logistic regression, gradient boosting or neural networks. During training, each of these algorithms adjusts the model’s weights based on the loss function used for optimization.

The choice of loss function depends on a certain task and the particular values ​​of the metric needed to be achieved. Many loss functions (such as MSE, MAE, RMSLE etc.) focus on predicting the expected value of a variable given a feature vector.

In this article, we will take a look at a special loss function called quantitative loss Special variables are used to predict quantities. Before diving into the details of quantile loss, let us briefly revise the term quantile.

quantile qₐ is a value that divides the given set of numbers in such a way that α * 100% The value of numbers is less than and (1- α)* 100% are greater than the value of the numbers.

quantiles qₐ For α = 0.25, α = 0.5 And α = 0.75 is often used in statistics and is called quartile, These quartiles are denoted as Q₁, Q₂ And Q₃ respectively. Three quartiles divide the data into 4 equal parts.

Similarly, are percentile p which divides the given set of numbers into 100 equal parts. A percentile is represented as pₐ where α is the percentage of numbers less than the corresponding value.

The quartiles Q₁, Q₂ and Q₃ correspond to the percentiles p₂₅, p₅₀ and p₇₅ respectively.

In the example below, for the given set of numbers, all three quartiles are found.

An illustration showing all three quartiles for a given set of numbers. The first quartile Q₁ is equal to 10 because 25% of the values ​​are less than 10 and 75% are greater than 10. The analogy continues for the other quadrants.

The goal of machine learning algorithms is to predict quantiles of a particular variable using quantile loss as a loss function. Before moving on to the formulation, let us consider a simple example.

Imagine a problem where the goal is to predict the 75th percentile of a variable. In fact, this statement is equivalent to saying that prediction errors should be negative in 75% of cases and positive in the other 25% of cases. This is the actual intuition used behind the quantile loss.

formulation

The quantified loss formula is illustrated below. α The parameter refers to the quantile that needs to be predicted.

quantitative loss formula

The value of the quantile loss depends on whether the prediction is lower or higher than the true value. To better understand the reasoning behind this, consider that our objective is to predict the 80th quantile, such that α = 0.8 is plugged into Eqs. As a result, the formula looks like this:

Basically, in such a case, the quantile loss penalizes underestimated forecasts by 4 times more than overestimated ones. This way the model will be more significant for lower prediction errors and predict higher values ​​more often. As a result, on average the fitted model will overestimate the outcome in about 80% of the cases and underestimate it in 20%.

Now suppose that two predictions are received for the same target. The target value is 40, while the predictions are 30 and 50. Let us calculate the quantum loss in both the cases. Despite the fact that the absolute error of 10 is the same in both cases, the loss value is different:

  • For 30, the loss value is L = 0.8 * 10 = 8
  • For 50, the loss value is L = 0.2 * 10 = 2,

This loss function is shown in the diagram below which shows the loss values ​​for various parameters α When the actual value is 40.

Conversely, if the value of α 0.2, then over-estimated predictions would be penalized 4 times more than under-estimated.

The problem of predicting quantiles of a certain variable is called quantile regression,

Let us create a synthetic dataset with 10 000 samples where the ratings of players in a video game will be predicted based on the number of hours played.

dataset generation
Scatter plot between predictor (hours) and target (rating)

Let’s split the data on train and test in the ratio 80:20:

Splitting the dataset in the ratio 80:20

For comparison, let’s build 3 regression models with different α Values: 0.2, 0.5 and 0.8. Each regression model will be built by LightGBM – a library with an efficient implementation of gradient boosting.

Based on information from the official documentation, LightGBM allows solving quantitative regression problems by specifying Objective as parameter ‘quantile’ and passing the corresponding value of Alpha,

After training the 3 models, they can be used to obtain predictions (line 6).

lgbm model training with objective=’quantile’

Let us visualize the predictions through the below code snippet:

Scatter plot between predictor (hours) and true/predicted target values

From the above scatter plot, it is clear that with more values ​​of α, the models produce more predictable results. Additionally, let us compare the predictions of each model against all target values.

Comparison of predictions made by different models

This leads to the following output:

The pattern is clearly seen from the output: for any αEstimated values ​​are approximately greater than actual values α * 100% of matters. Therefore, we can empirically conclude that our prediction model works correctly.

The prediction errors of the quantile regression model are approximately negative in α * 100% are positive in matters and (1- α)* 100% of cases.

We’ve explored the quantile loss – a flexible loss function that can be incorporated into any regression model to predict a certain variable’s quantile. Based on the example of LightGBM, we saw how to adjust the model so it solves the quantile regression problem. In fact, many other popular machine learning libraries allow quantile loss to be set as a loss function.

The code used in this article is available at:

All images by the author unless otherwise noted.

Previous Post

Ethereum network upgrade and increase in Arbitrum active users could trigger ARB price reversal

Next Post

BlackRock’s Spot Bitcoin ETF Isn’t Like Grayscale’s Product, Experts Say

admin

admin

Next Post
BlackRock’s Spot Bitcoin ETF Isn’t Like Grayscale’s Product, Experts Say

BlackRock's Spot Bitcoin ETF Isn't Like Grayscale's Product, Experts Say

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Journal Official

Welcome to our News Magazine Website, your go-to source for the latest and most compelling news around the Globe. Stay informed, stay inspired, and explore the world through our comprehensive and user-friendly platform.

Follow Us

Recent posts

  • Open Access vs. Subscription: Masa Depan Aksesibilitas Jurnal Akademik
  • Strategi Memilih Jurnal yang Tepat untuk Naskah Penelitian Anda
  • Peran Jurnal Terindeks Scopus: Mengapa Penting untuk Karier Akademik
  • Etika Penulisan Ilmiah: Menghindari Plagiarisme dan Pelanggaran Kode Etik
  • Memahami Proses Peer Review: Kunci Kualitas Publikasi Ilmiah

Recent News

Open Access vs. Subscription: Masa Depan Aksesibilitas Jurnal Akademik

December 7, 2025

Strategi Memilih Jurnal yang Tepat untuk Naskah Penelitian Anda

December 7, 2025
  • Home
  • About Us
  • Privacy Policy
  • Contact Us
  • Disclaimer
  • Terms & Conditions

© 2023 Journal Official - News Magazine

No Result
View All Result
  • Disclaimer

© 2023 Journal Official - News Magazine