Documentation ¶
Index ¶
- type Collection
- func (collection *Collection) DeriveNormalizedAttributesFrequencyCounts() map[string]map[string]int
- func (collection *Collection) ExtractCollectionAttributeEntropy() map[string]float64
- func (collection *Collection) ExtractCollectionAttributeFrequencyCounts() map[string]map[string]int
- func (collection *Collection) ExtractCollectionAttributes() map[string][]CollectionAttribute
- func (collection *Collection) ExtractNullAttributes() map[string]*CollectionAttribute
- func (collection *Collection) TotalTokensWithAttribute(attribute TokenAttribute) int
- type CollectionAttribute
- type InformationContentScorer
- func (scorer *InformationContentScorer) GetCollectionEntropy(collection *Collection, collectionAttributes map[string][]CollectionAttribute, ...) float64
- func (scorer *InformationContentScorer) GetICScore(collection *Collection, token *Token, ...) (float64, error)
- func (scorer *InformationContentScorer) GetTokenAttributesScoresAndWeights(collection *Collection, token *Token, _ bool, ...) ([]float64, []float64)
- func (scorer *InformationContentScorer) ScoreCollection(collection *Collection) ([]float64, error)
- func (scorer *InformationContentScorer) ScoreToken(collection *Collection, token *Token, ...) (float64, error)
- type Scorer
- type Token
- type TokenAttribute
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Collection struct { Name string Tokens []*Token AttributesFrequencyCounts map[string]map[string]int }
Collection.
func NewCollection ¶
func NewCollection(name string, tokens []*Token) *Collection
func (*Collection) DeriveNormalizedAttributesFrequencyCounts ¶
func (collection *Collection) DeriveNormalizedAttributesFrequencyCounts() map[string]map[string]int
func (*Collection) ExtractCollectionAttributeEntropy ¶
func (collection *Collection) ExtractCollectionAttributeEntropy() map[string]float64
func (*Collection) ExtractCollectionAttributeFrequencyCounts ¶
func (collection *Collection) ExtractCollectionAttributeFrequencyCounts() map[string]map[string]int
func (*Collection) ExtractCollectionAttributes ¶
func (collection *Collection) ExtractCollectionAttributes() map[string][]CollectionAttribute
func (*Collection) ExtractNullAttributes ¶
func (collection *Collection) ExtractNullAttributes() map[string]*CollectionAttribute
func (*Collection) TotalTokensWithAttribute ¶
func (collection *Collection) TotalTokensWithAttribute(attribute TokenAttribute) int
type CollectionAttribute ¶
type CollectionAttribute struct { Attribute TokenAttribute TotalTokens int }
type InformationContentScorer ¶
type InformationContentScorer struct{}
func NewInformationContentScorer ¶
func NewInformationContentScorer() *InformationContentScorer
func (*InformationContentScorer) GetCollectionEntropy ¶
func (scorer *InformationContentScorer) GetCollectionEntropy(collection *Collection, collectionAttributes map[string][]CollectionAttribute, collectionNullAttributes map[string]*CollectionAttribute) float64
func (*InformationContentScorer) GetICScore ¶
func (scorer *InformationContentScorer) GetICScore(collection *Collection, token *Token, collectionNullAttributes map[string]*CollectionAttribute) (float64, error)
func (*InformationContentScorer) GetTokenAttributesScoresAndWeights ¶
func (scorer *InformationContentScorer) GetTokenAttributesScoresAndWeights(collection *Collection, token *Token, _ bool, collectionNullAttributes map[string]*CollectionAttribute) ([]float64, []float64)
func (*InformationContentScorer) ScoreCollection ¶
func (scorer *InformationContentScorer) ScoreCollection(collection *Collection) ([]float64, error)
func (*InformationContentScorer) ScoreToken ¶
func (scorer *InformationContentScorer) ScoreToken(collection *Collection, token *Token, collectionNullAttributes map[string]*CollectionAttribute, collectionEntropy float64) (float64, error)
type Token ¶
type Token struct { ContractAddress common.Address TokenID int64 Metadata []TokenAttribute }
type TokenAttribute ¶
type TokenAttribute struct { Name string Value interface{} }
Click to show internal directories.
Click to hide internal directories.