Posts

Showing posts with the label regression

why DNN nonlinear regression model underestimate the actual target?

why DNN nonlinear regression model underestimate the actual target? I recently used tensorflow to create a DNN nonlinear regression model. The training dataset size is only 569 examples, the predicted dataset size is 101. The input features are 209 dimensions. The DNN model has three hidden layer with hidden_units=[250, 200, 100, 50]. But the result shows that most of the predicted targets are smaller than the actual targets, which means the model underestimates the actual target. I don't understand what does this mean. Does anyone know how to explain this? 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.

Making Quantile Regression Example work for my own dataset in sklearn

Making Quantile Regression Example work for my own dataset in sklearn I am trying to implement quantile regression for my problem using the code at http://scikit-learn.org/stable/auto_examples/ensemble/plot_gradient_boosting_quantile.html I want to use the exact same code for my model. I am mainly interested in the quantile part. My data is simple, I have a bunch of features, a 5 dimensional vector as my input and a real value as y. So, instead of the data (x, sin(x)) in the above code, I am trying to get the model work for my own (X, y). The problem is, they are using xx as separate variables in the code, if I set xx to X, the code just gets messed up with a useless noisy visualisation. I described the specific changes I made, hoping the model to work, I tried a few other things as well to retrofit my data to the model. How should the code be modified to work on my inputs. What specific changes should be made? By cli...

Statsmodels.formula.api OLS does not show statistical values of intercept

Statsmodels.formula.api OLS does not show statistical values of intercept I am running the following source code: import statsmodels.formula.api as sm # Add one column of ones for the intercept term X = np.append(arr= np.ones((50, 1)).astype(int), values=X, axis=1) regressor_OLS = sm.OLS(endog=y, exog=X).fit() print(regressor_OLS.summary()) where X is an 50x5 (before adding the intercept term) numpy array which looks like this: X [[0 1 165349.20 136897.80 471784.10] [0 0 162597.70 151377.59 443898.53]...] and y is a a 50x1 numpy array with float values for the dependent variable. y The first two columns are for a dummy variable with three different values. The rest of the columns are three different indepedent variables. Although, it is said that the statsmodels.formula.api.OLS adds automatically an intercept term (see @stellacia's answer here: OLS using statsmodel.formula.api versus statsmodel.api) its summary does not show the statistical values of the intercept term as it e...

Call Log-Likelihood in Statsmodels RegressionResults?

Call Log-Likelihood in Statsmodels RegressionResults? After running OLS with Statsmodels, I'm interested in the Log-Likelihood for comparing the fit of different models. I'm able to obtain the Log-Likelihood through the res.summary() function, but since I'm not interested in all available results in this summary, I would like to only call the Log-Likelihood. res.summary() I consulted the documentation of RegressionResults, but this gives me no answer. Can anybody tell me whether it is possible to obtain the Log-Likelihood result on its own? 1 Answer 1 Try below. It gives the same Log-Likelihood in summary on its own. print(res.llf) 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.