3
$\begingroup$

First post on StackExchange. I’m fairly new to ML, with about 1 year of experience so please pardon any ignorance or misuse of terms.

I have a multivariate time series dataset where I would like to predict the likelihood of an outcome of 1/0 (think of this as a Conversion) in the next 3 time periods for unique ObjectID’s. I have a table that takes snapshots of ObjectID over time, and I want to use current data to predict if the ObjectID will convert (1 or 0) in the coming 3 time periods. Once an ObjectID reaches conversion, it will stay as such.

There’s a twist: some of the X variables are static, they do not change with time. I call these attributes, there are 8 in my dataset. These are essentially characteristics ObjectID in question. I have 2 variables that change with time, Age (in months) and a categorical variable with 7 levels through which the ObjectID progresses. Here’s how the data looks:

ObjID   Age  Time      Attr1    Attr2   Att3    CurrCat Conversion
id1234  0   1/1/2019    ABC      XYZ    HIJ        A       0
id1234  1   1/2/2019    ABC      XYZ    HIJ        B       0
id1234  2   1/3/2019    ABC      XYZ    HIJ        A       0
id1234  3   1/4/2019    ABC      XYZ    HIJ        D       0 <-- current time
id6789  0   1/1/2019    CBA      ZYX    JIH        C       0
id6789  1   1/2/2019    CBA      ZYX    JIH        C       0
id6789  2   1/3/2019    CBA      ZYX    JIH        D       1
id6789  3   1/4/2019    CBA      ZYX    JIH        A       1

How can I setup this dataset for a classification or decision tree model?

I'll be building the model in Python, so any suggested packages would be helpful too.

$\endgroup$

1 Answer 1

1
$\begingroup$

I have good experiences with Keras LSTM. Think it should also work with the time constant features. Here is a helpful tutorial. https://machinelearningmastery.com/multivariate-time-series-forecasting-lstms-keras/

$\endgroup$
2
  • $\begingroup$ Thanks, do I need to change the dataset from time series to static, or can I run it through the algorithm as is? $\endgroup$
    – escherdb
    May 26, 2019 at 17:20
  • $\begingroup$ I run as static, so no time variable specified. The LSTM requires a „lookback“ function which generates a lag of x steps, which is used in the learning process. So the time variable is defined via the lookback function. $\endgroup$
    – Peter
    May 26, 2019 at 17:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.