ဒေတာသိပ္ပံ - ဆုတ်ယုတ်မှုဇယား- R-Squared


R - နှစ်ထပ်

R-Squared နှင့် Adjusted R-Squared သည် linear regression model သည် data point များနှင့် မည်မျှကိုက်ညီကြောင်း ဖော်ပြသည်-

ဆုတ်ယုတ်မှုဇယား - Coefficients ကိန်းဂဏန်းများ

R-Squared ၏တန်ဖိုးသည် အမြဲတမ်း 0 မှ 1 (0% မှ 100%) ကြားဖြစ်သည်။

  • မြင့်မားသော R-Squared တန်ဖိုးသည် ဒေတာအချက်များစွာသည် linear regression function line နှင့် နီးစပ်သည်ဟု ဆိုလိုသည်။
  • R-Squared တန်ဖိုးနည်းသော အဓိပ္ပါယ်မှာ linear regression function line သည် data နှင့် ကောင်းစွာ မကိုက်ညီကြောင်း ဆိုလိုသည်။

R Low R - နှစ်ထပ်တန်ဖိုး (0.00) ၏ မြင်သာသော ဥပမာ

ကျွန်ုပ်တို့၏ ဆုတ်ယုတ်မှုပုံစံသည် သုည၏ R-Squared တန်ဖိုးကို ပြသသည်၊ ဆိုလိုသည်မှာ မျဉ်းကြောင်းဆုတ်ယုတ်မှုလုပ်ဆောင်မှုမျဉ်းသည် ဒေတာနှင့် ကောင်းစွာမကိုက်ညီပါ။

Average_Pulse နှင့် Calorie_Burnage ၏ ဒေတာအမှတ်များမှတဆင့် linear regression function ကို ကြံစည်သောအခါ ၎င်းကို မြင်ယောင်နိုင်သည်။

R နိမ့် - နှစ်ထပ်တန်ဖိုး (0.00)

မြင့်မားသော R - နှစ်ထပ်ကိန်းတန်ဖိုး (0.79)

သို့သော်၊ ကျွန်ုပ်တို့သည် ကြာချိန် နှင့် Calorie_Burnage ကို ကြံစည်ပါက R-Squared တိုးလာသည်။ ဤတွင်၊ ဒေတာအချက်များသည် linear regression function line နှင့် နီးကပ်နေကြောင်း ကျွန်ုပ်တို့မြင်ရသည်-

R နိမ့် - နှစ်ထပ်တန်ဖိုး (0.00)

ဤသည်မှာ Python ရှိ ကုဒ်ဖြစ်သည်။

ဥပမာ

import pandas as pd
import matplotlib.pyplot as plt
from scipy import stats

full_health_data = pd.read_csv("data.csv", header=0, sep=",")

x = full_health_data["Duration"]
y = full_health_data ["Calorie_Burnage"]

slope, intercept, r, p, std_err = stats.linregress(x, y)

def myfunc(x):
 return slope * x + intercept

mymodel = list(map(myfunc, x))

print(mymodel)

plt.scatter(x, y)
plt.plot(x, mymodel)
plt.ylim(ymin=0, ymax=2000)
plt.xlim(xmin=0, xmax=200)
plt.xlabel("Duration")
plt.ylabel ("Calorie_Burnage")

plt.show()

အနှစ်ချုပ် - Average_Pulse ဖြင့် Calorie_Burnage ကို ခန့်မှန်းခြင်း။

Average_Pulse ဖြင့် linear regression function ကို explanatory variable အဖြစ် မည်သို့ အကျဉ်းချုံးနိုင်မည်နည်း။

  • Coefficient သည် 0.3296 ဖြစ်ပြီး ဆိုလိုသည်မှာ Average_Pulse သည် Calorie_Burnage ပေါ်တွင် အလွန်သေးငယ်သော အကျိုးသက်ရောက်မှုရှိပါသည်။
  • မြင့်မားသော P-တန်ဖိုး (0.824)၊ ဆိုလိုသည်မှာ ကျွန်ုပ်တို့သည် Average_Pulse နှင့် Calorie_Burnage အကြား ဆက်စပ်မှုကို ကောက်ချက်ချနိုင်မည်မဟုတ်ပေ။
  • R-Squared တန်ဖိုး 0၊ ဆိုလိုသည်မှာ linear regression function line သည် data နှင့် ကောင်းစွာ မကိုက်ညီပါ။