Giter VIP home page Giter VIP logo

lenskit-hello's Introduction

LensKit

Build Status Windows build status Test coverage SonarQube test coverage SonarQube technical debt Coverity Scan Build Status Join the chat at https://gitter.im/lenskit/lenskit

Deprecation Notice: The Java implementation of LensKit is now deprecated. For new projects, use the Python version.

LensKit is an implementation of collaborative filtering algorithms and a set of tools for benchmarking them. This readme is about working with the LensKit source code. For more information about LensKit and its documentation, visit the web site or wiki. You can also find information on the wiki about how to use LensKit without downloading the source code. If this is your first time working with LensKit we recommend checking out the Getting Started guide.

LensKit is made available under the MIT license; see LICENSE.md.

Installation and Dependency Management

LensKit is built and deployed with Gradle and publishes its artifacts to Maven Central. To install it to the local Maven repository, making it available to other projects using standard Java-based tools, check out this repository and run ./gradlew install; it is then available to other projects by depending directly on it in your Maven, Gradle, Ivy, or SBT project. The source code can also be checked out and used in most Java IDEs.

Working with the Code

To work with the LensKit code, import the Gradle project into your IDE. Most modern Java IDEs include support for Gradle, including IntelliJ IDEA (used by most LensKit developers), Eclipse, and NetBeans.

No other particular setup is needed.

Modules

LensKit is comprised of several modules. The top-level lenskit module serves as a container to build them and provide common settings and dependencies. The other modules are as follows:

  • lenskit-api -- the common, public recommender API exposed by LensKit, independent of its actual implementations.
  • lenskit-test -- infrastructure and helper code for testing.
  • lenskit-core -- the core support code and configuration facilities for the rest of LensKit. It is the entry point for most of what you want to do with LensKit, providing support for configuring and building recommenders.
  • lenskit-knn -- k-NN recommenders (user-user and item-item collaborative filtering).
  • lenskit-svd -- the FunkSVD recommender (and eventually real SVD recommenders).
  • lenskit-slopeone -- Slope-One recommenders.
  • lenskit-eval -- the evaluation framework and APIs, along with a command line evaluation runner.
  • lenskit-groovy -- support for reading LensKit configurations from Groovy files.
  • lenskit-all -- a metapackage you can depend on to pull in the rest of the LensKit packages.
  • lenskit-cli -- the LensKit command line interface.
  • lenskit-gradle -- the Gradle plugin to script the LensKit evaluator
  • lenskit-integration-tests -- additional integration tests for LensKit.

Running the Tests

After you make changes, it's good to run the unit tests. You can run many of them from your IDE; run all tests in the org.grouplens.lenskit package (and subpackages) across all modules.

To run the full test suite, including data-driven unit tests and integration tests, use Gradle:

$ ./gradlew check

Copyright

LensKit is under the following copyright and license:

Copyright 2014-2017 LensKit Contributors. Copyright 2010-2014 Regents of the University of Minnesota Work on LensKit has been funded by the National Science Foundation under grants IIS 05-34939, 08-08692, 08-12148, and 10-17697.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Contributing to LensKit

We welcome contribution to LensKit. If you are looking for something to work on, we recommend perusing the open tickets on GitHub or asking on the mailing list.

We prefer to receive code submissions as GitHub pull requests. To do this:

  1. Fork the LensKit repository (lenskit/lenskit) on GitHub
  2. Push your changes to your fork
  3. Submit a pull request via the GitHub web interface

For additional details, including legal maters, please see CONTRIBUTING.md.

lenskit-hello's People

Contributors

koos303 avatar mdekstrand avatar taavi223 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lenskit-hello's Issues

GET Some ERROR when I run lenskit-hello

Dear Sir, I meet some Errors When I import the build.gradle in IDEA or just run it on shell. I google it and don't find relative ways to tackle it so I wish you can help me.

