recommender-als-0.2.2.0: Recommendations using alternating least squares algorithm
Safe HaskellSafe-Inferred
LanguageHaskell2010

Numeric.Recommender.ALS

Synopsis

Documentation

data ALSParams Source #

Constructors

ALSParams 

Fields

Instances

Instances details
Show ALSParams Source # 
Instance details

Defined in Numeric.Recommender.ALS

Default ALSParams Source # 
Instance details

Defined in Numeric.Recommender.ALS

Methods

def :: ALSParams #

data ALSModel u i Source #

Constructors

ALSModel 

Fields

buildModel Source #

Arguments

:: (Functor f, Foldable f) 
=> ALSParams 
-> (u -> Int) 
-> (Int -> u) 
-> (i -> Int) 
-> (Int -> i) 
-> f (u, i)

User-item pairs

-> ALSModel u i 

Build recommendations based on users' unrated item choices.

Takes conversion functions to/from Int representation for user supplied data types. Use id if you're already based on them.

The implementation follows the one in the recommenderlab library in CRAN. For further details, see "Large-scale Parallel Collaborative Filtering for the Netflix Prize" by Yunhong Zhou, Dennis Wilkinson, Robert Schreiber and Rong Pan.

buildModelRated Source #

Arguments

:: (Functor f, Foldable f) 
=> ALSParams 
-> (u -> Int) 
-> (Int -> u) 
-> (i -> Int) 
-> (Int -> i) 
-> f (u, (i, Double))

User-item pairs, rated

-> ALSModel u i 

Build model for data with ratings.

recommend Source #

Arguments

:: ALSModel u i 
-> Int

Iterations

-> IntMap [(i, Bool)] 

Per user recommendations. Results include items user has selected and the snd in the tuple is False for those items.

The result IntMap uses dense user representation as the key. Access with encodeUser.

related Source #

Arguments

:: ALSModel u i 
-> Int

Iterations

-> IntMap [(i, Double)]

IntMap key encoded item

The feature matrix gives nFactors-dimensional coordinates for the items. As such similar results can be found with using norm.

The result IntMap uses dense item representation as the key. Access with encodeItem.

byDimensions :: ALSModel u i -> Int -> [[(i, Double)]] Source #

Sort items by components of the feature matrix. This could be used for visualization purposes or to sort items along some feature axis. The interpretation of them is totally up to the user but it's not unreasonable to expect items close to each other in this representation to be in some sense similar.

There's no guarantee that the results are stable between different models even with only small differences.