C# Class NReco.CF.Taste.Impl.Model.GenericDataModel

Inheritance: NReco.CF.Taste.Impl.Model.AbstractDataModel
Afficher le fichier Open project: nreco/recommender Class Usage Examples

Méthodes publiques

Méthode Description
GenericDataModel ( FastByIDMap userData ) : System

Creates a new GenericDataModel from the given users (and their preferences). This IDataModel retains all this information in memory and is effectively immutable.

GenericDataModel ( FastByIDMap userData, FastByIDMap timestamps ) : System

Creates a new GenericDataModel from the given users (and their preferences). This IDataModel retains all this information in memory and is effectively immutable.

GenericDataModel ( IDataModel dataModel ) : System

Creates a new GenericDataModel containing an immutable copy of the data from another given IDataModel.

GetItemIDs ( ) : IEnumerator
GetItemIDsFromUser ( long userID ) : FastIDSet
GetNumItems ( ) : int
GetNumUsers ( ) : int
GetNumUsersWithPreferenceFor ( long itemID ) : int
GetNumUsersWithPreferenceFor ( long itemID1, long itemID2 ) : int
GetPreferenceTime ( long userID, long itemID ) : DateTime?
GetPreferenceValue ( long userID, long itemID ) : float?
GetPreferencesForItem ( long itemID ) : IPreferenceArray
GetPreferencesFromUser ( long userID ) : IPreferenceArray
GetRawItemData ( ) : FastByIDMap

This is used mostly internally to the framework, and shouldn't be relied upon otherwise.

GetRawUserData ( ) : FastByIDMap

This is used mostly internally to the framework, and shouldn't be relied upon otherwise.

GetUserIDs ( ) : IEnumerator
HasPreferenceValues ( ) : bool
Refresh ( IList alreadyRefreshed ) : void
RemovePreference ( long userID, long itemID ) : void
SetPreference ( long userID, long itemID, float value ) : void
ToDataMap ( FastByIDMap data, bool byUser ) : FastByIDMap

Swaps, in-place, ILists for arrays in map values.

ToDataMap ( IDataModel dataModel ) : FastByIDMap

Exports the simple user IDs and preferences in the data model.

ToString ( ) : string

Method Details

GenericDataModel() public méthode

Creates a new GenericDataModel from the given users (and their preferences). This IDataModel retains all this information in memory and is effectively immutable.
public GenericDataModel ( FastByIDMap userData ) : System
userData FastByIDMap userData users to include; (see also )
Résultat System

GenericDataModel() public méthode

Creates a new GenericDataModel from the given users (and their preferences). This IDataModel retains all this information in memory and is effectively immutable.
public GenericDataModel ( FastByIDMap userData, FastByIDMap timestamps ) : System
userData FastByIDMap users to include; (see also )
timestamps FastByIDMap timestamps optionally, provided timestamps of preferences as milliseconds since the epoch. User IDs are mapped to maps of item IDs to long timestamps.
Résultat System

GenericDataModel() public méthode

Creates a new GenericDataModel containing an immutable copy of the data from another given IDataModel.
public GenericDataModel ( IDataModel dataModel ) : System
dataModel IDataModel dataModel to copy
Résultat System

GetItemIDs() public méthode

public GetItemIDs ( ) : IEnumerator
Résultat IEnumerator

GetItemIDsFromUser() public méthode

public GetItemIDsFromUser ( long userID ) : FastIDSet
userID long
Résultat FastIDSet

GetNumItems() public méthode

public GetNumItems ( ) : int
Résultat int

GetNumUsers() public méthode

public GetNumUsers ( ) : int
Résultat int

GetNumUsersWithPreferenceFor() public méthode

public GetNumUsersWithPreferenceFor ( long itemID ) : int
itemID long
Résultat int

GetNumUsersWithPreferenceFor() public méthode

public GetNumUsersWithPreferenceFor ( long itemID1, long itemID2 ) : int
itemID1 long
itemID2 long
Résultat int

GetPreferenceTime() public méthode

public GetPreferenceTime ( long userID, long itemID ) : DateTime?
userID long
itemID long
Résultat DateTime?

GetPreferenceValue() public méthode

public GetPreferenceValue ( long userID, long itemID ) : float?
userID long
itemID long
Résultat float?

GetPreferencesForItem() public méthode

public GetPreferencesForItem ( long itemID ) : IPreferenceArray
itemID long
Résultat IPreferenceArray

GetPreferencesFromUser() public méthode

public GetPreferencesFromUser ( long userID ) : IPreferenceArray
userID long
Résultat IPreferenceArray

GetRawItemData() public méthode

This is used mostly internally to the framework, and shouldn't be relied upon otherwise.
public GetRawItemData ( ) : FastByIDMap
Résultat FastByIDMap

GetRawUserData() public méthode

This is used mostly internally to the framework, and shouldn't be relied upon otherwise.
public GetRawUserData ( ) : FastByIDMap
Résultat FastByIDMap

GetUserIDs() public méthode

public GetUserIDs ( ) : IEnumerator
Résultat IEnumerator

HasPreferenceValues() public méthode

public HasPreferenceValues ( ) : bool
Résultat bool

Refresh() public méthode

public Refresh ( IList alreadyRefreshed ) : void
alreadyRefreshed IList
Résultat void

RemovePreference() public méthode

public RemovePreference ( long userID, long itemID ) : void
userID long
itemID long
Résultat void

SetPreference() public méthode

public SetPreference ( long userID, long itemID, float value ) : void
userID long
itemID long
value float
Résultat void

ToDataMap() public static méthode

Swaps, in-place, ILists for arrays in map values.
public static ToDataMap ( FastByIDMap data, bool byUser ) : FastByIDMap
data FastByIDMap
byUser bool
Résultat FastByIDMap

ToDataMap() public static méthode

Exports the simple user IDs and preferences in the data model.
public static ToDataMap ( IDataModel dataModel ) : FastByIDMap
dataModel IDataModel
Résultat FastByIDMap

ToString() public méthode

public ToString ( ) : string
Résultat string