Comments (8)
Hi. Thanks for bringing the errors to my attention. Will address those errors in a package update version as well as here on the repos.
To answer your question about the weights, in practice, some people depending on the client, industry, business etc. will hold certain variables (R-F-M) to have higher worth or weight with regards to other variables. The weighting system applies those weights (which sum to 1) to highlight which variables are more important comparatively against the others.
As for the scoring methods, they are taken from this paper: https://link.springer.com/article/10.1057/palgrave.jdm.3240019
Essentially for the scoring methods such as 'mean', what will happen is that it will recursively divide the segments based on the remaining customers as it build each scoring boundary one at a time as it does for the 'median' as well. If you want more information I would suggest reading the paper with regards to the scoring methods.
from crm-rfm-modeling.
Hi, thanks for creating a package like this. I'm looking forward to using it.
I just tried your example.py. Running it in jupyter.
I can't import this package:
import RFM_Model as rfm
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-12-03e5aa4d8f56> in <module>
1 import pandas as pd
----> 2 import RFM_Model as rfm
3 from datetime import datetime
4 from copy import deepcopy
ModuleNotFoundError: No module named 'RFM_Model'
I then decided to just import the packages in your main github readme:
import crm_rfm_modeling
from crm_rfm_modeling import rfm
That works fine
Then I got another error here:
#Default scoring method is "Quintile"
rfm.fit(data=data,dataset_type='transactional')
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-15-1e04ea7337cf> in <module>
1 rfm = rfm.RFM(weights=wgts)
2 #Default scoring method is "Quintile"
----> 3 rfm.fit(data=data,dataset_type='transactional')
~\Anaconda3\lib\site-packages\crm_rfm_modeling\rfm.py in fit(self, data, dataset_type, scoring_method, **kwargs)
79 self.__dict__.update(catch_exception((k, v)) for k, v in kwargs.items())
80
---> 81 self.data = deepcopy(data)
82 if boo_0:
83 if data.shape[1] != 3:
NameError: name 'deepcopy' is not defined
So it looks like I had to import deepcopy.
from copy import deepcopy
But this didn't work. I get the same error as above. It doesn't detect deepcopy even though I imported it myself.
Any advice?
from crm-rfm-modeling.
OK - I figured out the RFM_Model problem.
You have an extra file called RFM_Model.py that I had to download an put in the same folder as my jupyer notebook. Seems to work now, no errors about deepcopy either.
from crm-rfm-modeling.
Would you be able to explain a bit how weights work? Before finding this library, I've been doing a few RFM Python tutorials and they don't mention weights. If they are useful I'd like to use them of course, but I'm not really sure how to use them.
from crm-rfm-modeling.
Also - the different scoring methods.
Does 'mean' get the mean frequency and monetary per month? Same with 'median'? Is it per month?
from crm-rfm-modeling.
Thanks for the info, will check the paper.
from crm-rfm-modeling.
please update and install to the latest version - pip install -U crm-rfm-modeling
Added additional options to include end date for transactional datasets along with another function to retrieve the fitted data.
Thanks again for the feedback.
from crm-rfm-modeling.
Additionally you can pip install such as: pip install crm-rfm-modeling==1.0.1
from crm-rfm-modeling.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crm-rfm-modeling.