Open starryeg opened 3 years ago
I believe I worked out how to do this. We can get the probabilities by using the predict method for the fitted model:
model.predict(train_set)
This will throw an error however. Something wrong happens with the padded sequence dimensions when predicting, even though we don't have that problem when fitting the model initially. Changing "Step 7" in data_utils.py as follows can eliminate that error:
# Step 7 - Pad sequences per batch
max_sequence_length = max(df.groupby('user_id').agg(seq_length=('user_id', len))['seq_length'])
dataset = dataset.padded_batch(
batch_size=batch_size,
padding_values=(MASK_VALUE, MASK_VALUE),
padded_shapes=([max_sequence_length, None], [max_sequence_length, None]),
drop_remainder=True
)
Edit: There is a downside that this approach provides predictions for the padded parts of the sequences.
Is there any way the padded part is not used in the predcitions ?
Hello there Appreciate your codes first! btw i wanna know its probability of skill and can you pls let me know how can i find it? Many thanks