4.3.1 v16

This commit is contained in:
piotrwrzodak 2023-05-11 23:28:25 +02:00
parent cb02b76c3f
commit 885a138d19
3 changed files with 13 additions and 6 deletions

View File

@ -4,3 +4,10 @@ RUN apt-get update && \
apt-get install -y python3 python3-pip apt-get install -y python3 python3-pip
RUN pip3 install pandas numpy RUN pip3 install pandas numpy
WORKDIR /app
COPY create-dataset.py /app
COPY barcelona_weekends.csv /app
CMD ["python3", "create-dataset.py"]

View File

@ -47,7 +47,7 @@ pipeline {
} }
} }
steps { steps {
sh 'ls' archiveArtifacts artifacts: 'barcelona_weekends.train.csv, barcelona_weekends.dev.csv, barcelona_weekends.test.csv', fingerprint: true
} }
} }
} }

View File

@ -5,17 +5,17 @@ import numpy as np
cutoff = 10 cutoff = 10
data = pd.read_csv('./data/barcelona_weekends.csv') data = pd.read_csv('./barcelona_weekends.csv')
data = data.sample(cutoff) data = data.sample(cutoff)
data = data.iloc[:, 1:] data = data.iloc[:, 1:]
train_set, dev_set, test_set = np.split(data.sample(frac=1, random_state=42), train_set, dev_set, test_set = np.split(data.sample(frac=1, random_state=42),
[int(.6 * len(data)), int(.8 * len(data))]) [int(.6 * len(data)), int(.8 * len(data))])
train_set.to_csv('data/barcelona_weekends.train.csv', index=False) train_set.to_csv('barcelona_weekends.train.csv', index=False)
dev_set.to_csv('data/barcelona_weekends.dev.csv', index=False) dev_set.to_csv('barcelona_weekends.dev.csv', index=False)
test_set.to_csv('data/barcelona_weekends.test.csv', index=False) test_set.to_csv('barcelona_weekends.test.csv', index=False)
check = pd.read_csv('./train.csv') check = pd.read_csv('./barcelona_weekends.test.csv')
print(check.head()) print(check.head())