def preprocess(X, X_test):
    # Impute missing data. This may not make actual sense, because some
    # data is missing because it really should be missing. However, scikit
    # models do not play well with missing data.
    imputer = Imputer(missing_values = -999.0, strategy = 'most_frequent')
    X = imputer.fit_transform(X)
    X_test = imputer.transform(X_test)

    # Create inverse log values of features which is positive in value.
    inv_log_cols = (0,1,2,3,4,5,7,8,9,10,12,13,16,19,21,23,26)
    X_inv_log_cols = np.log(1 / (1 + X[:, inv_log_cols]))
    X = np.hstack((X, X_inv_log_cols))
    X_test_inv_log_cols = np.log(1 / (1 + X_test[:, inv_log_cols]))
    X_test = np.hstack((X_test, X_test_inv_log_cols))

    # Scaling usually helps a machine learning algorithm. Tree-based models
    # should not be of much help, but doesn't hurt.
    scaler = StandardScaler()
    X = scaler.fit_transform(X)
    X_test = scaler.transform(X_test)

    return X, X_test

#########################################################################
# Training run
#########################################################################
dataset/ETHPy150Open log0/higgs_boson/cleaned_model.py/preprocess/original