You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
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.
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 byjid
first? If the goal here is to separate out the sub-arrays for individualjid
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 thejourney_matrix
array, so shouldn't it bejourney_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
The text was updated successfully, but these errors were encountered: