added cutoff script
This commit is contained in:
parent
8124103847
commit
93f452556f
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@ -25,7 +25,7 @@ pipeline {
|
||||
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
||||
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
|
||||
sh 'chmod 777 ./data_download.sh'
|
||||
sh './data_download.sh'
|
||||
sh './data_download.sh --cutoff \"${params.CUTOFF}\"'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10,3 +10,20 @@ cut -d',' -f2- test.csv > test_without_id_column.csv
|
||||
|
||||
figlet "TESTSET AFTER ID COLUMN CUT"
|
||||
head -n 5 test_without_id_column.csv
|
||||
|
||||
figlet "CUTOFF DATA FROM TRAIN SET"
|
||||
cutoff="10"
|
||||
shift "$(($OPTIND - 1))"
|
||||
if [[ "$1" == "--cutoff" ]]; then
|
||||
shift
|
||||
if [[ ! "$1" =~ ^[0-9]+$ ]]; then
|
||||
echo "Error: cutoff value must be a positive number"
|
||||
exit 1
|
||||
fi
|
||||
cutoff="$1"
|
||||
fi
|
||||
|
||||
head -n "$cutoff" train.csv > cutoff_train.csv
|
||||
|
||||
figlet "DISPLAY CUTOFF DATA"
|
||||
cat cutoff_train.csv
|
||||
|
Loading…
Reference in New Issue
Block a user