Documentation

Atlas.AnAlgorithmistsToolkit.code.MultiplicativeWeights

def MultiplicativeWeights.expertMistakes {n : } (wrong : Fin nProp) [(i : Fin n) → (t : ) → Decidable (wrong i t)] (i : Fin n) (t : ) :
Instances For
    def MultiplicativeWeights.weight {n : } (wrong : Fin nProp) [(i : Fin n) → (t : ) → Decidable (wrong i t)] (ε : ) (i : Fin n) (t : ) :
    Instances For
      def MultiplicativeWeights.Φ {n : } (wrong : Fin nProp) [(i : Fin n) → (t : ) → Decidable (wrong i t)] (ε : ) (t : ) :
      Instances For
        def MultiplicativeWeights.algWrongAt {n : } (wrong : Fin nProp) [(i : Fin n) → (t : ) → Decidable (wrong i t)] (ε : ) (k : ) :
        Instances For
          noncomputable def MultiplicativeWeights.algMistakes {n : } (wrong : Fin nProp) [(i : Fin n) → (t : ) → Decidable (wrong i t)] (ε : ) (t : ) :
          Instances For
            theorem MultiplicativeWeights.weight_succ {n : } (wrong : Fin nProp) [(i : Fin n) → (t : ) → Decidable (wrong i t)] (ε : ) (i : Fin n) (k : ) :
            weight wrong ε i (k + 1) = weight wrong ε i k * if wrong i k then 1 - ε else 1
            theorem MultiplicativeWeights.Φ_zero {n : } (wrong : Fin nProp) [(i : Fin n) → (t : ) → Decidable (wrong i t)] (ε : ) :
            Φ wrong ε 0 = n
            theorem MultiplicativeWeights.Φ_step {n : } (wrong : Fin nProp) [(i : Fin n) → (t : ) → Decidable (wrong i t)] (ε : ) (k : ) :
            Φ wrong ε (k + 1) = Φ wrong ε k - ε * i : Fin n with wrong i k, weight wrong ε i k
            theorem MultiplicativeWeights.Φ_drop_on_mistake {n : } (wrong : Fin nProp) [(i : Fin n) → (t : ) → Decidable (wrong i t)] {ε : } (hε_pos : 0 < ε) (_hε_lt : ε < 1) (k : ) (hmistake : algWrongAt wrong ε k) :
            Φ wrong ε (k + 1) (1 - ε / 2) * Φ wrong ε k
            theorem MultiplicativeWeights.Φ_nonincreasing {n : } (wrong : Fin nProp) [(i : Fin n) → (t : ) → Decidable (wrong i t)] {ε : } (hε_pos : 0 < ε) (hε_lt : ε < 1) (k : ) :
            Φ wrong ε (k + 1) Φ wrong ε k
            theorem MultiplicativeWeights.Φ_upper_bound {n : } (wrong : Fin nProp) [(i : Fin n) → (t : ) → Decidable (wrong i t)] {ε : } (hε_pos : 0 < ε) (hε_lt : ε < 1) (T : ) :
            Φ wrong ε T n * (1 - ε / 2) ^ algMistakes wrong ε T
            theorem MultiplicativeWeights.Φ_lower_bound {n : } (wrong : Fin nProp) [(i : Fin n) → (t : ) → Decidable (wrong i t)] {ε : } (hε_lt : ε < 1) (i : Fin n) (t : ) :
            weight wrong ε i t Φ wrong ε t
            theorem MultiplicativeWeights.log_one_sub_half_eps_le {ε : } (hε_lt : ε < 2) :
            Real.log (1 - ε / 2) -ε / 2
            theorem MultiplicativeWeights.neg_log_one_sub_le {ε : } (hε_pos : 0 < ε) (hε_le : ε 1 / 2) :
            -Real.log (1 - ε) ε + ε ^ 2
            theorem MultiplicativeWeights.potential_inequality {n : } (wrong : Fin nProp) [(i : Fin n) → (t : ) → Decidable (wrong i t)] {ε : } (hε_pos : 0 < ε) (hε_lt : ε < 1) (i : Fin n) (T : ) :
            (1 - ε) ^ expertMistakes wrong i T n * (1 - ε / 2) ^ algMistakes wrong ε T
            theorem MultiplicativeWeights.regret_bound_from_potential {n : } (hn : 0 < n) {ε : } (hε_pos : 0 < ε) (hε_le : ε 1 / 2) {m mᵢ : } (hpot : (1 - ε) ^ mᵢ n * (1 - ε / 2) ^ m) :
            m 2 * Real.log n / ε + 2 * (1 + ε) * mᵢ
            theorem MultiplicativeWeights.weighted_majority_regret_bound {n : } (hn : 0 < n) (wrong : Fin nProp) [(i : Fin n) → (t : ) → Decidable (wrong i t)] {ε : } (hε_pos : 0 < ε) (hε_le : ε 1 / 2) (i : Fin n) (T : ) :
            (algMistakes wrong ε T) 2 * Real.log n / ε + 2 * (1 + ε) * (expertMistakes wrong i T)
            def MultiplicativeWeights.generalWeight {n : } {P : Type u_1} (M : Fin nP) (ρ ε : ) (outcomes : P) (i : Fin n) :
            Instances For
              noncomputable def MultiplicativeWeights.generalΦ {n : } {P : Type u_1} (M : Fin nP) (ρ ε : ) (outcomes : P) (t : ) :
              Instances For
                noncomputable def MultiplicativeWeights.expertProb {n : } {P : Type u_1} (M : Fin nP) (ρ ε : ) (outcomes : P) (i : Fin n) (t : ) :
                Instances For
                  noncomputable def MultiplicativeWeights.expectedPenalty {n : } {P : Type u_1} (M : Fin nP) (ρ ε : ) (outcomes : P) (t : ) :
                  Instances For
                    noncomputable def MultiplicativeWeights.totalExpectedPenalty {n : } {P : Type u_1} (M : Fin nP) (ρ ε : ) (outcomes : P) (T : ) :
                    Instances For
                      noncomputable def MultiplicativeWeights.totalNonnegPenalty {n : } {P : Type u_1} (M : Fin nP) (outcomes : P) (i : Fin n) (T : ) :
                      Instances For
                        noncomputable def MultiplicativeWeights.totalNegPenalty {n : } {P : Type u_1} (M : Fin nP) (outcomes : P) (i : Fin n) (T : ) :
                        Instances For
                          def MultiplicativeWeights.totalExpertPenalty {n : } {P : Type u_1} (M : Fin nP) (outcomes : P) (i : Fin n) (T : ) :
                          Instances For
                            theorem MultiplicativeWeights.expert_penalty_split {n : } {P : Type u_1} (M : Fin nP) (outcomes : P) (i : Fin n) (T : ) :
                            totalExpertPenalty M outcomes i T = totalNonnegPenalty M outcomes i T + totalNegPenalty M outcomes i T
                            theorem MultiplicativeWeights.general_mw_regret_bound {P : Type u_1} {n : } (hn : 0 < n) (M : Fin nP) (ρ ε : ) (outcomes : P) (hε_pos : 0 < ε) (hε_le : ε 1 / 2) (hρ_pos : 0 < ρ) (hM : ∀ (i : Fin n) (j : P), M i j Set.Icc (-ρ) ρ) (i : Fin n) (T : ) :
                            totalExpectedPenalty M ρ ε outcomes T ρ * Real.log n / ε + (1 + ε) * totalNonnegPenalty M outcomes i T + (1 - ε) * totalNegPenalty M outcomes i T
                            theorem MultiplicativeWeights.corollary_algebraic_core (totalExp expertTotal A B ρ logn δ : ) (T : ) (hT_pos : 0 < T) (hρ_pos : 0 < ρ) (hδ_pos : 0 < δ) (hAB : A + B = expertTotal) (hAmB : A - B T * ρ) (hbound : totalExp ρ * logn / (δ / (4 * ρ)) + (1 + δ / (4 * ρ)) * A + (1 - δ / (4 * ρ)) * B) (hT_big : 16 * ρ ^ 2 * logn / δ ^ 2 T) :
                            totalExp / T δ + expertTotal / T
                            theorem MultiplicativeWeights.abs_penalty_sum_le {n : } {P : Type u_1} {ρ : } (M : Fin nP) (outcomes : P) (hM : ∀ (i : Fin n) (j : P), M i j Set.Icc (-ρ) ρ) (_hρ_pos : 0 < ρ) (i : Fin n) (T : ) :
                            totalNonnegPenalty M outcomes i T - totalNegPenalty M outcomes i T T * ρ
                            theorem MultiplicativeWeights.mw_average_penalty_bound {P : Type u_1} {n : } (hn : 0 < n) (M : Fin nP) {ρ : } (outcomes : P) (hρ_pos : 0 < ρ) (hM : ∀ (i : Fin n) (j : P), M i j Set.Icc (-ρ) ρ) {δ : } (hδ_pos : 0 < δ) (hε_le : δ / (4 * ρ) 1 / 2) {T : } (hT_pos : 0 < T) (hT_big : 16 * ρ ^ 2 * Real.log n / δ ^ 2 T) (i : Fin n) :
                            totalExpectedPenalty M ρ (δ / (4 * ρ)) outcomes T / T δ + totalExpertPenalty M outcomes i T / T
                            noncomputable def MultiplicativeWeights.expectedMistakes {n : } (wrong : Fin nProp) [(i : Fin n) → (t : ) → Decidable (wrong i t)] (ε : ) (T : ) :
                            Instances For
                              theorem MultiplicativeWeights.randomized_mw_expected_regret_bound {n : } (hn : 0 < n) (wrong : Fin nProp) [(i : Fin n) → (t : ) → Decidable (wrong i t)] {ε : } (hε_pos : 0 < ε) (hε_lt : ε < 1 / 2) (i : Fin n) (T : ) :
                              expectedMistakes wrong ε T Real.log n / ε + (1 + ε) * (expertMistakes wrong i T)