/
build.gradle
87 lines (77 loc) · 2.91 KB
/
build.gradle
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
apply plugin: 'java'
ext.lenskitVersion = '3.0-M1'
if (!hasProperty('dataDir')) {
ext.dataDir = 'data'
}
sourceCompatibility = 1.7
apply from: "$rootDir/gradle/repositories.gradle"
dependencies {
compile "org.lenskit:lenskit-core:$lenskitVersion"
runtime "org.lenskit:lenskit-cli:$lenskitVersion"
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
}
task runMean(type: JavaExec, group: 'run') {
description "Run the simple mean recommender."
classpath sourceSets.main.runtimeClasspath
main 'org.lenskit.cli.Main'
args '--log-file', file("$buildDir/recommend-mean.log"), '--log-file-level', 'DEBUG'
args 'global-recommend'
args '--data-source', "$dataDir/movielens.yml"
args '-c', file('etc/mean.groovy')
args '-n', 10
if (project.hasProperty('lenskit.maxMemory')) {
maxHeapSize project.getProperty('lenskit.maxMemory')
}
}
task runDampedMean(type: JavaExec, group: 'run') {
description "Run the damped mean recommender."
mustRunAfter runMean
classpath sourceSets.main.runtimeClasspath
main 'org.lenskit.cli.Main'
args '--log-file', file("$buildDir/recommend-damped-mean.log"), '--log-file-level', 'DEBUG'
args 'global-recommend'
args '--data-source', "$dataDir/movielens.yml"
args '-c', file('etc/damped-mean.groovy')
if (project.hasProperty('lenskit.maxMemory')) {
maxHeapSize project.getProperty('lenskit.maxMemory')
}
}
task runBasicAssoc(type: JavaExec, group: 'run') {
description "Run the damped mean recommender."
mustRunAfter runDampedMean
classpath sourceSets.main.runtimeClasspath
main 'org.lenskit.cli.Main'
args '--log-file', file("$buildDir/recommend-basic-assoc.log"), '--log-file-level', 'DEBUG'
args 'global-recommend'
args '--data-source', "$dataDir/movielens.yml"
args '-c', file('etc/simple-assoc.groovy')
args findProperty('referenceItem') ?: 260
if (project.hasProperty('lenskit.maxMemory')) {
maxHeapSize project.getProperty('lenskit.maxMemory')
}
}
task runLiftAssoc(type: JavaExec, group: 'run') {
description "Run the damped mean recommender."
classpath sourceSets.main.runtimeClasspath
mustRunAfter runBasicAssoc
main 'org.lenskit.cli.Main'
args '--log-file', file("$buildDir/recommend-lift-assoc.log"), '--log-file-level', 'DEBUG'
args 'global-recommend'
args '--data-source', "$dataDir/movielens.yml"
args '-c', file('etc/lift-assoc.groovy')
args findProperty('referenceItem') ?: 2761
if (project.hasProperty('lenskit.maxMemory')) {
maxHeapSize project.getProperty('lenskit.maxMemory')
}
}
task runAll(group: 'run') {
dependsOn runMean, runDampedMean
dependsOn runBasicAssoc, runLiftAssoc
}
task prepareSubmission(type: Copy) {
from jar
into distsDir
rename(/-assignment/, '-submission')
}