🛠️ Scheduled Maintenance | We’ll be undergoing scheduled maintenance and upgrades between 00:00 PST Jan 26th until 00:00 PST Jan 28th. There may be brief interruption of services in that period. We apologize for the inconvenience.

The 365 Data Science team is proud to invite you to our own community forum. A very well built system to support your queries, questions and give the chance to show your knowledge and help others in their path of becoming Data Science specialists.
Anybody can ask a question
Anybody can answer
The best answers are voted up and moderated by our team

Would months be considered a discrete variable since it is counted and a whole number? (plus typo)

Would months be considered a discrete variable since it is counted and a whole number? (plus typo)

Super Learner

In this data set there are many variables that deal with months. I am trying to figure out which function to use on a months column. In the video, ‘mnths_since_issue_d’ has been calculated by simply subtracting months from a particular date and through fine classing is called with the woe_ordered_continuous function. It is counted and a whole number so shouldn’t we treat this as a discrete variable? Thanks for the help.


P.S. The homework “Data Preperation. Preprocessing continuous variables: creating dummies. Homework” has a typo that is underlined:

Your task in this homework is to examine weight of evidence and determine the categories that should be created as dummy variables for the probability of default (PD) model for two continuous variables: ‘dti’ (debt to income ratio) and ‘mths_since_last_record’.

For each of the two variables:

1. Determine whether you should do fine classing of the variable, that is, cut it into categories. If yes, use the ‘pd.cut’ method to do the fine classing.

2. Run the ‘woe_discrete’ function with the following arguments: the ‘df_inputs_prepr’ dataframe, the respective independent variable, and the ‘df_targets_prepr’ dataframe. Display the dataframe with results.


1 Answer

365 Team

Hi john, 
thanks for bringing this to our attention!
To your question months is of type date. As such it is neither discrete, nor continuous, as it has specific properties, related to time series data. 
Hope this helps!
365 Eli