My dataframe contains 7000 rows with the following library login details: login time, libraryid (userid), login date, fined/not.
This data is for a local library, I want to create a model which predicts a persons visit to library. Say, the chance that the member with libraryid=1015
will visit the library tomorrow. The library has had many regular visitors over the past 2-3 yrs.
I tried the following:
clf = RandomForestClassifier(n_estimators=30)
clf.fit(df_train[features], df_train['a'])
Since the date is involved it is not getting the required result.
login_time id login_date fined 0 2016-02-29 23:28:58 1015 2016-02-29 1 1 2016-03-01 00:19:27 4890 2016-03-01 1 2 2016-03-01 04:40:17 1020 2016-03-01 0 3 2016-03-01 04:41:05 9134 2016-03-01 1 4 2016-03-01 05:00:27 7798 2016-03-01 1 5 2016-03-01 05:01:21 1325 2016-03-01 1 6 2016-03-01 05:02:22 5017 2016-03-01 1 7 2016-03-01 05:05:47 2730 2016-03-01 1 8 2016-03-01 05:09:57 8125 2016-03-01 1 9 2016-03-01 05:10:47 8604 2016-03-01 1 10 2016-03-01 05:16:26 9033 2016-03-01 1 11 2016-03-01 05:17:23 7096 2016-03-01 1 12 2016-03-01 05:18:02 1022 2016-03-01 1 13 2016-03-01 05:19:33 1015 2016-03-01 1 14 2016-03-01 05:19:48 3087 2016-03-01 1 15 2016-03-01 05:21:40 5641 2016-03-01 0 16 2016-03-01 05:28:25 5548 2016-03-01 1 17 2016-03-01 05:31:54 8970 2016-03-01 0 18 2016-03-01 05:58:52 7781 2016-03-01 1 19 2016-03-01 06:09:12 5859 2016-03-01 1 20 2016-03-01 06:13:28 1017 2016-03-01 1 21 2016-03-01 06:14:35 8138 2016-03-01 1 22 2016-03-01 06:15:41 1018 2016-03-01 1 23 2016-03-01 06:17:40 9355 2016-03-01 1 24 2016-03-01 06:18:10 10583 2016-03-01 1 25 2016-03-01 06:20:44 2394 2016-03-01 0 26 2016-03-01 06:29:17 10168 2016-03-01 1 27 2016-03-01 06:31:11 4235 2016-03-01 0
I used ARIMA model, the model is taking too much time for running, any other solutions please.