Setup files and functions for encoding and prediction