fix script 5

This commit is contained in:
Sheaza 2024-03-26 18:45:26 +01:00
parent 2c085e5512
commit d153734899
2 changed files with 4 additions and 4 deletions

4
Jenkinsfile vendored
View File

@ -13,8 +13,8 @@ pipeline {
)
string (
name: 'DATA_TRAIN_RATIO',
defaultValue: '0.8',
description: 'Train data ratio'
defaultValue: '80',
description: 'Train data ratio percentage'
)
string (
name: 'CUTOFF',

View File

@ -13,5 +13,5 @@ head -n $2 data.csv > data.csv.tmp && mv data.csv.tmp data.csv
data_size=$(wc -l < data.csv)
# split data to train and test and save it to csv files
head -n $(( $data_size * $1 )) data.csv > train.csv
tail -n $(( $data_size * ( 1 - $1 ) )) data.csv > test.csv
head -n $(( $data_size * $1/100 )) data.csv > train.csv
tail -n $(( $data_size * ( 1 - $1/100 ) )) data.csv > test.csv