Questions tagged [momentum]

73 questions
0
votes
1 answer

Chart.js parser returns the wrong date (suddenly back in 1990)

have a look at my code here. I am getting the data from backend so I am not able to manipulate them any further. I got Chart.js as Scatter chart working, but the provided dates are parsed wrong 2020 becomes 1996 and so on. Any idea how I get the…
Felix Weber
  • 526
  • 1
  • 4
  • 8
0
votes
0 answers

Why does my simulation compute only a certain number of digits before only changing the power magnitude?

I am using another person's code to try and demonstrate this problem in physics: a large mass M collides with a smaller mass m, which then moves moves to rebound off a wall returning to collide with the larger mass M. This process repeats until…
0
votes
1 answer

why is gradient descent with momentum an exponentially weighted average?

I recently watched Andrew Ng's video on SGDM. I understand that the momentum term updates the gradient by weighting the last gradient and using a small component of V_dw. I don't understand why momentum is also known as exponentially weighted…
0
votes
2 answers

Get name of slots for momentum optimizer in tensorflow

I want to get names of slots from Momentum optimizer in tensorflow with using get_slot_names as it is explained here in tensorflow webpage. I am using following line in my code to get them: slots=tf.train.MomentumOptimizer(learning_rate=1e-3,…
0
votes
1 answer

TensorFlow - Combining gradients for multiple target objectives when using a momentum optimizer?

If I'm using a optimizer that uses momentum (e.g. AdamOptimizer) and I have a graph which splits at the end leading to two values I'm trying to simultaneously minimize, I can use compute_gradients twice attempting to minimize each value. This…
golmschenk
  • 9,361
  • 17
  • 69
  • 117
0
votes
1 answer

Tensorflow MomentumOptimizer issue

When I run the following simple code, I get this error: tensorflow.python.framework.errors.FailedPreconditionError: Attempting to use uninitialized value Variable_5/Momentum This code works with GradientDescentOptimizer, but I have the error with…
Afshin Oroojlooy
  • 1,088
  • 2
  • 16
  • 34
0
votes
1 answer

1 period TS lag return (ROC) to mimic stock momentum

I am relatively new to R and have read as much as I have been able to on the topic but can't seem to find what I am looking for on the other questions. I am looking to calculate the rate of change (momentum) using TTR and ROC for 12 periods, using…
0
votes
1 answer

Adding momentum term in online back propagation weight update?

I have implemented the ANN for two-layer network, I need to modify my weight update code with momentum, but i need to know how can i update it. below is the code snap of only weight update. The below code updates weight for each example it has seen,…
0
votes
2 answers

How to stop seek (steering behaviour) orbiting target in Box2D?

Ok so I currently have a very simple steering behaviour on my game. One object chases another. The problem is that the chasing object ends up orbiting the other object indefinitely. Is there any way of solving this in box2d? Right now all I've got…
0
votes
1 answer

jquery apply momentum of inertia on drag

I write a little script to drag a div container. It will works for touch and mouse events. I have some difficulties to write the momentum script in order to have my container moving after touchend. I know how to calculate a momentum but I don't know…
lolo
  • 227
  • 4
  • 15
0
votes
1 answer

Problems with Inertina when add force in 2d physic

I try to make a very simple 2d physic functions to solve rigidBody with with sphere particles as colliders, I have so a rigidBody and particle class : function _rigidBody () { this._position = cc.p(0.0, 0.0); this._angle = 0; …
user1482649
  • 45
  • 1
  • 6
0
votes
1 answer

Rotating wheel with touch adding velocity

I have a wheel control in a game which is setup like so: - (void)ccTouchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; CGPoint location = [touch locationInView:[touch view]]; location =…
dev6546
  • 1,372
  • 6
  • 20
  • 39
-1
votes
1 answer

I tried creating lag variable for a momentum plan but not sure how to proceed

this is how I sorted for lag variables data tsset permno date, monthly sort permno date by permno: gen lagret1=ret[_n-1] by permno: gen lagret2=ret[_n-2] by permno: gen lagret3=ret[_n-3] by permno: gen lagret4=ret[_n-4] by permno: gen…
1 2 3 4
5