# Tag Info

0

If you use a linear activation function on your perceptron you are essentially creating a linear regression where the weights connecting to your perceptron are analogous to the the coefficients on your linear regression model. The only difference in this case is you would normally fit your perceptron using backpropagation, but for the linear regression model ...

2

Let's have a look how dummies work: R Example: # Some data df = data.frame(y=c(30,32,28,10,11,9),gender=c(1,1,1,0,0,0), gender2=c(0,0,0,1,1,1)) # 1) Regression with constant and dummy summary(lm(y~gender,data=df)) # 2) Regression without constant and dummy summary(lm(y~gender-1,data=df)) # 3) Regression without constant and two dummies summary(lm(y~gender+...

3

Linear regression has no way of knowing if features have significance or not. It will find the βs that produce the smallest squared error. That will usually not be zero even if the data is just noise. More features, regardless of significance, give more ways of describing the target variable and get a lower error. Here is an example where you can see that ...

2

What you are trying to avoid is including features that, while they do technically improve results on your sample data, they don't do a good job of generalizing to other hold-out sets. When you say "If I have a new feature which is really not important wont the beta coefficient of that feature should be zero" - you are correct that in this case it ...

1

Linear regression will not work for this problem because the relationship between the board features and target variable that you are using is not linear. Is this how data scientists would go about creating the training set for tic tac toe? It is not 100% clear what your goal is. For simplicity I will select that your goal as "Predict the probability ...

0

Linear Regression is associating any numerical (or binary, which is a particular numerical) value to a coefficient. Multiplying those values by those coefficients gives you an output, and setting the threshold, you know if the model predicts 1 or 0. (This is a brief summary, you'll find plenty of people explaining in details how it works). If your variable ...

0

No, the weight does not always has to be equal to the inverse of the square of variance. There is no universally accepted scheme. Different weighting schemes are used, such as $1/x$, $1/x^2$, $1/\sqrt{x}$, where $x$ are your data. The weighting scheme depends on many things: the distribution of your data, their meaning, and in which regions you want to fit ...

0

# The confusion occurs due to the two different forms of statsmodels predict() method. # This is just a consequence of the way the statsmodels folks designed the api. # Both forms of the predict() method demonstrated and explained below. import statsmodels.api as sm import numpy as np import matplotlib.pyplot as plt # random normal x, y with y = x + 10 x = ...

0

It makes no sense to standardize one-hot encoded features. One-hot encoding implies the level of the measurement for a feature is nominal / categorial. Standardization implies the level of measure for a features is at least interval. For example, if the feature is country of origin. Since that feature is categorical, one-hot encoding makes sense. A person is ...

0

Yes; selecting based on the correlation coefficient, which I'll call $r$, is a valid option. It doesn't necessarily have to be $|r|>0.5$, but keep in mind that the lower you go, the more likely you are to lose valuable information. You may also decide that you wish to eliminate a certain number of features, $k$, and choose these based on the $k$-highest ...

0

Regarding 1) Usually you would check this based on "tests" like the VIF (see this post for details). I personally would not be too worried with a correlation of 0.5. Regarding 2) Not really since you would need to "decorrelate" the variables and you can only do linear transformations (when you want to preserve the variable(s)). What you ...

-1

If an independent variable (x) has a lagged effect on dependent variable (y) of a OLS regression model, you must insert its lagged value and not current value in time series data. Your proposed stats model includes both current value and lagged value . This is not justifiable. Therefore, correct your model and proceed.

Top 50 recent answers are included