Questions tagged [logarithmic]

16 questions
5
votes
1 answer

XGBoost non-linear regression

Is it possible to use XGBoost regressor to do non-linear regressions? I know of the objectives linear and logistic. The linear objective works very good with the gblinear booster. This made me wonder if it is possible to use XGBoost for non-linear…
Harrys Kavan
  • 151
  • 4
1
vote
0 answers

How to maximize a log linear regression equation satisfying a constraint?

I have a log linear equation of the form $y = w_1(\log{X1}) + w_2(\log{X2}) + ... + w_n(\log{Xn})$. How can I find the value of X's that maximize the value of y subject to a constraint $(X_1+X_2+...+X_n \le t)$ in python or excel? I tried using…
1
vote
2 answers

Dealing with zeros when plotting log-scaled data

I have a non-negative variable and I'd like to plot it, log-scaled I'm trying to understand how to deal with 0-values. One naive idea I had in mind is just to add 1 to all values (or some very low number greater than 1) What other options are…
Elimination
  • 171
  • 6
1
vote
0 answers

Normalizing variables with logarithmic shape

A simple model with two variables [A,B] to train, let's say, a logistic regression or any other classification model: A: Flat distribution from 0 to 100. B: A logarithmic distribution from 0 to a few thousands. What would be the proper way to…
miguelbadajoz
  • 321
  • 1
  • 6
1
vote
1 answer

name of log(n+1) plot

I am trying to plot a distribution of positive integers which contains a lot of variance. I opted to use the log of the y-values but that causes issues due to the inclusion of zeros. I though of plotting log10(n+1), but it seems a bit janky. Is this…
iHnR
  • 13
  • 2
1
vote
1 answer

Understanding log odds equation with multiple variables

"If we take the antilog of the regression coefficient associated with obesity, exp(0.415) = 1.52 we get the odds ratio adjusted for age. The odds of developing CVD are 1.52 times higher among obese persons as compared to non obese persons,…
Apoorva
  • 275
  • 4
  • 13
1
vote
1 answer

Get result from log transformed variable

I can't find some documentation. I had right-skewed target (sale price) variable and also some skewed features at the same way. I did log transformation and fit the regression model and it doing well. But I can't understand how I can return to…
Olha
  • 11
  • 1
1
vote
1 answer

Effect of log odds on skewed data

Does taking the log of odds bring linearity between the odds of the dependent variable & the independent variables by removing skewness in the data? Is this one reason why we use log of odds in logistic regression? If yes, then is log transformation…
Apoorva
  • 275
  • 4
  • 13
1
vote
1 answer

How to justify logarithmically scaled frequency for tf in tf-idf?

I am studying tf-idf (term frequency - inverse document frequency). The original logic for tf was straightforward: count of term t / number of total terms in the document. However, I came across the log scaled frequency: log(1 + count of term t in…
Fred Chang
  • 85
  • 1
  • 6
1
vote
1 answer

RANSAC and R2, why the r2 score is negative?

I was experimenting with curve_fit, RANSAC and stuff trying to learn the basics and there is one thing I don´t understand. Why is R2 score negative here? import numpy as np import warnings import matplotlib.pyplot as plt from sklearn.metrics import…
mavetek
  • 21
  • 4
0
votes
1 answer

Can absolute or relative contributions from X be calculated for a multiplicative model? $\log{ y}$ ~ $\log {x_1} + \log{x_2}$

(How) can absolute or relative contributions be calculated for a multiplicative (log-log) model? Relative contributions from a linear (additive) model E.g., there are 3 contributors to $y$ (given by the three additive terms): $$y = \beta_1 x_{1} +…
0
votes
1 answer

Why does the application of the logarithmic function improve the outcome of Random forests?

I have a Random forest model that tries to predict what kind of a useful activity a machine is doing based on its power readings. There are 5 features in a single reading. There are two main types of activities: Main (A set of useful activities.…
Nht_e0
  • 21
  • 3
0
votes
2 answers

How can a log transformation decrease performance?

I'm working on a Demand Forecasting project, I have a lot of 0 (75% of the database) I got a highly right skewed target (5.5). So I decided to log transform my target: target = log(target + 1) When I train my models (linear regression or LGBM,…
0
votes
0 answers

Log odds understanding

Here is my understanding of one reason why we prefer log odds over odds & probability. Please let me know if I got it right. Reasons why we choose log-odds- The range of probability values: $[0,1]$, The range of odds values: $[0,\infty]$, The range…
Apoorva
  • 275
  • 4
  • 13
0
votes
1 answer

Interpretation of Log Odds in Logistic Regression

$\log(\text{odds}) = \text{logit}(P)=ln \big({{P}\over{1-P}}\big)$ $ln\big({{P}\over{1-P}}\big)=\beta_0+\beta_1x$ Consider this example: $0.7=\beta_o+\beta_1(x)+\beta_2(y)+\beta_3(z)$ How can this expression be interpreted?
Apoorva
  • 275
  • 4
  • 13
1
2