GBA 464课程作业代写、Python程序设计作业代做、代写Java/c++语言作业、代做RFM留学生作业代做SPSS|代写Python编程

GBA 464: Assignment 31 ObjectiveThe general goal of this task is that we try to distinguish potential high-value consumers and separatethem from low-value consumers. Recency, frequency and monetary value (RFM) are 3 factorsthat we can calculate and use to do the targeting. In this assignment, we will work with a sampledataset from a company called CDNOW, to try and figure out the potential value of a consumer ina given month, using only historical data prior to this month. We will then classify the sample bythe “RFM index” we generated and see how much it is related to actual consumer spending.2 Loading the data [20%]You can obtain the dataset via the following link:https://dl.dropboxusercontent.com/s/xxfloksp0968mgu/CDNOW_sample.txtNote that the data is stored in fixed format, meaning that each variable starts at a fixed columnin the text file. I’ve written the code for reading the data. Basically, I use the function ’read.fwf()’to read the data.In the raw data, the first two variables are individual consumer identifiers. The second oneis a re-coded version of the first one. For simplicity, we drop the first variable and only use therecoded ID as identifiers. I’ve already written this part as well. After dropping the first column in1the original data, the remaining columns are individual ID ($id), date of the trip ($date), purchasequantity (i.e. number of CDs purchased, $qty) and total expenditure (in dollar values, $expd).Our next step is to aggregate the data into individual-month level, so keys should be $id, $year,and $month. During this aggregation process, we should sum up quantity and expenditure for eachconsumer in each month. You also need how many trips (construct $trips) the individual has beento the shop. Assign the collapsed data (again, on the key of $id, $year and $month) to a new dataframe.Of course, most people will not go to the shop and buy something every month. But we needan RFM prediction for each individual in every month (between January 1997 and June 1998, 18months in total). When there is no trip in a given month, replace trip, expenditure and quantity tozero. Now, you should be ready to compute recency, frequency and monetary value separately.3 Computing the RFM measures [80%]3.1 Recency [20%]Keep in mind that for any measure in RFM, we can only use historical data, i.e. data in the monthsbefore the current month. In this note, we define recency as the number of months since the lastmonth with purchase. In the example below, if an individual has been to the store in month 1, 2and 5, her recency is NA in month 1 (because we do not know anything before the data starts), 1 inmonth 2, 1 in month 3, 2 in month 4, 3 in month 5, and 1 in month 6.We talked about an example in class that is similar to this recency measure. However, the waywe constructed that measure was not optimal. Optionally, try to optimize your algorithm when youconstruct the recency measure.3.2 Frequency [20%]We define frequency as the total number of trips a given individual made in the previous quarter.A quarter is defined as one of Jan-Mar, Apr-Jun, Jul-Sep, Oct-Dec. If the observation is in the very2first of this individual, we assign frequency to NA.3.3 Monetary value [20%]Monetary value is defined as –still using historical data– the average monthly expenditure for aconsumer, in the previous months when she purchased something. For example, in month 1, theconsumer came to the store and spent in total 15 dollars. Then, in month 2, her monetary value is15. In month 2, the consumer came again and spent a total of 30 dollars. Then her monetary valuein month 3 is the average, i.e. (15 + 30)/2 = 22.5. She did not come in month 3 and 4, so hermonetary value did not change. Finally, she came in month 5 and spent 20, and thus her monetaryvalue is (15+30+20)/3 = 21.7.3.4 ExampleLet’s create an artificial example with individual “0”. Note that we’ve already organized the datainto individual-year-month level, and included the months with no trip. Note that we have computedtrips by counting the number of trips in a month with purchase. The last row shows that thesestatistics should be re-calculated for the next consumer.id year month trips qty expd quarter recency frequency monval0 1997 1 1 1 15 1 NA NA NA0 1997 2 2 2 30 1 1 NA 150 1997 3 0 0 0 1 1 NA 22.50 1997 4 0 0 0 2 2 3 22.50 1997 5 1 3 20 2 3 3 22.50 1997 6 0 0 0 2 1 3 21.71 1997 1 1 2 29 1 NA NA NAFollowing this example, please calculate recency, frequency and monetary value measures asdefined.34 Targeting [20%]4.1 RFM indexAn RFM index is an weighted sum of the 3 measures, for each individual i in month t:RFMit = b1Rit +b2Fit +b3MitFor now, let’s say it is your marketing team’s responsibility to tell you what are the factor loadings.1For now let’s take b1 = ?0.05, b2 = 3.5 and b3 = 0.05. Note that if a consumer is considered “highvalue” if she has low recency, or high frequency, or high onetary value. I have coded this sectionalready but you need to run it or change the corresponding variable names.4.2 Validation [20%]When you have computed this measure, sort your sample according to the RFM index and split itinto 10 (roughly) even-sized portions. One way is to use quantile() to generate the cut-offs. Thehigh RFM parts refer to individuals (in particular months) that are more valuable than the low RFMparts of your sample. Examine the average monthly expenditure for each bin of sample, definedby the deciles of the RFM index.2 Plot the average spending (and potentially some other measuresif you want to) by group and confirm that the result is more or less monotonic. Which groups ofconsumers do you want to target?For example, you might produce something similar to this. You might not get the exact figurebecause the result depends on how you segment the market.1In principle, we should estimate these loadings and we should use another sample to validate our results.2Deciles: 10% quantiles.4Figure 1: Average expenditure by deciles in the RFM index5本团队核心人员组成主要包括BAT一线工程师,精通德英语!我们主要业务范围是代做编程大作业、课程设计等等。我们的方向领域:window编程 数值算法 AI人工智能 金融统计 计量分析 大数据 网络编程 WEB编程 通讯编程 游戏编程多媒体linux 外挂编程 程序API图像处理 嵌入式/单片机 数据库编程 控制台 进程与线程 网络安全 汇编语言 硬件编程 软件设计 工程标准规等。其中代写编程、代写程序、代写留学生程序作业语言或工具包括但不限于以下范围:C/C++/C#代写Java代写IT代写Python代写辅导编程作业Matlab代写Haskell代写Processing代写Linux环境搭建Rust代写Data Structure Assginment 数据结构代写MIPS代写Machine Learning 作业 代写Oracle/SQL/PostgreSQL/Pig 数据库代写/代做/辅导Web开发、网站开发、网站作业ASP.NET网站开发Finance Insurace Statistics统计、回归、迭代Prolog代写Computer Computational method代做因为专业,所以值得信赖。如有需要,请加QQ:99515681 或邮箱:[email protected] 微信:codehelp QQ:99515681 或邮箱:[email protected] 微信:codehelp

你可能感兴趣的:(GBA 464课程作业代写、Python程序设计作业代做、代写Java/c++语言作业、代做RFM留学生作业代做SPSS|代写Python编程)