def classify(model, dataframe):
    """Classifies a dataframe using a trained random forest model

    Args:
        model: trained RandomForestClassifier
        dataframe: A features dataframe

    Returns:
        dataframe of raw predictions
    """

    return model.transform(dataframe)\
                .select(['cx', 'cy', 'px', 'py', 'sday', 'eday', 'rawPrediction'])\
                .withColumnRenamed('rawPrediction', 'rfrawp')