Documentation ¶
Index ¶
- Constants
- func NewMatrixInt(row, col int) [][]int
- func NewMatrixfloat64(row, col int) [][]float64
- type DataSet
- func (set *DataSet) Count() int
- func (set *DataSet) GetWithIndex(i int) (userindex int, itemindex int, score float64)
- func (set *DataSet) GlobalMean() float64
- func (set *DataSet) Item(itemId uint32) *MarginalSubSet
- func (set *DataSet) ItemByIndex(itemIndex int) *MarginalSubSet
- func (set *DataSet) ItemCount() int
- func (set *DataSet) ItemIndexer() *Indexer
- func (set *DataSet) Items() []*MarginalSubSet
- func (set *DataSet) User(userId uint32) *MarginalSubSet
- func (set *DataSet) UserByIndex(userIndex int) *MarginalSubSet
- func (set *DataSet) UserCount() int
- func (set *DataSet) UserIndexer() *Indexer
- func (set *DataSet) Users() []*MarginalSubSet
- type DataSetInterface
- type Indexer
- type MarginalSubSet
- type MaxHeap
- func (maxHeap *MaxHeap) Add(elem interface{}, score float64)
- func (maxHeap *MaxHeap) Len() int
- func (maxHeap *MaxHeap) Less(i, j int) bool
- func (maxHeap *MaxHeap) Pop() interface{}
- func (maxHeap *MaxHeap) Push(x interface{})
- func (maxHeap *MaxHeap) Swap(i, j int)
- func (maxHeap *MaxHeap) ToSorted() ([]interface{}, []float64)
- type RandomGenerator
Constants ¶
View Source
const NotId = -1
Variables ¶
This section is empty.
Functions ¶
func NewMatrixInt ¶
func NewMatrixfloat64 ¶
Types ¶
type DataSet ¶
type DataSet struct {
// contains filtered or unexported fields
}
func (*DataSet) GetWithIndex ¶
func (*DataSet) GlobalMean ¶
func (*DataSet) Item ¶
func (set *DataSet) Item(itemId uint32) *MarginalSubSet
func (*DataSet) ItemByIndex ¶
func (set *DataSet) ItemByIndex(itemIndex int) *MarginalSubSet
func (*DataSet) ItemIndexer ¶
func (*DataSet) Items ¶
func (set *DataSet) Items() []*MarginalSubSet
func (*DataSet) User ¶
func (set *DataSet) User(userId uint32) *MarginalSubSet
func (*DataSet) UserByIndex ¶
func (set *DataSet) UserByIndex(userIndex int) *MarginalSubSet
func (*DataSet) UserIndexer ¶
func (*DataSet) Users ¶
func (set *DataSet) Users() []*MarginalSubSet
type DataSetInterface ¶
type DataSetInterface interface { Count() int GlobalMean() float64 UserCount() int ItemCount() int Users() []*MarginalSubSet Items() []*MarginalSubSet UserIndexer() *Indexer ItemIndexer() *Indexer User(userId uint32) *MarginalSubSet Item(itemId uint32) *MarginalSubSet UserByIndex(userIndex int) *MarginalSubSet ItemByIndex(itemIndex int) *MarginalSubSet GetWithIndex(i int) (int, int, float64) }
type Indexer ¶
func NewIndexer ¶
func NewIndexer() *Indexer
type MarginalSubSet ¶
func NewMarginalSubSet ¶
func NewMarginalSubSet(indexer *Indexer, subset []int) *MarginalSubSet
func (*MarginalSubSet) Contain ¶
func (set *MarginalSubSet) Contain(id uint32) bool
func (*MarginalSubSet) GetID ¶
func (set *MarginalSubSet) GetID(i int) uint32
func (*MarginalSubSet) GetIndex ¶
func (set *MarginalSubSet) GetIndex(i int) int
func (*MarginalSubSet) Len ¶
func (set *MarginalSubSet) Len() int
func (*MarginalSubSet) Less ¶
func (set *MarginalSubSet) Less(i, j int) bool
func (*MarginalSubSet) Swap ¶
func (set *MarginalSubSet) Swap(i, j int)
type MaxHeap ¶
type MaxHeap struct { Elem []interface{} // store elements Score []float64 // store scores K int // the size of heap }
func NewMaxHeap ¶
type RandomGenerator ¶
func NewRandomGenerator ¶
func NewRandomGenerator(seed int64) RandomGenerator
func (RandomGenerator) NewNormalMatrix ¶
func (rng RandomGenerator) NewNormalMatrix(row, col int, mean, stdDev float64) [][]float64
func (RandomGenerator) NewNormalVector ¶
func (rng RandomGenerator) NewNormalVector(size int, mean, stdDev float64) []float64
Click to show internal directories.
Click to hide internal directories.