Open
Description
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.
- 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 jid
s? Or am I missing the point?
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
?
-
Finally, I had to convert
y_train
,y_val
, andy_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
Metadata
Metadata
Assignees
Labels
No labels
Activity