congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
LenskitRecommenderEngineBuilder.build
Code IndexAdd Tabnine to your IDE (free)

How to use
build
method
in
org.lenskit.LenskitRecommenderEngineBuilder

Best Java code snippets using org.lenskit.LenskitRecommenderEngineBuilder.build (Showing top 11 results out of 315)

origin: lenskit/lenskit

/**
 * Build the recommender engine.
 *
 * @return The built recommender engine, with {@linkplain ModelDisposition#EXCLUDED excluded}
 *         components removed.
 * @throws RecommenderBuildException if there is an error building the recommender.
 * @deprecated Use {@link #build(DataAccessObject)}
 */
@Deprecated
public LenskitRecommenderEngine build() throws RecommenderBuildException {
  return build(null);
}
origin: lenskit/lenskit

/**
 * Build a LensKit recommender engine from a configuration.  The resulting recommender is
 * independent of any subsequent modifications to the configuration.
 *
 * @param config     The configuration.
 * @return The recommender engine.
 */
@SuppressWarnings("deprecation")
public static LenskitRecommenderEngine build(LenskitConfiguration config) throws RecommenderBuildException {
  return newBuilder().addConfiguration(config).build();
}
origin: lenskit/lenskit

/**
 * Build a LensKit recommender engine from a configuration.  The resulting recommender is
 * independent of any subsequent modifications to the configuration.
 *
 * @param config     The configuration.
 * @param dao The data access object
 * @return The recommender engine.
 */
public static LenskitRecommenderEngine build(LenskitConfiguration config, DataAccessObject dao) throws RecommenderBuildException {
  return newBuilder().addConfiguration(config).build(dao);
}
origin: lenskit/lenskit

private LenskitRecommenderEngine buildRecommenderEngine(DataAccessObject train) throws RecommenderBuildException {
  logger.debug("Starting recommender build");
  LenskitRecommenderEngineBuilder builder = new EvalEngineBuilder();
  builder.addConfiguration(sharedConfig);
  builder.addConfiguration(dataSet.getExtraConfiguration());
  for (LenskitConfiguration cfg: algorithm.getConfigurations()) {
    builder.addConfiguration(cfg);
  }
  return builder.build(train);
}
origin: lenskit/lenskit

LenskitRecommenderEngine engine = builder.build(input.getDAO());
timer.stop();
logger.info("built recommender in {}", timer);
origin: lenskit/lenskit

@Override
public void execute(Namespace opts) throws LenskitCommandException {
  Context ctx = new Context(opts);
  LenskitConfiguration dataConfig = ctx.input.getConfiguration();
  LenskitRecommenderEngineBuilder builder = LenskitRecommenderEngine.newBuilder();
  try {
    for (LenskitConfiguration config: ctx.environment.loadConfigurations(ctx.getConfigFiles())) {
      builder.addConfiguration(config);
    }
  } catch (IOException e) {
    throw new LenskitCommandException("error loading LensKit configuration", e);
  }
  builder.addConfiguration(dataConfig, ModelDisposition.EXCLUDED);
  Stopwatch timer = Stopwatch.createStarted();
  LenskitRecommenderEngine engine = builder.build(ctx.input.getDAO());
  timer.stop();
  logger.info("built model in {}", timer);
  File output = ctx.getOutputFile();
  CompressionMode comp = CompressionMode.autodetect(output);
  logger.info("writing model to {}", output);
  try (OutputStream raw = new FileOutputStream(output);
     OutputStream stream = comp.wrapOutput(raw)) {
    engine.write(stream);
  } catch (IOException e) {
    throw new LenskitCommandException("could not write output file", e);
  }
}
origin: lenskit/lenskit

lre = LenskitRecommenderEngine.newBuilder()
               .addConfiguration(algorithm.getConfigurations().get(0))
               .build(limitedDao);
timer.stop();
logger.info("built model {} in {}", buildsCount, timer);
origin: org.lenskit/lenskit-core

/**
 * Build the recommender engine.
 *
 * @return The built recommender engine, with {@linkplain ModelDisposition#EXCLUDED excluded}
 *         components removed.
 * @throws RecommenderBuildException if there is an error building the recommender.
 * @deprecated Use {@link #build(DataAccessObject)}
 */
@Deprecated
public LenskitRecommenderEngine build() throws RecommenderBuildException {
  return build(null);
}
origin: org.lenskit/lenskit-core

/**
 * Build a LensKit recommender engine from a configuration.  The resulting recommender is
 * independent of any subsequent modifications to the configuration.
 *
 * @param config     The configuration.
 * @param dao The data access object
 * @return The recommender engine.
 */
public static LenskitRecommenderEngine build(LenskitConfiguration config, DataAccessObject dao) throws RecommenderBuildException {
  return newBuilder().addConfiguration(config).build(dao);
}
origin: org.lenskit/lenskit-core

/**
 * Build a LensKit recommender engine from a configuration.  The resulting recommender is
 * independent of any subsequent modifications to the configuration.
 *
 * @param config     The configuration.
 * @return The recommender engine.
 */
@SuppressWarnings("deprecation")
public static LenskitRecommenderEngine build(LenskitConfiguration config) throws RecommenderBuildException {
  return newBuilder().addConfiguration(config).build();
}
origin: org.grouplens.lenskit/lenskit-eval

/**
 * Build a recommender.
 *
 * @param defaults Additional configuration.  This configuration comes <em>before</em> the
 *                 algorithm's configuration, so it is overridden if appropriate.  It is used
 *                 for providing things such as DAOs.
 * @return The instantiated recommender.
 * @throws RecommenderBuildException
 */
public LenskitRecommender buildRecommender(@Nullable LenskitConfiguration defaults) throws RecommenderBuildException {
  LenskitRecommenderEngineBuilder builder = LenskitRecommenderEngine.newBuilder();
  if (defaults != null) {
    builder.addConfiguration(defaults);
  }
  for (LenskitConfiguration cfg: configurations) {
    builder.addConfiguration(cfg);
  }
  return builder.build().createRecommender();
}
org.lenskitLenskitRecommenderEngineBuilderbuild

Javadoc

Build the recommender engine.

Popular methods of LenskitRecommenderEngineBuilder

  • addConfiguration
    Add a configuration to be used when building the engine.
  • buildRecommenderGraph
    Build a recommender graph for this engine builder's configuration. Clients generally do not need to
  • instantiateGraph
    Instantiate the recommender graph.
  • <init>
  • rewriteExcludedComponents
    Remove configuration that should be excluded from engine graphs, particularly the DAO.

Popular in Java

  • Reading from database using SQL prepared statement
  • putExtra (Intent)
  • compareTo (BigDecimal)
  • getContentResolver (Context)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • JCheckBox (javax.swing)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now