1 of 34

Using Sentiment Analysis to Differentiate Types of Loans

Data from: Consumer Financial Protection Bureau Complaints

Team 7: Xi Du, Alan Hunt, Leah Gall, Jason Jimenez

2 of 34

What we Looked for in Data

  • Relatable

  • Emotional

  • Well-structured

3 of 34

Data Collection

4 of 34

Data Collection

5 of 34

Data Cleaning

On XX/XX/2022 I submitted a request over the telephone to get a refund on my payments made during Covid. I was told the total amount I would get and it would take six weeks for a refund. \n\nOn XX/XX/2022 I called backend and they said it was still in processing and it would take 10-12 weeks from the request. \n\nOn XX/XX/2022 I called back and they said it hasnt been processed and that I need to continue to wait and that it will be another 8 weeks from the the time it was approved. They can not say why it hasnt been process or when it would be processed even though I requested back on XX/XX/XXXX. \n\nDoing research it appears there have been plenty of people to get their refund who have applied on or after XX/XX/XXXX through the same servicer. \n\nThis servicer is acting in a deceptive manner. We have given them ample time to resolve this issue.

6 of 34

Research Questions

  • Do customers have different proportions of negative words in complaints about two types of products: student loan and vehicle loan or lease?

  • Can we differentiate student loan and vehicle loan/lease complaints using classification models?

7 of 34

Research Questions

  • Do customers have different proportions of negative words in complaints about two types of products: student loan and vehicle loan or lease?

  • Can we differentiate student loan and vehicle loan/lease complaints using classification models?

8 of 34

Methodology

  • Calculate the proportions of negative words
  • Perform Hypothesis T-Test
  • Build and Compare Classification Models

First Research Question

Do customers have different proportions of negative words in complaints about two types of products: student loan and vehicle loan or lease?

9 of 34

Methodology

  • Calculate the proportions of negative words
  • Perform Hypothesis T-Test
  • Build and Compare Classification Models

Second Research Question

Can we differentiate student loan and vehicle loan/lease complaints using classification models?

10 of 34

Methodology (Calculate the proportions of negative words)

  • Define the proportion
  • Use a Negative Word Dictionary
  • Stem the words using Snowball algorithm
  • Use the English Snowball stopword list

11 of 34

Methodology (Calculate the proportions of negative words)

  • Define the proportion

12 of 34

Methodology (Calculate the proportions of negative words)

  • Define the proportion
  • Use a Negative Word Dictionary
  • Stem the words using Snowball algorithm
  • Use the English Snowball stopword list

13 of 34

Methodology (Calculate the proportions of negative words)

  • Use a Negative Word Dictionary
  • Find on GitHub

Credit:

Minqing Hu and Bing Liu. "Mining and Summarizing Customer Reviews." Proceedings of the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD-2004), Aug 22-25, 2004, Seattle, Washington, USA.

Bing Liu, Minqing Hu and Junsheng Cheng. "Opinion Observer: Analyzing and Comparing Opinions on the Web." Proceedings of the 14th International World Wide Web conference (WWW-2005), May 10-14, 2005, Chiba, Japan.

14 of 34

Methodology (Calculate the proportions of negative words)

  • Use a Negative Word Dictionary
  • Find on GitHub

15 of 34

Methodology (Calculate the proportions of negative words)

  • Define the proportion
  • Use a Negative Word Dictionary
  • Stem the words using Snowball algorithm
  • Use the English Snowball stopword list

16 of 34

Methodology (Calculate the proportions of negative words)

  • Stem the words using Snowball algorithm
  • Use wordStem( ) in SnowballC package

17 of 34

Methodology (Calculate the proportions of negative words)

  • Stem the words using Snowball algorithm
  • Use wordStem( ) in SnowballC package
  • Compare stemmed words with Negative Word List

18 of 34

Methodology (Calculate the proportions of negative words)

  • Stem the words using Snowball algorithm
  • Use wordStem( ) in SnowballC package
  • Compare stemmed words with Negative Word List

The number of negative words in each narrative

19 of 34

Methodology (Calculate the proportions of negative words)

  • Define the proportion
  • Use a Negative Word Dictionary
  • Stem the words using Snowball algorithm
  • Use the English Snowball stopword list

20 of 34

Methodology (Calculate the proportions of negative words)

  • Use the English Snowball stopword list
  • Remove the stopwords

21 of 34

Methodology (Calculate the proportions of negative words)

  • Use the English Snowball stopword list
  • Remove the stopwords

The number of non-stop words in each narrative

22 of 34

Calculate the Proportion!

23 of 34

Boxplot of the Proportions of Negative Words Distribution for Two Products

24 of 34

Boxplot of the Proportions of Negative Words Distribution for Two Products

25 of 34

Boxplot of the Proportions of Negative Words Distribution for Two Products

26 of 34

Hypothesis testing: T-test

H0: There is no difference in the proportions of negative words used between Vehicle and Student loans.

Ha: There is a difference in the proportions of negative words used between Vehicle and Student loans.

27 of 34

Results (Hypothesis testing: T-test)

28 of 34

Results (Hypothesis testing: T-test)

< 0.05

Statistically Significant!

29 of 34

Results (Hypothesis testing: T-test)

30 of 34

Classification Model Building

  • Create/add new factors
  • Split into train and test
  • Run multiple versions

31 of 34

Results (Classification Models)

Model

Accuracy

Precision

Recall

Conservative

0.67

0.63

.88

Perfect*

1.00

1.00

1.00

Text-based

0.52

0.52

0.87

32 of 34

Conclusion

  • From two sample T-test
  • From classification models

33 of 34

Next Steps

  • Use Tree-based models
  • Add more predictors

34 of 34

Thank You for Listening!