Class Adam
- java.lang.Object
-
- com.github.benmanes.caffeine.cache.simulator.policy.sketch.climbing.AbstractClimber
-
- com.github.benmanes.caffeine.cache.simulator.policy.sketch.climbing.gradient.Adam
-
- All Implemented Interfaces:
HillClimber
public final class Adam extends AbstractClimber
Adaptive Moment Estimation (Adam) optimizer. Adam is an improvement on stochastic gradient descent with momentum, that incorporates adaptive learning rates. The authors describe it in Adam: A Method for Stochastic Optimization.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.github.benmanes.caffeine.cache.simulator.policy.sketch.climbing.HillClimber
HillClimber.Adaptation, HillClimber.QueueType
-
-
Field Summary
-
Fields inherited from class com.github.benmanes.caffeine.cache.simulator.policy.sketch.climbing.AbstractClimber
hitsInMain, hitsInSample, hitsInWindow, missesInSample, previousHitRate, sampleSize
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected doubleadjust(double hitRate)Returns the amount to adapt by.protected voidresetSample(double hitRate)Starts the next sample period.-
Methods inherited from class com.github.benmanes.caffeine.cache.simulator.policy.sketch.climbing.AbstractClimber
adapt, onHit, onMiss
-
-
-
-
Constructor Detail
-
Adam
public Adam(Config config)
-
-
Method Detail
-
resetSample
protected void resetSample(double hitRate)
Description copied from class:AbstractClimberStarts the next sample period.- Overrides:
resetSamplein classAbstractClimber
-
adjust
protected double adjust(double hitRate)
Description copied from class:AbstractClimberReturns the amount to adapt by.- Specified by:
adjustin classAbstractClimber
-
-