Questions tagged [constraint]

120 questions
22
votes
2 answers

The definition of natural cubic splines for regression

I am learning about splines from the book "The Elements of Statistical Learning Data Mining, Inference, and Prediction" by Hastie et al. I found on page 145 that Natural cubic splines are linear beyond the boundary knots. There are $K$ knots,…
Durin
  • 964
  • 2
  • 7
  • 17
10
votes
2 answers

Proving Ridge Regression is strictly convex

Definition of ridge regression $$min_\beta||y-X\beta||_2^2+\lambda||\beta||_2^2, \lambda\ge0$$ you can prove a function is strictly convex if the 2nd derivative is strictly greater than 0 thus But unfortunately I don't know if this is sufficient…
8
votes
2 answers

Does the determination of the mean and SD imply the loss of one or two degrees of freedom?

I'm facing some doubts in understanding how degrees of freedom are considered in distributions. In particular let's refer to $t$ Student variable, that…
Sørën
  • 537
  • 1
  • 4
  • 11
7
votes
2 answers

Question about joint distribution of Bernoulli random variables under constraint that sum must be 1

I am stuck with a problem at work. Can anybody please help me to give me the joint distribution of $n$ Bernoulli random variables but under the constraint that the sum of the these $n$ random variables must be $1$. Can anybody show me how to derive…
5
votes
3 answers

Generating identically-distributed random variables with a constraint

Is there a way to generate identically-distributed random variables (eg $x_1,x_2,x_3,x_4$) with the following constraint: $\frac{x_1*x_2}{x_3*x_4} ≡ 1$ $x \in (0,1)$ Please note that simply sampling $x_1, x_2, x_3$ from the given distribution and…
PG_eon
  • 51
  • 2
4
votes
3 answers

Adjusting round-off error so as to have percentages that sum up to $100$

I have non-negative numbers $x_1, \dots, x_n$. These numbers are all percentages rounded to the nearest tenth of a percentage. Unfortunately, I don't have any of the numerators or denominators driving these percentages. The true percentages, $t_1,…
Clarinetist
  • 3,761
  • 3
  • 25
  • 70
4
votes
2 answers

In optimization, is there a distinction between "implicit/natural" and "explicit/designed" constraints?

For example, I wish to optimization a function which has a log term $\log(x)$ Now the very presence of the log term induces a constraint which says $x > 0$. The case $x = 0 $ might be a bit ambiguous but certainly $x \not< 0$ Now, this to me is some…
4
votes
0 answers

Linear regression of higher order polynomial with slope constraint

I am trying to constrain the coefficients on a higher order polynomial (let's say an order 6) for the curve to be decreasing. I have found this link, where the fitting of a 3rd order polynomial is being fit, but that will not fit my data…
4
votes
1 answer

Machine learning with some constraints

I'm wondering how can machine learning approach solves a problem which has some restrictions. Let's say we have a demand prediction problem (regression) and the demand must be less or equal than 50. Therefore, the outputs of the machine must be…
Yoo Inhyeok
  • 161
  • 8
4
votes
2 answers

Coordinate descent with constraints

When performing constrained optimization on a smooth, convex function using coordinate descent, for what types of constraints will the algorithm work ? (i.e. converge or reach an approximate optimum within a tolerance of the constraint) My…
4
votes
0 answers

Algorithm that preserves the order of the predicted variable

Hi all, I need some advice on possible algorithms that I can apply to the following problem (if possible with pointers to implementations of these algorithms). The dataset: I have some dataset about boreholes drilled in the earth. For each of the…
4
votes
1 answer

Covariance matrix decomposition and coregionalization

The original question (that can be seen at the bottom of this post) was replaced by this first edit (below) EDIT I I give more details about my problem. First of all let suppose to have K vectors $\boldsymbol{\omega}_k = \{\omega_{i,k}\}_{i=1}^n$,…
4
votes
0 answers

scipy optimization - 'Singular matrix C in LSQ subproblem'

I'm trying to do a fairly simple optimization, but I keep getting the error 'Singular matrix C in LSQ subproblem'. I've tried to search the internet, however I couldn't find anything about why this occurs or how I could solve it. The following code…
user2817219
  • 141
  • 1
  • 4
4
votes
0 answers

Imposing Constraints reduce degree of freedom

This question is from Statistical learning Page 271 Section 7.4.2 Where it was stated (not explained) that Imposing three constraints to a 8 degree of freedom of the model reduce its degree of freedom from 8 to 5. How imposing three constraints…
3
votes
0 answers

Sampling from Gaussian distribution subject to a quadratic inequality constraint

Would it be possible to generate samples $x \in \mathbb{R}^n$ from $\mathcal{N}(\mu, \Sigma)$ subject to an inequality constraint $x^\top Q x/2 + b^\top x \le c$, $Q = Q^\top \succeq 0$. We also know, that and $\mu^\top Q \mu/2 + b^\top \mu < c$.…
1
2 3 4 5 6 7 8