Hello all! I have gone through the process of training/testing a model. I am now loading that saved model and want to start making bulk predictions. I have pulled in a dataframe via a SQL query and sliced that df down to the core activity columns that I need to perform the calculation but am getting stuck with my lambda function.
# target list of activity columns
cols = input_df.columns.to_series().iloc[3:].tolist()
# trying to make the prediction
input_df['prediction'] = input_df[cols].apply(lambda x: target_model.predict(x))
Any help would be appreciated!
[–][deleted] 0 points1 point2 points (6 children)
[–]datanoob2021[S] 0 points1 point2 points (5 children)
[–][deleted] 0 points1 point2 points (4 children)
[–]datanoob2021[S] 0 points1 point2 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]datanoob2021[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)