{"id":85559,"date":"2022-03-09T00:00:00","date_gmt":"2022-03-09T00:00:00","guid":{"rendered":"https:\/\/nursingstudybay.com\/2022\/03\/09\/medical-data-analytics-using-r\/"},"modified":"2022-03-09T00:00:00","modified_gmt":"2022-03-09T00:00:00","slug":"medical-data-analytics-using-r","status":"publish","type":"post","link":"https:\/\/www.studyproessays.com\/help\/medical-data-analytics-using-r\/","title":{"rendered":"Medical Data Analytics Using R"},"content":{"rendered":"<p>Study Bay Coursework Assignment Writing Help<\/p>\n<div>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/aaimagestore.s3.amazonaws.com\/july2017\/0009045.004.png\"\/ loading=\"lazy\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/aaimagestore.s3.amazonaws.com\/july2017\/0009045.003.png\"\/ loading=\"lazy\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/aaimagestore.s3.amazonaws.com\/july2017\/0009045.001.png\"\/ loading=\"lazy\"><\/p>\n<p>1.) <strong>R for Recency<\/strong> =&gt; months since last donation, 2.) <strong>F for Frequency<\/strong> =&gt; total number of donation, 3.) <strong>M for Monetary <\/strong>=&gt; total amount of blood donated in c.c., 4.) <strong>T for Time <\/strong>=&gt; months since first donation and 5.) <strong>Binary variable <\/strong>=&gt; 1 -&gt; donated blood, 0-&gt; didn\u2019t donate blood.<\/p>\n<p>The main idea behind this dataset is the concept of relationship management CRM. Based on three metrics: Recency, Frequency and Monetary (RFM) which are 3 out of the 5 attributes of the dataset, we would be able to predict whether a customer is likely to donate blood again based to a marketing campaign. For example, customers who have donated or visited more currently (Recency), more frequently (Frequency) or made higher monetary values (Monetary) are more likely to respond to a marketing effort. Customers with less RFM score are less likely to react. It is also known in customer behavior, that the time of the first positive interaction (donation, purchase) is not significant. However, the Recency of the last donation is very important.<\/p>\n<p>In the traditional RFM implementation each customer is ranked based on his RFM value parameters against all the other customers and that develops a score for every customer. Customers with bigger scores are more likely to react in a positive way for example (visit again or donate). The model constructs the formula which could predict the following problem.<\/p>\n<ul>\n<li>Keep in repository only customers that are more likely to continue donating in the future and remove those who are less likely to donate, given a certain period of time. The previous statement also determines the problem which will be trained and tested in this project ( help with nursing paper writing from experts with MSN &#038; DNP degrees).<\/li>\n<\/ul>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/aaimagestore.s3.amazonaws.com\/july2017\/0009045.029.png\"\/ loading=\"lazy\">Firstly, I created a .csv file and generated 748 unique random numbers in Excel in the domain [1,748] in the first column, which corresponds to the customers or users ID. Then I transferred the whole data from the .txt file (transfusion.data) to the .csv file in excel by using the delimited (\u2018,\u2019) option. Then I randomly split it in a train file and a test file. The train file contains the 530 instances and the test file has the 218 instances. Afterwards, I read both the training dataset and the test dataset.<\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/aaimagestore.s3.amazonaws.com\/july2017\/0009045.030.png\"\/ loading=\"lazy\"><\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/aaimagestore.s3.amazonaws.com\/july2017\/0009045.031.png\"\/ loading=\"lazy\"><\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/aaimagestore.s3.amazonaws.com\/july2017\/0009045.032.png\"\/ loading=\"lazy\"><\/p>\n<p>From the previous results, we can see that we have no missing or invalid values. Data ranges and units seem reasonable.<\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/aaimagestore.s3.amazonaws.com\/july2017\/0009045.033.png\"\/ loading=\"lazy\"><\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/aaimagestore.s3.amazonaws.com\/july2017\/0009045.034.png\"\/ loading=\"lazy\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/aaimagestore.s3.amazonaws.com\/july2017\/0009045.035.png\"\/ loading=\"lazy\"><\/p>\n<p>Figure 1 above depicts boxplots of all the attributes and for both train and test datasets. By examining the figure, we notice that both datasets have similar distributions and there are some outliers (Monetary &gt; 2,500) that are visible. The volume of blood variable has a high correlation with frequency. Because the volume of blood that is donated each time is fixed, the Monetary value is proportional to the Frequency (number of donations) each person gave. For example, if the amount of blood drawn in each person was 250 ml\/bag (Taiwan Blood Services Foundation 2007) March then Monetary = 250*Frequency. This is also why in the predictive model we will not consider the Monetary attribute in the implementation. So, it is reasonable to expect that customers with higher frequency will have a lot higher Monetary value. This can be verified also visually by examining the Monetary outliers for the train set. We retrieve back 83 instances.<\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/aaimagestore.s3.amazonaws.com\/july2017\/0009045.036.png\"\/ loading=\"lazy\"><\/p>\n<table cellpadding=\"0\" cellspacing=\"0\">\n<tbody>\n<tr>\n<td>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/aaimagestore.s3.amazonaws.com\/july2017\/0009045.037.png\"\/ loading=\"lazy\"><\/p>\n<\/td>\n<td>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/aaimagestore.s3.amazonaws.com\/july2017\/0009045.038.png\"\/ loading=\"lazy\"><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/aaimagestore.s3.amazonaws.com\/july2017\/0009045.039.png\"\/ loading=\"lazy\"><\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/aaimagestore.s3.amazonaws.com\/july2017\/0009045.040.png\"\/ loading=\"lazy\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/aaimagestore.s3.amazonaws.com\/july2017\/0009045.041.png\"\/ loading=\"lazy\"><\/p>\n<p>In order, to understand better the statistical dispersion of the whole dataset (748 instances) we will look at the standard deviation (SD) between the Recency and the variable \u2018whether customer has donated blood\u2019 (Binary variable) and the SD between the Frequency and the Binary variable.The distribution of scores around the mean is small, which means the data is concentrated. This can also be noticed from the plots.<\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/aaimagestore.s3.amazonaws.com\/july2017\/0009045.042.png\"\/ loading=\"lazy\"><\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/aaimagestore.s3.amazonaws.com\/july2017\/0009045.043.png\"\/ loading=\"lazy\"><\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/aaimagestore.s3.amazonaws.com\/july2017\/0009045.044.png\"\/ loading=\"lazy\"><\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/aaimagestore.s3.amazonaws.com\/july2017\/0009045.045.png\"\/ loading=\"lazy\"><\/p>\n<table cellpadding=\"0\" cellspacing=\"0\">\n<tbody>\n<tr>\n<td>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/aaimagestore.s3.amazonaws.com\/july2017\/0009045.046.png\"\/ loading=\"lazy\"><\/p>\n<\/td>\n<td>\n<ul>\n<li>From this correlation matrix, we can verify what was stated above, that the frequency and the monetary values are proportional inputs, which can be noticed from their high correlation.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Another observation is that the various Recency numbers are not factors of 3. This goes to opposition with what the description said about the data being collected every 3 months. Additionally, there is always a maximum number of times you can donate blood per certain period (e.g. 1 time per month), but the data shows that.<\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/aaimagestore.s3.amazonaws.com\/july2017\/0009045.047.png\"\/ loading=\"lazy\"><\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/aaimagestore.s3.amazonaws.com\/july2017\/0009045.048.png\"\/ loading=\"lazy\"><\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/aaimagestore.s3.amazonaws.com\/july2017\/0009045.049.png\"\/ loading=\"lazy\"><\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/aaimagestore.s3.amazonaws.com\/july2017\/0009045.050.png\"\/ loading=\"lazy\"><\/p>\n<p>36 customers donated blood more than once and 6 customers had donated 3 or more times in the same month.<\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/aaimagestore.s3.amazonaws.com\/july2017\/0009045.051.png\"\/ loading=\"lazy\"><\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/aaimagestore.s3.amazonaws.com\/july2017\/0009045.052.png\"\/ loading=\"lazy\"><\/p>\n<p>The features that will be used to calculate the prediction of whether a customer is likely to donate again are 2, the Recency and the Frequency (RF). The Monetary feature will be dropped. The number of categories for R and F attributes will be 3. The highest RF score will be 33 equivalent to 6 when added together and the lowest will be 11 equivalent to 2 when added together. The threshold for the added score to determine whether a customer is more likely to donate blood again or not, will be set to 4 which is the median value. The users will be assigned to categories by sorting on RF attributes as well as their scores. The file with the donators will be sorted on Recency first (in ascending order) because we want to see which customers have donated blood more recently. Then it will be sorted on frequency (in descending order this time because we want to see which customers have donated more times) in each Recency category. Apart from sorting, we will need to apply some business rules that have occurred after multiple tests:<\/p>\n<ul>\n<li><strong><u>For Recency (Business rule 1): <\/u><\/strong><\/li>\n<\/ul>\n<ol>\n<li>If the Recency in months is less than 15 months, then these customers will be assigned to category 3.<\/li>\n<li>If the Recency in months is equal or greater than 15 months and less than 26 months, then these customers will be assigned to category 2.<\/li>\n<li>Otherwise, if the Recency in months is equal or greater than 26 months, then these customers will be assigned to category 1<\/li>\n<\/ol>\n<ul>\n<li><strong><u>And for Frequency (Business rule 2):<\/u><\/strong><\/li>\n<\/ul>\n<ol>\n<li>If the Frequency is equal or greater than 25 times, then these customers will be assigned to category 3.<\/li>\n<li>If the Frequency is less than 25 times or greater than 15 months, then these customers will be assigned to category 2.<\/li>\n<li>If the Frequency is equal or less than 15 times, then these customers will be assigned to category 1<\/li>\n<\/ol>\n<p>RESULTS<\/p>\n<p>The output of the program are two smaller files that have resulted from the train file and the other one from the test file, that have excluded several customers that should not be considered future targets and kept those that are likely to respond. Some statistics about the precision, recall and the balanced F-score of the train and test file have been calculated and printed. Furthermore, we compute the absolute difference between the results retrieved from the train and test file to get the offset error between these statistics. By doing this and verifying that the error numbers are negligible, we validate the consistency of the model implemented. Moreover, we depict two confusion matrices one for the test and one for the training by calculating the true positives, false negatives, false positives and true negatives. In our case, true positives correspond to the customers (who donated on March 2007) and were classified as future possible donators. False negatives correspond to the customers (who donated on March 2007) but were not classified as future possible targets for marketing campaigns. False positives correlate to customers (who did not donate on March 2007) and were incorrectly classified as possible future targets. Lastly, true negatives which are customers (who did not donate on March 2007) and were correctly classified as not plausible future donators and therefore removed from the data file. By classification we mean the application of the threshold (4) to separate those customers who are more likely and less likely to donate again in a certain future period.<\/p>\n<table cellpadding=\"0\" cellspacing=\"0\">\n<tbody>\n<tr>\n<td>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/aaimagestore.s3.amazonaws.com\/july2017\/0009045.053.png\"\/ loading=\"lazy\"><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/aaimagestore.s3.amazonaws.com\/july2017\/0009045.054.png\"\/ loading=\"lazy\"><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Lastly, we calculate 2 more single value metrics for both train and test files the Kappa Statistic (general statistic used for classification systems) and Matthews Correlation Coefficient or cost\/reward measure. Both are normalized statistics for classification systems, its values never exceed 1, so the same statistic can be used even as the number of observations grows. The error for both measures are MCC error: 0.002577\u00c2\u00a0 and Kappa error:\u00c2\u00a0 0.002808, which is very small (negligible), similarly with all the previous measures.<\/p>\n<p>REFERENCES<\/p>\n<ol>\n<li>UCI Machine Learning Repository (2008) UCI machine learning repository: Blood transfusion service center data set. Available at: http:\/\/archive.ics.uci.edu\/ml\/datasets\/Blood+Transfusion+Service+Center (Accessed: 30 January 2017).<\/li>\n<li>Fundation, T.B.S. (2015) Operation department. Available at: http:\/\/www.blood.org.tw\/Internet\/english\/docDetail.aspx?uid=7741&amp;pid=7681&amp;docid=37144 (Accessed: 31 January 2017).<\/li>\n<\/ol>\n<p>The <strong>Appendix<\/strong> with the code starts below. However the <strong>whole code has been uploaded<\/strong> on my Git Hub profile and this is the link where it can be accessed.<\/p>\n<p><a href=\"https:\/\/github.com\/it21208\/RassignmentDataAnalysis\/blob\/master\/RassignmentDataAnalysis.R\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">https:\/\/github.com\/it21208\/RassignmentDataAnalysis\/blob\/master\/RassignmentDataAnalysis.R<\/a><\/p>\n<ul>\n<li>library(ggplot2)<\/li>\n<li>library(car)<\/li>\n<\/ul>\n<p>\u00c2\u00a0# read training and testing datasets<\/p>\n<ul>\n<li>traindata \u00ef\u0192\u0178\u00c2\u00a0 read.csv(\u2018C:\/Users\/Alexandros\/Dropbox\/MSc\/2nd Semester\/Data analysis\/Assignment\/transfusion.csv\u2019)<\/li>\n<li>testdata \u00ef\u0192\u0178\u00c2\u00a0 read.csv(\u2018C:\/Users\/Alexandros\/Dropbox\/MSc\/2nd Semester\/Data analysis\/Assignment\/test.csv\u2019)<\/li>\n<\/ul>\n<p># assigning the datasets to dataframes<\/p>\n<ul>\n<li>dftrain \u00ef\u0192\u0178 data.frame(traindata)<\/li>\n<li>dftest \u00ef\u0192\u0178 data.frame(testdata)<\/li>\n<li>sapply(dftrain, typeof)<\/li>\n<\/ul>\n<p># give better names to columns<\/p>\n<ul>\n<li>names(dftrain)[1] \u00ef\u0192\u0178 \u201cID\u201d<\/li>\n<li>names(dftrain)[2] \u00ef\u0192\u0178 \u201crecency\u201d<\/li>\n<li>names(dftrain)[3]\u00ef\u0192\u0178\u201dfrequency\u201d<\/li>\n<li>names(dftrain)[4]\u00ef\u0192\u0178\u201dcc\u201d<\/li>\n<li>names(dftrain)[5]\u00ef\u0192\u0178\u201dtime\u201d<\/li>\n<li>names(dftrain)[6]\u00ef\u0192\u0178\u201ddonated\u201d<\/li>\n<\/ul>\n<p>#\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<\/p>\n<ul>\n<li>names(dftest)[1]\u00ef\u0192\u0178\u201dID\u201d<\/li>\n<li>names(dftest)[2]\u00ef\u0192\u0178\u201drecency\u201d<\/li>\n<li>names(dftest)[3]\u00ef\u0192\u0178\u201dfrequency\u201d<\/li>\n<li>names(dftest)[4]\u00ef\u0192\u0178\u201dcc\u201d<\/li>\n<li>names(dftest)[5]\u00ef\u0192\u0178\u201dtime\u201d<\/li>\n<li>names(dftest)[6]\u00ef\u0192\u0178\u201ddonated\u201d<\/li>\n<\/ul>\n<p># drop time column from both files<\/p>\n<ul>\n<li>dftrain$time \u00ef\u0192\u0178 NULL<\/li>\n<li>dftest$time \u00ef\u0192\u0178 NULL<\/li>\n<\/ul>\n<p>#\u00c2\u00a0 sort (train) dataframe on Recency in ascending order<\/p>\n<ul>\n<li>sorted_dftrain \u00ef\u0192\u0178 dftrain[ order( dftrain[,2] ), ]<\/li>\n<\/ul>\n<p>#\u00c2\u00a0 add column in (train) dataframe -\u00c2\u00a0 hold score (rank) of Recency for each customer<\/p>\n<ul>\n<li>sorted_dftrain[ , \u201cRrank\u201d] \u00ef\u0192\u0178 0<\/li>\n<\/ul>\n<p>#\u00c2\u00a0 convert train file from dataframe format to matrix<\/p>\n<ul>\n<li>matrix_train \u00ef\u0192\u0178 as.matrix(sapply(sorted_dftrain, as.numeric))<\/li>\n<\/ul>\n<p>#\u00c2\u00a0 sort (test) dataframe on Recency in ascending order<\/p>\n<ul>\n<li>sorted_dftest \u00ef\u0192\u0178 dftest[ order( dftest[,2] ), ]<\/li>\n<\/ul>\n<p>#\u00c2\u00a0 add column in (test) dataframe -hold score (rank) of Recency for each customer<\/p>\n<ul>\n<li>sorted_dftest[ , \u201cRrank\u201d] \u00ef\u0192\u0178 0<\/li>\n<\/ul>\n<p>#\u00c2\u00a0 convert train file from dataframe format to matrix<\/p>\n<ul>\n<li>matrix_test \u00ef\u0192\u0178 as.matrix(sapply(sorted_dftest, as.numeric))<\/li>\n<\/ul>\n<p># categorize matrix_train and add scores for Recency \u2013 apply business rule<\/p>\n<ul>\n<li>for(i in 1:nrow(matrix_train)) {<\/li>\n<\/ul>\n<p>if (matrix_train [i,2] &lt; 15) {<\/p>\n<p>\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 matrix_train [i,6] \u00ef\u0192\u0178 3<\/p>\n<p>} else if ((matrix_train [i,2] &lt; 26) &amp; (matrix_train [i,2] &gt;= 15)) {<\/p>\n<p>\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 matrix_train [i,6] \u00ef\u0192\u0178 2<\/p>\n<p>} else {\u00c2\u00a0 matrix_train [i,6] \u00ef\u0192\u0178 1\u00c2\u00a0 }<\/p>\n<p>\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 }<\/p>\n<p># categorize matrix_test and add scores for Recency \u2013 apply business rule<\/p>\n<ul>\n<li>for(i in 1:nrow(matrix_test)) {<\/li>\n<\/ul>\n<p>if (matrix_test [i,2] &lt; 15) {<\/p>\n<p>\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 matrix_test [i,6] \u00ef\u0192\u0178 3<\/p>\n<p>} else if ((matrix_test [i,2] &lt; 26) &amp; (matrix_test [i,2] &gt;= 15)) {<\/p>\n<p>\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 matrix_test [i,6] \u00ef\u0192\u0178 2<\/p>\n<p>} else {\u00c2\u00a0 matrix_test [i,6] \u00ef\u0192\u0178 1 }<\/p>\n<p>\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 }<\/p>\n<p># convert matrix_train back to dataframe<\/p>\n<ul>\n<li>sorted_dftrain \u00ef\u0192\u0178 data.frame(matrix_train)<\/li>\n<\/ul>\n<p># sort dataframe 1rst by Recency <strong>Rank<\/strong> (desc.) then by Frequency (desc.)<\/p>\n<ul>\n<li>sorted_dftrain_2\u00ef\u0192\u0178 sorted_dftrain[order(-sorted_dftrain[,6], -sorted_dftrain[,3] ), ]<\/li>\n<\/ul>\n<p># add column in train dataframe- hold Frequency score (rank) for each customer<\/p>\n<ul>\n<li>sorted_dftrain_2[ , \u201cFrank\u201d] \u00ef\u0192\u0178 0<\/li>\n<\/ul>\n<p># convert dataframe to matrix<\/p>\n<ul>\n<li>matrix_train \u00ef\u0192\u0178 as.matrix(sapply(sorted_dftrain_2, as.numeric))<\/li>\n<\/ul>\n<p># convert matrix_test back to dataframe<\/p>\n<ul>\n<li>sorted_dftest \u00ef\u0192\u0178 data.frame(matrix_test)<\/li>\n<\/ul>\n<p># sort dataframe 1rst by Recency <strong>Rank<\/strong> (desc.) then by Frequency (desc.)<\/p>\n<ul>\n<li>sorted_dftest2 \u00ef\u0192\u0178 sorted_dftest[ order( -sorted_dftest[,6], -sorted_dftest[,3] ), ]<\/li>\n<\/ul>\n<p># add column in test dataframe- hold Frequency score (rank) for each customer<\/p>\n<ul>\n<li>sorted_dftest2[ , \u201cFrank\u201d] \u00ef\u0192\u0178 0<\/li>\n<\/ul>\n<p># convert dataframe to matrix<\/p>\n<ul>\n<li>matrix_test \u00ef\u0192\u0178 as.matrix(sapply(sorted_dftest2, as.numeric))<\/li>\n<\/ul>\n<p>#categorize matrix_train, add scores for Frequency<\/p>\n<ul>\n<li>for(i in 1:nrow(matrix_train)){<\/li>\n<\/ul>\n<p>\u00c2\u00a0 if (matrix_train[i,3] &gt;= 25) {<\/p>\n<p>\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 matrix_train[i,7] \u00ef\u0192\u0178 3<\/p>\n<p>\u00c2\u00a0 } else if ((matrix_train[i,3] &gt; 15) &amp; (matrix_train[i,3] &lt; 25)) {<\/p>\n<p>\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 matrix_train[i,7] \u00ef\u0192\u0178 2<\/p>\n<p>\u00c2\u00a0 } else {\u00c2\u00a0 matrix_train[i,7] \u00ef\u0192\u0178 1\u00c2\u00a0 }<\/p>\n<p>\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 }<\/p>\n<p>#categorize matrix_test, add scores for Frequency<\/p>\n<ul>\n<li>for(i in 1:nrow(matrix_test)){<\/li>\n<\/ul>\n<p>\u00c2\u00a0 if (matrix_test[i,3] &gt;= 25) {<\/p>\n<p>\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 matrix_test[i,7] \u00ef\u0192\u0178 3<\/p>\n<p>\u00c2\u00a0 } else if ((matrix_test[i,3] &gt; 15) &amp; (matrix_test[i,3] &lt; 25)) {<\/p>\n<p>\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 matrix_test[i,7] \u00ef\u0192\u0178 2<\/p>\n<p>\u00c2\u00a0 } else {\u00c2\u00a0\u00c2\u00a0 matrix_test[i,7] \u00ef\u0192\u0178 1\u00c2\u00a0 }<\/p>\n<p>}<\/p>\n<p>#\u00c2\u00a0 convert matrix test back to dataframe<\/p>\n<ul>\n<li>sorted_dftrain \u00ef\u0192\u0178 data.frame(matrix_train)<\/li>\n<\/ul>\n<p># sort (train) dataframe 1rst on Recency rank (desc.) &amp; 2<sup>nd <\/sup>Frequency rank (desc.)<\/p>\n<ul>\n<li>sorted_dftrain_2 \u00ef\u0192\u0178 sorted_dftrain[ order( -sorted_dftrain[,6], -sorted_dftrain[,7] ), ]<\/li>\n<\/ul>\n<p># add another column for the Sum of Recency rank and Frequency rank<\/p>\n<ul>\n<li>sorted_dftrain_2[ , \u201cSumRankRAndF\u201d] \u00ef\u0192\u0178 0<\/li>\n<\/ul>\n<p># convert dataframe to matrix<\/p>\n<ul>\n<li>matrix_train \u00ef\u0192\u0178 as.matrix(sapply(sorted_dftrain_2, as.numeric))<\/li>\n<\/ul>\n<p>#\u00c2\u00a0 convert matrix test back to dataframe<\/p>\n<ul>\n<li>sorted_dftest \u00ef\u0192\u0178 data.frame(matrix_test)<\/li>\n<\/ul>\n<p># sort (train) dataframe 1rst on Recency rank (desc.) &amp; 2<sup>nd <\/sup>Frequency rank (desc.)<\/p>\n<ul>\n<li>sorted_dftest2 \u00ef\u0192\u0178 sorted_dftest[ order( -sorted_dftest[,6],\u00c2\u00a0 -sorted_dftest[,7] ), ]<\/li>\n<\/ul>\n<p># add another column for the Sum of Recency rank and Frequency rank<\/p>\n<ul>\n<li>sorted_dftest2[ , \u201cSumRankRAndF\u201d] \u00ef\u0192\u0178 0<\/li>\n<\/ul>\n<p># convert dataframe to matrix<\/p>\n<ul>\n<li>matrix_test \u00ef\u0192\u0178 as.matrix(sapply(sorted_dftest2, as.numeric))<\/li>\n<\/ul>\n<p># sum Recency rank and Frequency rank for train file<\/p>\n<ul>\n<li>for(i in 1:nrow(matrix_train))<\/li>\n<\/ul>\n<p>{ matrix_train[i,8] \u00ef\u0192\u0178 matrix_train[i,6] + matrix_train[i,7] }<\/p>\n<p># sum Recency rank and Frequency rank for test file<\/p>\n<ul>\n<li>for(i in 1:nrow(matrix_test))<\/li>\n<\/ul>\n<p>{ matrix_test[i,8] \u00ef\u0192\u0178 matrix_test[i,6] + matrix_test[i,7] }<\/p>\n<p># convert matrix_train back to dataframe<\/p>\n<ul>\n<li>sorted_dftrain \u00ef\u0192\u0178 data.frame(matrix_train)<\/li>\n<\/ul>\n<p># sort train dataframe according to total rank in descending order<\/p>\n<ul>\n<li>sorted_dftrain_2 \u00ef\u0192\u0178 sorted_dftrain[ order( -sorted_dftrain[,8] ), ]<\/li>\n<\/ul>\n<p># convert sorted train dataframe<\/p>\n<ul>\n<li>matrix_train \u00ef\u0192\u0178 as.matrix(sapply(sorted_dftrain_2, as.numeric))<\/li>\n<\/ul>\n<p># convert matrix_test back to dataframe<\/p>\n<ul>\n<li>sorted_dftest \u00ef\u0192\u0178 data.frame(matrix_test)<\/li>\n<\/ul>\n<p># sort test dataframe according to total rank in descending order<\/p>\n<ul>\n<li>sorted_dftest2 \u00ef\u0192\u0178 sorted_dftest[ order( -sorted_dftest[,8] ), ]<\/li>\n<\/ul>\n<p># convert sorted test dataframe to matrix<\/p>\n<ul>\n<li>matrix_test \u00ef\u0192\u0178 as.matrix(sapply(sorted_dftest2, as.numeric))<\/li>\n<\/ul>\n<p># apply business rule check &amp; count customers whose score &gt;= 4 and that Have Donated, train file<\/p>\n<p># check &amp; count for all customers that have donated in the train dataset<\/p>\n<ul>\n<li>count_train_predicted_donations \u00ef\u0192\u0178 0<\/li>\n<li>counter_train \u00ef\u0192\u0178 0<\/li>\n<li>number_donation_instances_whole_train \u00ef\u0192\u0178 0<\/li>\n<li>false_positives_train_counter \u00ef\u0192\u0178 0<\/li>\n<\/ul>\n<ul>\n<li>for(i in 1:nrow(matrix_train)) {<\/li>\n<\/ul>\n<p>\u00c2\u00a0 if ((matrix_train[i,8] &gt;= 4) &amp; (matrix_train[i,5] == 1)) {<\/p>\n<p>\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 count_train_predicted_donations = count_train_predicted_donations + 1\u00c2\u00a0 }<\/p>\n<p>if ((matrix_train[i,8] &gt;= 4) &amp; (matrix_train[i,5] == 0)) {<\/p>\n<p>\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 false_positives_train_counter = false_positives_train_counter + 1}<\/p>\n<p>\u00c2\u00a0 if (matrix_train[i,8] &gt;= 4) {<\/p>\n<p>\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 counter_train \u00ef\u0192\u0178 counter_train + 1<\/p>\n<p>\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 }<\/p>\n<p>\u00c2\u00a0 if (matrix_train[i,5] == 1) {<\/p>\n<p>\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 number_donation_instances_whole_train \u00ef\u0192\u0178 number_donation_instances_whole_train + 1<\/p>\n<p>\u00c2\u00a0 }<\/p>\n<p>}<\/p>\n<p># apply business rule check &amp; count customers whose score &gt;= 4 and that Have Donated, test file<\/p>\n<p># check &amp; count for all customers that have donated in the test dataset<\/p>\n<ul>\n<li>count_test_predicted_donations \u00ef\u0192\u0178 0<\/li>\n<li>counter_test \u00ef\u0192\u0178 0<\/li>\n<li>number_donation_instances_whole_test \u00ef\u0192\u0178 0<\/li>\n<li>false_positives_test_counter \u00ef\u0192\u0178 0<\/li>\n<li>for(i in 1:nrow(matrix_test)) {<\/li>\n<\/ul>\n<p>\u00c2\u00a0 if ((matrix_test[i,8] &gt;= 4) &amp; (matrix_test[i,5] == 1)) {<\/p>\n<p>\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 count_test_predicted_donations = count_test_predicted_donations + 1\u00c2\u00a0 }<\/p>\n<p>if ((matrix_test[i,8] &gt;= 4) &amp; (matrix_test[i,5] == 0)) {<\/p>\n<p>\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 false_positives_test_counter = false_positives_test_counter + 1}<\/p>\n<p>\u00c2\u00a0 if (matrix_test[i,8] &gt;= 4) {<\/p>\n<p>\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 counter_test \u00ef\u0192\u0178 counter_test + 1<\/p>\n<p>\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 }<\/p>\n<p>\u00c2\u00a0 if (matrix_test[i,5] == 1) {<\/p>\n<p>\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 number_donation_instances_whole_test \u00ef\u0192\u0178 number_donation_instances_whole_test + 1<\/p>\n<p>\u00c2\u00a0\u00c2\u00a0 }<\/p>\n<p>}<\/p>\n<p># convert matrix_train to dataframe<\/p>\n<ul>\n<li>dftrain \u00ef\u0192\u0178 data.frame(matrix_train)<\/li>\n<\/ul>\n<p># remove the group of customers who are less likely to donate again in the future from train file<\/p>\n<ul>\n<li>dftrain_final \u00ef\u0192\u0178 dftrain[c(1:counter_train),1:8]<\/li>\n<\/ul>\n<p># convert matrix_train to dataframe<\/p>\n<ul>\n<li>dftest \u00ef\u0192\u0178 data.frame(matrix_test)<\/li>\n<\/ul>\n<p># remove the group of customers who are less likely to donate again in the future from test file<\/p>\n<ul>\n<li>dftest_final \u00ef\u0192\u0178 dftest[c(1:counter_test),1:8]<\/li>\n<\/ul>\n<p># save final train dataframe as a CSV in the specified directory \u2013 reduced target future customers<\/p>\n<ul>\n<li>write.csv(dftrain_final, file = \u201cC:UsersAlexandrosDropboxMSc2nd SemesterData analysisAssignmenttrain_output.csv\u201d, row.names = FALSE)<\/li>\n<\/ul>\n<p>#save final test dataframe as a CSV in the specified directory \u2013 reduced target future customers<\/p>\n<ul>\n<li>write.csv(dftest_final, file = \u201cC:UsersAlexandrosDropboxMSc2nd SemesterData analysisAssignmenttest_output.csv\u201d, row.names = FALSE)<\/li>\n<\/ul>\n<p>#train precision=number of relevant instances retrieved \/ number of retrieved instances collect.530<\/p>\n<p>precision_train \u00ef\u0192\u0178\u00c2\u00a0 count_train_predicted_donations \/ counter_train<\/p>\n<p># train recall = number of relevant instances retrieved \/ number of relevant instances in collect.530<\/p>\n<p>recall_train \u00ef\u0192\u0178 count_train_predicted_donations \/ number_donation_instances_whole_train<\/p>\n<p># measure combines Precision&amp;Recall is harmonic mean of Precision&amp;Recall balanced F-score for # train file<\/p>\n<p>f_balanced_score_train \u00ef\u0192\u0178 2*(precision_train*recall_train)\/(precision_train+recall_train)<\/p>\n<p># test precision<\/p>\n<p>precision_test \u00ef\u0192\u0178 count_test_predicted_donations \/ counter_test<\/p>\n<p># test recall<\/p>\n<p>recall_test \u00ef\u0192\u0178 count_test_predicted_donations \/ number_donation_instances_whole_test<\/p>\n<p># the balanced F-score for test file<\/p>\n<p>f_balanced_score_test \u00ef\u0192\u0178 2*(precision_test*recall_test)\/(precision_test+recall_test)<\/p>\n<p># error in precision<\/p>\n<p>error_precision \u00ef\u0192\u0178 abs(precision_train-precision_test)<\/p>\n<p># error in recall<\/p>\n<p>error_recall \u00ef\u0192\u0178 abs(recall_train-recall_test)<\/p>\n<p># error in f-balanced scores<\/p>\n<p>error_f_balanced_scores \u00ef\u0192\u0178 abs(f_balanced_score_train-f_balanced_score_test)<\/p>\n<p># Print Statistics for verification and validation<\/p>\n<ul>\n<li>cat(\u201cPrecision with training dataset: \u201c, precision_train)<\/li>\n<li>cat(\u201cRecall with training dataset: \u201c, recall_train)<\/li>\n<li>cat(\u201cPrecision with testing dataset: \u201c, precision_test)<\/li>\n<li>cat(\u201cRecall with testing dataset: \u201c, recall_test)<\/li>\n<li>cat(\u201cThe F-balanced scores with training dataset: \u201c, f_balanced_score_train)<\/li>\n<li>cat(\u201cThe F-balanced scores with testing dataset:\u00c2\u00a0 \u201c, f_balanced_score_test)<\/li>\n<li>cat(\u201cError in precision: \u201c, error_precision)<\/li>\n<li>cat(\u201cError in recall: \u201c, error_recall)<\/li>\n<li>cat(\u201cError in F-balanced scores: \u201c, error_f_balanced_scores)<\/li>\n<\/ul>\n<p># confusion matrix (true positives, false positives, false negatives, true negatives)<\/p>\n<p># calculate true positives for train which is the variable \u2018count_train_predicted_donations\u2019<\/p>\n<p># calculate false positives for train which is the variable \u2018false_positives_train_counter\u2019<\/p>\n<p># calculate false negatives for train<\/p>\n<ul>\n<li>false_negatives_for_train \u00ef\u0192\u0178 number_donation_instances_whole_train \u2013 count_train_predicted_donations<\/li>\n<\/ul>\n<p># calculate true negatives for train<\/p>\n<ul>\n<li>true_negatives_for_train \u00ef\u0192\u0178 (nrow(matrix_train) \u2013 number_donation_instances_whole_train) \u2013 false_positives_train_counter<\/li>\n<li>collect_train\u00ef\u0192\u0178c(false_positives_train_counter, true_negatives_for_train, count_train_predicted_donations, false_negatives_for_train)<\/li>\n<\/ul>\n<p># calculate true positives for test which is the variable \u2018count_test_predicted_donations\u2019<\/p>\n<p># calculate false positives for test which is the variable \u2018false_positives_test_counter\u2019<\/p>\n<p># calculate false negatives for test<\/p>\n<ul>\n<li>false_negatives_for_test \u00ef\u0192\u0178 number_donation_instances_whole_test \u2013 count_test_predicted_donations<\/li>\n<\/ul>\n<p># calculate true negatives for test<\/p>\n<ul>\n<li>true_negatives_for_test\u00ef\u0192\u0178(nrow(matrix_test)-number_donation_instances_whole_test)- false_positives_test_counter<\/li>\n<li>collect_test \u00ef\u0192\u0178 c(false_positives_test_counter, true_negatives_for_test, count_test_predicted_donations, false_negatives_for_test)<\/li>\n<li>TrueCondition \u00ef\u0192\u0178 factor(c(0, 0, 1, 1))<\/li>\n<li>PredictedCondition \u00ef\u0192\u0178 factor(c(1, 0, 1, 0))<\/li>\n<\/ul>\n<p># print confusion matrix for train<\/p>\n<ul>\n<li>df_conf_mat_train \u00ef\u0192\u0178 data.frame(TrueCondition,PredictedCondition,collect_train)<\/li>\n<li>ggplot(data = df_conf_mat_train, mapping = aes(x = PredictedCondition, y = TrueCondition)) +<\/li>\n<\/ul>\n<p>\u00c2\u00a0 geom_tile(aes(fill = collect_train), colour = \u201cwhite\u201d) +<\/p>\n<p>\u00c2\u00a0 geom_text(aes(label = sprintf(\u201c%1.0f\u201d, collect_train)), vjust = 1) +<\/p>\n<p>\u00c2\u00a0 scale_fill_gradient(low = \u201cblue\u201d, high = \u201cred\u201d) +<\/p>\n<p>\u00c2\u00a0 theme_bw() + theme(legend.position = \u201cnone\u201d)<\/p>\n<p>#\u00c2\u00a0 print confusion matrix for test<\/p>\n<ul>\n<li>df_conf_mat_test \u00ef\u0192\u0178 data.frame(TrueCondition,PredictedCondition,collect_test)<\/li>\n<li>ggplot(data =\u00c2\u00a0 df_conf_mat_test, mapping = aes(x = PredictedCondition, y = TrueCondition)) +<\/li>\n<\/ul>\n<p>\u00c2\u00a0 geom_tile(aes(fill = collect_test), colour = \u201cwhite\u201d) +<\/p>\n<p>\u00c2\u00a0 geom_text(aes(label = sprintf(\u201c%1.0f\u201d, collect_test)), vjust = 1) +<\/p>\n<p>\u00c2\u00a0 scale_fill_gradient(low = \u201cblue\u201d, high = \u201cred\u201d) +<\/p>\n<p>\u00c2\u00a0 theme_bw() + theme(legend.position = \u201cnone\u201d)<\/p>\n<p># MCC = (TP * TN \u2013 FP * FN)\/sqrt((TP+FP) (TP+FN) (FP+TN) (TN+FN)) for train values<\/p>\n<ul>\n<li>mcc_train \u00ef\u0192\u0178 ((count_train_predicted_donations * true_negatives_for_train) \u2013 (false_positives_train_counter * false_negatives_for_train))\/sqrt((count_train_predicted_donations+false_positives_train_counter)*(count_train_predicted_donations+false_negatives_for_train)*(false_positives_train_counter+true_negatives_for_train)*(true_negatives_for_train+false_negatives_for_train))<\/li>\n<\/ul>\n<p># print MCC for train<\/p>\n<ul>\n<li>cat(\u201cMatthews Correlation Coefficient for train: \u201c,mcc_train)<\/li>\n<\/ul>\n<p># MCC = (TP * TN \u2013 FP * FN)\/sqrt((TP+FP) (TP+FN) (FP+TN) (TN+FN)) for test values<\/p>\n<ul>\n<li>mcc_test \u00ef\u0192\u0178 ((count_test_predicted_donations * true_negatives_for_test) \u2013 (false_positives_test_counter * false_negatives_for_test))\/sqrt((count_test_predicted_donations+false_positives_test_counter)*(count_test_predicted_donations+false_negatives_for_test)*(false_positives_test_counter+true_negatives_for_test)*(true_negatives_for_test+false_negatives_for_test))<\/li>\n<\/ul>\n<p># print MCC for test<\/p>\n<ul>\n<li>cat(\u201cMatthews Correlation Coefficient for test: \u201c,mcc_test)<\/li>\n<\/ul>\n<p># print MCC err between train and err<\/p>\n<ul>\n<li>cat(\u201cMatthews Correlation Coefficient error: \u201c,abs(mcc_train-mcc_test))<\/li>\n<\/ul>\n<p># Total = TP + TN + FP + FN for train<\/p>\n<ul>\n<li>total_train \u00ef\u0192\u0178 count_train_predicted_donations + true_negatives_for_train + false_positives_train_counter + false_negatives_for_train<\/li>\n<\/ul>\n<p># Total = TP + TN + FP + FN for test<\/p>\n<ul>\n<li>\u00c2\u00a0total_test \u00ef\u0192\u0178 count_test_predicted_donations + true_negatives_for_test + false_positives_test_counter + false_negatives_for_test<\/li>\n<\/ul>\n<p># totalAccuracy = (TP + TN) \/ Total \u2013 for train values<\/p>\n<ul>\n<li>totalAccuracyTrain \u00ef\u0192\u0178 (count_train_predicted_donations + true_negatives_for_train)\/ total_train<\/li>\n<\/ul>\n<p># totalAccuracy = (TP + TN) \/ Total \u2013 for test values<\/p>\n<ul>\n<li>totalAccuracyTest \u00ef\u0192\u0178 (count_test_predicted_donations + true_negatives_for_test)\/ total_test<\/li>\n<\/ul>\n<p># randomAccuracy = ((TN+FP)*(TN+FN)+(FN+TP)*(FP+TP)) \/ (Total*Total)\u00c2\u00a0 for train values<\/p>\n<ul>\n<li>randomAccuracyTrain\u00ef\u0192\u0178((true_negatives_for_train+false_positives_train_counter)*(true_negatives_for_train+false_negatives_for_train)+(false_negatives_for_train+count_train_predicted_donations)*(false_positives_train_counter+count_train_predicted_donations))\/(total_train*total_train)<\/li>\n<\/ul>\n<p># randomAccuracy = ((TN+FP)*(TN+FN)+(FN+TP)*(FP+TP)) \/ (Total*Total)\u00c2\u00a0 for test values<\/p>\n<ul>\n<li>randomAccuracyTest\u00ef\u0192\u0178((true_negatives_for_test+false_positives_test_counter)*(true_negatives_for_test+false_negatives_for_test)+(false_negatives_for_test+count_test_predicted_donations)*(false_positives_test_counter+count_test_predicted_donations))\/(total_test*total_test)<\/li>\n<\/ul>\n<p># kappa = (totalAccuracy \u2013 randomAccuracy) \/ (1 \u2013 randomAccuracy) for train<\/p>\n<ul>\n<li>kappa_train \u00ef\u0192\u0178 (totalAccuracyTrain-randomAccuracyTrain)\/(1-randomAccuracyTrain)<\/li>\n<\/ul>\n<p># kappa = (totalAccuracy \u2013 randomAccuracy) \/ (1 \u2013 randomAccuracy) for test<\/p>\n<ul>\n<li>kappa_test \u00ef\u0192\u0178 (totalAccuracyTest-randomAccuracyTest)\/(1-randomAccuracyTest)<\/li>\n<\/ul>\n<p># print kappa error<\/p>\n<ul>\n<li>cat(\u201cKappa error: \u201c,abs(kappa_train-kappa_test))<\/li>\n<\/ul>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Study Bay Coursework Assignment Writing Help 1.) R for Recency =&gt; months since last donation, 2.) F for Frequency =&gt; total number of donation, 3.)\u2026<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7822,7724,7820,7548,7826,8080,8079,8077,8078,8081,7605],"tags":[103,95,83,94,80,86,79,98,93,104,7647,99,92,82,102,85,8,101,97,87,96,91,89,90,88,100,1402,84,6940,81],"class_list":["post-85559","post","type-post","status-publish","format-standard","hentry","category-best-dissertation-writing-service-uk","category-best-dissertation-writing-services","category-dissertation-title-generator","category-dissertation-writing-services-cost","category-dissertation-writing-services-in-usa","category-master-thesis-writing-service","category-online-thesis-writing-services","category-phd-dissertation-help-and-editing-helper-in-usa","category-professional-dissertation-writing-service","category-write-my-dissertation","category-writing-dissertation-and-grant-proposals","tag-150-200-words-discussion-with-a-scholarly-reference","tag-200-300-words-response-to-classmate-discussion-question","tag-250-word-analysis-essay","tag-bachelor-of-nursing-assignments","tag-case-study","tag-essay-bishops-website","tag-expert-online-nursing-writing-service","tag-fast-nursing-papers","tag-freelance-case-study-writing-service","tag-health-medicine-assignment-help-australia","tag-health-care-an","tag-health-care-assignment-help-service","tag-healthcare-assignment-writing-services-by-top-writers","tag-healthcare-essay-writing-services-by-medical-academics","tag-healthcare-writing-help-by-certified-medical-academics","tag-i-need-to-submit-this-assignment","tag-medical-essay-writing-service","tag-nursing-assessment-help","tag-nursing-assignment-help","tag-nursing-assignment-help-australia","tag-nursing-assignment-help-sydney","tag-nursing-assignment-writers","tag-nursing-assignments-examples-assignment-help-nursing","tag-pay-someone-to-do-my-nursing-assignment","tag-professional-case-study-writers","tag-quality-nursing-essay-writing-service","tag-write-a-paper","tag-write-a-review","tag-write-an-essay","tag-writing-assignment"],"_links":{"self":[{"href":"https:\/\/www.studyproessays.com\/help\/wp-json\/wp\/v2\/posts\/85559","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.studyproessays.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.studyproessays.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.studyproessays.com\/help\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.studyproessays.com\/help\/wp-json\/wp\/v2\/comments?post=85559"}],"version-history":[{"count":0,"href":"https:\/\/www.studyproessays.com\/help\/wp-json\/wp\/v2\/posts\/85559\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.studyproessays.com\/help\/wp-json\/wp\/v2\/media?parent=85559"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.studyproessays.com\/help\/wp-json\/wp\/v2\/categories?post=85559"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.studyproessays.com\/help\/wp-json\/wp\/v2\/tags?post=85559"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}