Source code for traveltimes_prediction.support_files.fields_definitions
[docs]class ColumnNamesRaw:
# Sensors` data -- det1
CALC_TIME = "calculation_time"
# Backward prediction
TT_CALCULATED = 'tt_calculated'
# Detectors` TT data
LP_FULL_ENC = 'lp_full_enc'
SENSOR_NAME = "sensor_name"
TT_LP_MATCH = 'match_tt'
TT_LP_UNMATCHED = 'unmatched_counter'
[docs]class ColumnNamesRawFiveMin:
# Sensors` data
CALC_TIME = "calculation_time"
SENSOR_NAME = "sensor_name"
VELOCITY = "velocity_avg"
OCCUPANCY = 'occupancy'
COUNT = 'detection_count'
OUTPUT_SECTION = 'output_section'
TT_REAL = 'tt_real'
# Backward prediction
TT_CALCULATED = 'tt_calculated'
# Detectors` data
LP_COUNT = 'lp_count'
[docs]class ColumnNames:
# Aggregated data
AVG_VELOCITY = 'avg_velocity'
NORM_COUNT = 'norm_count'
CALC_TIME = 'calculation_time'
TOTAL_OCCUPANCY = 'total_occupancy'
FEAT_DAY = 'day_of_week'
FEAT_TIME = 'time_of_day'
FEAT_det1_VELOCITY = 'det1_velocity'
FEAT_det1_OCCUPANCY = 'det1_occupancy'
FEAT_det1_COUNT = 'det1_count'
FEAT_TT_BCK = 'bck_prediction_tt'
FEAT_WEEKEND = 'weekend'
FEAT_FRIDAY = 'friday'
FEAT_THURSDAY = 'thursday'
FEAT_WEDNESDAY = 'wednesday'
FEAT_TUESDAY = 'tuesday'
FEAT_MONDAY = 'monday'
FEAT_TIME_BIN = 'time_bin'
# Detectors
FEAT_det2_COUNT = 'det2_count'
# TEST
FEAT_TT_MATCH = 'tt_matches'
FEAT_TT_UNMATCHED = 'tt_count_unmatched'
[docs]class MessageCodes:
MODEL_NOT_IN_DB = -1
DATA_NOT_IN_DB = -2
PREDICTION_UNSUCCESSFUL = -3
DATA_AGGREGATION_FAILED = -4
FEATURE_ENGINEERING_FAILED = -5
RESULT_EXTRAPOLATED = -6
TOO_HIGH_TRAVELTIME = -7
PREDICTION_SUCCESSFUL = 1
TRANSLATION_TABLE = {MessageCodes.MODEL_NOT_IN_DB: "No model saved in DB.",
MessageCodes.DATA_NOT_IN_DB: "No data saved in DB.",
MessageCodes.PREDICTION_UNSUCCESSFUL: "Prediction has not been succesful, see other messages to find out probable reason.",
MessageCodes.DATA_AGGREGATION_FAILED: "Data aggregation has failed.",
MessageCodes.FEATURE_ENGINEERING_FAILED: "Feature engineering has failed.",
MessageCodes.RESULT_EXTRAPOLATED: "Due to unsuccessful prediction the extrapolated value based on previous predictions has been used as the result.",
MessageCodes.TOO_HIGH_TRAVELTIME: "Traveltime has been coerced to meaning ful values due to unlikely high predicted value."
}