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,038
questions
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 ...
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 ...
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 ...
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, ...
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 ...
-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),...
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? &...
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 ...
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 ...
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) ...
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 ...
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(%....
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 ...
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&...
-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 "...