전산물리학:선형_회귀_분석_linear_regression_analysis

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
전산물리학:선형_회귀_분석_linear_regression_analysis [2022/01/17 15:54] jonghoon전산물리학:선형_회귀_분석_linear_regression_analysis [2023/09/05 15:46] (current) – external edit 127.0.0.1
Line 42: Line 42:
 먼저 Python 코드는 아래와 같다. 먼저 Python 코드는 아래와 같다.
  
-<Code:Python | curve_fit.py>+<code:Python | curve_fit.py>
 import numpy as np import numpy as np
 from scipy.optimize import curve_fit from scipy.optimize import curve_fit
Line 65: Line 65:
  
 print("y = {0}x + {1}".format(popt[0],popt[1]) print("y = {0}x + {1}".format(popt[0],popt[1])
-</Code>+</code>
  
 ===== C++ ===== ===== C++ =====
 다음은 C++에서 gsl을 이용한 코드이다. 다음은 C++에서 gsl을 이용한 코드이다.
-<Code:C++ | curve_fit.cpp>+<code:C++ | curve_fit.cpp>
 #include <iostream> #include <iostream>
 #include <gsl/gsl_fit.h> #include <gsl/gsl_fit.h>
Line 148: Line 148:
     cout << "y = " << a << "x + "<< b << "\n";     cout << "y = " << a << "x + "<< b << "\n";
 } }
-</Code>+</code>
  
 ===== 결과 ===== ===== 결과 =====
  • 전산물리학/선형_회귀_분석_linear_regression_analysis.1642402457.txt.gz
  • Last modified: 2023/09/05 15:46
  • (external edit)