Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crm_rfm_modeling/rfm.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def fit(self,data,dataset_type='customer',scoring_method="quintile",recency_end_
raise ValueError('Error: expected 3 columns for dataset type of '+ self.dataset_type +'; received: ' + str(data.shape[1]))

if self.dataset_type == 'transactional':
self.data = convert_transaction_to_user(self.data, recency_end_date=recency_end_date)
self.data = convert_transaction_to_user(self.data, recency_end_date=self.recency_end_date)

#### Scoring Section
#Retrieving the indexes for each R-F-M categorized within each dictionary for each score
Expand Down Expand Up @@ -169,4 +169,4 @@ def __str__(self):
s = "Parameters:\n\tDataset_Type: "+str(self.dataset_type)+"\n\tScoring_Method: "+str(self.scoring_method)+"\n\tWeights: "+str(self.weights)+"\n"
output = s + print_kwargs(self.__dict__)
return output