I'm working through a quiz where you have to implement some machine learning concepts from scratch. One question asks to implement linear interpolation in python without any external libraries besides numpy. The question states:
Q: Given the input data of points [(1, 2), (3, 4), (5, 6), (8, 8), (7, -1)], fit a line of the form Y = A * X + B using gradient descent. Provide the implementation of your algorithm in the function provided using no external libraries, except for numpy. The evaluate linear regression fit on the provided point.
def linear_interpolate_point(data, x):
"""
Fit a line to the provided data and then evaluate on the provided test point.
:param data: Collection of points to fit provided as a list of tuples
:param x: Point to interpolate using your fit line
:return: The output of your point on the interpolated line
"""
# fill in function below
I've tried a few different concepts but seem to be stumped on what the question is asking.
Any help is much appreciated.
