ML Exp 1.3 3229
ML Exp 1.3 3229
Code:
import numpy as np
import matplotlib.pyplot as plt
# mean of x and y
vector m_x =
np.mean(x) m_y =
np.mean(y)
# putting labels
plt.xlabel('x')
plt.ylabel('y')
def main():
# observations / data
x = np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
y = np.array([1, 3, 2, 5, 7, 8, 8, 9, 10, 12])