रेखीय संबंधों का विज़ुअलाइज़ेशन

Python में Linear Modeling परिचय

Jason Vestuto

Data Scientist

त्वरित प्लॉट्स

import matplotlib.pyplot as plt
plt.plot(x, y, 'r-o')
plt.show()

Python में Linear Modeling परिचय

ऑब्जेक्ट इंटरफ़ेस

# pyplot मॉड्यूल इम्पोर्ट करें
import matplotlib.pyplot as plt
# figure और axis ऑब्जेक्ट बनाएँ
fig, axis = plt.subplots()
# शुरुआती स्टाइल विकल्प तैयार करें
options = dict(marker='o', color='blue')
Python में Linear Modeling परिचय

ऑब्जेक्ट इंटरफ़ेस

# axis ऑब्जेक्ट पर plot मेथड कॉल करें
line = axis.plot(x, y, **options)
# set मेथड्स से axis ऑब्जेक्ट संशोधित करें
_ = axis.set_ylabel('Times')
_ = axis.set_xlabel('Distances')
# figure दिखाएँ
plt.show()
Python में Linear Modeling परिचय

रेखीय डेटा का विज़ुअलाइज़ेशन

  • दो बिंदु:
    • (x1,y1) = (0,0)
    • (x2,y2) = (2,3)
  • x और y में परिवर्तन:
    • dy = (y2 - y1) = 3 - 0
    • dx = (x2 - x1) = 2 - 0
  • ढाल = rise-over-run
    • slope = dy/dx = 3/2
  • अवरोध (intercept):
    • जब x=0: y1 = 0

ढाल दिखाने के लिए rise over run का प्लॉट

Python में Linear Modeling परिचय

अभ्यास करते हैं!

Python में Linear Modeling परिचय

Preparing Video For Download...