.
All checks were successful
s434784-training/pipeline/head This commit looks good

This commit is contained in:
Maciej Sobkowiak 2021-05-16 21:08:09 +02:00
parent 19bf9c3fe0
commit 801a2f1c8d
2 changed files with 1 additions and 42 deletions

2
Jenkinsfile vendored
View File

@ -23,7 +23,7 @@ pipeline {
image.inside{
sh 'chmod +x preprocesing.py'
sh 'echo ${CUTOFF}'
sh 'python3 preprocessing.py ${CUTOFF}'
sh 'python3 preprocesing.py ${CUTOFF}'
}
}
}

View File

@ -1,41 +0,0 @@
import sys
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
sc = pd.read_csv('who_suicide_statistics.csv')
train, validate, test = np.split(sc.sample(frac=1, random_state=42),
[int(.6*len(sc)), int(.8*len(sc))])
print("Train set: ", train.size)
print("Validate set: ", validate.size)
print("Test set: ", test.size)
print(train.describe(include='all'))
print(train.country.value_counts())
print(validate.describe(include='all'))
print(validate.country.value_counts())
print(test.describe(include='all'))
print(test.country.value_counts())
pd.value_counts(train['country']).plot.bar()
pd.value_counts(validate['country']).plot.bar()
pd.value_counts(test['country']).plot.bar()
test['age'] = test['age'].map(lambda x: x.rstrip('years'))
train['age'] = train['age'].map(lambda x: x.rstrip('years'))
validate['age'] = validate['age'].map(lambda x: x.rstrip('years'))
print(train.isnull().sum())
print(validate.isnull().sum())
print(test.isnull().sum())
train.dropna(inplace=True)
validate.dropna(inplace=True)
test.dropna(inplace=True)
print(train)
print(validate)
print(test)