Thanks to Semyeong Oh, Adrian Price-Whelan, Jo Bovy, and Dan Foreman-Mackey, for very valuable comments.
Full disclaimer: this tutorial is by no means the final word on how to sample mixture models! It also contains some personal biases with respect to the presentation and choice of methodology/technology. But it should provide a good starting point for those who are interested in using a mixture model and sampling it with MCMC. Despite the simplicity of the model/data considered here, the lessons are actually very deep and broadly applicable.
Don't be scared by the amount of code. This notebook is *self-contained* and has a lot of tests. This is intentional, since I didn't want to pretend one can write a complicated MCMC analysis without performing detailed tests and checks at all stages of the work.
Some basic knowledge of Bayes theorem, parameter inference via MCMC, and hierarchical probabilistic models.
If you want to run this notebook, you will need matplotlib, scipy, numpy, autograd, emcee, and Polychord.
The kernels do not have to be identical or even belong to the same family. Also note that the mixture could be infinite. Both of those extensions are the state of the art of modern statistical modeling, but are advanced topics which will not be covered here.
You might have already realized that this loose definition gives a lot of flexibility. As we will see, this creates numerous technical issues, notably in how mixture models are optimized or sampled when fitting data. In particular, there is the infamous label degeneracy, which refers to the ability to swap components/kernels and leave the total PDF invariant. There is also the mode collapse phenomenon, describing how using too many components might make them describe the data points separately (one component per datum). More generally, the presence components with low amplitudes, infinitely low or high widths, creates various new degeneracies in the posterior distribution. For instance, one can probably add many of those components without changing the quality of the fit to a data set. This is related to model selection, and choosing the number of mixtures. All of those issues are problematic if one attempts to naively sample the mixture parameters with MCMC. Luckily, there are standard tricks to get around them, as we will illustrate below.
One of the main restrictions of this notebook is to focus on one-dimensional mixtures. However, if were multidimensional, most of the discussion below would be unchanged - but many of the calculations and illustrations would be much more difficult.
which is our likelihood function for each data point.
The variables are such that and , i.e., they live on the -dimensional simplex.
Let us start by making a simulated data set.
# and the (B-1)-dimensional unit hypercube. This will be described later on.
"""Project the hypercube coefficients onto the simplex"""
"""Project the simplex coefficients onto the hypercube"""
As we can see, our noisy samples span a wider domain than the initial density. Because of the noise, the density is blurried, and we cannot resolve the two components. In fact, we barely guess that there are two components. But, as we will see below, because the noise is known, it can be deconvolved, and we can recover the two components pretty well. Note that this statement is only correct under the assumption of our two-component Gaussian Mixture model! We will see that things are not so simple once this assumption is relaxed and we consider a broader model space.
We have dropped the evidence at the denominator, since it is a normalization constant. It would be important if we were comparing models or fitting parameters accross models. For parameter estimation within one model (here with two components), it is unimportant.
If you are note sure how to do that, please look at the Matrix Cookbook! The reference is above.
This is a very convenient result since we have once and for all removed the latent variables and integrals, and we obtained a simple expression for the posterior distribution of interest. We will refer to this expression as the "simplified" posterior, while the previous one, with the set of latent variables and integrals, is the "full" posterior. Because this analytical elimination of the latent variables is not always possible, and because sometimes one does want to explicitly sample them, the full posterior is of great interest. Below we will see to correctly sample it and deal with the large number of parameters.
Why would we want to explore the full set of parameters, especially if we are able to eliminate a large number of them? This is because we might be interested in recovering the true noiseless values 's. More precisely, we may want to look at the join posterior distribution on the 's and the mixture model. We may find that some values are well recovered regardless of the mixture, while some other might not. More generally, this is because of a shrinkage property of Bayesian hierarchical models: by simulatenously recovering the population parameters and the object parameters 's, we will obtain stronger constraints on than by using the objects individually (i.e., the likelihood function ). This is a natural yet powerful consequence of the hierarchical nature of the model and the parameter inference, which we cannot quite access if we analytically marginalize over the latent variables. We will illustrate this shrinkage property below.
Minor comment: we have integrated each in , but we will adopt bounded priors in the other numerical tests below. This difference does not affect our investigations. If we wanted to be very precise, we could easily include truncated gaussians in the simplified posterior distribution.
We will try sampling both of those posterior distributions below. This is because in many real-world problems this analytic simplification is not possible, and one has to work with the full posterior distribution, which might involve many latent variables and integrals. This would be the case if our population model and/or our noise were not Gaussian. We will work with this toy model because we have the simplified posterior distribution to verify our results.
# Let's first define a few basic functions we will need.
"""Jacobian of the simplex-to-hypercube transformation"""
"""Just the log of a normalized Gaussian"""
# Let's also define a convenient function for testing gradients and derivatives.
# We compare the analytic prediction to the numerical derivative.
Let us sample the simplified posterior distribution (which, for our fake data set, has 6 parameters: the amplitudes, means, and standard deviations of the two Gaussian components) with a very good sampler: emcee. The reasons why emcee is a good sampler are beyond the scope of this tutorial (but scale invariance and speed are two of them!). As mentioned before, we adopt uniform priors in for all parameters. We will manually impose by renormalizing them systematically at each random draw.
As we can see, the result is surprisingly nasty! In fact, running MCMC on this distribution is incorrect. The posterior distribution has strong degeneracies and is multimodal, so standard MCMC will not work. As an exercise, you can check that the sampler has not converged. Also, even if it looks like it is finding multiple modes, you can also check that the density of samples is incorrect at those locations, and is not proportional to the posterior distribution.
We briefly mentioned this phenomenon before. The degeneracy between 's is due to them being normalized and constrained to sum to one. As a result, the posterior distribution, by construction, lives on a thin slice in space.
There are other possibilities for mapping the simplex onto closes volumes, but not all of them lead to simple derivatives (via a change of variable), which is often critical for some inference methods, like the HMC we will use later on.
Moreover, there is an additional complication that made our sampling failed: the labeling degeneracy. That is, we haven't imposed a specific order to the components, which means they can be swapped and lead to the same value of the posterior distribution. This degeneracy is well known and leads to a perfectly multimodal distribution (with modes!). Since the mapping between those modes is known, a simple solution is to tune the prior and only explore one of them. In one dimension, this can be achieved by enforcing the order of the components (for example their 's) in the prior itself. Note that in multidimentional cases, this condition is more difficult to enforce.
We will now order the component locations and use the hypercube-to-simplex mapping to run the emcee sampler once again. We will also make some tighted assumptions about the component amplitudes and widths. We don't want those to be too small in order to avoid new sources of degeneracies in the posterior distribution, like the mode collapse. (This point will be illustrated in the next section).
We now see that we have solved those issues and that we obtain a nicely sampled unimodal posterior distribution, with the true values correctly included.
Note that our sampling procedure is very quick: the two runs merely took a few seconds. This is because emcee has many nice properties and is parallelized. Yet, as we will discuss below, more efficient approaches exist (in terms of the fraction of random proposed samples that are accepted), and those are essential for scaling up from a few parameters to… many millions!
A nice visualization of the result is in data space, where we evaluate our model for a few hundred samples of the posterior distribution, and see that they are nicely around the truth.
Let us now investigate and try to understand the structure of our simplified posterior distribution. We will use the simplex-to-hypercube mapping, but no longer order the components.
Standard MCMC techniques like Metropolis-Hasting or Ensemble approaches, in their standard implementations, will only correctly sample uni-modal distributions. Some of them can be extended to deal with multimodality. Yet, the most widespead solution for fully mapping a multimodal distribution is nested sampling. PolyChord is one of the most sophisticated implementations of this sampling scheme, and is able to accurately map very complicated distributions.
There is a cost: nested sampling typically requires many more function evaluations than standard MCMC, and also has a few parameters that need to be tuned. We will not cover that last point here, but you should know that running nested sampling may require some tuning via trial and error. Finally, we won't discuss or make use of the fact that nested sampling delivers the model evidence (or marginalized likelihood), which is essential for performing model comparison.
Let us run PolyChord on our data set, with the same posterior, no ordering constraints, and two components only.
# Save the data to numpy arrays since we will run polychord outside of this notebook.
# The code we will write to a file and execute to run PolyChord.
# the only parameter of this string is the number of components.
# the second string has a parameter for (de)activating the clustering algorith.
sys.path.append('/Users/bl/Dropbox/software/PolyChord') # Put correct path here.
# to make sure the stack size is sufficient.
Let's visualize the posterior distribution. In this figure we will also plot all the ordering permutations of our true parameter values.
# If you want to plot the live points while PolyChord runs.
We can now see the two modes caused by the labelling degeneracy! PolyChord nicely finds and map them. Since we have activated the clustering algorithm, we can restrict our attention to one of the modes and plot posterior samples. Indeed, we check that our inference is correct.
You may wonder, since the mapping between the two modes is predictable, why we don't simply post-process the chains to order the components and manually merge the modes? This is indeed a very good solution to return to a unimodal case. Unsurprisingly, it is more sampled that the plot we just made with PolyChord's solution for a single cluster, since we've just merged all the clusters by reordering.
Note that this trick must be very carefully applied. One cannot just post-processed any MCMC chain to alleviate the multimodality problem (for mixture models only!). This will only work if the MCMC sampler has converged and properly explored the multiple modes it has mapped (though it is insensitive the the relative amplitudes in this exploration, for obvious geometrical reasons). In our case this is valid.
Note that this PolyChord run took a few minutes. This is because nested sampling is generally calls the posterior distribution more times than MCMC, and our calls were not parallelized here. We have also tuned the parameters to sample the posterior distribution in a conservative fashion. One could certainly find better parameters that lead to a more efficient sampling.
Let's do a more difficult run: perform the inference via PolyChord and three components instead of two. What will we see? Unfortunately, this run will be even slower and take several minutes, but the comments above apply again: this could be made more efficient if necessary.
# run without clustering to speed it up.
If we plot the posterior distribution, we immediately see that the labeling degeneracy has gotten worse (since it scales as factorial ), and that the two-component model is clearly preferred (we nicely recover our input parameters). In other words, one of the components is constrained to be zero.
If we try the previous trick and post-process the chains to reorder the components, we see that the result is not satisfactory at all! This is because the parameters of the third (small) component are unconstrained because it doesn't fit the data. It ends up interfering with the two others.
Unfortunately, we can only conclude that the labeling degeneracy is not that easily killed. We have seen that nested sampling is a natural solution to map out the full posterior distribution. But isn't there another way to do standard MCMC and map a single of the modes? This is what we will do now with HMC.
By histogramming the samples only in the dimensions, we should recover the previous results from the simplified posterior distribution since this is equivalent to numerically integrating out the 's. This is a classic MCMC trick: if one draws samples from a distribution and only look at the dimension (by histogramming the values and ignoring ), one is effectively looking at the marginalized posterior .
Since this model has many more parameters ( instead of ), standard MCMC methods like emcee will struggle. This is because those have a typical acceptance rate of (at best), which is the cornerstone of standard MCMC algorithms like Metropolis-Hastings. This can only be increased by using extra information such as gradients, which we will do below. Moreover, due to volume effects, the space to explore is very large, so there is a chance the relevant portions of the full posterior distribution will rarely be explored. This is known as the curse of dimensionality.
A common way to get around this problem is to adopt a more efficient MCMC method: Hamiltonian or Hybrid Monte Carlo. It has high acceptance rate (close to 1), and this method is designed to explore large parameter spaces and deal with nasty degenerate distributions. This is exactly what we need. Note that it cannot deal with multimodal distribution - we will come back to this point later in this tutorial.
One of the peculiarities of HMC is that it requires gradients of the posterior with respect to the parameters of interest. In our case, we could write those analytically. But in real world problems this might be cumbersome and error-prone. Thus, we will use a powerful tool: automatic differentiation. This originates from the observation that differentiation rules are simple and can be propagated via the chain rule. If one can write the posterior distribution from elementary analytical or numerical operations, then finding the gradients is most likely a mechanical, algorithmic task that doesn't need to be done by hand. And indeed, there are automatic differentiation packages that will go through a piece of code and infer the analytic form of the gradient from elementary functions. Autograd is one of those, and only require that you write your function (here the posterior distribution) with numpy (or rather, its wrapped version of numpy, as you can see from how we have imported numpy and autograd at the start of this notebook).
We will now ask autograd to create a function that computes the analytic gradient of our posterior distribution with automatic differentiation! At the moment, we will focus on our simplified posterior distribution and check that the HMC approach works, before moving to the full posterior distribution.
Of course, this gradient works for our original simplified posterior distribution, not the reparametrized one. So it will suffer from the degeneracies and multimodality we've already discussed. We want to avoid that and use our reparametrized posterior with the simplex-to-hypercube mapping.
If you try to apply autograd to the latter, you will get an error message saying that 'numpy.cumprod' is not yet implemented in autograd. This is the limitation of automatic differentiation: sometimes the operations used in a model are not supported. In our case, we can easily get around this problem by performing the change of variables manually (also explained in arxiv:1010.3436). In most cases, one can use automatic differentiation for large chunks of a model, and implement the rest by hand. Note that there are other frameworks supporting automatic differentiation. Autograd is convenient because it works on top of numpy. For large data sets and complicated likelihoods, I recommend Google's TensorFlow. It requires rewriting some of your code in a particular format, but is incredibly powerful.
Note that autograd also allows us to extract the Hessian of our distribution of interest. We will use that to tune our HMC run and make it blazingly efficient. This is explained in arxiv:1206.1901 and also many other HMC papers.
The code below is an implementation of the classic HMC algorithm with bounds and a mass matrix. It is not parallelized, so we expect it will be slower than emcee. All the HMC runs below will take a few minutes to complete. However, by using analytic derivatives and Hessians, we should hope that it performs well and samples the target distribution very well. We will use random step sizes and lengths, too. Those technical choices are fairly common and discussed in Neal (2006).
The mass matrix is important in HMC, because it informs the sampler of the dimensions of the various parameters, and how constrained they are, so that the random moves are made in the most efficient directions. The most efficient choice for the mass matrix is to use the inverse hessian at the parameter optimum (i.e., the covariance matrix of the parameters). In our case we will also update the Hessian every 500 iterations, evaluated at the posterior mean. This tends to work better (than finding the optimum and computing the Hessian once) for nasty distributions.
Because this approach tells the algorithm about the local curvature, it will implicitly restrict the sample to a single mode in the posterior distribution.
Note that our sampler will throw a warning every time it rejects a sample (which is possible due to numerical approximations involved in the HMC algorithm). But this will be very rare; our acceptance rate will be very close to one.
# with num_steps steps of size step_size relative to the gradient.
# x0 is the initial point, lnprob the posterior distribution, lnprobgrad is gradients.
The marginalized posterior distribution for pairs of parameters looks good. Let's look at the marginalized posterior for the individual parameters and compare with the results we obtained with emcee.
As we can see, the HMC run was successful, which is good! However, it is slower than emcee. This is because, despite using gradient information to obtain a higher acceptance rate (close to 1, as opposed to 0.3), our HMC sampler is not parallelized. And emcee is generally blazingly fast. We could make HMC much more efficient if we wanted.
However, we will now sample the full posterior distribution, which emcee cannot deal with since it has way too many parameters.
using HMC with the settings described before.
The marginalized posterior distribution looks good. For the population parameters , it matches what we obtained with the simplified posterior distribution. This is remarkable because we have added a ton of parameters to the model, and explored a much bigger parameter volume. Thanks to HMC, this exploration was efficient, and we were able to numerically marginalize over all the latent variables 's and recover the results from the analytic solution, the simplified posterior distribution.
The other panels in the figure above show a comparison of the posterior distribution on each versus the likelihood function . This is a typical illustration of Bayesian shrinkage: by fitting a model to the population of objects, we in turn improve the individual estimates. It doesn't matter that those parameters are latent - they are connected via a hierarchical probabilistic model, so the information gained in one part of the model might actually affect the rest of the model. This is a theme that we have explored (and will continue to explore) in other tutorials.
We have not discussed a number of additional issues that may arise, including what happens if the data are very noisy and/or the components significantly overlap. Those are common with mixture models.
Indeed, those can create new degeneracies in the posterior distribution, since components can more easily be interchanged if they overlap or in the presence of significant noise. One can still find a prior that alleviates those degeneracies, but this might not be sufficient. In that case, an HMC sampler that is carefully tuned should still work. But if the distribution is really multimodal, then one could adopt a "tempered" HMC sampler. For example, the approach of https://arxiv.org/abs/1704.03338 is interesting.
Another related question is how to find a suitable prior to alleviate labelling degeneracies in dimensions. This is possible, but may require some careful thinking. Again, the key is to order the components in a quasi-unique fashion.
In other words, one way or another, a huge multidimensional integral is needed. Calculating evidences accurately is a research topic on its own. One can run a very long MCMC chain and perform this integral numerically. Or adopt a more adequate sampler that explicitly targets the evidence (e.g., via nested sampling). Those options are good. For two runs with two different numbers of components and , the evidence ratio (also called Bayes factor) will allow one to perform model selection and pick the preferred number of components. Even better, one could simply consider both models simultaneously, and weight the samples in each model by their respective evidences. All of those could be performed with nested sampling.
Note that with mixture models, we are in a very particular situation: by fixing one or multiple or to zero or one, the number of components has effectively changed. We say that the models are nested. Nested models are very convenient and are worth learning about. Many physical models are nested, and this hugely simplifies model comparison, via the Savage Dickey density ratio, for example.
Equivalently, one could adopt a trans-dimensional approach and explore the space of models with a variable number of components. It is in fact equivalent to multiple-run solution we just discussed. Either way, there are various pieces of technology to achieve that, such as trans-dimensional MCMC (which explicitely adds and removes parameters), which we will not discuss here. But you should immediatly spot that we have already done that: when we ran nested sampling with three components, we found that the posterior distribution was naturaly peaked at two components, with the third one often set to zero. The point is: for nested models, it is not that hard to perform a trans-dimensional sampling. One only needs to write the posterior distribution in a convenient, nested form, and think carefully about what priors would help pinning down (i.e., sampling) the most probably number of components.
This brings us to our final point of discussion and experiment.
Let's run PolyChord with more components - say four - and show the result in data space, i.e., plot the true density of objects and that infered with our Gaussian mixture model.
In this figure, we have separated the models into their number of components (specifically: any component having an amplitude ten times smaller than the largest component is not counted). Since we randomly picked posterior stamples, the number of curves arriving in each subpanel is also telling us something about the most probably number of components. In fact, we could relate those relative densities to Bayes factors for the nest models with 1, 2, 3 and 4 components. What we are doing is much more generic and straightforward: we have implicitly performed a trans-dimensional sampling since we have allowed some of the compoments to be zero.
One final comment: you can see that except for the one-component case, most of our model samples indeed capture the true bimodal nature of the density. However, why are some of those models made of three and four components? This happens because we have not restriced the components to overlap. This creates yet another degeneracy on top of the labeling one: the fact that any component can be decomposed into sub-components with lower amplitudes. When considering a larger space of models (i.e., trans-dimensional), this is a complicated problem. This is related to the interpretability of mixture models. Luckily for us, it can be solved in two ways: in a fully Bayesian inference setting like we described in this tutorial, one can easily adopt a prior that mitigates this effect, for instance by forcing the components to be separated by some amount. An alternative which is particularly popular in the realm of empirical Bayesian inference and maximum a-posteriori solutions (i.e., finding the optimum of the posterior distribution only) is a set of "split and merge" methods, allowing to litteraty split and merge some of the components when relevant. The paper about extreme deconvolution by Bovy et al (2009) is a good place to learn about that.
If we adopt a large number of components, what do you think will happen? The answer is simple: the components will position themselves at the location of the true values . The phenomenon is known as mode collapse. Worse, the 's are latent variables, the collapsed components will never properly converge. Another final comment: if the number of objects is large and the gradients intensive to compute, standard HMC might be less compelling. Luckily, there is a natural solution to this issue: not using all of the data when calculating the gradient. However, a naive implementation of this idea is not recomment. Indeed, it has been shown by https://arxiv.org/abs/1402.4102 that this can yield arbitrarily bad results. The correct approach is presented in that same paper: the HMC must include an extra term to capture the extra noise introduced by the approximate gradient. This idea works beautifully well, even on large models and data sets, such as deep neural networks.


