/** * Create a recommender. * @return The recommender * @deprecated Use {@link #createRecommender(DataAccessObject)} */ @Deprecated @Override public LenskitRecommender createRecommender() { Preconditions.checkState(instantiable, "recommender engine does not have instantiable graph"); return new LenskitRecommender(graph); }
/** * Construct a recommender with some additional configuration. This can be used to do things * like add data source configuration on a per-recommender, rather than per-engine, basis. * * @param config The configuration to adjust the recommender. * @return The constructed recommender. * @throws RecommenderConfigurationException if there is an error configuring the recommender. */ public LenskitRecommender createRecommender(LenskitConfiguration config) throws RecommenderConfigurationException { final DAGNode<Component, Dependency> toBuild = createRecommenderGraph(config); return new LenskitRecommender(toBuild); }
/** * Build the recommender directly, skipping an engine. This does not separate the recommender from * the DAO, it just directly builds it. * * @param dao The data access object to use. Can be `null` to build without a DAO, but this is only useful in * special cases. * @return The built recommender engine, with {@linkplain ModelDisposition#EXCLUDED excluded} * components removed. * @throws RecommenderBuildException if there is an error building the engine. */ public LenskitRecommender buildRecommender(DataAccessObject dao) throws RecommenderBuildException { DAGNode<Component, Dependency> graph = buildRecommenderGraph(dao); graph = instantiateGraph(graph); return new LenskitRecommender(graph); }
/** * Create a recommender. * @return The recommender * @deprecated Use {@link #createRecommender(DataAccessObject)} */ @Deprecated @Override public LenskitRecommender createRecommender() { Preconditions.checkState(instantiable, "recommender engine does not have instantiable graph"); return new LenskitRecommender(graph); }
/** * Construct a recommender with some additional configuration. This can be used to do things * like add data source configuration on a per-recommender, rather than per-engine, basis. * * @param config The configuration to adjust the recommender. * @return The constructed recommender. * @throws RecommenderConfigurationException if there is an error configuring the recommender. */ public LenskitRecommender createRecommender(LenskitConfiguration config) throws RecommenderConfigurationException { final DAGNode<Component, Dependency> toBuild = createRecommenderGraph(config); return new LenskitRecommender(toBuild); }
/** * Build the recommender directly, skipping an engine. This does not separate the recommender from * the DAO, it just directly builds it. * * @param dao The data access object to use. Can be `null` to build without a DAO, but this is only useful in * special cases. * @return The built recommender engine, with {@linkplain ModelDisposition#EXCLUDED excluded} * components removed. * @throws RecommenderBuildException if there is an error building the engine. */ public LenskitRecommender buildRecommender(DataAccessObject dao) throws RecommenderBuildException { DAGNode<Component, Dependency> graph = buildRecommenderGraph(dao); graph = instantiateGraph(graph); return new LenskitRecommender(graph); }
return new LenskitRecommender(graph);