docker task 2 try_4
This commit is contained in:
parent
d90f6946f1
commit
743350919d
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@ -25,10 +25,10 @@ pipeline {
|
||||
|
||||
stage('Get data save artifacts') {
|
||||
steps {
|
||||
sh 'chmod +x -R ./data_prep.sh'
|
||||
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
||||
"KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
|
||||
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
|
||||
archiveArtifacts artifacts: 'apps_train.csv, apps_test.csv, apps_validate.csv'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
14
data_expl.py
14
data_expl.py
@ -32,4 +32,16 @@ data["Installs"] = (data["Installs"] - min_value) / (max_value - min_value)
|
||||
# splitting into sets
|
||||
np.random.seed(123)
|
||||
train, validate, test = np.split(data.sample(frac=1, random_state=42), [int(.6*len(data)), int(.8*len(data))])
|
||||
print(f"Data shape: {data.shape}\nTrain shape: {train.shape}\nTest shape: {test.shape}\nValidation shape:{validate.shape}")
|
||||
print(f"Data shape: {data.shape}\nTrain shape: {train.shape}\nTest shape: {test.shape}\nValidation shape:{validate.shape}")
|
||||
|
||||
f = open("apps_train.csv", "w")
|
||||
f.write(train)
|
||||
f.close()
|
||||
|
||||
f = open("apps_test.csv", "w")
|
||||
f.write(test)
|
||||
f.close()
|
||||
|
||||
f = open("apps_validate.csv", "w")
|
||||
f.write(validate)
|
||||
f.close()
|
Loading…
Reference in New Issue
Block a user