728x90
728x90
๐ด ํ์ ๋ชจ๋
# warning ์ ๊ฑฐ
import warnings
warnings.filterwarnings('ignore')
# ๋ฐ์ดํฐ ๋ถ๋ฌ์ค๊ธฐ
import pandas as pd
import numpy as np
# ๊ทธ๋ํ
import matplotlib.pyplot as plt
import seaborn as sns
import plotly.express as px
import cufflinks as cf
# ๊ทธ๋ํ ๊ธฐ๋ณธ ์ค์
%matplotlib inline
plt.rc('font', family = 'Malgun Gothic')
๐ด ์๊ด๊ณ์ํ์ธ
px.imshow(data.corr().round(2), text_auto = True, color_continuous_scale='RdBu')
๐ด R2score ๋ฐ t_value ํ์ธ
from statsmodels.api import OLS
import statsmodels.api as sm
model = OLS(y, x)
result = model.fit()
result.summary()
728x90
๋๊ธ