Quantcast
Channel: Data Science, Analytics and Big Data discussions - Latest topics
Viewing all articles
Browse latest Browse all 4448

How are weights calculated for linear regression?

$
0
0

@karan88 wrote:

I have a confusion that how the weights (a and b) for equation (y= a+bx) are calculated in linear regression Machine learning Algorithm -

  1. by solving the linear equation a = mean (y) - b * mean(x) and b = correlation *(std dev of y /std dev of x)
    or

  2. The weights are first arbitrarily taken and then cost function J(theta) is used to minimize the weights depending on the adjustment of the best fit line on the dataset.

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles