Documentation
¶
Overview ¶
Copyright 2020 Humility AI Incorporated, All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Humility AI Incorporated, All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Humility AI Incorporated, All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Humility AI Incorporated, All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Humility AI Incorporated, All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Humility AI Incorporated, All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Variables
- type AnnealingSoftmax
- func (a *AnnealingSoftmax) Counts() sam.SliceInt
- func (a *AnnealingSoftmax) Extend(n int)
- func (a *AnnealingSoftmax) Remove(option int)
- func (a *AnnealingSoftmax) Rewards() sam.SliceFloat64
- func (a *AnnealingSoftmax) Select() int
- func (a *AnnealingSoftmax) Significant(pvalue float64) bool
- func (a *AnnealingSoftmax) Update(option int, reward float64) error
- type EpsilonGreedy
- func (e *EpsilonGreedy) Counts() sam.SliceInt
- func (e *EpsilonGreedy) Extend(n int)
- func (e *EpsilonGreedy) Remove(option int)
- func (e *EpsilonGreedy) Rewards() sam.SliceFloat64
- func (e *EpsilonGreedy) Select() int
- func (e *EpsilonGreedy) Significant(pvalue float64) bool
- func (e *EpsilonGreedy) Update(option int, reward float64) error
- type Optimizer
- type ThompsonSampling
- func (t *ThompsonSampling) Counts() sam.SliceInt
- func (t *ThompsonSampling) Extend(n int)
- func (t *ThompsonSampling) Remove(option int)
- func (t *ThompsonSampling) Rewards() sam.SliceFloat64
- func (t *ThompsonSampling) Select() int
- func (t *ThompsonSampling) Significant(pvalue float64) bool
- func (t *ThompsonSampling) Update(option int, reward float64) error
- type UpperConfidenceBound
- func (u *UpperConfidenceBound) Counts() sam.SliceInt
- func (u *UpperConfidenceBound) Extend(n int)
- func (u *UpperConfidenceBound) Remove(option int)
- func (u *UpperConfidenceBound) Rewards() sam.SliceFloat64
- func (u *UpperConfidenceBound) Select() int
- func (u *UpperConfidenceBound) Significant(pvalue float64) bool
- func (u *UpperConfidenceBound) Update(option int, reward float64) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AnnealingSoftmax ¶
AnnealingSoftmax ...
func (*AnnealingSoftmax) Counts ¶
func (a *AnnealingSoftmax) Counts() sam.SliceInt
Counts returns a copy of the counts slice
func (*AnnealingSoftmax) Extend ¶ added in v0.1.0
func (a *AnnealingSoftmax) Extend(n int)
Extend --
func (*AnnealingSoftmax) Rewards ¶
func (a *AnnealingSoftmax) Rewards() sam.SliceFloat64
Rewards returns a copy of the rewards slice
func (*AnnealingSoftmax) Significant ¶ added in v0.1.1
func (a *AnnealingSoftmax) Significant(pvalue float64) bool
Significant --
type EpsilonGreedy ¶
EpsilonGreedy is the simplest, easiest, and most "good-enough" multi-armed bandit optimizer to utilize.
func (*EpsilonGreedy) Counts ¶
func (e *EpsilonGreedy) Counts() sam.SliceInt
Counts returns a copy of the counts slice
func (*EpsilonGreedy) Rewards ¶
func (e *EpsilonGreedy) Rewards() sam.SliceFloat64
Rewards returns a copy of the rewards slice
func (*EpsilonGreedy) Select ¶
func (e *EpsilonGreedy) Select() int
Select will select an option randomly.
func (*EpsilonGreedy) Significant ¶ added in v0.1.1
func (e *EpsilonGreedy) Significant(pvalue float64) bool
Significant --
type Optimizer ¶
type Optimizer interface { Select() int Update(selection int, reward float64) error Extend(int) Remove(int) Significant(float64) bool Counts() sam.SliceInt Rewards() sam.SliceFloat64 }
Optimizer represents a generic recommendation learning based bandit.
func NewAnnealingSoftmax ¶
NewAnnealingSoftmax ...
func NewEpsilonGreedy ¶
NewEpsilonGreedy will create and return a new EpsilonGreedy mab optimizer. Epsilon value must be between 0 and 1. The number of options must be 2 or greater.
func NewThompsonSampling ¶
NewThompsonSampling ...
func NewUpperConfidenceBound ¶
NewUpperConfidenceBound ...
type ThompsonSampling ¶
ThompsonSampling ...
func (*ThompsonSampling) Counts ¶
func (t *ThompsonSampling) Counts() sam.SliceInt
Counts returns a copy of the counts slice
func (*ThompsonSampling) Extend ¶ added in v0.1.0
func (t *ThompsonSampling) Extend(n int)
Extend --
func (*ThompsonSampling) Rewards ¶
func (t *ThompsonSampling) Rewards() sam.SliceFloat64
Rewards returns a copy of the rewards slice
func (*ThompsonSampling) Significant ¶ added in v0.1.1
func (t *ThompsonSampling) Significant(pvalue float64) bool
Significant --
type UpperConfidenceBound ¶
UpperConfidenceBound ...
func (*UpperConfidenceBound) Counts ¶
func (u *UpperConfidenceBound) Counts() sam.SliceInt
Counts returns a copy of the counts slice
func (*UpperConfidenceBound) Extend ¶ added in v0.1.0
func (u *UpperConfidenceBound) Extend(n int)
Extend --
func (*UpperConfidenceBound) Rewards ¶
func (u *UpperConfidenceBound) Rewards() sam.SliceFloat64
Rewards returns a copy of the rewards slice
func (*UpperConfidenceBound) Significant ¶ added in v0.1.1
func (u *UpperConfidenceBound) Significant(pvalue float64) bool
Significant --