shayueMBP:lenskit-hello-master 2 shayue$ ./gradlew build
:compileJava

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all dependencies for configuration ':compileClasspath'.
> Could not resolve org.lenskit:lenskit-all:3.0-M2.
  Required by:
      :lenskit-hello-master 2:unspecified
   > Could not resolve org.lenskit:lenskit-all:3.0-M2.
      > Could not get resource 'https://repo1.maven.org/maven2/org/lenskit/lenskit-all/3.0-M2/lenskit-all-3.0-M2.pom'.
         > Could not GET 'https://repo1.maven.org/maven2/org/lenskit/lenskit-all/3.0-M2/lenskit-all-3.0-M2.pom'.
            > repo1.maven.org:443 failed to respond
   > Could not resolve org.lenskit:lenskit-all:3.0-M2.
      > Could not get resource 'https://oss.sonatype.org/content/repositories/snapshots/org/lenskit/lenskit-all/3.0-M2/lenskit-all-3.0-M2.pom'.
         > Could not GET 'https://oss.sonatype.org/content/repositories/snapshots/org/lenskit/lenskit-all/3.0-M2/lenskit-all-3.0-M2.pom'.
            > oss.sonatype.org:443 failed to respond

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

hello,i meet some errors

nice to meet u sir. Im a student in China.im learing recommender system now,so I download lenskit from here."lenskit-hello-master",that's what I downloaded.I read the readme and I followed the steps hoping to see it working.
i setted environments well,then i entered:"C:\LensKit\lenskit-hello> .\gradlew.bat build",build successful.But when i entered"C:\LensKit\lenskit-hello-master> .\build\install\lenskit-hello-master\bin\lenskit-hello-master.bat 72",some errors occured:
C:\Users\chen\Desktop\lenskit-hello-master>.\build\install\lenskit-hello-master\bin\lenskit-hello-master.bat 72
INFO o.l.c.ConfigurationLoader - loading script from file:/C:/Users/chen/Desktop/lenskit-hello-master/etc/item-item.groovy
INFO o.l.k.i.m.ItemItemBuildContextProvider - constructing build context
INFO o.l.k.i.m.ItemItemModelBuilder - building item-item model for 8915 items
java.lang.RuntimeException: Instantiation error on (Provider(org.lenskit.knn.item.model.ItemItemModelBuilder), MEMOIZE)
java.lang.RuntimeException: Instantiation error on (Provider(org.lenskit.knn.item.model.ItemItemModelBuilder), MEMOIZE)
at org.lenskit.inject.NodeInstantiator.apply(NodeInstantiator.java:57)
at org.lenskit.inject.NodeInstantiator$DefaultImpl.apply(NodeInstantiator.java:67)
at org.lenskit.inject.InstantiatingNodeProcessor.processNode(InstantiatingNodeProcessor.java:54)
at org.lenskit.inject.NodeProcessors.processNodes(NodeProcessors.java:89)
at org.lenskit.inject.RecommenderInstantiator.replaceShareableNodes(RecommenderInstantiator.java:118)
at org.lenskit.inject.RecommenderInstantiator.instantiate(RecommenderInstantiator.java:87)
at org.lenskit.LenskitRecommenderEngineBuilder.build(LenskitRecommenderEngineBuilder.java:122)
at org.lenskit.LenskitRecommenderEngine.build(LenskitRecommenderEngine.java:257)
at org.grouplens.lenskit.hello.HelloLenskit.run(HelloLenskit.java:108)
at org.grouplens.lenskit.hello.HelloLenskit.main(HelloLenskit.java:59)
Caused by: org.grouplens.grapht.ConstructionException: Error invoking provider org.grouplens.grapht.reflect.internal.ClassInstantiator@1a14a4
at org.grouplens.grapht.Instantiators$ProviderInstantiator.instantiate(Instantiators.java:155)
at org.grouplens.grapht.Instantiators$MemoizingInstantiator.instantiate(Instantiators.java:184)
at org.lenskit.inject.NodeInstantiator$DefaultImpl.instantiate(NodeInstantiator.java:76)
at org.lenskit.inject.NodeInstantiator.apply(NodeInstantiator.java:55)
... 9 more
Caused by: java.lang.OutOfMemoryError: Java heap space
at it.unimi.dsi.fastutil.doubles.DoubleArrays.grow(DoubleArrays.java:165)
at it.unimi.dsi.fastutil.doubles.DoubleArrayList.grow(DoubleArrayList.java:192)
at it.unimi.dsi.fastutil.doubles.DoubleArrayList.add(DoubleArrayList.java:206)
at org.grouplens.lenskit.scored.ScoredIdListBuilder.add(ScoredIdListBuilder.java:209)
at org.grouplens.lenskit.util.UnlimitedScoredItemAccumulator.put(UnlimitedScoredItemAccumulator.java:57)
at org.lenskit.knn.item.model.ItemItemModelBuilder.get(ItemItemModelBuilder.java:112)
at org.lenskit.knn.item.model.ItemItemModelBuilder.get(ItemItemModelBuilder.java:50)
at org.grouplens.grapht.Instantiators$ProviderInstantiator.instantiate(Instantiators.java:153)
... 12 more

