# Sentiment Analysis for Investor Profiles

Published: 10/22/2019

Last Updated: 10/22/2019

## Overview

Investors who want to put their savings into financial assets are faced with a wide variety of product offerings. These assets vary in complexity and investment profile. Two fundamental aspects of a financial asset investment must be considered: risk and profitability. The investor should consider the fact that assets with lower risk may have lower profitability, and assets with higher risk may have higher profitability. When investors are not fully aware of an investment profile, they are more apt to make decisions that can result in financial loss.

Used in a broad range of applications such as marketing, sales, and social media, sentiment analysis has been achieving impressive results for several years. Another use case for sentiment analysis is to analyze customer answers when building an investor profile based on a standard new-account questionnaire. Today, most sentiment analysis tasks are done by humans, which can be labor intensive and inconsistent.

This paper discusses sentiment analysis using Intel® Optimization for TensorFlow* to help classify investment profiles. It also compares two different environments and the speed at which the analysis is done in each environment.

### Solution Architecture and Design

This sentiment analysis solution was developed to identify sentiments in the customer-provided answers to specific investment-related questions. The block diagram below illustrates a simple analysis scenario.

### Hardware Configuration

Table 1 lists the hardware configurations used for the comparison in this paper.

Table 1. Hardware configurations

Platform x86_64 1 2 Intel® Xeon® Platinum 8153 processor at 2.00 GHz 16, 2 0x200004d On On SE5C620.86B.00.01.0015.110720180833 1 slot, 394 GB 394 GB CentOS* Linux* 7 (Core) Linux kernel 3.10.0-693.11.6.el7.x86_64 3, L1TF GCC 6.4.0 Intel® Optimization for TensorFlow* TensorFlow* 1.12 Intel MKL-DNN 2018 ISV data and customer data Custom CNN 50

## Software Configurations

The software configurations used in the analysis and comparison are below.

### Optimized Environment

Intel® Distribution for Python* version Python 3.6.1 1.12 4.3.25

### Default Environment

Python  version Python 3.6.1 1.12 4.3.25

## Setting up the Environments

The optimized environment, which uses Intel® Math Kernel Library for Deep Neural Neworks (Intel® MKL-DNN) in the back-end, consists of the Intel® Distribution for Python* and the Intel Optimization for TensorFlow.

1. Install the Intel Distribution for Python.
2. Install Intel Optimization for TensorFlow.

To install the default environment ( with Eigen* in the back-end), execute:

pip install tensorflow --user

## Comparison Results

We used the samples-per-second (SPS) metric while comparing the performance between Intel Optimization for TensorFlow and the default TensorFlow version from pip.

Cloud Intel® AI Builders DevCloud Architecture Inference Time (samples per second) CPU optimized 32469.85 CPU non-optimized 37937.99

The chart above shows that Intel Optimization for TensorFlow on the Intel® Xeon® Platinum 8153 processor delivered a performance 1.17x faster than the non-optimized version of TensorFlow with Eigen.

## Conclusion

This paper describes how to optimize deep learning inference on an Intel® Xeon® processor for sentiment analysis. A 1.17x speedup was achieved when using the Intel Optimization for TensorFlow on the Intel Xeon Platinum 8153 processor. The solution also took advantage of Intel MKL-DNN optimization to achieve the expected performance.

This solution can help improve a company’s ability to offer more personalized investment options to customers because it helps them more efficiently process investor profiles and it reduces analysis costs using existing hardware solutions.

## References

Installing Intel Optimization for TensorFlow

#### Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.