cutoff
This commit is contained in:
parent
6b49b51e7b
commit
6317ac1d8b
@ -15,15 +15,15 @@ head -n 1 avocado-updated-2020.csv > header.csv
|
|||||||
head -n -1 avocado-updated-2020.csv | shuf > avocado-updated-2020-shuf.csv
|
head -n -1 avocado-updated-2020.csv | shuf > avocado-updated-2020-shuf.csv
|
||||||
|
|
||||||
head -n "$1" avocado-updated-2020-shuf.csv > avocado-2020.csv
|
head -n "$1" avocado-updated-2020-shuf.csv > avocado-2020.csv
|
||||||
TRUNCATED_SIZE=$(wc -l avocado-2020.csv | awk '{print $1}')
|
declare -i truncated_size=$(wc -l avocado-2020.csv | awk '{print $1}')
|
||||||
TEST_SIZE= $((0,2*$TRUNCATED_SIZE))
|
let test_size= $((0,2*$truncated_size))
|
||||||
DEV_SIZE=$((2*0,2*$TRUNCATED_SIZE))
|
let dev_size=$((2*0,2*$truncated_size))
|
||||||
TRAIN_SIZE=$((2*0,2*$TRUNCATED_SIZE+1))
|
let train_size=$((2*0,2*$truncated_size+1))
|
||||||
|
|
||||||
# podzial na train/dev/test 6/2/2
|
# podzial na train/dev/test 6/2/2
|
||||||
head -n $TEST_SIZE avocado-2020.csv > avocado-updated-2020-test.csv
|
head -n $test_size avocado-2020.csv > avocado-updated-2020-test.csv
|
||||||
head -n $DEV_SIZE avocado-2020.csv | tail -n $TEST_SIZE > avocado-updated-2020-dev.csv
|
head -n $dev_size avocado-2020.csv | tail -n $test_size > avocado-updated-2020-dev.csv
|
||||||
tail -n +$TRAIN_SIZE avocado-2020.csv > avocado-updated-2020-train.csv
|
tail -n +$train_size avocado-2020.csv > avocado-updated-2020-train.csv
|
||||||
|
|
||||||
wc -l avocado-updated-2020-*.csv
|
wc -l avocado-updated-2020-*.csv
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user