Fixed jenkins file

This commit is contained in:
Jan Nowak 2021-03-28 22:31:37 +02:00
parent 2920d98709
commit fe00431d06

View File

@ -1,17 +1,19 @@
#!/bin/bash
kaggle datasets download -d apoorvaappz/global-super-store-dataset
unzip -o global-super-store-dataset.zip
cat Global_Superstore2.csv | shuf > Global_Superstore2.csv.shuf
echo $1
if [ $1="0" ]; then
if [ $1 = "0" ]; then
CUTOFF=51291
cp Global_Superstore2.csv Global_Superstore22.csv
else
CUTOFF=$1
head -n $1 Global_Superstore2.csv > Global_Superstore22.csv
fi
head -n -1 Global_Superstore22.csv | shuf > Global_Superstore2.csv.shuf
prop1=$((CUTOFF/5))
head -n $prop1 Global_Superstore2.csv.shuf > Global_Superstore2.csv.test
head -n $((prop1*2)) Global_Superstore2.csv.shuf | tail -n $prop1 > Global_Superstore2.csv.dev
tail -n +$((prop1*2+1)) Global_Superstore2.csv.shuf > Global_Superstore2.csv.train
rm Global_Superstore2.csv.shuf
#Sprawdźmy, czy wielkości się zgadzają:
wc -l Global_Superstore2.csv*
wc -l Global_Superstore2*