add cutoff

This commit is contained in:
Alicja Szulecka 2024-03-26 19:41:42 +01:00
parent b7eb51e781
commit c096796a9a
2 changed files with 6 additions and 1 deletions

4
Jenkinsfile vendored
View File

@ -3,6 +3,7 @@ pipeline {
parameters {
string(name: 'KAGGLE_USERNAME', defaultValue: 'alicjaszulecka', description: 'Kaggle username')
password(name: 'KAGGLE_KEY', defaultValue:'', description: 'Kaggle Key')
string(name: 'CUTOFF', defaultValue: '100', description: 'cut off number')
}
stages {
stage('Git Checkout') {
@ -20,7 +21,8 @@ pipeline {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
sh 'bash ./get_dataset.sh'
sh 'bash ./get_dataset.sh ${params.CUTOFF}'
archiveArtifacts artifacts: 'artifacts/*', onlyIfSuccessful: true
}
}
}

View File

@ -14,6 +14,9 @@ test_val_ratio=0.5
shuf meteorite-landings.csv -o shuffled-meteorite-landings.csv
##Cut off $1 rows##
head -n $1 shuffled-meteorite-landings.csv > shuffled-meteorite-landings.csv
total_lines=$(wc -l < shuffled-meteorite-landings.csv)
train_lines=$(echo $total_lines*$train_ratio| bc)
train_lines=$(echo "($train_lines+0.5)/1" | bc )