Interview Query

Linear Regression Parameters

3
Have you seen this question before?

Given a matrix of X and Y values, write a function to generate a transposed matrix and estimate the parameters for linear regression.

Example:

Input:

A = [[1, 5], [4,8], [5,9]]

Output:

A_T = [[1, 4, 5], [5, 8, 9]]  
α = 4  
β = 1  
ŷ = 1X + 4
Next question: Random Forest Explanation
Python 3.9.6
Loading editor