private void initSchedule(List<FeatureVectorSequence> sample, CRFModel model, double eta0)
    {
        double obj0 = findObjBySampling(sample, model);

        log.info("Initial objective=" + obj0);
        double bestEta = BEST_ETA_INIT;
        double bestObj = obj0;
        double etaGuess = eta0;

        boolean phase2 = false;

        for (int k = 10; k > 0 || !phase2; )
        {
            CRFModel clone = (CRFModel)model.prototype();
            double obj = tryEtaBySampling(sample, clone, etaGuess);
            boolean ok = (obj < obj0);

            log.info("Trying eta=" + etaGuess + " obj=" + obj);
            if (ok)
            {
                log.info(" (possible)");
            }
            else
            {
                log.info("(too large)");
            }
            if (ok)
            {
                --k;
                if (obj < bestObj)
                {
                    bestObj = obj;

                    bestEta = etaGuess;
                }
            }
            if (!phase2)
            {
                if (ok)
                {
                    etaGuess *= FACTOR;
                }
                else
                {
                    phase2 = true;
                    etaGuess = eta0;
                }
            }
            if (phase2)
            {
                etaGuess /= FACTOR;
            }

        }
        bestEta /= FACTOR;
        t = 1.0 / (bestEta * lambda);


    }