Questions tagged [coefficients]

In mathematics, a coefficient is a multiplicative factor in some term of a polynomial, a series or any expression; it is usually a number, but in any case does not involve any variables of the expression.

In mathematics, a coefficient is a multiplicative factor in some term of a polynomial, a series or any expression; it is usually a number, but in any case does not involve any variables of the expression.

495 questions
2
votes
0 answers

Compute a similarity coefficient (DICE) between many images using R

I'm looking for a way to compute the similarity index between 2 files, however, I have almost 100 files for comparing. In order to make the process easier, I've started with just 10 of them. I need to load both images as matrices (image and its…
S4nD3r
  • 339
  • 1
  • 6
2
votes
1 answer

extract coefficient from auto.arima without intercept

I would like to extract the AR coefficients from a few models i created with auto.arima. the problem is that I want to take the sum of the AR coefficients but without the intercept/mean. bsp_ts <-…
yaennu
  • 85
  • 1
  • 9
2
votes
1 answer

Confused? If using all scalar values, you must pass an index

feature_names = X.columns feature_names = np.array(feature_names) feature_names = feature_names.reshape(60,1) X = np.nan_to_num(X) Y = np.nan_to_num(Y) lr = LinearRegression() model = lr.fit(X,Y) model_coefs = model.coef_ coefs1 = pd.DataFrame( …
mitch
  • 379
  • 1
  • 3
  • 14
2
votes
1 answer

c# calculating portfolio beta between stock and index

does anyone know a way to calculate Beta (beta coefficient) for a portfolio or stock vs. a benchmark, such as an index like S&P in c#? I already have 2 arrays of type double that would be required for such a calculation but I can't find any sleek…
MX313
  • 129
  • 1
  • 9
2
votes
2 answers

how to interpret coefficients in log-log market mix model

I am running a multivariate OLS regression as below using weekly sales and media data. I would like to understand how to calculate the sales contribution when doing log transforms like log-linear, linear-log and log-log. For example: Volume_Sales =…
A.M. Das
  • 63
  • 6
2
votes
0 answers

understanding coefficient values from model with offset

I'm using R to perform some statistical analysis and I have some problems in interpreting the model. consider the following data: df <- data.frame( richness=c(9,13,10,12,11,5,6,8,9,10,10,8, 5,7,6,9,5,6,7,8,4,10,5,8, …
Raf1987
  • 29
  • 2
2
votes
1 answer

Manipulating advection coefficient in Fipy: Advection Diffusion Equation

I am trying to solve advection-diffusion equation in python using fipy. I would like to manipulate the convection coefficient so that it point at the center of the domain. My code is from fipy import * # Setting mesh and discretising space nx =…
Irbin B.
  • 382
  • 3
  • 18
2
votes
2 answers

Standard error and confidence interval for nonlinear function of least squares regression coefficients

I am running an OLS regression in R from which I get a couple of coefficients. Here's part of the code: Attacks <- Treat.Terr.Dataset$Attacks[2:30] Attackslag <- Treat.Terr.Dataset$Attacks[1:29] TreatmentEffect <-…
Gonzalo M.
  • 21
  • 1
2
votes
1 answer

How to rename the coefficients in the summary() of a lm in R?

I have many interaction terms, and I want to have the name of these coefficients, which will be output to LaTeX, not be so cumbersome. I do not want to generate all the interactions in my data frame beforehand, that is a big nuisance.
wolfsatthedoor
  • 7,163
  • 18
  • 46
  • 90
2
votes
1 answer

Coefficients Reduction in Linear Programming lead to incoherent results

I'm a little bit confused about a result that I got after a coefficients reduction on a constraint of a linear programming problem. The problem is: maximize z = x1 + x2 + x3 + x4 + x5 + x6 subject to: 6*x1 + 3*x2 - 5*x3 + 2*x4 + 7*x5 - 4*x6 <=…
2
votes
1 answer

R: apply model coefficients across variables in model, a better way?

I've written a function to take the coefficients of a (linear) model and apply them onto the original variables to give a data frame of terms which, when added together, will be equivalent to the result of predict(). This ability seems useful to me…
Nathan Siemers
  • 423
  • 4
  • 8
2
votes
1 answer

How to get multiple coefficients on same graph

In Stata, I am using the coefplot package to try and plot one coefficient from multiple regressions (in other words, there will be multiple coefficients, but each one comes from a different regression) on the same plot. Here is code (related to…
bill999
  • 2,147
  • 8
  • 51
  • 103
2
votes
0 answers

Why does Sklearn's Naive bayes classifiers only return 1-dimentional coefficients for 2 class problems?

SKlearn has a couple naive bayes classifiers, namely BinomialNB, and MultinomialNB. In both cases, the coef_ variable returns the importance weights for each feature. When there are 3 classes, coef_ is of size 3xn, 4 classes, 4xn, etc.. However,…
Bunny_Ross
  • 1,378
  • 2
  • 10
  • 9
2
votes
0 answers

What is the Numerically Stable Way to Compute the Coefficients of a Quadratic Function from Three Points

I would like to compute the coefficients a0, a1, and a2 of a quadradic function (polynomial of degree 2) given three points (x0, y0), (x1, y1), and (x2, y2), where yi = a0 + a1*xi + a2*xi*xi? I have tried the following two formulas, but I am not…
2
votes
3 answers

Dummy coefficients back to factor

Say I have a trained glmnet model on a sparse matrix with multiple predictors containing a varying level of factors (and consequently varying number of dummy predictors). df <- data.frame(y=runif(10), catVar=as.factor(sample(0:5,10,TRUE))) A <-…