text:
Jewish World Review Nov. 2, 2007 / 21 Mar-Cheshvan 5768
http://www.JewishWorldReview.com | . Queen Elizabeth welcomed Saudi King Abdullah to Buckingham Palace Tuesday and rode with him in a gilded horse-drawn carriage. The reception was a message to the king. With oil at ninety-four dollars a barrel you've got us all living like the Amish.
The Boston Red Sox held a World Series victory parade in Boston Tuesday. Their fans went wild. So much money is being spent on beer in Boston that Dick Cheney is seriously considering ditching the oil industry and getting in bed with Sam Adams.
Prince Harry was questioned by Scotland Yard Tuesday about the shooting of two rare hen harrier birds. The cops were very careful with him. There are only twenty breeding pair in all of England and no one wanted the incident to turn the prince gay.
Alex Rodriguez was ripped Tuesday for breaking into World Series coverage with news he's leaving the Yankees. It was a blatant display of hogging the spotlight to satisfy his ego. In other words, he passed his Los Angeles physical with flying colors.
The U.S. Navy destroyer Arleigh Burke rescued a North Korean merchant ship from ruthless pirates who had seized the boat off the African coast of Somalia Tuesday. This wasn't the first time. Every year the North Koreans get lost on the way to Syria.
The Democratic candidates pledged Tuesday to keep Iran from getting a nuclear weapon. How can the United States prevent Iran from acquiring nuclear weapons if they really want to get them? We can't even keep the kids away from Britney Spears.
Dennis Kucinich said in Tuesday's debate he's seen UFOs, right after he said it was time to check on President Bush's mental health. It could all be true. Every week they pick up their lithium at the same pharmacy and act like they don't know each other.
Jerry Ford recorded his deepest beliefs for a book called Write It When I'm Gone, which was published Monday. He revealed, in remarks he wanted published posthumously, that he thought Bill Clinton was a sex addict. Some guys are always the last to get the word.

redpajama_set_name: RedPajamaCommonCrawl


