fix script 5
This commit is contained in:
parent
2c085e5512
commit
d153734899
4
Jenkinsfile
vendored
4
Jenkinsfile
vendored
@ -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',
|
||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user