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

How to use
addConfiguration
method
in
org.lenskit.LenskitRecommenderEngineBuilder

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

origin: lenskit/lenskit

/**
 * Add a configuration to be included in the recommender engine.  This is the equivalent of
 * calling {@link #addConfiguration(LenskitConfiguration, ModelDisposition)} with the {@link ModelDisposition#INCLUDED}.
 * @param config The configuration.
 * @return The builder (for chaining).
 */
public LenskitRecommenderEngineBuilder addConfiguration(LenskitConfiguration config) {
  return addConfiguration(config, ModelDisposition.INCLUDED);
}
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

/**
 * 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

@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

LenskitRecommenderEngineBuilder builder = LenskitRecommenderEngine.newBuilder();
for (LenskitConfiguration config: environment.loadConfigurations(getConfigFiles())) {
  builder.addConfiguration(config);
origin: lenskit/lenskit

               .addConfiguration(algorithm.getConfigurations().get(0))
               .build(limitedDao);
timer.stop();
origin: org.lenskit/lenskit-core

/**
 * Add a configuration to be included in the recommender engine.  This is the equivalent of
 * calling {@link #addConfiguration(LenskitConfiguration, ModelDisposition)} with the {@link ModelDisposition#INCLUDED}.
 * @param config The configuration.
 * @return The builder (for chaining).
 */
public LenskitRecommenderEngineBuilder addConfiguration(LenskitConfiguration config) {
  return addConfiguration(config, ModelDisposition.INCLUDED);
}
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.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();
}
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();
}
org.lenskitLenskitRecommenderEngineBuilderaddConfiguration

Javadoc

Add a configuration to be included in the recommender engine. This is the equivalent of calling #addConfiguration(LenskitConfiguration,ModelDisposition) with the ModelDisposition#INCLUDED.

Popular methods of LenskitRecommenderEngineBuilder

  • build
    Build the recommender 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
  • Best IntelliJ plugins
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