Cinco de Mayo means Fifth of May, and it marks the day when an untrained Mexican army of peasants defeated a highly-skilled French army in the town of Puebla, Mexico in 1862. This day is is a celebration of patriotism, much like our Independance Day.
Come Join the Fun - sung to "Frere Jacques"
Is lots of fun, for everyone.
Come join the fun, with everyone.
Here Is Our Pinata - sung to "Sing a Song of Sixpence"
Paint plate and bowl. Hot glue Bowl to the bottom of the plate. Punch holes in each side. Tie yarn in holes and tie around child's neck.
I have cut a poster board into 4 rectangles/squares, and then let the kids paint them all sorts of colors. Then they glue a shapes made out of scrap material and then glue yarn little strings on each end. It looks like a little Mexican blanket.
I like to make hot pepper wreaths. I cut out red, green and yellow construction paper peppers and let the kids glue to paper plate with center cut out. We add a raffia bow on top, best look yet!
I cut out maraca shapes and let the children decorate with glitter, confetti, colored glue. They are real pretty and the kids love them!
Our class always makes construction paper tacos. I cut out paper shapes like tomatoes pieces, cheese, lettuce, brown for meat. I then let them glue it to a circle that I cut out of a manila file folder, the kids fold it over and it's all created! Really a lot of fun and the kids think it's great! I even extend it to the kids helping make their own tacos at lunch!
Give the children bowls of red, blue and yellow finger paint, and sheets of white construction paper. Allow the children to mix the different colors of paint on their papers and talk about what they created. Talk about primary and secondary colors.
Make a pinata using mural rolled paper.Cut a square shape like a big pillow. Now staple 3 sides. Leave open one side for stuffing with stickers, raisins, peanuts in the shell etc... Let the children glue on cut tissue square will work. You glue. It goes red,white & When finished, fill & staple shut. Poke a hole & hang w/rope. make a bird using a brown paper bag.
1.. Cut a hole in a paper bag so that your or your child's head can fit through.
2.. Decorate the paper bag poncho with brightly colored markers or paints or crayons.
3.. Try a waterpaint wash technique, whereby you draw on the paper with crayons and paint a light wash of paint overtop.
4.. You can also glue bits of fabric scraps onto the paper bag as well.
5.. Have a look at some real ponchos for inspiration.
Fold the fabric in half. Cut a v-shaped slit in the middle of the fold. The slit should be large enough to let your head push through it. Cut fringes at the bottom of the poncho. Draw geometric designs on the bottom edge.
Use white paper & make flags. If you make small flags you can use index cards & staple them onto a straw.
To get in the spirit of your Mexican celebration, let the children make serapes (Mexican blankets)to wear over their shoulders. Use rolled paper that is about 12 inches wide. Cut a length that is long enough to hang over the front & back of the child. Let the child design the serape & then they can cut fringe on the bottom edges. You could also make these out of old white sheets.
Cut red, white & green paper strips & let the children make chains to decorate the room.
This is good for older children to make (6 & up). If you have younger kids it is good to do a demo. Ojo de Dios means "eye of God" in Spanish. The Mexican Indians made them for good luck pieces. Cross 2 sticks.Tie the yarn in a knot around the sticks where they cross. Weave the yarn over one stick, then around & under, then over the stick toward the next stick. Do this on each stick. Continue around the square doing the same thing for all the rows. Change colors whenever you'd like to. Start a new color by tying it to the yarn.
You can make miniature pinata's out of single egg cups. Have the children decorate the egg cup and thenthey can glue small tissue paper streamers to hang down on their pinata. Use a pipe cleaners for top top to hang on to. You can also decorate two paper cups and then add some beans or rice to one cup and tape the other cup on top upside down and the children can shake them as maracas. You can make serapa's using paper or strong paper towels the children can decorate it with red and green markers and then wear them over one shoulder.
Where Do We Get Clay?
Purchase a piece of raw clay from a pottery or craft store. Gather a few pictures of Mexican pottery. Show the pictures and clay to the children ask them where they think we get the clay. Explain that clay comes from the earth, in the mud, usually on river banks. Give each child a piece of the clay and ask him to mold the clay into forms if they wish. Make clay pots and paint them.
Terra Cotta Pots Give each child a small piece of clay and let have a chance to play with it a little. Then show them how to make a "pinch pot" by taking the clay, making a ball out of it, and pinching it down in the middle to make a "pot." Let this air dry and they can take them home at the end of the week.
Collect empty yogurt cups that still have the lids. Decorate a festive cover which will be taped around the yogurt cup to hide the words (I have seen some classes paint their cups, but the paint sometimes starts to flake off when the kids are using them). Tape a popsicle stick to one side of the cup (masking tape seems to hold better than glue). Put about 15 to 20 small beans inside the cup and tape closed.
Give each child 3-5 different colored squares of tissue paper and have them set the one on top of another. Shoe the children how to fan fold and then wrap a twist tie around the the middle of the fan folded paper. Have each child carefully open his flower by pulling the different colors of paper upwards or downwards to seperate each layer.
Give each child a piece of construction paper and allow them to decorate any way they wish.(crayons and markers) Next, have the children fold the paper in half length wise. They should then cut 1'' cuts apart beginning at the fold but leave one 1'' border around the edges except the fold. Have the children then unfold and roll each long edge of the paper in a circle and staple. Use the hole punch to make two holes in the top, then tie a piece of string to the hole as a hanger.
Use two small paper plates that have been decorated in the way you like. Fill with beans,corn,beads,pebbles etc... Now staple the 2 plates together.
Outline both of the child's shoes onto brown paper. Cut 4 strips 8 1/2 by 1 inch using the same brown paper. Cut out the shoe outline. Let the child glue the 2 straps to each outline shoe shape & you will have huraches!
Cut a hat shape out using construction paper. Punch holes all around. Let the child decorate & lace. Use culrling ribbon so you won't have to use a needle. This ribbon is inexpensive.
Take a yellow piece of construction paper & cut out a large circle shape. Older kids can do this. Now fold it in half. You want the fold to be off center so that the bottom section sticks out more then the top. Open up the yellow paper circle & glue on the ingred. on the bottom outer edge about 1 1/2 inches wide. Apply glue to the edge & add items.Then fold down taco shell & glue the top down or staple it closed like a folded taco. Green Easter grass makes great lettuce. Cut small red triangles for tomatoes. Orange strips of paper become cheese Glue on real pinto beans. Also using green paper cut out a whole jalapeno to glue on the top of the taco.
Go to Page 2 of Cinco de Mayo Theme!


I'm very glad to say that I received my wireless black today from advancedmp3players. Fantastic bit of kit and no kidding, I had it plugged in and was listening to music within 10 minutes! I previously had fears of spending hours fiddling and writing on this forum before I got it to work but hell no, it was a piece of cake.
I had already installed Slimserver 6.2.1 and filled it with plenty of tunes, plugged the power and phono leads in, switched on, went through the set up manual, SB3 instantly found my wireless router (Linksys WRT54GS)(60-70%signal strength), and that was that, music heaven.
So any beginners out there wavering, take the plunge it was easy for me. I do sympathise with any people out there who are having difficulties though.
p.s. It also sounds great, my hi-fi is already no slouch, Roksan Caspian CD, MF A5 amp, Sonus Faber speakers. AND bear in mind I'm only using MP3, 192-320 kps, no Flac for me(yet).


