Release notes for LensKit 2.0
Remove many deprecated classes and methods, including algorithm-specific recommenders.
RatingPredictorno longer extends
Recommenders are no longer
Closeable, and do not need to be closed. They can be left to be garbage collected. To reflect this,
RecommenderEngine.open()has been renamed
The way DAOs work has been completely rewritten. There is non longer a monolithic
DataAccessObject, but several modular DAO instances. Documentation on this is forthcoming.
Scorer, predictor, and recommender components now only take a user ID; the
UserHistory-based methods have been removed. The user event DAO should be fast & caching, so individual components can request the data they need directly.
Event and history interfaces have been moved out of
lenskit-core, in their corresponding packages.
Since DAOs are rewritten, the configuration no longer has special-case support for them. Right now it is not possible to build a configuration with one DAO implementation, serialize it, and replace the DAO implementation; that capability will come back in LensKit 2.1 (#issue(335)).
get()methods can now be annotated with
@Shareableto indicate that the provider returns a shareable component.
If you just want a recommender for evaluation or testing,
LenskitRecommender.buildlets you build one from a configuration without going through a recommender engine.
Baseline predictors have been restructured to implement
ItemScorer; the old
BaselinePredictor interface is gone. Baseline scorers are qualified with
To configure a baseline, bind
ItemScorerwith the qualifier
To fall back to a baseline for missing scores, use either
SimpleRatingPredictor(which includes fallback) or
FallbackItemScorer, which takes two item scorers annotated with
BaselineScorer. The primary scorer is consulted first, and the baseline used to fill in any scores the primary could not.
ItemUserMeanPredictoris gone. Instead, the
UserMeanItemScorercan use an arbitrary scorer as the base from which user offsets should be computed. It qualifies this scorer dependency with
UserMeanBaseline, which defaults to the global mean rating item scorer. Configure this to use
ItemMeanRatingItemScorerto get a user-item personalized mean.
PrimaryScorernow allows unqualified matches, so dependencies qualified with it will be satisfied by an unqualified
ItemScorerbinding, if there is no qualified binding.
SparseVectorsmethods now throw
IllegalArgumentExceptionon invalid keys, rather than being no-ops or returning
Sparse vectors and scored ids now have consistent channel behavior, with
TypedSymbolbeing the the most general interface to channels. Raw symbols reference unboxed side channels (raw doubles or vectors); they will be how most code interacts with channels, but are now conceptually a special case of side channels with an optimized implementation.
long-related collection utilities have been moved to
LongSortedArraySetis no longer public; instead, use
LongCursor; it is no longer needed with the new DAOs.
IntIntervalListis no longer public; instead, use
For consistency, all data structures should be created using builders or static factory methods, not their constructors (see Effective Java). Public data structure constructors have therefore been deprecated, and will be removed in LensKit 2.0.
Return packed lists from Top-N accumulators.
holdoutdirective on crossfold commands no longer supports fractions; use
holdoutFractionfor fractional holdouts.
Item-item CF once again uses sparsity to speed up the model-building process.
Use scored ID lists for neighborhoods in item-item CF.