Top "Linear-regression" questions

for issues related to linear regression modelling approach

sklearn: Found input variables with inconsistent numbers of samples: [1, 99]

I'm trying to build a simple regression line with pandas in spyder. After executing the following code, I got this …

pandas linear-regression spyder sklearn-pandas
Model matrix with all pairwise interactions between columns

Let's say that I have a numeric data matrix with columns w, x, y, z and I also want to …

r matrix regression linear-regression
R: plm -- year fixed effects -- year and quarter data

I am having a problem setting up a panel data model. Here is some sample data: library(plm) id <…

r regression linear-regression plm
R: cannot predict specific value

> age <- c(23,19,25,10,9,12,11,8) > steroid <- c(27.1,22.1,21.9,10.7,7.4,18.8,14.7,5.7) > sample <- data.frame(age,steroid) > fit2 &…

r linear-regression prediction lm
sklearn LinearRegression, why only one coefficient returned by the model?

I'm trying out scikit-learn LinearRegression model on a simple dataset (comes from Andrew NG coursera course, I doesn't really matter, …

machine-learning scikit-learn linear-regression
Normal equation and Numpy 'least-squares', 'solve' methods difference in regression?

I am doing linear regression with multiple variables/features. I try to get thetas (coefficients) by using normal equation method (…

python numpy machine-learning linear-algebra linear-regression
sklearn LinearRegression.Predict() issue

I am trying to predict call volume for a call center based on various other factors. I have a fairly …

python scikit-learn linear-regression predict
"weighted" regression in R

I have created a script like the one below to do something I called as "weighted" regression: library(plyr) set.…

r linear-regression weighted
Plot and report X intercept from linear regression - R

I am using lm in r for linear regression. I would like to plot and report the x intercept. I …

r linear-regression intercept
Pandas rolling regression: alternatives to looping

I got good use out of pandas' MovingOLS class (source here) within the deprecated stats/ols module. Unfortunately, it was …

python pandas numpy linear-regression statsmodels