I want to make a parameter estimate using python's weighted least squares method (WLS).
● Observation data
x = np.array ([6, 8, 8.6, 8.7, 11.6, 12.3, 14, 15, 21, 23, 26, 26.4, 26.3, 23.1, 19, 17, 14.5, 13.5, 10, 9, 9.7]) y = np.array ([3.7, 3.3, 3.2, 2.8, 2.2, 2.24, 1.8, 1.83, 1.5, 1.36, 1.21, 1.52, 1.3, 1.34, 1.61, 1.41, 1.8, 1.88, 2.11, 2.36, 2.4])
● The formula I want to fit
y = ((-(a + (0.07 * x))) + ((a + ((0.07 * x) ** 2))-(4 * 0.07 * math.log (0.1))) ** 0.5)/(2 * 0.07)
Parameter I want to estimate → "a"
・ I'm too new to use python
→ Looking at some sites, most of them generate observation data with random numbers, and none of them handle the observation data itself. Therefore, I don't know how to handle the data at hand.
・ Most of the explanation of WLS is linear regression
→ I found a site that uses WLS for linear approximation, but I had no idea how to apply it non-linearly.
● Sites that I mainly refer to
The samples on the site are somehow understood so far, so I'd be happy if you could transform them into tears.
We would appreciate your help from the teachers.
Thanks for your cooperation.
Answer # 1
In this case, a can be solved algebraically to make a = f (x, y).
Isn't it better to calculate the array of a from the observed value sequence of x and y based on that, and then fit a specific a by linear regression?
- i don't understand the exercises using python trigonometric functions
- about batch change of file name using python
- python - i'm using selenium the text sent by send_keys to the input tag disappears when the text is sent by send_key to the next
- please explain the function using the python dictionary
- parallel processing using python multiprocessingpool and multiprocessingqueue does not work well
- about external libraries when using multiple versions of python
- python - i want to separate by a specific word using the split function
- python - image recognition using cnn keras multiple inputs
- about the operation of python's speedtest module (library)
- python 3x - i want to get the nth array with an argument using python3 argparse
- python - parameter "form" should contain a valid django form in django
- python 3x - how to rename a folder created using jupyternotebook
- python 3x - processing to jump to the link destination using chrome driver in python
- python - error in image binarization using cv2adaptivethreshold function
- i want to adjust the execution result using the while statement in python as expected
- python - i want to put the image file path in a variable and open it using that variable
- python - aggregation processing using pandas
- specifying the range of the graph using python date
- python - about the fibonacci sequence using recursion