KeLP can be easily included in your JAVA project as a Maven dependency, as shown in the rest of this page.
The Source Code is available on the KeLP GitHub page.
How to import KeLP
KeLP has been developed in different packages according to a modularization aimed at logically separating the different components of the library: the current release is composed of the following 4 projects:
- kelp-core: it contains the infrastructure of abstract classes and interfaces to work with KeLP. Furthermore, some implementations of algorithms, kernels and representations are included to provide a base operative environment.
- kelp-additional-kernels: it contains several kernel functions that extend the set of kernels made available in the kelp-core project. Moreover, this project implements the specific representations required to enable the application of such kernels. For instance, this project includes Sequence Kernels, Tree Kernels and Graph Kernels.
- kelp-additional-algorithms: it contains several learning algorithms extending the set of algorithms provided in the kelp-core project. In particular, advanced learning algorithms for classification and regression can be found in this package, such as Online Learning algorithms.
- kelp-full: this is the complete package of KeLP. It aggregates the previous modules. It contains also a set of fully functioning examples showing how to implement a learning system with KeLP. Batch as well as Online Learning algorithms usage is shown here. Different examples cover the usage of standard kernel, Tree Kernels and Sequence Kernel, with caching mechanisms.
All the KeLP packages are released under Maven in our repositories.
Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage the compiling of a Java project as well as its reporting and documentation from a centralized repository.
Currently, a custom repository is used to distribute the maven packages for the whole platform. Thus, it is necessary to specify the repository where the platform is located. The repositories of Maven project for KeLP can be specified In the pom.xml with the following piece of code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
<repositories> <repository> <id>kelp_repo_snap</id> <name>KeLP Snapshots Repository</name> <releases> <enabled>false</enabled> <updatePolicy>always</updatePolicy> <checksumPolicy>warn</checksumPolicy> </releases> <snapshots> <enabled>true</enabled> <updatePolicy>always</updatePolicy> <checksumPolicy>fail</checksumPolicy> </snapshots> <url>http://sag.art.uniroma2.it:8081/artifactory/kelp-snapshot/</url> </repository> <repository> <id>kelp_repo_release</id> <name>KeLP Stable Repository</name> <releases> <enabled>true</enabled> <updatePolicy>always</updatePolicy> <checksumPolicy>warn</checksumPolicy> </releases> <snapshots> <enabled>false</enabled> <updatePolicy>always</updatePolicy> <checksumPolicy>fail</checksumPolicy> </snapshots> <url>http://sag.art.uniroma2.it:8081/artifactory/kelp-release/</url> </repository> </repositories> |
A full version ok KeLP is available on maven in the package kelp-full. It includes all the modules that compose the library. To import the 2.2.3 version of kelp-full, you can use the following Maven dependency.
1 2 3 4 5 6 7 |
<dependencies> <dependency> <groupId>it.uniroma2.sag.kelp</groupId> <artifactId>kelp-full</artifactId> <version>2.2.3</version> </dependency> </dependencies> |
Maven allows also to import a subset of the packages. For example, if you need only to work with tree kernel functions, you can import only the kelp-additional-kernels package in your project.
For example, to import the 2.2.3 version of this package, the dependency specification to be added in your pom.xml is:
1 2 3 4 5 6 7 |
<dependencies> <dependency> <groupId>it.uniroma2.sag.kelp</groupId> <artifactId>kelp-additional-kernels</artifactId> <version>2.2.3</version> </dependency> </dependencies> |
For a complete example on how to import KeLP packages via Maven, please refer to the pom.xml that is contained in the kelp-full project (available on GitHub).
NOTE: KeLP packages are meant to enable users to import only the needed dependencies for each project. For example, if one needs only to work with Online Learning algorithms it is sufficient to import the kelp-additional-algorithms package.