Questions tagged [gradient]

Vector pointing in the direction where a function is growing fastest; its components are partial derivatives of this function. For questions about gradients in ecology, please use the [ecology] tag instead.

Filter by
Sorted by
Tagged with
0
votes
1answer
22 views

Derivation of gradient-bandit algorithm, Why is the sum of the derivatives is zero?

https://www.cs.mcgill.ca/~dprecup/courses/RL/Lectures/2-bandits-2019.pdf In above pdf document, page 19, they explain by formula: $$\sum _{ b }^{ }{ \frac { \nabla { \Pi }_{ t }(b) }{ \nabla { H }_{ ...
0
votes
0answers
38 views

Gradient of multivariate normal distribution function?

Let $X\sim\mathcal{N}_J(\mu,\Sigma)$ be a multivariate normal with PDF $f_X$ and CDF $F_X$. Taking derivatives of $f_X$ wrt $X$, $\mu$ and $\Sigma$ is easy as shown here. However, I am interested in ...
0
votes
0answers
21 views

Differentiating tanh with Matrix [closed]

so I am looking to understand the Maths for backpropagation and trying random examples by hand, but right now I am confused on wether my derivation was correct. The layer equation I want to derive (...
0
votes
0answers
12 views

what's the split criteria used by catboost?

I'm trying to understand the split criteria used by catboost in the "plain" boosting mode (not interested in the "ordered" mode complication). In "algorithm 2 - Building a tree" they are saying that ...
0
votes
1answer
16 views

Computing Gradients for a [-1, 1]-valued RBM

The gradient derivation for a binary-valued RBM with values $\in\{0,1\}$ is well-documented, for example in Goodfellow, et al and here on Cross Validated. However, in some works (e.g., associative ...
0
votes
1answer
87 views

Recurrent Neural Network - Vanishing Gradient in a network that has output at each time step

I am trying to understand the problem of vanishing gradient in RNN. However, it seems to me that this problem is not happen with a network that has output at each time step. Let's say we are trying to ...
0
votes
0answers
17 views

Detecting correct changepoint using cpt.reg and envept

I have used cpt.reg from envcpt and changepoint beta, and I am now getting these results, where I need to detect the blue arrow but it is not. I could change the penalties to try detect it, however ...
0
votes
0answers
33 views

Trying to detect when graph first changes direction

Trying to identify when the point where graph trend changes, the first time it changes, circled in the picture. Any ideas? Prior to the point we want, the graph can be either flat, decreasing or ...
1
vote
1answer
48 views

Trying to smooth small 'bumps' in graph data using spline interpolation for changepoint detection

I'm trying to detect changes in my data, I want to identify points that are like local minima and shoot upwards. I have used the changepoint package to do so, and upon running it and selecting my ...
0
votes
0answers
24 views

Why doesn't ReLu solve vanishing gradient completely?

As far as I know, ReLu reduces the vanishing gradient problem since its gradient is not very small at larger and smaller values(as long as value is bigger than 0). But my question is this: Why doesn'...
1
vote
0answers
66 views

Why do we use the log-derivative trick before Monte Carlo?

I still don't understand how we can approximate the gradient of an expected value... Indeed it's impossible to sample points and then to average the gradients of them as we have only samples... (How ...
0
votes
0answers
10 views

Whats a good estimation for error measuremets when trying to predict values inside two bands?

I am using gradient boosting to predict two quantiles (upper and lower). The predicted value can be above, below, or in bounds. The problem I am facing is that counting the number of values in bound ...
1
vote
0answers
28 views

Standard errors for Composite Marginal Likelihood

I am estimating a multivariate ordered probit model using a composite marginal likelihood (CML) approach. In other words, I replace the full likelihood function by a surrogate likelihood constructed ...
3
votes
2answers
90 views

Why is the expected gradient of a density not parallel to the expected gradient of the log density?

I'm confused by a seemingly counter-intuitive property of the interaction between distributions, log transforms, expectations and gradients. Suppose I have some distribution over random variable $x$ ...
0
votes
0answers
34 views

Non L2 loss-function in gradient boosting

As I understand the idea of gradient boosting in the (m+1)-th step we take the partial derivatives of the loss with respect to our new parameters $f^{[m]}(x^{(i)})$: $\tilde{y}^{(i)}=-\frac{\partial (\...
2
votes
2answers
35 views

Simplifying Matrix Form

I'm trying to understand how to obtain the solution to an objective function by solving for theta. I found an example here from Naomi which takes an example from The Elements of Statistical Learning ...
0
votes
0answers
15 views

Does increasing the margin value/ delta in a SVM loss function decrease the frequency of coming across kinks when evaluating the gradient?

According to http://cs231n.github.io/optimization-1/, kinks refer to non-differentiable points of a function. Even if the analytical gradient would be zero at such a point, the numerical gradient ...
3
votes
1answer
33 views

can we use any learners in gradient boosting instead of trees?

As we are simply trying to predict residuals from weak learners and aggregating them, can we use any weak learners in gradient boosting machines instead of trees ? If so, why are the all the gbm ...
0
votes
0answers
13 views

Why cache gradients for params between training examples?

I was going through Karpathy's guide here where he defines an simple multiplication gate's forward and backward passes like so ...
0
votes
1answer
41 views

svm loss function gradient

I was taking Stanford's cs231n class and was unable to understand the gradient calculated using the SVM loss function. You should go here to check the notes which I am talking about. This is the SVM ...
0
votes
1answer
46 views

Backpropagation gradient of the average

In the Pytorch Udacity course, the following is said at one point: To calculate the gradients, you need to run the .backward method on a Variable, ...
2
votes
1answer
42 views

What is state of the art in gradient free neural network learning, esp. for images?

I've been recently looking into gradient free learning of neural networks. However, most of the techniques I've found seem to be only applied to toy problems, which I assume means they're infeasible ...
0
votes
0answers
90 views

Multiclass hinge loss gradient

I am trying to compute the gradient of multi class hinge loss function but i am kinda confused. First things first, I have a W matrix [10xD] (10 classes) that contains the weights. The loss ...
0
votes
1answer
43 views

Interpreting gradient descent as a constrained optimization problem- Reinforcement learning

I' m studying the lectures of Sergey Levine in reinforcement learning, specifically the TRPO algorithm, during his explanation we claims that gradient descent is the same as doing this. He does ...
0
votes
1answer
32 views

Optimisation by using directional derivative

So I’ve seen the code of an R package where a two dimensional optimisation (actually MLE, finding the minimum of the negative log likelihood) is performed with the optim function and also two optimise ...
0
votes
0answers
57 views

How is the minimum logarithmic loss calculated when initializing the XGBoost algorithm?

Suppose there are $5$ sample units, $2$ of which carry the feature $y=1$ to be predicted and three of which carry the feature $y=0$. So, $2$ are positive. The XGBoost algorithm initializes with $\...
1
vote
0answers
38 views

gradient vs derivative: defintions of [closed]

According to wikipedia: In mathematics, the gradient is a multi-variable generalization of the derivative. Like the derivative, the gradient represents the slope of the tangent of the graph of ...
4
votes
1answer
290 views

Intuition behind gradient of expected value and logarithm of probabilities

I recently came across the following curious identity: $$\nabla_\theta \mathbb{E}_{x \sim D_\theta}[f(x)] = \mathbb{E}_{x \sim D_\theta} [ \nabla_\theta \log(D_\theta(x)) f(x)],$$ where $D_\theta$ ...
2
votes
0answers
57 views

What is the gradient of the objective function in the Soft Actor-Critic paper?

In the paper "Soft Actor-Critic: Off-Policy Maximum Entropy Deep Reinforcement Learning with a Stochastic Actor", they define the loss function for the policy network as $$ J_\pi(\phi)=\mathbb E_{...
0
votes
1answer
130 views

Is there an advantage to normalizing labels when using MSE loss?

I am designing a NN that uses MSE as a loss regressor. Its a big network and when I train, the loss/gradients are HUGE. I have to clip my gradients our else the loss just goes to NaNs. The differences ...
2
votes
0answers
34 views

In Gradient Boosting Tree, why do we fit the tree on the residuals and not on the sum of the previous function and the residuals?

In the Gradient Boosting Tree algorithm, as described in https://en.wikipedia.org/wiki/Gradient_boosting#Gradient_tree_boosting, we update the previous model $F_m$ by adding the results $h_m$ of the ...
3
votes
0answers
1k views

Gradient Boosting - Price Forecast based on time series data [closed]

What I am trying to achieve. I want to forecast Natural Gas prices under the column "NG Open" based on other parameters in the data set below for all Contract Months ,which is scraped from a public ...
1
vote
1answer
31 views

Storage and re-computation of Intermediate / Weight / Back-propagated Gradients

I need to track the computation and storage of different parts of my network training. To be on the same page, let's assume the simple following scenario (biases omitted) Questions Local Gradients - ...
3
votes
0answers
175 views

Gradient Descent in Metric Learning for Kernel Regression (MLKR)

I am currently studying the Metric Learning for Kernel Regression (MLKR) algorithm (http://proceedings.mlr.press/v2/weinberger07a/weinberger07a.pdf). Let $\{(x_{1}, y_{1}), ..., (x_{N}, y_{N})\}$ ...
0
votes
1answer
157 views

focusing on hard examples in neural networks, like in gradient boosting?

gradient boosting can be seen as focusing on the hard examples (the training set examples where the prediction is still far from the true label, and the gradient is still big). is there a similar ...
6
votes
1answer
1k views

Is stochastic gradient descent biased?

In the paper Mutual Information Neural Estimation, the authors derive the following gradient for the network $$ \nabla_\theta\mathcal V(\theta)=\mathbb E\left[\nabla_\theta T_\theta\right]-{\mathbb E\...
0
votes
1answer
222 views

Gradient in batch-size

When we set a batch-size, after each sample of batch passed we take the gradient but wait until last sample of batch to passed and then propagate the sum of gradient of them through the network? Am I ...
6
votes
1answer
2k views

gradient descent and local maximum

I read that gradient descent converge always to a local minimum while other methods as Newton's method this is not guaranteed (if the Hessian is not definite positive); but if the start point in GD is ...
2
votes
1answer
188 views

Determining significant changes in slope in a nested GAM

I have annual measurements from 2 sites and want to plot where significant changes in slope occur in each site (in a nested design). I can achieve this using non-nested data based on Gavin Simpson's ...
8
votes
1answer
1k views

Can I combine many gradient boosting trees using bagging technique

Based on Gradient Boosting Tree vs Random Forest . GBDT and RF using different strategy to tackle bias and variance. My question is that can I resample dataset (with replacement) to train multiple ...
1
vote
1answer
205 views

Find a weak learner in Boosting

I know gradient boosting use an iteration approach to finding a weak learner. But I am confused about the way to find weak learner, PDF source Question 1: Why find the weak learner by the formula ...
0
votes
0answers
1k views

gradient of SVM Loss (hinge loss)

I am trying to follow https://mlxai.github.io/2017/01/06/vectorized-implementation-of-svm-loss-and-gradient-update.html He starts with the SVM loss (hinge loss) function defined per input instance ...
0
votes
0answers
291 views

Gradient function for log-likelihood

We are trying to calculate the gradient for a logistic regression where the log-likelihood function is: $$ll(x,y,\beta)=ln\left(\frac{\Pi {(e^{x_i\beta}})^{y_i}}{\Sigma {e^{x_i\beta}}}\right)$$ $x$ ...
3
votes
1answer
440 views

How do the residual blocks prevent exploding gradients?

I am reading Roger Grosse's lecture notes on ResNet and I have a question regarding the explanation on how residue blocks prevent gradient explosion, see the screenshot below: My confusion is: this ...
1
vote
0answers
237 views

How do I implement softmax forward propagation and backpropagation to replace sigmoid in a neural network?

I'm currently using 3Blue1Brown's tutorial series on neural networks and lack extensive calculus knowledge/experience. I'm using the following equations to calculate the gradients for weights and ...
2
votes
0answers
127 views

Generative Adversarial Networks - Gradient saturation

This is the value function from the GANs paper: The authors explain that this equation "may not provide sufficient gradient for $G$ to learn well", because early in the learning process the ...
0
votes
1answer
54 views

Can a full batch gradient descent point not to a minimum for a convex function?

Let's say that we have a three dimentional convex function with a minimum marked by a red dot. Can a full batch gradient in a blue point not directed to a red dot as drawn below? Actually this ...
3
votes
1answer
436 views

Gradient ascent to maximise log likelihood

I'm working on an online method to adapt the parameters $\mu, \Sigma$ of a Gaussian distribution. Do to so i perform a gradient descent on the log likelihood $L$. With the help of the matrix cookbook ...
0
votes
1answer
284 views

Review: Gradient of loss function

This question was asked about the gradient of a linear function. In the answer I don't understand why is $\nabla g(w)=X^t$ (the marked in red part)? Shouldn't it be just $\nabla g(w)=X$? And in ...
2
votes
0answers
384 views

Multiclass: I want to develop a customized objective function with weights given by both label and prediction, for Xgboost

I want to develop a customized objective function with weights given by both label and prediction, for Xgboost. Example, let's say you have 2 classes I want to assign a penalties according to this ...