About 3,990,000 results
Open links in new tab
  1. numpy - How to do exponential and logarithmic curve fitting in Python ...

    Aug 8, 2010 · 250 I have a set of data and I want to compare which line describes it best (polynomials of different orders, exponential or logarithmic). I use Python and Numpy and for polynomial fitting there …

  2. How do you do natural logs (e.g. "ln()") with numpy in Python?

    Also like MATLAB/Octave, Numpy does not offer a logarithmic function for an arbitrary base. If you find log confusing you can create your own object ln that refers to the numpy.log function:

  3. Why the cost function of logistic regression has a logarithmic expression?

    Oct 7, 2015 · The log cost function penalizes confident and wrong predictions heavily. If I use a cost function of MSE as below. If y=1 cost=(1-yhat)^2; if y=0 cost=yhat^2. This cost function is …

  4. Python using curve_fit to fit a logarithmic function

    Jan 18, 2020 · I'm trying to fit a log curve using curve_fit, assuming it follows Y=a*ln(X)+b, but the fitted data still looks off. Right now I'm using the following code: from scipy.optimize import curve_fit ...

  5. How to write a simple logarithm function without math.h?

    Apr 11, 2023 · That means if you have a function that computes the binary logarithm, you can use it to deduce the decimal logarithm or the natural (base e) logarithm. In particular, log10(x) = log2(x) / …

  6. What is the complexity of the log function? - Stack Overflow

    Sep 6, 2011 · This really depends on the domain of what values you want to compute a logarithm of. For IEEE doubles, many processors can take logarithms in a single assembly instruction; x86 has the …

  7. Fit a logarithmic curve to data points and extrapolate out in numpy

    Apr 20, 2018 · I would like to plot these points, and fit a curve to them that shows what value of x would be required to make y = 100.0 (y values are percentages). Here is what I have tried, but my curve is …

  8. Can I make a logarithmic regression on sklearn? - Stack Overflow

    Sep 23, 2017 · I have search a lot and can't find that, only linear regression, polynomial regression, but no logarithmic regression on sklearn. I need to plot the curve and then make predictions with that …

  9. math - Convert Linear scale to Logarithmic - Stack Overflow

    Oct 20, 2013 · You asked to convert linear to logarithmic, and you just plug the numbers into the formula. In this case, the linear input of 5.00 would become 1.02 on the logarithmic scale.

  10. python - Plotting the logarithm of a function - Stack Overflow

    Aug 23, 2023 · Is your problem calculating the logarithm base 10 or plotting the values? If the latter, how is that different from plotting anything else? Also, your f(x,a) is a function of two values. Do you want …