This commit is contained in:
s444439 2023-04-19 20:22:37 +02:00
parent 69dbec64e7
commit 1ac6cebc41
2 changed files with 3 additions and 4 deletions

3
Jenkinsfile vendored
View File

@ -19,8 +19,7 @@ pipeline {
steps { steps {
sh 'git clone https://git.wmi.amu.edu.pl/s444439/ium_z444439' sh 'git clone https://git.wmi.amu.edu.pl/s444439/ium_z444439'
sh 'curl -O https://archive.ics.uci.edu/ml/machine-learning-databases/adult/adult.data' sh 'curl -O https://archive.ics.uci.edu/ml/machine-learning-databases/adult/adult.data'
sh 'sed -i "1i\\age,workclass,fnlwgt,education,education-num,marital-status,occupation,relationship,race,sex,capital-gain,capital-loss,hours-per-week,native-country,income" adult.data > adult.csv' sh 'sed "1i\\age,workclass,fnlwgt,education,education-num,marital-status,occupation,relationship,race,sex,capital-gain,capital-loss,hours-per-week,native-country,income" adult.data > adult.csv'sh 'rm adult.data'
sh 'rm adult.data'
sh 'ls -a' sh 'ls -a'
sh 'ls -a ./ium_z444439' sh 'ls -a ./ium_z444439'

View File

@ -1,9 +1,9 @@
import pandas import pandas as pd
import os import os
from sklearn.model_selection import train_test_split from sklearn.model_selection import train_test_split
CUTOFF = int(os.environ['CUTOFF']) CUTOFF = int(os.environ['CUTOFF'])
adults = pandas.read_csv('adult.csv') adults = pd.read_csv('adult.csv')
adults = adults.dropna() adults = adults.dropna()
adults = adults.sample(CUTOFF) adults = adults.sample(CUTOFF)