Does anyone have a process for RFM that can be shared for use ?
Best Answers
-
land RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
Hi,
nowadays it's even simpler: You simply copy the above XML to clipboard (take care to get everything but not more) and then simply click into the process and press CTRL+V. Notice that it will override the current process there without asking.
Greetings,
Sebastian
0 -
cwoo Member Posts: 10 Contributor II
Hi Sebastian ,
I tried it it works and copied and pasted into the blank process sheet and it generated all the processes fantastic. I ran the code on some test data .
However i got different code not from martin but this one works to score the data with RFM codes.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.3.005">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="5.3.005" expanded="true" name="Process">
<process expanded="true">
<operator activated="true" class="read_csv" compatibility="5.3.005" expanded="true" height="60" name="Read CSV" width="90" x="45" y="30">
<parameter key="csv_file" value="/Users/Carlos/Desktop/test-rfm.csv"/>
<parameter key="column_separators" value=","/>
<parameter key="first_row_as_names" value="false"/>
<list key="annotations">
<parameter key="0" value="Name"/>
</list>
<parameter key="encoding" value="MacRoman"/>
<list key="data_set_meta_data_information">
<parameter key="0" value="id.true.integer.id"/>
<parameter key="1" value="Recency.true.integer.attribute"/>
<parameter key="2" value="Frequency.true.integer.attribute"/>
<parameter key="3" value="Monetary.true.integer.attribute"/>
<parameter key="4" value="Purchase.true.integer.label"/>
</list>
</operator>
<operator activated="true" class="discretize_by_frequency" compatibility="5.3.005" expanded="true" height="94" name="Discretize-R" width="90" x="45" y="210">
<parameter key="attribute_filter_type" value="single"/>
<parameter key="attribute" value="Recency"/>
<parameter key="number_of_bins" value="5"/>
<parameter key="range_name_type" value="short"/>
</operator>
<operator activated="true" class="nominal_to_numerical" compatibility="5.3.005" expanded="true" height="94" name="Nominal to Numerical" width="90" x="45" y="345">
<parameter key="attribute_filter_type" value="single"/>
<parameter key="attribute" value="Recency"/>
<parameter key="coding_type" value="unique integers"/>
<list key="comparison_groups"/>
</operator>
<operator activated="true" class="discretize_by_frequency" compatibility="5.3.005" expanded="true" height="94" name="Discretize-F" width="90" x="179" y="210">
<parameter key="attribute_filter_type" value="single"/>
<parameter key="attribute" value="Frequency"/>
<parameter key="number_of_bins" value="5"/>
<parameter key="range_name_type" value="short"/>
</operator>
<operator activated="true" class="nominal_to_numerical" compatibility="5.3.005" expanded="true" height="94" name="Nominal to Numerical (2)" width="90" x="179" y="345">
<parameter key="attribute_filter_type" value="single"/>
<parameter key="attribute" value="Frequency"/>
<parameter key="coding_type" value="unique integers"/>
<list key="comparison_groups"/>
</operator>
<operator activated="true" class="discretize_by_frequency" compatibility="5.3.005" expanded="true" height="94" name="Discretize-M" width="90" x="313" y="210">
<parameter key="attribute_filter_type" value="single"/>
<parameter key="attribute" value="Monetary"/>
<parameter key="number_of_bins" value="5"/>
<parameter key="range_name_type" value="short"/>
</operator>
<operator activated="true" class="nominal_to_numerical" compatibility="5.3.005" expanded="true" height="94" name="Nominal to Numerical (3)" width="90" x="313" y="345">
<parameter key="attribute_filter_type" value="single"/>
<parameter key="attribute" value="Monetary"/>
<parameter key="coding_type" value="unique integers"/>
<list key="comparison_groups"/>
</operator>
<operator activated="true" class="generate_attributes" compatibility="5.3.005" expanded="true" height="76" name="GenerateRFM-Score" width="90" x="447" y="210">
<list key="function_descriptions">
<parameter key="rfm_score" value="100*(5-Recency)+10*(Frequency+1)+(Monetary+1)"/>
</list>
</operator>
<connect from_op="Read CSV" from_port="output" to_op="Discretize-R" to_port="example set input"/>
<connect from_op="Discretize-R" from_port="example set output" to_op="Nominal to Numerical" to_port="example set input"/>
<connect from_op="Nominal to Numerical" from_port="example set output" to_op="Discretize-F" to_port="example set input"/>
<connect from_op="Discretize-F" from_port="example set output" to_op="Nominal to Numerical (2)" to_port="example set input"/>
<connect from_op="Nominal to Numerical (2)" from_port="example set output" to_op="Discretize-M" to_port="example set input"/>
<connect from_op="Discretize-M" from_port="example set output" to_op="Nominal to Numerical (3)" to_port="example set input"/>
<connect from_op="Nominal to Numerical (3)" from_port="example set output" to_op="GenerateRFM-Score" to_port="example set input"/>
<connect from_op="GenerateRFM-Score" from_port="example set output" to_port="result 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
<portSpacing port="sink_result 2" spacing="0"/>
</process>
</operator>
</process>
1
Answers
Hi Cwoo,
can you maybe help me and tell me what RFM is?
~Martin
Dortmund, Germany
Martin, Typically it is a reference to Recency, Frequency, and Monetary value, used in a simple marketing segmentation model. See more here:
https://en.wikipedia.org/wiki/RFM_(customer_value)
Cwoo, I have done several RFM-type models in RapidMiner--what exactly are you looking to do with it? The good news is that they are easy to build in RapidMiner. The bad news is that they don't generlalize well because the cutoffs for the buckets and the values of the resulting cells tend to be very specific to your dataset. You probably would want to do some exploratory data analysis first to figure out how many different segments you want for each of recency, frequency, and monetary value, using the binning operators. You can then define some cutoffs and run historical revenue or profit summaries for the resulting cells using the aggregate operators, and you should have a usable solution.
Lindon Ventures
Data Science Consulting from Certified RapidMiner Experts
RFM is a segmentation prediction model to predict profitable customers most likely to respond to an offer by identifying certain cells in the database that have been scored based on three attributes - Recency , Frequency and monetary. Each attribute is sorted into quintiles ( 1- 5 ) so RFM code for a record will look like 555 for the most frequent , most frequent and most spent in the distribution 111 will be the worst customer.
A test sample ( nth selection sample ) and control group will be established and direct mail offer is mailed to the test sample and the cell and sales responses are recorded. The responses are then appended to the test file and the profitable cells are identified based on the cells that have break even or more profit.
Once the profitable cells have been identified in the test file . the next step will be to rollout to the larger file master file which was scored by RFM codes so only mail to the profitbale RFM cells identified in the test sample ( Trained )
The result is a higher ROI for the direct mail program because you are only mailing offers to the profitable cells.
This method is a simle prediciton model but very effecctive it have been used in Direct marketing for over 25 years.
The person who taught this was arthur hughs see website
http://www.dbmarketing.com/articles/Art149.htm
http://www.dbmarketing.com/Software/RFM42/rfm_for_windows.htm
Download the manual for more detail .
Colin
The cells that have been responded to that was profitable , will then be rolled out to the larger master file hence increasing the ROI by not mailing to the non responsive and unprofitable cells. It is used when introducing a new product .
1) R how recent a product/ service was purchased
2) F how frequent a product/service was purchased
3) M how much was spent monetary was purchased
An nth selection sample is made and
Hi cwoo,
now i get it. I even built a "model" like this once. You might want to have a look at the attached proicess. I would really recommend to do it with something more complex.
~ Martin
Dortmund, Germany
Thanks Martin
However, how do i use the code you sent in rapid miner ?
What menu so i go into to import this code and save this as a process ?
Colin
Colin,
you can add the XML Panel via View->Show Panel->XML. You can simply copy and replace the new XML code into it and hit the small green arrow.
~Martin
Dortmund, Germany
How do i attach a file to send to you .
I went to the show pannel and it does not have XML.