Release notes for LensKit 2.0
The Git changelog and the list of closed tickets and pull requests provide more information on what has happened, including bugs that have been fixed.
-
Remove many deprecated classes and methods, including algorithm-specific recommenders.
-
RatingPredictor
no longer extendsItemScorer
. -
Recommender
s are no longerCloseable
, and do not need to be closed. They can be left to be garbage collected. To reflect this,RecommenderEngine.open()
has been renamedcreateRecommender()
. -
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-api
intolenskit-core
, in their corresponding packages.
Configuration
-
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)).
-
Provider
get()
methods can now be annotated with@Shareable
to indicate that the provider returns a shareable component. -
If you just want a recommender for evaluation or testing,
LenskitRecommender.build
lets you build one from a configuration without going through a recommender engine.
Baseline Algorithms
Baseline predictors have been restructured to implement ItemScorer
; the old
BaselinePredictor
interface is gone. Baseline scorers are qualified with
BaselineScorer
.
-
To configure a baseline, bind
ItemScorer
with the qualifierBaselineScorer
. -
To fall back to a baseline for missing scores, use either
SimpleRatingPredictor
(which includes fallback) orFallbackItemScorer
, which takes two item scorers annotated withPrimaryScorer
andBaselineScorer
. The primary scorer is consulted first, and the baseline used to fill in any scores the primary could not. -
ItemUserMeanPredictor
is gone. Instead, theUserMeanItemScorer
can use an arbitrary scorer as the base from which user offsets should be computed. It qualifies this scorer dependency withUserMeanBaseline
, which defaults to the global mean rating item scorer. Configure this to useItemMeanRatingItemScorer
to get a user-item personalized mean. -
PrimaryScorer
now allows unqualified matches, so dependencies qualified with it will be satisfied by an unqualifiedItemScorer
binding, if there is no qualified binding.
Data Structures
-
More
SparseVectors
methods now throwIllegalArgumentException
on invalid keys, rather than being no-ops or returningNaN
. -
Sparse vectors and scored ids now have consistent channel behavior, with
TypedSymbol
being 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 toLongUtils
. -
LongSortedArraySet
is no longer public; instead, useLongUtils.packedSet
. -
Removed
LongCursor
; it is no longer needed with the new DAOs. -
Removed pointers.
-
IntIntervalList
is no longer public; instead, useCollectionUtils.interval
. -
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.
Evaluator
holdout
directive on crossfold commands no longer supports fractions; useholdoutFraction
for fractional holdouts.
Algorithms
-
Item-item CF once again uses sparsity to speed up the model-building process.
-
Use scored ID lists for neighborhoods in item-item CF.