We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 395aedf + b05e189 commit de353ebCopy full SHA for de353eb
demo/recommendation/preprocess.sh
@@ -14,6 +14,15 @@
14
# limitations under the License.
15
set -e
16
17
+UNAME_STR=`uname`
18
+
19
+if [[ ${UNAME_STR} == 'Linux' ]]; then
20
+ SHUF_PROG='shuf'
21
+else
22
+ SHUF_PROG='gshuf'
23
+fi
24
25
26
cd "$(dirname "$0")"
27
delimiter='::'
28
dir=ml-1m
@@ -25,7 +34,7 @@ python meta_generator.py $dir meta.bin --config=meta_config.json
34
echo 'split train/test file'
35
python split.py $dir/ratings.dat --delimiter=${delimiter} --test_ratio=0.1
36
echo 'shuffle train file'
-gshuf $dir/ratings.dat.train > ratings.dat.train
37
+${SHUF_PROG} $dir/ratings.dat.train > ratings.dat.train
29
38
cp $dir/ratings.dat.test .
30
39
echo "./data/ratings.dat.train" > train.list
31
40
echo "./data/ratings.dat.test" > test.list
0 commit comments