I performed Linear Regression on the data set with two attributes (Salary and YearsExperience) using orange data mining tool.

Salary is a dependent variable and YearsExperience is an independent variable.

Can I find the equation : Salary = b0+YearsExperience*b1.

  • Yes you can, try looking for the attributes and get the weights...(atleast that's how it happens in Python) – Aditya Jun 19 at 10:16

Depending on what language you are using you can just print the model. In R it looks like this:

summary(my.model)

The output will look like this, or similar:

## 
## Call:
## lm(formula = dist ~ speed.c, data = cars)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -29.069  -9.525  -2.272   9.215  43.201 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  42.9800     2.1750  19.761  < 2e-16 ***
## YearsExp     3.9324     0.4155   9.464 1.49e-12 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 15.38 on 48 degrees of freedom
## Multiple R-squared:  0.6511, Adjusted R-squared:  0.6438 
## F-statistic: 89.57 on 1 and 48 DF,  p-value: 1.49e-12

Your betas are under the "Estimate Std." Column. Your beta0 is (Intercept) and your beta1 is YearsExp (or whatever your variable is) etc... If you have more than one variable there will be more in this column for you to see.

After you get the betas you can write a function to apply your model to new data like this:

y-hat <- 42.9800 + YearsExp*3.9.324

Model summary copypastad w/ variable name edit from: https://feliperego.github.io/blog/2015/10/23/Interpreting-Model-Output-In-R

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.