# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# +
import pickle
# reload trained model fomr clf file
file = "39A_b_2017_06.clf"
pkl_file = open(file, 'rb')
new_clf = pickle.load(pkl_file)

import csv
import pandas as pd
timeTableFile = "39A_b_timeTable.csv"
df = pd.read_csv(timeTableFile, index_col=0)
# -

columns = df.columns.sort_values()

stops = []
for column in df.columns:
    stops.append(df[column].loc[0])
print(stops)

inputFeatures = []
for column in columns:
    #print(int(df[column].iloc[0]), int(df[column].iloc[1]))
    inputFeatures.append(df[column].iloc[1])

#len(inputFeatures)
len(df.columns)

import numpy as np
predictions = new_clf.predict([inputFeatures])

print(predictions[0])

predictions[0][-1] - predictions[0][0]

df['051_P'].iloc[1] - df['019_P'].iloc[1]



StarcoderdataJupyterScriptsDedupFiltered