fix script 5
This commit is contained in:
parent
2c085e5512
commit
d153734899
4
Jenkinsfile
vendored
4
Jenkinsfile
vendored
@ -13,8 +13,8 @@ pipeline {
|
|||||||
)
|
)
|
||||||
string (
|
string (
|
||||||
name: 'DATA_TRAIN_RATIO',
|
name: 'DATA_TRAIN_RATIO',
|
||||||
defaultValue: '0.8',
|
defaultValue: '80',
|
||||||
description: 'Train data ratio'
|
description: 'Train data ratio percentage'
|
||||||
)
|
)
|
||||||
string (
|
string (
|
||||||
name: 'CUTOFF',
|
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)
|
data_size=$(wc -l < data.csv)
|
||||||
|
|
||||||
# split data to train and test and save it to csv files
|
# split data to train and test and save it to csv files
|
||||||
head -n $(( $data_size * $1 )) data.csv > train.csv
|
head -n $(( $data_size * $1/100 )) data.csv > train.csv
|
||||||
tail -n $(( $data_size * ( 1 - $1 ) )) data.csv > test.csv
|
tail -n $(( $data_size * ( 1 - $1/100 ) )) data.csv > test.csv
|
Loading…
Reference in New Issue
Block a user