Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions about channel-attribution-lstm #14

Open
NataliaVConnolly opened this issue Apr 14, 2023 · 0 comments
Open

Questions about channel-attribution-lstm #14

NataliaVConnolly opened this issue Apr 14, 2023 · 0 comments

Comments

@NataliaVConnolly
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant