Can someone explain the solution to the following problem?

Q) We want to learn a function f(x) of the form f(x) = ax + b which is parameterized by (a, b). Using squared error as the loss function, which of the following parameters would you use to model this function to get a solution with the minimum loss. (a) (4, 3) (b) (1, 4) (c) (4, 1) (d) (3, 4)

Topic r-squared machine-learning-model loss-function

Category Data Science


The function f(x) = ax + b is used to model some data. (a, b) are the parameters in the equation, which means they are the values that need to be optimized. We cannot optimize the values of x or f(x) because those are just inputs and outputs. Squared error is a loss function, modeled by enter image description here

As a brief explanation of MSE, it's basically just the average of the square differences between the actual results in the data and the predicted results by your model.

In order to optimize (a, b), we need to find values for a and b such that the MSE is minimized over whatever data the model is trained on. Since you're given multiple choices, just try out each one and pick the one that returns the smallest MSE.

That said, doing all this requires the data, so although I gave you the way to the solution, you'll have to execute it yourself.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.