reference for report work
reference for report work
Sentiment Analysis
COMPUTER APPLICATIONS
by
OFT
STITUTE
9010N
NATIONA
1964
TIRUCHIAAPPALLLI
MAY 2024
Video Feedback
Sentiment Analysis
COMPUTER APPLICATIONS
by
6TITUTE oF
INS TE
KTONAL
1964
TIRUCHIRAPPALLI
MAY 2024
OPTIMIZATION OF NEURAL NETWORKS IN THE FINANCIAL
DOMAIN: TAILORING THE BEST OPTIMIZER
in partial fulfillmentof the
A project report submitted
the degree of
requirements for the award of
MASTER OF SCIENCE
IN
COMPUTER SCIENCE
BY
SUNDARRAMAN MADHUSUDANAN
(205322022)
TITUTE OF
INS7 TE
9010NW
ATIONA
RUC
Dr. GANGADHARAN G. R.
Assistant Professor
DECEMBER 2023
BONAFIDECERTIFICATE
"Optimization of Neural Networks in the
This is to certify that the project
Work).
the academic year 2023-2024 (3rd semester -CAS755
Mini Project
(Head of theDepartment)
(Project Guide) TRICHY
of the Department
529915 Dept.of Computer Applications
National Instituse of Technology
Tamilnadu, India.
Technology, Tiruchirappalli.
SUNDARRAMAN MADHUSUDANAN
Table of Contents
1. INTRODUCTION. 6
1.1 Financial Datasets in
Machine Learning 6
1.2 Convolutional Neural
Network ...... 6
1.3 Optimizers
2. LITERATURE REVIEW... ....8
2.1Literature Survey
3. METHODOLOGY. 10
3.1 Description of Dataset. 10
3.2 Convolutional Neural Network and Optimizers Used.. .10
3.3 Implementation of CNN using Python. 11
4. EXPERIMENTAL RESULTS.. 14
4.1 Performance with Loss Function MSE 14
4.2 Performance with Loss Function MAE 16
INTRODUCTION
1.1
FINANCIAL DATASETS IN
MACHINE LEARNING
In the realm of machine
learning, the use of
financial datasets is
making data-driven decisions in crucial for
the complex and dynamic
These datasets, comprised of field of finance.
diverse financial information
such as stock prices,
economic indicators, and trading volumes,
serve as valuable inputs for
models. Financial data presents training
challenges like non-linearity and
high-frequency
fluctuations, requiring sophisticated modeling approaches. Applications of
machine learning in finance include predictive
modeling, risk management,
portfolio optimization,fraud
detection, and algorithmic trading. This project
tries to explores the unique characteristics of
financial datasets and sets the stage
for further discussionon optimizing neural networks for
enhanced performance
in financial applications.
within the data. Fully connected layers follow the convolutional and pooling
Page 6 of 19
CNNs employ weight sharing,
using the same set of parameters across different
1.3 OPTIMIZERS
models, including neural networks, and their selection can significantly impact
in optimization algorithmsaims to
the model's performance. Ongoing research
and adaptable to different types of
develop techniques that are robust, efficient,
data and model architectures.
Page 7 of 19
CHAPTER 2
LITERATURE REVIEW
In [1], they have taken 3 unrelated data sets (cats and dogs, Fashion MNIST,
Natural Images) and tested it on a ConvNet with 3x3 filters across each layer
and with the following 7 optimizers: SGD (vanilla, with momentum, and
nesterov). RMSProp, Adam, Adamax, Adagrad, Adadelta, and Nadam. The
optimizers were judged on validation accuracy and loss. Nadam was the better
optimizer infirst aand third data set whereas adam performed better than Nadam
in the second data set.
In [2], they have taken four hyperspectral remote sensing data sets: Kennedy
Space Center (KSC),Indian Pines, University of Pavia and Salinas and tested it
on a CNN with 2x2 filters across each layer and with the following 7 optimizers:
SGD, Adam, Adadelta, Adagrade, RMSprop, AdaMax, and Nadam. The
optimizers were judged on accuracy, precision, recall, Fl-score, convergence
speed and stability during training. Adam was the best optimizer on the data set.
In (3], they have tested the data on a (LeNet) CNN with the following 7
set
minimize risk.
on a skin cancer using the ISIC standard data set for skin cancer
In 4], tests
SGD, and Root Mean Square Propagation)to explore the effect of the algorithms
on the skin images. The second data set is COVIDx CT images. The second data
set was tested with the following 10 optimizers: Stochastic Gradient Descent
Page 8 of 19
Rascd on the previ0Us rescarch, it's clear that most studies have primarily
focused on optimizing Convolutional Neural Networks (CNNs), mainly in the
healthcare scctor, with no more than two data sets. We will start with an
domain like finance and use 2 distinct We will
unexplored data sets for analysis.
apply the previously mentioncd optimizer options to determine the best choice
fjor the finance domain,
Page 9 of 19
CHAPTER 3
PROPOSED METHODOLOGY
3.1 DESCRIPTION OF DATASETSs
Dataset 1: Sales Prediction Datasct
the date of sale, a unique shop identifier ranging from 0 to 59,an item identifier,
comprehensive compilation
offers a of financial information
This dataset
of
from Yahoo Finance, encompassing a comprehensive list
U.S.
sourced
details about the mutual funds
Mutual Funds. The dataset not only includes
for a multifaceted
themselves but also provides historical price data, allowing
The historical prices associated with each
exploration of the financial landscape.
offer a temporal dimension to the analysis. This
mutual fund in the dataset
allows for the study of how the value of each
historical pricing information
the identification of trends,
mutual fund has evolved over time, enabling
The 7 Optimizers used for analysis are SGD, RMSprop, Adadelta, Adagrad,
Adam, AdaMax and Nadam.
a
In the time series analysis, the goal is to predict future sales using
first
Page 10 of 19
lo the second analysis, the focus is on conducting a time series analysis using a
Neural Network (CNN) applied
Convolutional to the second dataset, which
financial information from
comprises Yahoo Finance, specifically focusing on
U.S. Mutual Funds. The objective is to predict the value of Mutual
opening
Funds, a task well-suited for tinme series analysis given the temporal nature of
data.
financial
features from the input time series data. Each convolutional layer employs filters
20 Epochs: The model is trained over 20 epochs, where each epoch represents a
parameters accordingly.
and evaluation. The key libraries used in this implementation include NumPy,
Page 11 of 19
Pandas
is a powerful data manipulation and analysis library. It
Pandas: data structures like DataFrames, which are instrumental for organizing
static,
Matplotlib is a versatile plotting library used for creating
of the CNN
Matplotlib:
and interactive visualizations in Python. Inthe context
series data,
animated,
Matplotlib is likely employed to visualize time
implementation,
performance metrics, and generate plots that aid in understanding
model
diplay data
in the sales
the patterns
performance.
and capable
Keras
networks APIwritten in Python
is ahigh-level neural
Keras:
Cognitive Toolkit. In
ot running on topof
TensorFlow, Theano, or Microsoft
for
as the deep learning framework
he CNN implementation,Keras serves
It provides an abstraction
COnstructing andtraining the neural network model.
complex neural network
layer of building
that
simplifies the process
architectures, including CNNs.
Page 12of 19
libraries allows for a streamlined and efficient
The combined use of these
series analysis. NumPy and Pandas
implementation of the CNN-based time
data
Matplotlib and Seaborn aid in
handle data manipulationand preprocessing.
visualization, Scikit-learn facilitates
machine learning tasks, and Keras provides
constructing and training the CNN model. This
a convenicnt interface for
collaborative use of libraries ensures
a cohesive and effective workflow for
Page 13 of 19
4
CHAPTER
RESULTS
EXPERIMENTAL
with loss function MSE.
Performance
4.1P
dataset,
the following mean squarederror values were obtained when
first
Inthe
the mean squared error as the loss function.
employing
1.2
-
102585569.00
10
(MSE)
Error
0.6
Squared
Mean
2620793.00
2086934.10
1956458.50
0.2 1465390.50
1241828.00
1011876.80
0.
Adam SGD AdaGrad RMSprop AdaDelta
Nadam Adamax
Optimizer Name
Page 14 of 19
dataset, the following mean squared error values were obtained
In the second
en employing the mean squared error as the loss function.
20
15.2506
(MSE)
15
Error
10.4709
10.0522
Squared
10
Mean
3.6564 3.7418
5 3.5946
Page 15 of 19
A2Performance with loss functionMAE.
In the first dataset, the following mean absolute error values were obtained when
employing the mean absolute error as the loss function.
3000
2500
2000
(MAE)
Error
1500
Absolute
897.6266
786.6513
8115195
1000 763.6675 768.4765
Mean
739.5482
500
Page 16 of 19
dataset, the follovwing mean absolute error values were obtained
Inthe second
when employng the mean absolute error as the loss function.
1.75
1.50
11948
L25 1.1043
(MAE)
Error
0.8737
1.00 0.8480
0.7195
0.6890
Absolute
0.75 -
Mean
0.50
0.25
0.00
Adam Adamax RMSprop Nadam AdaGrad SGD AdaDelta
Optimizer Name
Page 17of 19
CHAPTER S
cONCLUSION AND FUTURE WORK
5.1 Conclusion
adjustments to
time-varying processes, where continual
scenarios involving and
are desirable, Adamax, Adam,
In
rate characteristic
of AdaDelta.
learning
Page 18 of 19
BIBLIOGRAPHY
[]"A Comparative Analysis of Gradient Descent-Based Optimization
on Convolutional
Algorithms Neural Networks" E. M. Dogo, O.J.Afolabi.
NLNwulu, B.Twala, C.0.Aigbavboa Department of Electrical and Electronics
Engineering Science,Department of Construction Management and Quantity
Survey,University of Johannesburg,Johannesburg, South Africa.
Page 19 of
19