Can you give me some advices please?Thank you very much.

sh or bash to run?

I tried to run the program like the README file says, using /bin/sh, but got a syntax error. It seems to work after I tried bash instead...

nlw@kvelertak:~/src/lenskit-hello$ /bin/sh build/install/lenskit-hello/bin/lenskit-hello 72
build/install/lenskit-hello/bin/lenskit-hello: 158: build/install/lenskit-hello/bin/lenskit-hello: Syntax error: "(" unexpected
nlw@kvelertak:~/src/lenskit-hello$ bash build/install/lenskit-hello/bin/lenskit-hello 72
INFO  o.l.d.d.f.TextEntitySource - loading text file source ratings to read from file:/home/nlw/src/lenskit-hello/data/ratings.csv
INFO  o.l.d.d.f.TextEntitySource - loading text file source items to read from file:/home/nlw/src/lenskit-hello/data/movies.csv
INFO  o.l.d.d.f.TextEntitySource - loading text file source tags to read from file:/home/nlw/src/lenskit-hello/data/tags.csv
(...)

Gradle build fails due to sun.security.validator.ValidatorException despite installing certificates

I'm not sure if this is an issue on my end or with lenskit-hello. I'm taking the Coursera course and thought I might try to ask here.

I'm trying to run lenskit-hello according to the instructions. When I run ./gradlew build, I receive the error

(base) Briennas-MBP:lenskit-hello-master briennakh$ ./gradlew build
:compileJava

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all dependencies for configuration ':compileClasspath'.
> Could not resolve org.lenskit:lenskit-all:3.0-M3.
  Required by:
      :lenskit-hello-master 4.50.57 AM:unspecified
   > Could not resolve org.lenskit:lenskit-all:3.0-M3.
      > Could not get resource 'https://repo1.maven.org/maven2/org/lenskit/lenskit-all/3.0-M3/lenskit-all-3.0-M3.pom'.
         > Could not GET 'https://repo1.maven.org/maven2/org/lenskit/lenskit-all/3.0-M3/lenskit-all-3.0-M3.pom'.
            > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
   > Could not resolve org.lenskit:lenskit-all:3.0-M3.
      > Could not get resource 'https://jcenter.bintray.com/org/lenskit/lenskit-all/3.0-M3/lenskit-all-3.0-M3.pom'.
         > Could not GET 'https://jcenter.bintray.com/org/lenskit/lenskit-all/3.0-M3/lenskit-all-3.0-M3.pom'.
            > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 4.009 secs

I am using Java 1.8.0_241 (and only that one is installed) on MacOS Mojave 10.14.6. I've installed the most recent security updates, then restarted my computer. I have attempted this on my regular wifi and on my phone's hotspot.

I followed instructions in the accepted answer here, downloading the security certificates from both https://repo1.maven.org/maven2/org/lenskit/lenskit-all/3.0-M2/lenskit-all-3.0-M2.pom and https://oss.sonatype.org/content/repositories/snapshots/org/lenskit/lenskit-all/3.0-M2/lenskit-all-3.0-M2.pom and adding them to the keystore via the following command (only showing one of two):

keytool -import -alias maven -file /Users/briennakh/Downloads/maven.cer -keystore 
/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/jre/lib/security/cacerts

Then if I check

keytool -list -keystore /Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/jre/lib/security/cacerts | grep maven

it shows that my certificate has been added, maven, Mar 17, 2020, trustedCertEntry, yet I'm still getting the same error when running ./gradlew build?

I also checked openssl x509 -in /Users/briennakh/Downloads/maven.pem -text to make sure that the certificate looks all right. My JAVA_HOME variable points to /Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home. I set it using echo export "JAVA_HOME=\$(/usr/libexec/java_home)" >> ~/.bash_profile.

lenskit-hello project doesn't work well it seems incompatible packages

I wanted to run HelloLenskit.java using the pre-built libraries provided in lenskit-2.2.1.zip. However, I noticed that the classes imported in the Hello file use different package names than the packages in the jar files available in the zip package. also some classes like ResultList, LenskitRecommender , ... I cannot find them in any of the jar files
Is the hello project on github not compatible with the lenskit latest release??
what can I do to run this code successfully??

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.