Skip to content

Questions about channel-attribution-lstm #14

Open
@NataliaVConnolly

Description

@NataliaVConnolly

Hi Ilya,

First, thanks so much for putting together this really helpful repo!

I've been trying to understand channel-attribution-lstm, and I've got a couple of questions about your features_for_lstm function.

  1. This code here:
    f_proj = df[['jid', 'campaigns', 'cats', 'click', 'cost', 'time_since_last_click_norm', \ 'timestamp_norm', 'conversion']]
    x2d = df_proj.values
    x3d_list = np.split(x2d[:, 1:], np.cumsum(np.unique(x2d[:, 0], return_counts=True)[1])[:-1])

Won't this split only work as intended if f_proj is sorted out by jid first? If the goal here is to separate out the sub-arrays for individual jids? Or am I missing the point?

  1. journey_matrix = journey_matrix[ journey_matrix[:, 5].argsort() ] # sort impressions by timestamp

Why 5 here? The timestamp_norm field is next to last in the journey_matrix array, so shouldn't it be journey_matrix.shape[1]-2?

  1. Finally, I had to convert y_train, y_val, and y_test into arrays for the model to run; it wouln't work for me as written because they were lists.

    I'd really appreciate your help! Thank you again --
    Natalia

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions