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

How to use
newBuilder
method
in
org.lenskit.LenskitRecommenderEngine

Best Java code snippets using org.lenskit.LenskitRecommenderEngine.newBuilder (Showing top 8 results out of 315)

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

if (modelFile == null) {
  logger.info("creating fresh recommender");
  LenskitRecommenderEngineBuilder builder = LenskitRecommenderEngine.newBuilder();
  for (LenskitConfiguration config: environment.loadConfigurations(getConfigFiles())) {
    builder.addConfiguration(config);
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);
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.lenskitLenskitRecommenderEnginenewBuilder

Javadoc

Create a new recommender engine builder.

Popular methods of LenskitRecommenderEngine

  • createRecommender
    Create a LensKit recommender.
  • build
    Build a LensKit recommender engine from a configuration. The resulting recommender is independent of
  • newLoader
    Create a new recommender engine loader.
  • write
    Write the state of this recommender engine to the given stream so that it can be recreated later usi
  • <init>
    Build an engine encapsulating a dependency graph. You generally do not want to use this - use Lenski
  • createRecommenderGraph
  • getGraph
    Get the dependency graph of the recommender engine.

Popular in Java

  • Making http requests using okhttp
  • getContentResolver (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getSupportFragmentManager (FragmentActivity)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • 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