8000 added scripts to run LOCO locally · convexsetgithub/loco-lib@a491067 · GitHub
[go: up one dir, main page]

Skip to content

Commit a491067

Browse files
added scripts to run LOCO locally
1 parent d465352 commit a491067

File tree

4 files changed

+47
-3
lines changed

4 files changed

+47
-3
lines changed

LOCO/build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ resolvers ++= Seq(
2222
)
2323

2424
// Configure jar named used with the assembly plug-in
25-
assemblyJarName in assembly := "LOCO-assembly-unserialized-disk-depth-0.1.jar"
25+
assemblyJarName in assembly := "LOCO-assembly-0.1.jar"
2626

2727
// assembly merge strategy
2828
assemblyMergeStrategy in assembly := {

LOCO/run-LOCO-local.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
3+
$SPARK_HOME/bin/spark-submit \
4+
--class "LOCO.driver" \
5+
--master local[4] \
6+
--driver-memory 1G \
7+
target/scala-2.10/LOCO-assembly-0.1.jar \
8+
--classification=false \
9+
--optimizer=SDCA \
10+
--numIterations=5000 \
11+
--dataFormat=text \
12+
--textDataFormat=spaces \
13+
--separateTrainTestFiles=true \
14+
--trainingDatafile="../data/climate_train.txt" \
15+
--testDatafile="../data/climate_test.txt" \
16+
--center=true \
17+
--Proj=sparse \
18+
--concatenate=true \
19+
--CVKind=none \
20+
--lambda=70 \
21+
--nFeatsProj=260 \
22+
--nPartitions=4 \
23+
--nExecutors=1
24+
"$@"

LOCO/src/main/scala/utils/LOCOUtils.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ object LOCOUtils {
9494
}
9595

9696
if (classification)
97-
println("Misclassification Error = " + MSE_train)
97+
println("Misclassification error on training set = " + MSE_train)
9898
else
9999
println("Training Mean Squared Error = " + MSE_train)
100100

@@ -108,7 +108,7 @@ object LOCOUtils {
108108
}
109109

110110
if(classification)
111-
println("Misclassification Error = " + MSE_test)
111+
println("Misclassification error on test set = " + MSE_test)
112112
else
113113
println("Test Mean Squared Error = " + MSE_test)
114114

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
$SPARK_HOME/bin/spark-submit \
4+
--class "preprocessingUtils.main" \
5+
--master local[4] \
6+
target/scala-2.10/preprocess-assembly-0.1.jar \
7+
--dataFormat=text \
8+
--textDataFormat=spaces \
9+
--separateTrainTestFiles=false \
10+
--dataFile="../data/dogs_vs_cats_n5000.txt" \
11+
--centerFeatures=true \
12+
--scaleFeatures=true \
13+
--centerResponse=false \
14+
--scaleResponse=false \
15+
--outputTrainFileName="../data/dogs_vs_cats_n5000_train_" \
16+
--outputTestFileName="../data/dogs_vs_cats_n5000_test_" \
17+
--outputClass=DataPoint \
18+
--twoOutputClasses=true \
19+
--secondOutputClass=LabeledPoint
20+
"$@"

0 commit comments

Comments
 (0)
0