text:
Arts Advisory Board
On the Foundation
On Princess Grace
Princess Grace Award Winners
Statue Award Winners
Prince Rainer III Award Winners
Award Winner Projects
Alex Soldier
For Award Winners
#gratitudeandtonic
YP Guild
Paul Tazewell x NeffNYC Masks
Grace Influential
RICCARDO HERNANDEZ
Princess Grace Statue Award, 2000
Princess Grace Award
Theater Apprenticeship, 1992
INTAR Theatre
A.R.T.: Riccardo Hernandez has designed sets for Britannicus, Romeo and Juliet, Desire Under the Elms, The Miser, Uncle Vanya, Marat/Sade, Full Circle (directed by Robert Woodruff), Enrico IV, Phaedra, Othello, The Doctor's Dilemma, Three Farces and a Funeral, and Dream of the Red Spider. Broadway: Tony Kushner's Caroline, or Change; Topdog/Underdog (also Royal Court, London); Elaine Stritch at Liberty (also West End's Old Vic, London and National Tour); Parade (Tony and Drama Desk Nominations) directed by Hal Prince; Bells Are Ringing (directed by Tina Landau); Noise/Funk (also National Tours and Japan); The Tempest. New York: Over a dozen productions at New York Shakespeare Festival/Public Theater where he has collaborated with George C. Wolfe, Brian Kulik, Mary Zimmerman, Ron Daniels, Liz Diamond, Graciela Daniele, Peter du Bois, among others; Santa Fe Opera, Lincoln Center, Second Stage Theatre, New York Theater Workshop, Manhattan Theatre Club, MCC, Playwrights Horizons, Cherry Lane Theatre, Brooklyn Academy of Music, etc. Regional: ACT, Alliance Theatre, Arena Stage, Center Stage, Dallas Theater Center, Geffen Playhouse, The Goodman Theater, Hartford Stage, Kennedy Center, La Jolla Playhouse, Long Wharf Theatre, McCarter Theatre, Mark Taper Forum, Old Globe Theatre, Seattle Repertory Theatre, South Coast Rep, The Shakespeare Theatre, Yale Repertory Theatre, etc. Opera: Lyric Opera of Chicago, Houston Grand Opera, New York City Opera, Los Angeles Opera, Pittsburgh Opera, Michigan Opera, Opera Pacific, Berkshire Opera and Hong Kong. Cuban born, raised and educated in Buenos Aires, Argentina. Ed.: Yale School of Drama
Recipient Login
The Princess Grace Foundation – USA is dedicated to elevating extraordinary artists in theater, dance, and film via game-changing awards in the form of grants, scholarships, and fellowships. The Foundation is a non-profit, publicly-supported charity, headquartered in New York City. Apply For A Grant
Join our community of dedicated arts patrons.
See How You Can Contribute
Select list(s) to subscribe to Current Subscribers
Example: Yes, I would like to receive emails from Princess Grace Foundation-USA. (You can unsubscribe anytime)
By submitting this form, you are consenting to receive marketing emails from: Princess Grace Foundation-USA, 150 East 58th Street, New York, NY, 10155, http://www.pgfusa.org. You can revoke your consent to receive emails at any time by using the SafeUnsubscribe® link, found at the bottom of every email. Emails are serviced by Constant Contact
© Princess Grace Foundation-USA | Images supplied by Getty, The Kobal Collection, & Princely Palace of Monaco | Site Design by Scout Collective


text:
L'Archara () è un fiume dell'Estremo Oriente russo, affluente di sinistra dell'Amur. Scorre nell'Archarinskij rajon dell'Oblast' dell'Amur.

L'Archara è formato dalla confluenza dei fiumi Gongor e Chara che scendono dagli speroni dei monti della Bureja. Nella parte superiore è un fiume di montagna che scorre veloce. Più avanti la valle del fiume si allarga gradualmente, nel corso inferiore è un fiume piatto e serpeggiante con molti canali. La lunghezza del fiume è di 155 km (sommata a quella del Gongor è di 277 km), l'area del bacino è di 2 790 km². Sfocia in un canale laterale dell'Amur, il Michajlovskaja, a 1 594 dalla foce. Maggior affluente, da sinistra, è il Salokači (lungo 124 km).

L'insediamento principale dell'area è il villaggio di Archara (a 3 km dal fiume) attraversato dalla Ferrovia Transiberiana.

Note

Collegamenti esterni
 Mappa  (Edizione 1977)

Fiumi dell'Oblast' dell'Amur
Affluenti dell'Amur

redpajama_set_name: RedPajamaWikipedia


text:
Henry VIII's Wives
The 90 Minute Dash
Running Tours
2023 Running Tours
91 MILES THE ROYAL BASTARD
VIRTUAL RUNNING / WALKING CHALLENGE SERIES
TAKE PART ANYWHERE IN THE WORLD
OPEN UNTIL THE END OF 2023
Follow in the footsteps of Elizabeth I, aged 2 years and 8 months in the immediate aftermath of her mother, Anne Boleyn's execution. This epic virtual running and walking challenge will take you on a 91 mile toddle through Elizabeth's early life.
Every time you complete a walking or running activity, you'll advance along the virtual map between Greenwich, Hunsdon House and Hampton Court - unlocking podcasts and postcards from Elizabeth's entourage along the way.
Earn beautiful fling, stay focused and make your miles more fun. Run or walk the 91 miles and choose to complete it in 2, 4, 6, 8 or 12 weeks and sign up today.
BUY SEASON PASS FOR SERIES
EARN BEAUTIFUL BLING
Celebrate your achievement with a beautiful limited edition Elizabeth I magnetic medal. Exclusively designed for this event, with lots of special history touches for history lovers, these medals are bound to stand out in your collection.
GET THE WHOLE SET
This medal is the first in a series of medals dedicated to The Rivals Series. This year, we're creating a giant finisher's medal upon which you can attach all the individual medals in a secret Tudor scene.
UNRAVEL FASCINATING HISTORY AS YOU GO
Over the 99 miles you'll learn about the effect that Anne Boleyn's death had on Elizabeth's life. And we'll uncover some of the incidents form Elizabeth's childhood that shaped her views and policies as queen.
We've partnered up with My Virtual Mission for this event so your whole journey is managed through their amazing tech platform - available through their website and in an easy-to-use app.
When you sign up for each challenge, you'll be asked for your goal completion time for the challenge. E.g. How many weeks/months would you like to take to walk/run 91 miles for Elizabeth I's 91 Miles the Royal Bastard.
SELECT YOUR GOAL
Wherever you are in the world, complete a running or walking activity - whatever distance you like. Measure it using a GPS tracking device or take a photo of your treadmill screen. Lots of people have fancy GPS watches but there are plenty of free apps (e.g. Strava) that you can download on your phone that work just as well.
RUN OR WALK
LOG YOUR ACTIVITY AND MOVE ALONG THE VIRTUAL MAP
Once this activity is logged in the My Virtual Mission app, you'll see your figure move along the virtual map. You can set it to automatically sync to some apps, or manually upload a photo of your GPS evidence in seconds.
UNLOCK PODCASTS AND POSTCARDS
When you reach certain places along the map, you'll unlock a postcard or podcast to tell you more about her time there. For example, Hever is about 22 miles along the route for Anne Boleyn. Once you've clocked up 22 miles of activity, you'll unlock a podcast telling you more about Anne's time at Hever. This will appear in the My Virtual Mission app/website and you'll also receive it by email.
At any time in your journey, you'll be able to check out your virtual surroundings on street view. You might even bump into someone with a matching ruff!
SEE YOU ON STREET VIEW
SHARE YOUR EXPERIENCE WITH OUR AMAZING COMMUNITY
The Secret London Runs Connect Facebook group is full of like-minded walkers and runners. Come join us and share the fun.
EARN YOUR MEDAL
We'll send you your medal in the post to celebrate your journey. There are 6 magnetic medals - will you collect them all? For this series, we're also working on a giant Finisher's Medal to host all the individual medals!
SIGN UP OPTIONS
SINGLE EVENT ENTRY
Elizabeth I's 91 Miles the Royal Bastard
Motivation and accountability for 99 miles
A unique magnetic medal with original illustrations
Unlocks loads of history along the route via postcards and podcasts
Access to "My Virtual Mission" platform for race mapping, tracking and street view, and synced activity uploads.
Choose your own time frame - set a goal for how long you want to take to complete the challenge.
Take part anywhere in the world and join our amazing community in the Secret London Runs Connect Facebook group.
£22.50 (excluding VAT in the UK and shipping outside the UK)
START THE FIRST CHALLENGE
6 QUEEN SEASON PASS
Entry to all 6 challenges, whilst saving a few £££
6 Magnetic medals, individually wrapped
A free limited edition postcard with original illustrations
25% off the medal backing plate and any event-based merchandise (e.g. buffs)
Motivation for all of the challenges!
A fabulous community to share the challenges with
6 QUEEN PASS: PAY IN 2 INSTALLMENTS
We want as many people as possible to be able to benefit from our season passes. But we're aware there's a small gap between us launching the challenges and the start of the first one and your bank account might not welcome the surprise. So we're giving you an option to pay in two installments.
With the first installment you'll get access to the first two challenges in The Rival Series as well as the limited edition postcard (with original illustrations) that we're sending to all Season Pass Holders.
Once you've paid the second installment, we'll send you all 6 of your medals, as well as open up the remaining 4 challenges for you when they launch.
You'll also get all the benefits of full season pass holders, which includes 25% off the medal backing plate and any event-based merchandise (e.g. buffs).
BUY 6 QUEEN SEASON PASS
BUY FIRST INSTALLMENT
169 MILES THE INFANT QUEEN
£23.50 (+ VAT & Shipping where applicable)
This journey explores the terrifying existence of the infant queen, Mary Stewart, born in 1542, and becoming Queen of Scotland at just 6 days old. We'll follow Mary through Scotland for the first 5 years of life, as her Mother, Mary of Guise, struggled to keep her safe from forces near and far.
Cycling miles permitted
197 MILES THE QUEEN'S SISTER
Opens 29th April 2022
We'll pick up Elizabeth's next journey in 1554, and follow the 20-year old to the Tower of London, where she was imprisoned for treason by her sister, and now Queen of England, Mary. We'll explore how Elizabeth managed to escape the gallows and retreat to the country under house arrest, and we'll stay with Elizabeth until, aged 25 years old, she discovered that she was to replace her sister on the throne.
Cycling miles permitted & can complete in teams
126 MILES THE WHITE QUEEN
Opens 10th June 2022
It's 1559 and Mary has been living in France for the past 12 years. She's married to Francis II, the Dauphin and we pick up her journey on the deathbed of her Father-in-law, Henry II at the Palace of Tournelles. We'll be following her to the coronation of her husband in Rheims, where Mary- now the Queen of Scotland and France - rather bravely wore white amongst a crowd of mourners in black.
500 MILES THE CAPTIVE QUEEN
Opens 5th August 2022
We know some of you love the long journeys and others hate them. So you can choose how much of Mary's 20 year incarceration in England you want to follow. The challenge follows Mary as she's forced to abdicate, begs for release and eventually to her execution at Fotheringhay.
Cycling miles permitted & can complete in teams for longer version.
75 MILES THE VIRGIN QUEEN
Starts 7th October 2022
It's 1588 the Spanish Armada threatened to destroy England as a huge fleet of ships set sail for the channel. In this journey we'll follow Elizabeth's movements during the successful English defence, ending up in Tilbury in Essex for her famous victory speech to the troops. We'll be exploring why she never married and how symbolism and propaganda were used to promote her status as the warrior queen.
THE MEDALS
6 Magnetic Medals to collect through the year. And a GIANT 18cm Finisher's Medal with spots to fix each medal.
The giant medal's ribbon is detachable - so you can alternate between wearing it and hanging it on your wall.
BUY GIANT FINISHER'S MEDAL
When you buy a season pass for The Rivals, you'll get 25% off the giant finisher's medal and any event-based merchandise.
We'll keep you in the loop
Check out our sightjogging friends around the world at runningtours.net
To book a tour or ask a question, get in touch. We'd love to hear from you.
Thank you for your enquiry. We'll get back to you soon.
Copyright © 2022 | Vanessa Cain-Tait| Secret London Runs Ltd


text:
\section{Introduction}

Online convex optimization is a sequential prediction paradigm in which,
at each time step, the learner chooses an element from a fixed convex
set $\scS$ and then is given access to a convex loss function defined on the
same set. The value of the function on the chosen element is
the learner's loss. Many problems such as prediction with expert
advice, sequential investment, and online regression/classification
can be viewed as special cases of this general framework.
Online learning algorithms are designed to minimize the regret. The
standard notion of regret is the difference between the learner's
cumulative loss and the cumulative loss of the single best element in
$\scS$. A much harder criterion to minimize is shifting regret, which
is defined as the difference between the learner's cumulative loss and
the cumulative loss of an arbitrary sequence of elements in
$\scS$. Shifting regret bounds are typically expressed in terms of the
\textsl{shift}, a notion of regularity measuring the length of the trajectory in $\scS$ described by
the comparison sequence (i.e., the sequence of elements against which the regret is evaluated).
In online convex optimization, shifting regret bounds for convex subsets $\scS\subseteq\R^d$ are obtained for the projected online mirror descent (or follow-the-regularized-leader) algorithm. In this case the shift is typically computed in terms of the $p$-norm of the difference of consecutive elements in the comparison sequence ---see~\cite{hewa01,Zink03} and~\cite{CeLu}.

We focus on the important special case when $\scS$ is the simplex. In~\cite{hewa01} shifting bounds are shown for projected mirror descent with entropic regularizers using a $1$-norm to measure the shift.\footnote{Similar $1$-norm shifting bounds can also be proven using the analysis of~\cite{Zink03}. However, without using entropic regularizers it is not clear how to achieve a logarithmic dependence on the dimension, which is one of the advantages of working in the simplex.} When the comparison sequence is restricted to the corners of the simplex (which is the setting of prediction with expert advice), then the shift is naturally defined to be the number of times the trajectory moves to a different corner. This problem is often called ``tracking the best expert'' ---see, e.g., \cite{hewa98,Vov99,hewa01,bowa,GyLiLu05a}, and it is well known that exponential weights with weight sharing, which corresponds to the fixed-share algorithm of~\cite{hewa98}, achieves a good shifting bound in this setting. In~\cite{bowa} the authors introduce a generalization of the fixed-share algorithm, and prove various shifting bounds for any trajectory in the simplex. However, their bounds are expressed using a quantity that corresponds to a proper shift only for trajectories on the simplex corners.

In this paper we offer a unified analysis of mirror descent, fixed share, and the generalized fixed share of~\cite{bowa} for the setting of online convex optimization in the simplex. Our bounds are expressed in terms of a notion of shift based on the total variation distance. Our analysis relies on a generalized notion of shifting regret which includes, as special cases, related notions of regret such as adaptive regret, discounted regret, and regret with time-selection functions. Perhaps surprisingly, we show that projected mirror descent and fixed share achieve essentially the same generalized regret bound. Finally, we show that widespread techniques in online learning, such as improvements for small losses and adaptive tuning of parameters, are all easily captured by our analysis.

\section{Preliminaries}
\label{sec:prelim}
For simplicity, we derive our results in the setting of online linear optimization. As we show in the supplementary material, these results can be easily extended to the more general setting of online convex optimization through a standard linearization step.

Online linear optimization may be cast as a repeated game between the {\sl forecaster} and the {\sl environment} as follows. We use $\Delta_d$ to denote the simplex $\bigl\{ \bq \in [0,1]^d \,:\, \|\bq\|_1 = 1 \bigr\}$.

\noindent
{\bf Online linear optimization in the simplex.} For each round $t = 1, \dots, T$, \\
\indent 1. Forecaster chooses $\bp_t=(\wh{p}_{1,t},\ldots,\wh{p}_{d,t})\in \Delta_d$ \\
\indent 2. Environment chooses a loss vector $\mathbf{\ell}_t = (\ell_{1,t},\ldots,\ell_{d,t}) \in [0,1]^d$ \\
\indent 3. Forecaster suffers loss $\bp_t^{\top}\mathbf{\ell}_t$~.

The goal of the forecaster is to minimize the accumulated loss, e.g.,
$\wh{L}_T= \sum_{t=1}^T \bp_t^{\top}\mathbf{\ell}_t$.
In the now classical problem of prediction with expert advice,
the goal of the forecaster is to compete with the best fixed component
(often called ``expert'')
chosen in hindsight, that is, with $\min_{i=1,\ldots,T} \sum_{t=1}^T \ell_{i,t}$;
or even to compete with a richer class of {\sl sequences} of components.
In Section~\ref{sec:target} we state more specifically the goals considered in this paper.

We start by introducing our main algorithmic tool, described in
Figure \ref{alg:genupd}, a share algorithm whose formulation
generalizes the seemingly unrelated formulations of the algorithms studied in~\cite{hewa98,hewa01,bowa}. It is parameterized by the ``mixing functions''
$\psi_{t}:[0,1]^{t d} \to \Delta_d$ for $t \geq 2$
that assign probabilities to past ``pre-weights'' as defined below.
In all examples discussed in this paper, these mixing functions are
quite simple, but working with such a general model makes the main ideas more
transparent. We then provide a simple lemma that serves as the starting
point\footnote{We only deal with linear losses in this paper. However, it is straightforward that
for sequences of $\eta$--exp-concave loss functions, the additional
term $\eta/8$ in the bound is no longer needed.}
for analyzing different instances of this generalized share algorithm.

\begin{algorithm}[h]
\begin{minipage}{\textwidth}
\rule{\linewidth}{.5pt}
\caption{\label{alg:1} The generalized share algorithm.}
\label{alg:genupd}
\medskip
	\textbf{Parameters:} learning rate $\eta>0$ and mixing functions $\psi_{t}$ for $t \geq 2$ \vspace{.125cm} \\
	\textbf{Initialization:} $\bp_1 = \mathbf{v}_1 = (1/d,\dots,1/d)$ \vspace{.125cm} \\
	\textbf{For} each round $t = 1, \dots, T$,
	\begin{itemize}
	 \nitem{1} Predict $\bp_t$ ;
	 \nitem{2} Observe loss $\mathbf{\ell}_t \in [0,1]^d$ ;
	 \nitem{3} [loss update] \textbf{For} each $j=1,\dots,d$ define \\
	 $\displaystyle{v_{j,t+1} = \frac{\wh{p}_{j,t} \, e^{-\eta\,\ell_{j,t}}}{\sum_{i=1}^d \wh{p}_{i,t} \, e^{-\eta\,\ell_{i,t}}}} \ \ \ $ the current pre-weights, \ \ \ and $\bv_{t+1} = (v_{1,t+1},\ldots,v_{d,t+1})$; \\[2mm]
	 $ \uV = \bigl[v_{i,s}\bigr]_{1 \leq i \leq d, \, 1\leq s\leq t+1} \quad$ the $d \times (t+1)$
matrix of all past and current pre-weights;
	 \nitem{4} [shared update] Define $\displaystyle{\bp_{t+1} = \psi_{t+1} \bigl(\uV \bigr)}$.
	\end{itemize}
\rule{\linewidth}{.5pt} \vspace{.125cm}
\end{minipage}
\end{algorithm}

\begin{lemma}
\label{lem:b0}
For all $t\geq 1$ and for all $\bq_t\in\Delta_d$, Algorithm~\ref{alg:genupd} satisfies
\[
    \bigl(\bp_t - \bq_t\bigr)^{\! \top}\mathbf{\ell}_t
\le
    \frac{1}{\eta} \sum_{i=1}^d q_{i,t} \ln \frac{v_{i,t+1}}{\wh{p}_{i,t}} + \frac{\eta}{8}~.
\]
\end{lemma}
\begin{proof}
By Hoeffding's inequality (see, e.g., \cite[Section~A.1.1]{CeLu}),
\begin{equation}
\label{eq:convexhoeffding}
    \sum_{j=1}^d \wh{p}_{j,t}\,\ell_{j,t}
    \le
    - \frac{1}{\eta} \ln \left( {\sum_{j=1}^d \wh{p}_{j,t}\, e^{-\eta\,\ell_{j,t}}} \right) + \frac{\eta}{8}\,.
\end{equation}
By definition of $v_{i,t+1}$, for all $i=1,\dots,d$ we then have $\sum_{j=1}^d \wh{p}_{j,t}\,e^{-\eta\,\ell_{j,t}} = \wh{p}_{i,t}\,e^{-\eta\,\ell_{i,t}}/v_{i,t+1},$
which implies $\quad\bp_t^{\top}\mathbf{\ell}_t \le
\ell_{i,t} + (1/\eta) \ln (v_{i,t+1}/\wh{p}_{i,t}) + \eta/8$.
The proof is concluded by taking a convex aggregation with respect to $\bq_t$.
\end{proof}

\section{A generalized shifting regret for the simplex}
\label{sec:target}

We now introduce a generalized notion of shifting regret which unifies and generalizes the notions of discounted regret (see~\cite[Section~2.11]{CeLu}), adaptive regret (see~\cite{hase09}), and shifting regret (see~\cite{Zink03}). For a fixed horizon $T$, a sequence of discount factors $\beta_{t,T} \geq 0$ for $t=1,\dots,T$ assigns varying weights to the instantaneous losses suffered at each round.
We compare the total loss of the forecaster with the loss of an arbitrary sequence of vectors $\bq_1,\ldots,\bq_T$ in the simplex $\Delta_d$. Our goal is to bound the regret
\[
\sum_{t=1}^T \beta_{t,T} \, \bp_t^{\top} \mathbf{\ell}_t - \sum_{t=1}^T \beta_{t,T} \, \bq_t^{\top} \mathbf{\ell}_t
\]
in terms of the ``regularity'' of the comparison sequence $\bq_1,\ldots,\bq_T$ and of the variations of the discounting weights $\beta_{t,T}$. By setting $\bu_t = \beta_{t,T} \, \bq_t^{\top} \in \R_+^d$, we can rephrase the above regret as
\begin{equation}
\label{eq:defregr}
\sum_{t=1}^T \|\bu_t\|_1 \, \bp_t^{\top} \mathbf{\ell}_t  - \sum_{t=1}^T \bu_t^{\top} \mathbf{\ell}_t~.
\end{equation}
In the literature on tracking the best expert~\cite{hewa98,Vov99,hewa01,bowa}, the
regularity of the sequence $\bu_1,\ldots,\bu_T$ is measured as the number of
times $\bu_t \neq \bu_{t+1}$.
We introduce the following regularity measure
\begin{equation}
\label{eq:regularity}
m(\b u_1^T) =  \sum_{t=2}^{T} D_{\mathrm{TV}}(\bu_{t},\bu_{t-1})
\end{equation}
where for $\bx=(x_1,\ldots,x_d),\by=(y_1,\ldots,y_d)\in \R_+^d$, we define
$D_{\mathrm{TV}}(\bx,\by) =  \sum_{x_i \geq y_i} (x_i - y_i)$.
Note that when $\bx,\by\in \Delta_d$, we recover the total variation
distance $D_{\mathrm{TV}}(\bx,\by) = \tfrac{1}{2} \norm[\bx-\by]_1$, while for general $\bx,\by\in \R_+^d$, the quantity $D_{\mathrm{TV}}(\bx,\by)$ is not necessarily
symmetric and is always bounded by $\norm[\bx-\by]_1$.
The traditional shifting regret of~\cite{hewa98,Vov99,hewa01,bowa} is obtained from \eqref{eq:defregr} when all $\bu_t$ are such that $\norm[\bu_t]_1 = 1$.

\section{Projected update}
The shifting variant of the EG algorithm analyzed in~\cite{hewa01} is a special case of the generalized share algorithm in which the function $\psi_{t+1}$ performs a projection of the pre-weights on the convex set $\Delta_d^\alpha = [{\alpha}/{d},1]^d \cap \Delta_d$. Here $\alpha \in (0,1)$ is a fixed parameter. We can prove (using techniques
similar to the ones shown in the next section---see the
supplementary material) the following bound which generalizes~\cite[Theorem~16]{hewa01}.
\begin{theorem}
\label{th:HW}
For all $T \geq 1$, for all sequences $\mathbf{\ell}_1,\dots,\mathbf{\ell}_t \in [0,1]^d$ of loss vectors, and for all $\bu_1,\dots,\bu_T \in \R_+^d$, if Algorithm~1 is run with the above update, then
\begin{equation}
\label{eq:zinlin}
\sum_{t=1}^T \|\bu_t\|_1 \, \bp_t^{\top} \mathbf{\ell}_t  - \sum_{t=1}^T \bu_t^{\top} \mathbf{\ell}_t
\leq \frac{\norm[\bu_1]_1 \ln d}{\eta} + \frac{m(\bu_1^T)}{\eta}\ln \frac{d }{\alpha}  + \left(\frac{\eta}{8} + {\alpha }\right) \sum_{t=1}^T\norm[\bu_t]_1~.
\end{equation}
\end{theorem}
This bound can be optimized by a proper tuning of $\alpha$ and $\eta$ parameters. We show a similarly tuned (and slightly better) bound in Corollary~\ref{cor:dtvopt}.

\section{Fixed-share update}
\label{sec:FS}
Next, we consider a different instance of the generalized share algorithm corresponding to the update
\begin{equation}
\label{eq:shareupdateclassicalfs}
    \wh{p}_{j,t+1} = \sum_{i=1}^d \left(\frac{\alpha}{d} + (1-\alpha) \ind_{i=j}\right) v_{i,t+1}
= \frac{\alpha}{d} + (1-\alpha) v_{j,t+1}\,,
\qquad
    0 \le \alpha \le 1
\end{equation}
Despite seemingly different statements, this update in Algorithm~\ref{alg:genupd} can be seen to lead {\sl exactly} to the fixed-share algorithm of~\cite{hewa98} for prediction with expert advice. We now show that this update delivers a bound on the regret almost equivalent to (though slightly better than)
that achieved by projection on the subset $\Delta_d^{\alpha}$ of the simplex.
\begin{theorem}
\label{prop:dtv}
With the above update, for all $T \geq 1$, for all sequences $\mathbf{\ell}_1,\dots,\mathbf{\ell}_T$ of loss
vectors $\mathbf{\ell}_t\in [0,1]^d$, and for all $\bu_1,\dots,\bu_T \in \R_+^d$,
\begin{multline*}
\sum_{t=1}^T  \norm[\bu_t]_1\,\bp_t^{\top}\mathbf{\ell}_t - \sum_{t=1}^T \bu_t^{\top}\mathbf{\ell}_t
\le
    \frac{\|\bu_1\|_1 \ln d}{\eta} + \frac{\eta}{8}
\sum_{t=1}^T \norm[\b u_t]_1
\\
    + \frac{m(\bu_1^T)}{\eta} \ln \frac{d}{\alpha} + \frac{\sum_{t=2}^T \norm[\b u_t]_1-m(\bu_1^T)}{\eta} \ln \frac{1}{1-\alpha}~.
\end{multline*}
\end{theorem}
Note that if we only consider vectors of the form $\bu_t = \bq_t = (0,\ldots,0,1,0,\ldots,0)$ then
$m(\bq_1^T)$ corresponds to the number of times $\bq_{t+1} \neq \bq_t$ in the sequence $\bq_1^T$. We thus recover
\cite[Theorem~1]{hewa98} and \cite[Lemma 6]{bowa} from the much more general Theorem~\ref{prop:dtv}.

The fixed-share forecaster does not need to ``know''
anything in advance about the sequence of the norms $\|\bu_t\|$
for the bound above to be valid. Of course, in order to
minimize the obtained upper bound, the tuning parameters $\alpha, \, \eta$ need to
be optimized and their values will depend on the maximal values of
$m(\bu_1^T)$ and $\sum_{t=1}^T \norm[\b u_t]_1$ for the sequences one wishes to compete against.
This is illustrated in the following corollary, whose proof is omitted.
Therein, $h(x)=-x\ln x -(1-x)\ln(1-x)$ denotes the binary entropy function for
$x\in [0,1]$. We recall\footnote{As can be seen
by noting that $\ln\bigl(1/(1-x)\bigr) < x/(1-x)$}
that $h(x) \leq x \ln(e/x)$ for $x \in [0,1]$.
\begin{corollary}
\label{cor:dtvopt}
Suppose Algorithm~\ref{alg:genupd} is run with the
update~(\ref{eq:shareupdateclassicalfs}).
Let $m_0 > 0$ and $U_0 > 0$. For all $T \geq 1$, for all sequences $\mathbf{\ell}_1,\dots,\mathbf{\ell}_T$
of loss vectors $\mathbf{\ell}_t\in [0,1]^d$, and for all sequences
$\bu_1,\dots,\bu_T \in \R_+^d$ with $\norm[\bu_1]_1 + m(\bu_1^T) \leq m_0$
and $\sum_{t=1}^T \norm[\b u_t]_1 \leq U_0$,
\[
\sum_{t=1}^T  \norm[\bu_t]_1\,\bp_t^{\top}\mathbf{\ell}_t - \sum_{t=1}^T \bu_t^{\top}\mathbf{\ell}_t
\le
   \sqrt{\frac{U_0}{2}
\Biggl( m_0 \ln d + U_0 \, h\!\left(\frac{m_0}{U_0}\right)\Biggr)}
\le \sqrt{\frac{U_0 \, m_0}{2}
\Biggl( \ln d + \ln \left(\frac{e \, U_0}{m_0}\right)\Biggr)}
\]
whenever $\eta$ and $\alpha$ are optimally chosen in terms of $m_0$ and $U_0$.
\end{corollary}
\begin{proof}[Proof of Theorem~\ref{prop:dtv}]
Applying Lemma~\ref{lem:b0} with $\b q_t = \b u_t / \norm[\b u_t]_1$, and multiplying by $\norm[\b u_t]_1$, we get for all $t \geq 1$ and $\bu_t \in \R_+^d$
\begin{equation}
\label{eq:proofdtv0}
    \norm[\b u_t]_1 \,\bp_t^{\top}\mathbf{\ell}_t - \bu_t^{\top}\mathbf{\ell}_t
\le
    \frac{1}{\eta} \sum_{i=1}^d u_{i,t} \ln \frac{v_{i,t+1}}{\wh{p}_{i,t}} + \frac{\eta}{8} \norm[\b u_t]_1~.
\end{equation}
We now examine
\begin{equation}
\label{eq:proofdtv1}
\sum_{i=1}^d u_{i,t} \ln \frac{v_{i,t+1}}{\wh{p}_{i,t}}  =  \sum_{i=1}^d \left(u_{i,t} \ln \frac{1}{\wh{p}_{i,t}} - u_{i,t-1} \ln \frac{1}{v_{i,t}} \right) + \sum_{i=1}^d \left( u_{i,t-1} \ln \frac{1}{v_{i,t}} - u_{i,t} \ln \frac{1}{v_{i,t+1}} \right)~.
\end{equation}
For the first term on the right-hand side, we have
\begin{align}
\nonumber
    \sum_{i=1}^d \left( u_{i,t} \ln \frac{1}{\wh{p}_{i,t}} - u_{i,t-1} \ln \frac{1}{v_{i,t}} \right)
& =
    \sum_{i\,:\,u_{i,t} \geq u_{i,t-1}} \left(
    \left(u_{i,t}-u_{i,t-1}\right) \ln \frac{1}{\wh{p}_{i,t}} + u_{i,t-1} \ln \frac{v_{i,t}}{\wh{p}_{i,t}} \right)
\\ & \quad+
\label{eq:proofdtv2}
    \sum_{i\,:\,u_{i,t} < u_{i,t-1}} \biggl( \underbrace{\left(u_{i,t}-u_{i,t-1}\right) \ln \frac{1}{v_{i,t}}}_{\leq 0} + u_{i,t} \ln \frac{v_{i,t}}{\wh{p}_{i,t}} \biggr).
\end{align}
In view of the update~\eqref{eq:shareupdateclassicalfs}, we have $1/\wh{p}_{i,t} \leq d/\alpha$
and $v_{i,t}/\wh{p}_{i,t} \leq 1/(1-\alpha)$. Substituting in~\eqref{eq:proofdtv2}, we get
\begin{align*}
    \sum_{i=1}^d &\left( u_{i,t} \ln \frac{1}{\wh{p}_{i,t}} - u_{i,t-1} \ln \frac{1}{v_{i,t}} \right)
\\ &\le
    \sum_{i\,:\,u_{i,t} \geq u_{i,t-1}} \left(u_{i,t}-u_{i,t-1}\right) \ln \frac{d}{\alpha} + \left( \sum_{i:~u_{i,t} \geq u_{i,t-1}} u_{i,t-1}  + \sum_{i:~u_{i,t} < u_{i,t-1}}  u_{i,t} \right) \ln \frac{1}{1-\alpha}
\\ & =
    D_{\mathrm{TV}}(\bu_{t},\bu_{t-1}) \ln \frac{d}{\alpha} + \underbrace{\left( \sum_{i=1}^d u_{i,t} - \sum_{i\,:\,u_{i,t} \geq u_{i,t-1}}  (u_{i,t}-
    u_{i,t-1}) \right)}_{= \norm[\b u_t]_1 - D_{\mathrm{TV}}(\bu_{t},\bu_{t-1})} \ln \frac{1}{1-\alpha}\,.
\end{align*}
The sum of the second term in~\eqref{eq:proofdtv1} telescopes. Substituting the
obtained bounds in the first sum of the right-hand side in~\eqref{eq:proofdtv1}, and summing over $t=2,\dots,T$, leads to
\begin{multline}
\nonumber
\sum_{t=2}^T \sum_{i=1}^d u_{i,t} \ln \frac{v_{i,t+1}}{\wh{p}_{i,t}}  \leq  m(\bu_1^T) \ln \frac{d}{\alpha} + \left(
\sum_{t=2}^T \norm[\b u_t]_1-m(\bu_1^T)\right) \ln \frac{1}{1-\alpha}
\\ + \sum_{i=1}^d u_{i,1} \ln \frac{1}{v_{i,2}} - \underbrace{u_{i,T} \ln \frac{1}{v_{i,T+1}}}_{\leq 0}\,.
\end{multline} \vspace{-1.25cm} \ \\

\noindent
We hence get from~\eqref{eq:proofdtv0}, which we use in particular for $t=1$,
\begin{multline*}
    \sum_{t=1}^T \norm[\b u_t]_1 \bp_t^{\top}\mathbf{\ell}_t - \bu_t^{\top} \mathbf{\ell}_t
\le
	\frac{1}{\eta} \sum_{i=1}^d u_{i,1} \ln \frac{1}{\wh{p}_{i,1}} + \frac{\eta}{8} \sum_{t=1}^T \norm[\bu_t]_1
\\+
	 \frac{m(\bu_1^T)}{\eta} \ln \frac{d}{\alpha} + \frac{\sum_{t=2}^T \norm[\b u_t]_1
m(\bu_1^T)}{\eta} \ln \frac{1}{1-\alpha}\,. \quad
\end{multline*}  \vspace{-1.2cm}

\end{proof}

\section{Applications}

\iffals
\begin{theorem}[A generalization of Theorem~2 of~\cite{Zink03}]
\label{th:Zink}
Let $m_0 > 0$ and $U_0 > 0$. For all $T \geq 1$, for all sequences $\mathbf{\ell}_1,\dots,\mathbf{\ell}_T$
of loss vectors $\mathbf{\ell}_t\in [0,1]^d$, and for all sequences
$\bu_1,\dots,\bu_T \in \R_+^d$ with $\norm[\bu_1]_1 + \norm[\bu_T]_1 + \sum_{t=2}^T \norm[\bu_t - \bu_{t-1}]_1 \leq m_0$
and $\sum_{t=1}^T \norm[\b u_t]_1 \leq U_0$, the weights output by the greedy projection forecaster
satisfy
\[
\sum_{t=1}^T  \norm[\bu_t]_1\,\bp_t^{\top}\mathbf{\ell}_t - \sum_{t=1}^T \bu_t^{\top}\mathbf{\ell}_t
\le \frac{\sqrt{3}}{2} \sqrt{ U_0 \, m_0 \, d}\,,
\]
whenever its parameter $\eta$ is optimally chosen in terms of $m_0$ and $U_0$.
\end{theorem}
\f

We now show how our regret bounds can be specialized to obtain bounds on adaptive and discounted regret, and on regret with time-selection functions. We show regret bounds only for the specific instance of the generalized share algorithm using update~(\ref{eq:shareupdateclassicalfs});
but the discussion below also holds up to minor modifications for the forecaster studied in Theorem~\ref{th:HW}.

\paragraph{Adaptive regret} was introduced by \cite{hase09} and can be viewed as a variant of discounted regret where the monotonicity assumption is dropped. For $\tau_0 \in \{1,\ldots,T\}$, the {\sl $\tau_0$-adaptive regret} of a forecaster is defined by
\begin{equation}
\label{def:adapt}
\c R_T^{\tau_0-\mathrm{adapt}}
= \max_{\scriptsize \begin{array}{c} [r,s] \subset [1,T] \\ s+1-r \leq \tau_0 \end{array}}
\left\{ \sum_{t=r}^{s} \bp_t^{\top}\mathbf{\ell}_t
 - \min_{\bq \in \Delta_d} \sum_{t=r}^{s} \bq^{\top}\mathbf{\ell}_t \right\}\,.
\end{equation}
The fact that this is a special case of~\eqref{eq:defregr} clearly emerges from the proof of Corollary~\ref{cor:adapt} below here.

Adaptive regret is an alternative way to measure the performance of a
forecaster against a changing environment.
It is a straightforward observation that adaptive regret bounds also lead to shifting regret bounds (in terms of
hard shifts). In this paper we note that these two notions of regret share an even tighter connection,
as they can be both viewed as instances of the same \textsl{alma mater} notion of regret, i.e.,
the generalized shifting regret introduced in Section~\ref{sec:target}.
The work \cite{hase09} essentially considered the case of online convex optimization
with exp-concave loss function; in case of general convex functions, they also mentioned that the greedy projection forecaster of \cite{Zink03} enjoys adaptive regret guarantees. This is obtained in much the same way as we obtain an adaptive regret bound for the fixed-share forecaster in the next result.
\begin{corollary}
\label{cor:adapt}
Suppose that Algorithm~\ref{alg:genupd} is run with the shared update~(\ref{eq:shareupdateclassicalfs}). Then
for all $T \geq 1$, for all sequences $\mathbf{\ell}_1,\dots,\mathbf{\ell}_T$ of loss
vectors $\mathbf{\ell}_t\in [0,1]^d$, and for all $\tau_0 \in \{1,\ldots,T\}$,
\[
\c R_T^{\tau_0-\mathrm{adapt}}
\leq \sqrt{\frac{\tau_0}{2} \left( \tau_0\,h\! \left(\frac{1}{\tau_0}\right) + \ln d \right)}
\leq \sqrt{\frac{\tau_0}{2} \, \ln (e d \tau_0)}
\]
whenever $\eta$ and $\alpha$ are chosen optimally (depending
on $\tau_0$ and $T$).
\end{corollary}

As mentioned in~\cite{hase09}, standard lower bounds on the regret show that the obtained
bound is optimal up to the logarithmic factors.

\begin{proof}
For $1 \leq r \leq s \leq T$ and $\bq \in \Delta_d$, the regret in the
right-hand side of~\eqref{def:adapt} equals the regret considered
in Theorem~\ref{prop:dtv} against the sequence $\bu_1^T$
defined as $\bu_t = \bq$ for $t = r,\dots,s$ and $\b 0 = (0,\dots,0)$ for the remaining $t$.
When $r \geq 2$, this sequence is such that
$D_{\mathrm{TV}}(\bu_r,\bu_{r-1}) = D_{\mathrm{TV}}(\bq,\b0) = 1$ and $D_{\mathrm{TV}}(\bu_{s+1},\bu_{s})
= D_{\mathrm{TV}}(\b0,\bq) = 0$ so that $m(\bu_1^T) = 1$, while $\norm[\bu_1]_1 = 0$.
When $r = 1$, we have $\norm[\bu_1]_1 = 1$ and $m(\bu_1^T) = 0$. In all cases,
$m(\bu_1^T) + \norm[\bu_1]_1 = 1$, that is, $m_0 = 1$.
Specializing the bound of Theorem~\ref{prop:dtv} with the additional choice $U_0 = \tau_0$
gives the result.
\end{proof}

\paragraph{Discounted regret} was introduced in~\cite[Section 2.11]{CeLu} and is defined by
\begin{equation}
\label{eq:defdisc}
\max_{\bq \in \Delta_d} \, \sum_{t=1}^T \beta_{t,T} \, \bigl( \bp_t^{\top} \mathbf{\ell}_t - \bq^{\top} \mathbf{\ell}_t \bigr)~.
\end{equation}
The discount factors $\beta_{t,T}$ measure the relative importance of more recent losses to older losses.
For instance, for a given horizon $T$, the discounts $\beta_{t,T}$ may be larger as $t$ is closer to $T$.
On the contrary, in a game-theoretic setting, the earlier losses may matter more then the more recent ones (because of interest
rates), in which case $\beta_{t,T}$ would be smaller as $t$ gets closer to $T$. We mostly consider below
monotonic sequences of discounts (both non-decreasing and non-increasing). Up to a normalization,
we assume that all discounts $\beta_{t,T}$ are in $[0,1]$.
As shown in~\cite{CeLu}, a minimal requirement to get non-trivial bounds is that the
sum of the discounts satisfies $U_T = \sum_{t \leq T} \beta_{t,T} \to \infty$ as $T \to \infty$.

A natural objective is to show that the quantity in~\eqref{eq:defdisc} is $o(U_T)$,
for instance, by bounding it by something of the order of $\sqrt{U_T}$.
We claim that Corollary~\ref{cor:dtvopt} does so, at least
whenever the sequences $(\beta_{t,T})$ are monotonic for all $T$.
To support this claim, we only need to show that $m_0 = 1$ is a suitable value to
deal with~\eqref{eq:defdisc}. Indeed, for all $T \geq 1$ and for all $\bq \in \Delta_d$,
the measure of regularity involved in the corollary satisfies \vspace{-.7cm}

\[
\norm[\beta_{1,T}\bq]_1 + m\bigl( (\beta_{t,T}\bq)_{t \leq T} \bigr)
= \beta_{1,T} + \sum_{t=2}^T \bigl( \beta_{t,T}- \beta_{t-1,T} \bigr)_+
= \max\bigl\{\beta_{1,T}, \, \beta_{T,T} \bigr\} \leq 1\,, \vspace{-.3cm}
\]

\noindent where the second equality follows from the monotonicity assumption on the discounts.

The values of the discounts for all $t$ and $T$ are usually known in advance. However, the horizon $T$
is not. Hence, a calibration issue may arise. The online tuning of the parameters $\alpha$ and $\eta$ shown in
Section~\ref{sec:online} entails a forecaster that can get discounted regret bounds of the order $\sqrt{U_T}$
for all $T$. The fundamental reason for this is that the discounts only come in the definition of the fixed-share
forecaster via their sums. In contrast, the forecaster discussed in \cite[Section 2.11]{CeLu} weighs each instance $t$
directly with $\beta_{t,T}$ (i.e., in the very definition of the forecaster)
and enjoys therefore no regret guarantees for horizons other than $T$ (neither before $T$
nor after $T$). Therein, the knowledge of the horizon $T$ is so crucial that it cannot be dealt with easily, not even with
online calibration of the parameters or with a doubling trick. We insist that for the fixed-share forecaster,
much flexibility is gained as some of the discounts $\beta_{t,T}$ can change in a drastic manner for a round $T$
to values $\beta_{t,T+1}$ for the next round. However we must admit that the bound of \cite[Section 2.11]{CeLu}
is smaller than the one obtained above, as it of the order of $\sqrt{\sum_{t \leq T} \beta_{t,T}^2}$,
in contrast to our $\sqrt{\sum_{t \leq T} \beta_{t,T}}$ bound. Again, this improvement was made possible because of the knowledge
of the time horizon.

As for the comparison to the setting of discounted losses of~\cite{disc},
we note that the latter can be cast as a special case of our setting (since the discounting weights take
the special form  $\beta_{t,T} = \gamma_t \ldots \gamma_{T-1}$ therein, for some sequence $\gamma_s$ of positive numbers).
In particular, the fixed-share forecaster can satisfy the bound stated in~\cite[Theorem 2]{disc}, for instance,
by using the online tuning techniques of Section~\ref{sec:online}.
A final reference to mention is the setting of time-selection functions of \cite[Section~6]{blma07},
which basically corresponds to knowing in advance the weights $\norm[\bu_t]_1$ of the comparison
sequence $\bu_1,\ldots,\bu_T$ the forecaster will be evaluated against. We thus generalize their results as well.

\section{Refinements and extensions}

We now show that techniques for refining the standard online analysis can be easily applied to our framework.
We focus on the following: improvement for small losses, sparse target sequences, and dynamic tuning of parameters. Not all of them where within reach of previous analyses.

\subsection{Improvement for small losses}

The regret bounds of the fixed-share forecaster can
be significantly improved when the cumulative loss of the best sequence of experts is small. The next result improves on Corollary~\ref{cor:dtvopt} whenever $L_0 \ll U_0$. For concreteness, we focus on the fixed-share update~(\ref{eq:shareupdateclassicalfs}).
\begin{corollary}
\label{cor:smalllosses}
Suppose Algorithm~\ref{alg:genupd} is run with the
update~(\ref{eq:shareupdateclassicalfs}).
Let $m_0 > 0$, $U_0 > 0$, and $L_0 >0$. For all $T \geq 1$, for all sequences $\mathbf{\ell}_1,\dots,\mathbf{\ell}_T$
of loss vectors $\mathbf{\ell}_t\in [0,1]^d$, and for all sequences
$\bu_1,\dots,\bu_T \in \R_+^d$ with $\norm[\bu_1]_1 + m(\bu_1^T) \leq m_0$,
$\sum_{t=1}^T \norm[\b u_t]_1 \leq U_0$, and $\sum_{t=1}^T \bu_t^\top \mathbf{\ell}_t \leq L_0$,
\[
\sum_{t=1}^T  \norm[\bu_t]_1\,\bp_t^{\top}\mathbf{\ell}_t - \sum_{t=1}^T \bu_t^{\top}\mathbf{\ell}_t
\le \sqrt{L_0 \, m_0
\Biggl( \ln d + \ln \left(\frac{e \, U_0}{m_0}\right)\Biggr)} + \ln d + \ln \left(\frac{e \, U_0}{m_0}\right)
\]
whenever $\eta$ and $\alpha$ are optimally chosen in terms of $m_0$, $U_0$, and $L_0$.
\end{corollary}
Here again, the parameters $\alpha$ and $\eta$ may be tuned online using the techniques shown in Section~$\ref{sec:online}$.
The above refinement is obtained by mimicking the analysis of Hedge forecasters for  small losses (see, e.g., \cite[Section~2.4]{CeLu}).
In particular, one should substitute Lemma~\ref{lem:b0} with the following lemma in the analysis carried out in
Section~\ref{sec:FS}; its proof follows from the mere replacement of Hoeffding's inequality
by \cite[Lemma A.3]{CeLu}, which states that for all $\eta \in \R$ and for all random variable $X$ taking values in $[0,1]$,
one has $\ln \E[e^{-\eta X}] \leq (e^{-\eta} -1) \E X$.
\begin{lemma}
Algorithm \ref{alg:genupd} satisfies
$\displaystyle{
\frac{1-e^{-\eta}}{\eta}  \bp_{t}^\top \mathbf{\ell}_t -\bq_t^\top \mathbf{\ell}_{t} \leq \frac{1}{\eta} \sum_{i=1}^d q_{i,t}  \ln \left( \frac{v_{i,t}}{\hat p_{i,t+1}} \right)}$ for all $\bq_t \in \Delta_d$.
\end{lemma}

\subsection{Sparse target sequences}
\label{sec:bowa}

The work~\cite{bowa} introduced forecasters that are able to efficiently
compete with the best sequence of experts among all those
sequences that only switch a bounded number of times and also
take a small number of different values. Such ``sparse'' sequences
of experts appear naturally in many applications. In this section
we show that their algorithms in fact work very well in comparison
with a much larger class of sequences $\bu_1,\ldots,\bu_T$
that are ``regular''---that is, $m(\bu_1^T)$, defined
in (\ref{eq:regularity}) is small---and ``sparse'' in the sense
that the quantity $n(\bu_1^T) = \sum_{i=1}^d \max_{t=1,\dots,T} u_{i,t}$
is small. Note that when $\bq_t \in \Delta_d$ for all $t$, then two
interesting upper bounds can be provided. First, denoting the union of
the supports of these convex combinations by $S \subseteq \{ 1,\ldots,d \}$,
we have $n(\b q_1^T) \le |S|$, the cardinality of $S$. Also, $n(\bq_1^T) \leq \bigl| \{ \bq_t, \ \ t = 1,\ldots,T \} \bigr|$,
the cardinality of the pool of convex combinations.
Thus, $n(\bu_1^T)$ generalizes the notion of sparsity
of \cite{bowa}.

Here we consider a family of shared updates of the form
\begin{equation}
\label{eq:shareupdatebw}
\wh{p}_{j,t} = (1-\alpha) v_{j,t} + \alpha \frac{w_{j,t}}{Z_t}\,,
\qquad
    0 \le \alpha \le 1\,,
\end{equation}
where the $w_{j,t}$ are nonnegative weights that may depend on
past and current pre-weights and
$Z_t = \sum_{i=1}^d w_{i,t}$ is a normalization constant.
Shared updates of this form were proposed by
\cite[Sections~3 and~5.2]{bowa}.
Apart from generalizing the regret bounds of \cite{bowa}, we believe
that the analysis given below is significantly simpler and more transparent.
We are also able to slightly improve their original bounds.

We focus on choices of the weights $w_{j,t}$ that satisfy the
following conditions:
there exists a constant $C \geq 1$ such that for all
$j=1,\dots,d$ and $t=1,\dots,T$,
\begin{equation}
\label{eq:cdw}
v_{j,t} \leq w_{j,t} \leq 1 \qquad \text{and} \qquad C \, w_{j,t+1} \geq w_{j,t}~.
\end{equation}
The next result improves on Theorem~\ref{prop:dtv}
when  $T \ll d$ and $n (\b u_1^T) \ll m(\b u_1^T)$, that is,
when the dimension (or number of experts) $d$ is large but
the sequence $\bu_1^T$ is sparse. Its proof can be found in
the supplementary material; it is a variation on the
proof of Theorem~\ref{prop:dtv}.
\begin{theorem}
\label{lem:tubeboundbw1}
Suppose Algorithm~\ref{alg:genupd} is run with the
shared update~(\ref{eq:shareupdatebw}) with weights satisfying
the conditions~\eqref{eq:cdw}.
Then for all $T \geq 1$, for all sequences $\mathbf{\ell}_1,\dots,\mathbf{\ell}_T$
of loss vectors $\mathbf{\ell}_t\in [0,1]^d$, and for all sequences
$\bu_1,\dots,\bu_T\in\R_+^d$,
\begin{align*}
 \sum_{t=1}^T \norm[\bu_t]_1\,\bp_t^{\top}\mathbf{\ell}_t - \sum_{t=1}^T\bu_t^{\top}\mathbf{\ell}_t
\le & \, \frac{n(\b u_1^T) \ln d}{\eta} + \frac{n(\b u_1^T) \, T \ln C}{\eta} + \frac{\eta}{8} \sum_{t=1}^T
\norm[\b u_t]_1 \\
&+ \frac{m(\bu_1^T)}{\eta} \ln \frac{\max_{t \leq T} Z_t}{\alpha} + \frac{\sum_{t=2}^T \norm[\b u_t]_1-m(\bu_1^T)}{\eta} \ln \frac{1}{1-\alpha}~.
\end{align*}
\end{theorem}
Corollaries~8 and~9 of~\cite{bowa} can now be generalized (and even improved); we do so---in the supplementary
material---by showing two
specific instances of the generic update~\eqref{eq:shareupdatebw} that
satisfy~\eqref{eq:cdw}.

\subsection{Online tuning of the parameters}
\label{sec:online}

The forecasters studied above need their parameters $\eta$ and $\alpha$
to be tuned according to various quantities, including the time horizon $T$.
We show here how the trick of~\cite{AuCeGe02} of having these parameters vary over time
can be extended to our setting. For the sake of concreteness
we focus on the fixed-share update, i.e., Algorithm~\ref{alg:genupd} run with the
update~(\ref{eq:shareupdateclassicalfs}).
We respectively replace steps 3 and 4 of its description by
the loss and shared updates
\begin{equation}
\label{eq:timevaryingupdate}
v_{j,t+1} = \wh{p}_{j,t}^{\,\frac{\eta_t}{\eta_{t-1}}} e^{-\eta_t \ell_{j,t}} \!\left/
\sum_{i=1}^d \wh{p}_{i,t}^{\,\frac{\eta_t}{\eta_{t-1}}} e^{-\eta_t \ell_{i,t}} \right.
\qquad \mbox{and} \qquad
p_{j,t+1} = \frac{\alpha_t}{d} + (1-\alpha_t) \, v_{j,t+1} \,,
\end{equation}
for all $t \geq 1$ and all $j \in \{ 1,\dots,d\}$,
where $(\eta_\tau)$ and $(\alpha_\tau)$ are two sequences of positive numbers,
indexed by $\tau \geq 1$. We also conventionally define $\eta_0 = \eta_1$.
Theorem~\ref{prop:dtv} is then adapted in the following way
(when $\eta_t \equiv \eta$ and $\alpha_t \equiv \alpha$,
Theorem~\ref{prop:dtv} is exactly recovered).
\begin{theorem}
\label{prop:dtv-adapt}
The forecaster based on the updates~\eqref{eq:timevaryingupdate} is such that whenever
$\eta_t \leq \eta_{t-1}$ and $\alpha_t \leq \alpha_{t-1}$ for all $t \geq 1$, the following performance bound
is achieved. For all $T \geq 1$, for all sequences $\mathbf{\ell}_1,\dots,\mathbf{\ell}_T$ of loss
vectors $\mathbf{\ell}_t\in [0,1]^d$, and for all $\bu_1,\dots,\bu_T \in \R_+^d$,
\begin{align*}
\sum_{t=1}^T  \norm[\bu_t]_1\,\bp_t^{\top}\mathbf{\ell}_t - \sum_{t=1}^T \bu_t^{\top}\mathbf{\ell}_t
& \le \left( \frac{\norm[\b u_t]_1}{\eta_1} + \sum_{t=2}^T \norm[\b u_t]_1 \left(\frac{1}{\eta_t}- \frac{1}{\eta_{t-1}} \right) \right) \! \ln d \\
& \ \ + \frac{m(\bu_1^T)}{\eta_T}\ln \frac{d(1-\alpha_T)}{\alpha_T} +
\sum_{t=2}^T \frac{\norm[\b u_t]_1}{\eta_{t-1}} \ln \frac{1}{1-\alpha_t}
+ \sum_{t=1}^T \frac{\eta_{t-1}}{8} \, \norm[\b u_t]_1\,.
\end{align*}
\end{theorem}
Due to space constraints, we provide an illustration of this bound only
in the supplementary material.

\subsubsection*{Acknowledgments}

The authors acknowledge support from the French National Research Agency (ANR) under grant
EXPLO/RA (``Exploration--exploitation for efficient resource allocation'') and by the PASCAL2 Network of
Excellence under EC grant no. 506778.

\newpage
\bibliographystyle{unsrt}

redpajama_set_name: RedPajamaArXiv


text:
package au.gov.amsa.ais;

import java.io.File;
import java.io.IOException;
import java.util.List;

import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;

import rx.Observable;
import au.gov.amsa.ais.message.AisShipStaticA;
import au.gov.amsa.ais.rx.Streams;
import au.gov.amsa.util.nmea.NmeaMessage;

@State(Scope.Benchmark)
public class BenchmarksAis {

	private static final String shipStaticA = "\\s:rEV02,c:1334337326*5A\\!ABVDM,1,1,0,2,57PBtv01sb5IH`PR221LE986222222222222220l28?554000:kQEhhDm31H20DPSmD`880,2*40";
	private static final String aisPositionA = "\\s:rEV02,c:1334337326*5A\\!AIVDM,1,1,,B,18JSad001i5gcaArTICimQTT068t,0*4A";
	private static final String aisPositionB = "\\s:MSQ - Mt Cootha,c:1426803365*73\\!AIVDM,1,1,,A,B7P?n900Irg8IHL4RblF?wRToP06,0*1B";

//	@Benchmark
	public void parseShipStaticNmeaMessage() {
		AisNmeaMessage n = new AisNmeaMessage(shipStaticA);
		n.getMessage();
	}

	@Benchmark
	public void parseShipStaticNmeaMessageAndExtractBitsOfInterest() {
		AisNmeaMessage n = new AisNmeaMessage(shipStaticA);
		AisShipStaticA m = (AisShipStaticA) n.getMessage();
		m.getName();
		m.getShipType();
		m.getImo();
		m.getLengthMetres();
		m.getWidthMetres();
		m.getCallsign();
		m.getMmsi();
	}

	@Benchmark
	public void parseAisPositionANmeaMessage() {
		AisNmeaMessage n = new AisNmeaMessage(aisPositionA);
		n.getMessage();
	}

	@Benchmark
	public void parseAisPositionBNmeaMessage() {
		AisNmeaMessage n = new AisNmeaMessage(aisPositionB);
		n.getMessage();
	}
}

redpajama_set_name: RedPajamaGithub


text:
our work india
Our work in India involves monitoring, reviewing, and advocating for the implementation of the ICPD POA and working through ARROW's WHRAP-SA partnership that focuses on strengthening civil society capacity to effectively advocate for SRHR, especially safe motherhood. India is part of the WHRAP-Asia Pacific regional partnership on SRHR and Sustainable Development as well as the #SRHR4ALL campaign. Our current initiatives in India are Claiming the right to safe abortion: Strategic partnerships in Asia, building the next generation movement leaders and organisations in South Asia for young people's sexual and reproductive health and rights and the ICPD+25 monitoring programme.
India continues to be the second most populous country in the world with a population of 1.2 billion and growing. As of 1st March 2011, there are 623.7 million males and 586.5 million females. Unlike the previous decades, there is a significant decline in population growth rate in the recent decade. The low sex ratio statistics are an indicator of greater gender inequality and the low status of women in India.
Government spending on health in India is amongst the lowest in the world, comprising of about 1 percent of the national GDP. Among South East Asian countries, India ranks third in terms of high out of pocket expenditure on health. The high amount of population out of pocket expenditure on health care presents a heavy burden to the poor and marginalized and acts as a great barrier for universal access to healthcare.
Source: extracted from India National Family Health Survey (INFHS) 2015-16
Key findings from the 2015-16 INFHS on the situation of SRHR in India are as follows:
Maternal Health:
The proportion of women age 15-49 in India who received antenatal care has risen from 77 percent in 2005-06 to 84 percent.
Fifty-nine percent of women had their first antenatal care visit during the first trimester of pregnancy and 51 percent had four or more antenatal care visits.
Eighty-nine percent of women's last live births were protected against neonatal tetanus.
Institutional deliveries have increased markedly from 39 percent in 2005-06 to 79 percent in 2015-16.
Thirty-six percent of newborns had a postnatal check, and 27 percent of newborns received a postnatal check within 2 days of birth.
Contraception:
The total fertility rate is 2.2 children per woman, which declined from 2.7 children in 2005-06 and is currently just above the replacement level of fertility of 2.1 children per woman.
The median birth interval is 32.0 months since the preceding birth.
The median age at first birth among women age 25-49 is 21.0 years.
Eight percent of women age 15-49 have begun childbearing, which is half the level in 2005-06.
The wanted fertility rate is 1.8 children per woman and ranges from 0.9 children in Sikkim to 2.8 children in Meghalaya.
Modern contraceptive use by currently married women has remained unchanged, at just under 50 percent, between 2005-06 and 2015-16.
Female sterilization is still the most popular contraceptive method, used by 36 percent of currently married women.
Thirteen percent of currently married women have an unmet need for family planning, almost the same as the estimate in 2005-06 (14%).
Three percent of pregnancies in the five years preceding the survey resulted in an abortion and 6 percent resulted in a miscarriage.
12 percent of women age 15-49 have experienced a stillbirth, miscarriage, or abortion in their lifetime.
Almost one in five women with an abortion had complications from the abortion.
A majority of the abortions were performed in the private health sector (52%) and 20 percent were performed in the public health sector.
More than one-quarter (26%) of the abortions were reportedly performed by the woman herself at home.
According to the UN Abortion Policies and Reproductive Health around the World (2014), abortion is permitted on all grounds except on request.
HIV & AIDS:
One-fifth (21%) of women and one-third of men age 15-49 have comprehensive knowledge of HIV/AIDS.
Forty-five percent of women and 61 percent of men age 15-49 know where to obtain an HIV test.
Eleven percent of women and 8 percent of men age 15-49 who have ever had sex reported having an STI and/or symptoms of an STI in the 12 months preceding the survey.
Twenty-two percent of young women and 32 percent of young men age 15-24 have comprehensive knowledge of HIV.
Thirty-five percent of men age 15-24 have had higher-risk intercourse (sex with a non-marital, non-cohabitating partner) in the 12 months, compared with 2 percent of women age 15-24.
HIV prevalence among women and men age 15-49 decreased slightly between 2005-06 and 2015-16, from 0.28 percent to 0.24 percent.
HIV prevalence is twice as high in urban areas as in rural areas (0.38% versus 17%).
Child Early & Forced Marriage (CEFM):
Teenage pregnancy is relatively high in rural areas. Nearly 1 in every 10 women in rural areas in the age group 15-19 have begun childbearing.
Twenty-eight percent of women age 18-29 marry before reaching the legal minimum age at marriage.
Eleven percent of women age 25-49 had sex before age 15.
The level of teenage pregnancy decreases with an increasing level of schooling. Twenty percent of women age 15-19 with no schooling have already begun childbearing, compared with only 4 percent of women who had 12 or more years of schooling.
Fourteen percent of marriages are consanguineous marriages, which are more common in all of the southern states except Kerala.
Violence Against Women (VAW):
Thirty percent of women have experienced physical violence since age 15, and 6 percent have ever experienced sexual violence in their lifetime.
Thirty-three percent of ever-married women have experienced physical, sexual, or emotional spousal violence.
The most common type of spousal violence is physical violence (30%), followed by emotional violence (14%).
Fifty-two percent of women and 42 percent of men agree with one or more of the specified seven reasons for wife beating.
One-fourth of ever-married women who have experienced spousal physical or sexual violence report experiencing physical injuries, including 8 percent who have had eye injuries, sprains, dislocations, or burns and 5 percent who have had deep wounds, broken bones, broken teeth, or any other serious injury.
Only 14 percent of women who have experienced physical or sexual violence by anyone have sought help to stop the violence.
ICPD+25: Access to Contraception and Family Planning in Asia and the Pacific Region
ICPD+25: Access to Safe Abortion in Asia and the Pacific Region


text:
Disney Traditional
Saludos Amigos (1942)
The Three Caballeros (1944)
Make Mine Music (1946)
Fun and Fancy Free (1947)
Melody Time (1948)
The Aristocats (1970)
The Rescuers (1977)
The Fox and the Hound (1981)
The Great Mouse Detective (1986)
Oliver & Company (1988)
The Rescuers Down Under (1990)
The Hunchback of Notre Dame (1996)
Fantasia 2000 (1999)
The Emperor's New Groove (2000)
Atlantis: The Lost Empire (2001)
Treasure Planet (2002)
Brother Bear (2003)
Home On the Range (2004)
Disney 3D
Dinosaur (2000)
The Wild (2006)
Meet the Robinsons (2007)
Mars Needs Moms (2011)
A Bug's Life (1998)
Monsters, Inc. (2001)
The Good Dinosaur (2015)
Finding Dory (2016)
DreamWorks 3D
Antz (1998)
Shrek 2 (2004)
Shark Tale (2004)
Madagascar (2005)
Over the Hedge (2006)
Flushed Away (2006)
Shrek the Third (2007)
Bee Movie (2007)
Kung Fu Panda (2008)
Madagascar: Escape 2 Africa (2008)
Monsters Vs. Aliens (2009)
How To Train Your Dragon (2010)
Shrek Forever After (2010)
Megamind (2010)
Kung Fu Panda 2 (2011)
Puss In Boots (2011)
Madagascar 3: Europe's Most Wanted (2012)
Mr. Peabody & Sherman (2014)
How To Train Your Dragon 2 (2014)
Penguins of Madagascar (2014)
Zemeckis Motion Capture
The Polar Express (2004)
Beowulf (2007)
A Christmas Carol (2009)
Other 3D
Ice Age (2002)
Hoodwinked! (2005)
Ice Age: The Meltdown (2006)
Open Season (2006)
Surf's Up (2007)
Horton Hears a Who! (2008)
Ice Age: Dawn of the Dinosaurs (2009)
Cloudy With a Chance of Meatballs (2009)
Despicable Me (2010)
Legend of the Guardians: The Owls of Ga'Hoole (2010)
Happy Feet Two (2011)
Arthur Christmas (2011)
The Book of Life (2014)
Bugs Bunny Superstar (1975)
The Bugs Bunny/Road Runner Movie (1979)
The Looney Looney Looney Bugs Bunny Movie (1981)
1001 Rabbit Tales (1982)
Daffy Duck's Movie: Fantastic Island (1983)
Daffy Duck's Quackbusters (1988)
Charlie Brown Features
A Boy Named Charlie Brown (1969)
Snoopy, Come Home (1972)
Race For Your Life, Charlie Brown (1977)
Bon Voyage, Charlie Brown (1980)
DreamWorks Traditional
The Prince of Egypt (1998)
Spirit: Stallion of the Cimarron (2002)
Sinbad: Legend of the Seven Seas (2003)
Other Traditional
The Adventures of Prince Achmed (1926)
Mr. Bug Goes To Town (1941)
Gay Purr-ee (1962)
The Phantom Tollbooth (1970)
Charlotte's Web (1973)
Fantastic Planet (1973)
Watership Down (1978)
The Secret of NIMH (1982)
The Plague Dogs (1982)
The Flight of Dragons (1982)
An American Tail (1986)
The Brave Little Toaster (1987)
An American Tail: Fievel Goes West (1991)
The Thief and the Cobbler (1993)
Anastasia (1997)
Titan A.E. (2000)
Curious George (2006)
Renaissance (2006)
The Secret of Kells (2009)
The Illusionist (2010)
A Cat In Paris (2010)
Ernest & Celestine (2012)
A Grand Day Out (1989)
The Wrong Trousers (1993)
Wallace and Gromit In a Close Shave (1995)
Cracking Contraptions (2002)
Wallace and Gromit: The Curse of the Were-Rabbit (2005)
A Matter of Loaf and Death (2008)
Other Stop-Motion
James and the Giant Peach (1996)
The Miracle Maker (2000)
Chicken Run (2000)
The Pirates! Band of Misfits (2012)
Frankenweenie (2012)
The Castle of Cagliostro (1979)
Nausicaa of the Valley of the Winds (1984)
Laputa: Castle In the Sky (1986)
Kiki's Delivery Service (1989)
Porco Rosso (1992)
Princess Mononoke (1997)
Howl's Moving Castle (2004)
Ponyo (2008)
The Wind Rises (2013)
Other Notable Anime
Grave of the Fireflies (1988)
Evangelion: Death and Rebirth (1997)
The End of Evangelion (1997)
Cowboy Bebop: Knockin' On Heaven's Door (2001)
The Animatrix (2003)
Tokyo Godfathers (2003)
Ghost In the Shell 2: Innocence (2004)
Tales From Earthsea (2006)
A Letter To Momo (2011)
Partial Animation
Gertie the Dinosaur (1914)
Anchors Aweigh (1945)
Song of the South (1946)
Bedknobs and Broomsticks (1971)
Tron (1982)
Who Framed Roger Rabbit? (1988)
Looney Tunes: Back In Action (2003)
Enchanted (2007)