preprocessing package

Submodules

preprocessing.clean_holo module

preprocessing.clean_holo.clean_data(filename: str)[source]
Parameters

filename – raw trajectory csv file path

Returns

a cleaned/down-sampled csv file

preprocessing.clean_holo.create_lane(filename: str)[source]
Parameters

filename – name of the lane file

Returns

cleaned lane txt file

preprocessing.clean_holo.csv2txt(filename: str)[source]
Parameters

filename – the file name of the csv file

Returns

the converted text file

preprocessing.extract_feature module

preprocessing.extract_feature.extract_features(ext, trajdata, roadway, timestep_delta, record_length, offset, prime, maxframes)[source]
Parameters
  • ext – feature extractor

  • trajdata – trajectory data

  • roadway – roadway object

  • timestep_delta – time step interval

  • record_length – length of the record

  • offset – offset frame

  • prime – prime step

  • maxframes – maximum frames

Returns

extracted features

preprocessing.extract_feature.extract_ngsim_features(timestep_delta=1, record_length=10, offset=50, prime=10, maxframes=None, output_filename='ngsim_holo_new.h5', n_expert_files=1)[source]
Parameters
  • timestep_delta – timesteps between feature extractions

  • record_length – number of frames for record to track in the past

  • offset – from ends of the trajectories TODO: offset was 500, holo data is too short

  • prime

  • maxframes – nothing for no max

  • output_filename

  • n_expert_files – number of time periods for which to extract.

Returns

no return, write features to output file

preprocessing.extract_feature.write_features(features, output_filepath, ext)[source]
Parameters
  • features – features

  • output_filepath – output file path

  • ext – feature extractor

Returns

no return, write feature to file

Module contents