How get optimal number of iterations in ray tune - ray-tune

If I'm using ray tune without a scheduler, how can I determine the number of iterations after which the network starts to overfit? I.e. I need an iteration, when the model achieved the best score on a validation set.

Related

What is the recommended value for the pagerank algorithm parameter in the workflow of NebulaGraph Explorer?

The PageRank algorithm calculates the relevance and importance of vertices based on their relationships.
I would like to know the use of parameters ITERATIONS and EPS and their recommended value.
IS_DIRECTED is whether to consider the direction of the edges. If set to false, the system automatically adds the reverse edge.
EPS is the convergence accuracy. When the difference between the result of two iterations is less than the EPS value, the iteration is not continued.
With regard to recommended values, they usually depend on your business scenario, and you will need to debug these values several times to fit your business scenario, such as maybe 10 iterations to meet the business requirements, or maybe 12 iterations.

OpenMDAO: conditional statement depending on the number of iterations

During an optimisation using OpenMDAO, is there any way to access the number of iterations or the values of the design variables in previous iterations during optimisation?
I would like to create a conditional statement depending on the corresponding number of iterations.
I have created a continuous function representing discrete points linked by exponential functions. I would like to increase the exponent of the intermediate function with the number of iterations so that it penalises the intermediate values and the optimisation converges close to one of the discrete values.
Thank you in advance.
What you are describing sounds like a form of continuation/smoothing. I can suggest two different approaches:
Set a reasonable max-iteration limit on the optimizer and add an outside for-loop around the call to run_driver. You could even adapt the iteration limit after each stopping point is reached. Start with a very small iteration limit, and let it grow as you converge more.
Pros:
fairly simple to implement
uses existing OpenMDAO Driver APIs
Cons:
Limited ability to set your own stoping conditions (only really have iteration limit)
Restarting the optimization does not preserve the prior hessian approximation and may lead to poor convergence for quasi-newton method
Skip the OpenMDAO driver interface, and roll your own. This approach was suggested in the 2020 OpenMDAO Reverse Hackathon, for users who find the OpenMDAO Driver interface doesn't meet their need.
Pros:
A lot more flexibility
total control
Cons:
A lot more work

State space models/Kalman filter instability

I am using KFAS (in R) to estimate a local level state space model (smoothing, Gaussians).
In order to evaluate the sensitivity of the estimation, I am introducing a single local perturbation (e.g. a small block of 20 time points with a value of zero out of 1000 time points of the signal) to each of the control signals.
Although the small perturbations are detected in all cases, an additional fluctuations in the resulted estimates are observed throughout the signal.
Is there a way to adjust the estimation to decrease the effect of the local perturbation on the smoothing of the whole signal?
A Kalman filter is inherently a linear filter. So it will always multiply your erroneous signal by some gain (determined by your covariances) and add it to your state. It is by far better to just skip filter updates when you have outliers in your measurement data.

Maximum Likelihood - Estimating Number of maximas

I'm training a Hidden Markov Model using EM, and want to get some estimation of how "certain" I can be about the learned parameters (i.e- the estimated transition, emission, and prior probabilities). In general, different initial conditions result in different parameters, but in many of the cases the different parameters have similar likelihood.
I'm looking for some way to probe the likelihood terrain to get an estimate of the number of local maximas, in-order to get a better idea about the different results I might get. (Running the algorithm takes quite a long time so I can't run it enough times to do a "naive" sensitivity analysis)
Any standard methods to do so?

markov chains stationary distribution's condition about the init state

As a property of the markov chain, the stationary distribution has been widely used in many fields like page_rank etc.
However, since the distribution is just a property about the transition matrix and has nothing to do with the init state of the markov chain.
So what's the condition of the transition matrix make the init state has nothing to do with markov chain so it will finally arrive at the stationary distribution after nth iteration.
Markov chains aren't guaranteed to have unique stationary distributions. For example, consider a two state Markov Chain where the transition matrix is the identity matrix. That means that whatever the initial state is, it never changes. So in that case there is no stationary distribution that is independent of the initial case.
Where there is a stationary distribution, unless the initial state is the stationary distribution, the stationary distribution is only reached in the limit as n tends to infinity. So iteration n+1 will be closer to it that iteration n, but however large n is, it won't ever actually be the stationary distribution. However, for practical purposes (i.e. to the limit of the accuracy of floating point numbers in computers), the stationary state may well be reached after a handful of iterations.
You need the underlying graph to be strongly connected and aperiodic. If you want to find the stationary distribution of a periodic Markov chain just by running some chain, add "stay put" transitions with some constant probability to each node and scale the other transitions down appropriately.

Resources