Skip to main content

Questions tagged [logarithm]

The logarithm of a number is the exponent by which another fixed value, the base, has to be raised to produce that number. It has applications in algebra and complexity theory. It is usually denoted as log in programming languages. Use this tag for any programming questions involving logarithms.

logarithm
1 vote
1 answer
26 views

The means from stats_summary on my bar plot with a y-axis in log scale are incorrect

I am wanting to make a bar plot, with error bars representing standard deviations and an overlay of a scatter plot to show individual data points. The data is microbial count data and there are 2 ...
Emma Chareyre's user avatar
0 votes
0 answers
40 views

Calculating natural logarithm without predefined functions in C++ [duplicate]

I'm doing an assignment problem that requires me to write a ln (natural logarithm) function, using the divide and conquer / divide et impera technique that takes a float x as its parameter and finds ...
Andrei Trifan's user avatar
0 votes
1 answer
39 views

Map linear data points to logarithmic data points

How can I map linear data points to logarithmic data points? This is different from Map a linear scale to a logarithmic one with both scales having variable min/max and Convert Linear scale to ...
FromTheStackAndBack's user avatar
1 vote
0 answers
36 views

KDE for a logarithmic data in plotly

I'm trying to use plotly violin plot for a logarithmic data set with positive values only. when I use the regular violin aka: fig= go.Figure() fig.add_trace(go.Violin(x=last_value, line_color=color, ...
Tomer Gigi's user avatar
0 votes
0 answers
76 views

Customizing Y-axis Major Ticks on Symlog Scale

I am working on a boxplot in Python using Seaborn and Matplotlib where the Y-axis is set to a symmetrical logarithmic scale. I'm attempting to place major ticks at specific intervals using a custom ...
ex1led's user avatar
  • 437
-1 votes
3 answers
186 views

Summation of log time complexities

What is O(logn) + O(2log(n/2)) + O(4log(n/4)) ... + O(nlog1) ? I think it is O(nlogn) . Please clarify if I am correct or not. The recurrence relation I am trying to solve here is T(n)=2T(n/2)+ log(n),...
Tanish Agarwal's user avatar
0 votes
0 answers
44 views

what is wrong with this logarithm code? (new to coding) [duplicate]

int starting ; int ending ; float x; do { starting = get_int (" Starting population of llamas? "); } while (starting < 12); do { ending = get_int (" Ending population of llamas? &...
Dylan wee's user avatar
0 votes
0 answers
31 views

Is there any way or packages that can help me plot logarithmic graphs in flutter?

I am trying to plot a logarithmic (semilog) graph using a set of data coming from a flask backend. Most of the flutter packages support normal line charts only. Is there any way to achieve this? Can ...
Abhishek V's user avatar
1 vote
1 answer
78 views

fitting a log curve using lmfit and scipy.curve_fit - not working! (Dataset: The Ultimate Film Statistics Dataset - for ML)

this dataset is great! However I am stuck… there seems to be a logarithmic relationship between number of Votes (x axis) and Approval Index(y axis), but I tried using both scipy.curve_fit as well as ...
Chirag Mohnani's user avatar
0 votes
1 answer
16 views

How to bin into the degree in a logarithm scale in a Pandas dataframe?

I want to bin as efficiently as possible numbers of a Pandas dataframe column into the degree in a logarithm scale. By logarithm scale, I mean the way to display numbers over a power(unit, degree) ...
Maxime Oriol's user avatar
0 votes
2 answers
321 views

Python Fitting polynomial to natural log, then reversing the transformation back into non-log space?

I'm trying to create a smooth function to represent some data I am working with. Trouble is the data is pretty noisy, and simply using the least squares method to create a polynomial line of best fit ...
SSC Fan's user avatar
  • 135
1 vote
1 answer
113 views

Mismatch between Matlab log and Numpy np.log

While rewriting an old Matlab code to NumPy, I noticed differences in logarithmic calculation. In NumPy, I use np.log, Matlab uses log function. b = [1 1 2 3 5 1 1]; p = b ./ sum(b); sprintf('log(%....
Martin Benes's user avatar
2 votes
1 answer
82 views

Logarithm of a positive number result in minus infinity python

I have this image: HI00008918.png I want to apply a logarithmic function (f(x) = (1/a)*log(x + 1), where a = 0.01) on the image... So this is the code: import numpy as np import matplotlib.pyplot as ...
Gustavo Henrique's user avatar
1 vote
2 answers
62 views

Intersection of two lines in semi-logarithmic plot

Two points: df.x <- c(0.0014, 0.0027) df.y <- c(17.38, 22.49) I want to know y at x==0.002. Linear interpolation gives 19.74. A linear plot shows the intersection: plot(df.x, df.y, type="b&...
akr's user avatar
  • 21
-2 votes
2 answers
136 views

Can one emulate bitwise arithmetic "and" or "or" using only non-bitwise operations?

Imagine we are tasked with using an idealized scientific calculator which has the following properties: no direct support for bitwise operations, or for base conversions (eg cannot simply "...
HappMacDonald's user avatar

15 30 50 per page
1
2 3 4 5
70