Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

curve-fitting

How to do exponential and logarithmic curve fitting in Python? I found only polynomial fitting

August 20, 2022 by Magenaut

I have a set of data and I want to compare which line describes it best (polynomials of different orders, exponential or logarithmic).

Categories Python, Q&A Tags curve-fitting, linear-regression, numpy, python, scipy Leave a comment

How to apply piecewise linear fit in Python?

August 18, 2022 by Magenaut

I am trying to fit piecewise linear fit as shown in fig.1 for a data set

Categories Python, Q&A Tags curve-fitting, numpy, piecewise, python, scipy Leave a comment

python numpy/scipy curve fitting

August 17, 2022 by Magenaut

I have some points and I am trying to fit curve for this points. I know that there exist scipy.optimize.curve_fit function, but I do not understand documentation, i.e how to use this function.

Categories Python, Q&A Tags curve-fitting, numpy, python, scipy Leave a comment

How do I fit a sine curve to my data with pylab and numpy?

August 17, 2022 by Magenaut

I am trying to show that economies follow a relatively sinusoidal growth pattern. I am building a python simulation to show that even when we let some degree of randomness take hold, we can still produce something relatively sinusoidal.

Categories Python, Q&A Tags curve-fitting, matplotlib, numpy, python Leave a comment

Fitting a closed curve to a set of points

August 15, 2022 by Magenaut

I have a set of points pts which form a loop and it looks like this:

Categories Python, Q&A Tags curve-fitting, data-fitting, numpy, python, scipy Leave a comment

Python curve_fit with multiple independent variables

August 14, 2022 by Magenaut

Python’s curve_fit calculates the best-fit parameters for a function with a single independent variable, but is there a way, using curve_fit or something else, to fit for a function with multiple independent variables? For example:

Categories Python, Q&A Tags curve-fitting, python, scipy Leave a comment

How do I calculate r-squared using Python and Numpy?

August 14, 2022 by Magenaut

I’m using Python and Numpy to calculate a best fit polynomial of arbitrary degree. I pass a list of x values, y values, and the degree of the polynomial I want to fit (linear, quadratic, etc.).

Categories Python, Q&A Tags curve-fitting, math, numpy, python, statistics Leave a comment

Fitting a line in 3D

August 13, 2022 by Magenaut

Are there any algorithms that will return the equation of a straight line from a set of 3D data points? I can find plenty of sources which will give the equation of a line from 2D data sets, but none in 3D.

Categories Python, Q&A Tags curve-fitting, linear-algebra, numpy, python Leave a comment

Python and lmfit: How to fit multiple datasets with shared parameters?

August 13, 2022 by Magenaut

I would like to use the lmfit module to fit a function to a variable number of data-sets, with some shared and some individual parameters.

Categories Python, Q&A Tags curve-fitting, lmfit, parameters, python Leave a comment

fitting data with numpy

August 12, 2022 by Magenaut

Let me start by telling that what I get may not be what I expect and perhaps you can help me here. I have the following data:

Categories Python, Q&A Tags curve-fitting, data-fitting, numpy, python, regression Leave a comment
Older posts
Page1 Page2 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress