script fixes
This commit is contained in:
parent
cc4a903383
commit
c1b7825305
@ -1,6 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
CUTOFF=$1
|
CUTOFF=$1
|
||||||
|
|
||||||
|
! rm -rf heart_2020_*
|
||||||
|
! rm -rf personal-key-indicators-of-heart-disease.zip
|
||||||
|
|
||||||
TEST_SIZE=$(($CUTOFF * 1/5))
|
TEST_SIZE=$(($CUTOFF * 1/5))
|
||||||
TRAIN_START=$(($TEST_SIZE+1))
|
TRAIN_START=$(($TEST_SIZE+1))
|
||||||
echo $TEST_SIZE
|
echo $TEST_SIZE
|
||||||
@ -8,12 +11,11 @@ echo $TRAIN_START
|
|||||||
echo $KAGGLE_USERNAME
|
echo $KAGGLE_USERNAME
|
||||||
|
|
||||||
kaggle datasets download -d kamilpytlak/personal-key-indicators-of-heart-disease --force
|
kaggle datasets download -d kamilpytlak/personal-key-indicators-of-heart-disease --force
|
||||||
! unzip personal-key-indicators-of-heart-disease -d ./
|
unzip personal-key-indicators-of-heart-disease -d ./
|
||||||
|
|
||||||
! wc -l heart_2020_cleaned.csv
|
head -n $CUTOFF heart_2020_cleaned.csv | shuf > heart_2020_sorted.csv
|
||||||
! head -n $CUTOFF heart_2020_cleaned.csv | shuf > heart_2020_sorted.csv
|
|
||||||
|
|
||||||
! head -n $TEST_SIZE heart_2020_sorted.csv > heart_2020_test.csv
|
head -n $TEST_SIZE heart_2020_sorted.csv > heart_2020_test.csv
|
||||||
! tail -n +$TRAIN_START heart_2020_sorted.csv > heart_2020_train.csv
|
tail -n +$TRAIN_START heart_2020_sorted.csv > heart_2020_train.csv
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user