The assignment questions is in the Machine Learning in Finance Assignments pdf files. There are 11 questions which are only theory type questions related to Machine learning and python applying it into finance. The expert should know deep learning and neural networks and model evaluation and know its application in Finance. Please these are easy questions and I have provided all related documents to be able to answer the questions. There is a mini case study in the attached support document in the pdf deep learning and neural networks file which the expert has to consult and answer some questions. Please make it a very good price for me as I have provided all necessary material to answer the 11 theoritical questions and they are straight forward. Please make it very professional and high level.
FIN 5622 Final Assignment (due on 4/27/2020) 1. (10 points) In an artificial Neural Network shown below, a. How many input variables does it have? b. How many output variables does it have? c. How many neurons does this neural network have? d. What’s the depth of this neural network? e. Draw the input layer, output layer and hidden layers on the graph. 2. (10 points) List the activation functions commonly used in an artificial Neural Network 3. (10 points) What is the forward propagation in a neural network and what is its output? What is the backpropagation in a neural network and what’s the purpose of this process? 4. (10 points) What is a Recurrent Neural Network (RNN)? Why we need an RNN? What is the LSTM model in the RNN? 5. (10 points) In the class we showed a case study: Predict Stock Price by using RNN-LSTM models. In the code, a. How many layers does this RNN have? b. What is the input at each time point? c. How many neurons in the last layer at each time point for this RNN? d. What is the loss function used in this RNN? e. If it is a classification problem, what type of loss function we should use? Why we can not use the same loss function as commonly used in the regression problem? 6. (10 points) In our case study, what are hyperparameters that we can tune in the model? Provide one detailed plan to obtain the one (or several) optimal hyperparameters (you don’t need to write any code to explain this although some pseudo code may help). Will this set of hyperparameters lead to the lowest loss function in the test dataset? 7. (10 points) In the classification study of companies’ bankruptcy, we have a sample of 1,000 companies and 50 of these companies went to bankruptcy. If you want to assign a dummy predictor to this study, a. What is the dummy predictor you will choose? What’s the accuracy of this dummy predictor? b. Is accuracy a good measure to evaluate the classification model for this problem? If not what’s your suggestion? c. What’s the definition of “precision” and “recall”? why we want to introduce “F1- score?” d. What is a Receiver Operating Characteristics (ROC) curve? On this curve, what is the X-axis? Y-axis? What is the “idea” point for the curve? e. If two models generate two different ROC curves, how do we determine which model is better based on their ROC curves? 8. (10 points) Select ANY applicable below for the benefit of Cross-Validation a. Reduce the chance of good/bad luck of training data fitting. b. provides some information about how sensitive our model is to the selection of the training dataset c. Use more data to fit the model compare to a simple training-test data splitting d. Resolve the model overfitting 9. (10 points) Suppose you have the following data with one real-value input variable X and one real-value output variable Y. What is leave-one out cross validation mean square error in case of linear regression (Y = bX + c)? 10. (5 points) Suppose you were to test a time series model on a daily stock price data set. Which of the evaluation method is the best? a. Validation set approach. b. Standard K-fold. c. Stratified K-fold. d. Leave-one-out method. 11. (5 points) A supervised learning model has been built to predict whether someone is infected with a new strain of a virus. The probability of a person having the virus is 3%. Using accuracy as a metric, what would be a good choice for a baseline accuracy score that the new model would want to outperform? Introduction to Neural Networks and Deep Learning Introduction to Neural Networks and Deep Learning Ming Fang, Ph.D.
[email protected], Alter Hall 436 FIN 5639, Spring 2020 Fox School of Management, Temple University Outlines • Overview of neural networks (NN) and deep learning: concepts, notations and terminologies • Algorithms: Multi-layer neural network, Recurrent neural network (RNN), Long short-term memory (LSTM) • Applications: Forecast stock price by using NN in Keras • Resources: • Deep Learning with Python by François Chollet • Deep Learning by Goodfellow et al. (MIT press) • Deep Learning by Andrew Ng (Coursera) Overview of Deep Learning What is Deep Learning In machine learning • Input data points – pictures (unstructured data) • Examples of the expected output— labels such as “dog,” “cat,” and so on – classification problem • A way to measure whether the algorithm is doing a good job—The measurement is used as a feedback signal to adjust the way the algorithm works. The measurement is the cost function. This adjustment step is what we call learning. Representations from Data The central problem in machine learning is to meaningfully transform data: in other words, to learn useful representations of the input data at hand—representations that get us closer to the expected output. What’s Special about Deep Learning • Machine learning: searching for useful representations of some input data, within a predefined space of possibilities, using guidance from a feedback signal. • Deep learning is a specific subfield of machine learning: a new take on learning representations from data that puts an emphasis on learning successive layers of increasingly meaningful representations. • How many layers contribute to a model of the data is called the depth of the model. Other appropriate names for the field could have been layered representations learning and hierarchical representations learning. Neural Network and Deep Learning In deep learning, these layered representations are (almost always) learned via models called neural networks, structured in literal layers stacked on top of each other. Example: House Price Prediction size of house p ri ce Size x -> -> price y “Neuron” Rectified Linear Unit ReLU Example: House Price Prediction How Deep Learning Works The specification of what a layer does to its input data is stored in the layer’s weights, which are a bunch of numbers. In technical terms, we’d say that the transformation implemented by a layer is parameterized by its weights Neural Network examples Standard NN Recurrent NN Convolutional NN Scale drives deep learning progress Amount of data P e rf o rm a n ce • Data • Computation • Algorithms Idea Experiment Code Scale drives deep learning progress What Deep Learning has Achieved so far • Near-human-level image classification, speech recognition, handwriting transcription, autonomous driving • Improved machine translation, text-to-speech conversion • Digital assistants such as Google Now and Amazon Alexa • Improved ad targeting, search results on the web • Ability to answer natural-language questions • Superhuman Go playing Robot Trading? What Makes Deep Learning Different • The development of deep learning was motivated in part by the failure of traditional algorithms to generalize well on such AI tasks • The Curse of Dimensionality – the number of the samples compared to the possible number of points in the probability space is small • Local Constancy and Smoothness Regularization -- machine learning algorithms need to be guided by prior beliefs about what kind of function they should learn, e.g. a smooth function such as a polynomial function • Deep learning makes problem-solving much easier, because it completely automates what used to be the most crucial step in a machine-learning workflow: feature engineering. Standard Multi-layer Neural Networks 1 (cat) vs 0 (non cat) Red Green Blue Binary Classification Given pair of training data ? ? , ? ? ? = 1, 2, 3, …? Find a probability function such that ො? = ?(?) Logistic Function • We try to model the probability of a binomial process: ???? ? = 1 = ?(?) and ????( ) ? = 0 = 1 − ?(?) where ? = ??? + ? • If the probability function follows a Logistic (sigmoid) function ො? = ?(?) = 1 1 + exp(−?) we have a logit model. Cost Function of Logistic Regression In Linear Regression, Loss/Cost function: ? ?0, ?1 = ??? = σ?=1 ? ?? − ℎ?(??) 2 Cost Function for Logistic Regression • Logistic model is not a classification model but can be used as a classifier to assign a data to a category with the highest probability • In logistic model, log-odds of an event log( ? 1−? ) is modeled by a linear combination of features • Likelihood function (joint probability of observing n data): ? = ???? ?1 = ? 1 , ?2 = ? 2 , … ?? = ? ? = ෑ ? ? =0 1 − ? ? ? ෑ ?(?)=1 ?(? ? ) • Loss function: ? ො?, ? = − ? log(ො?)) + 1 − ? log 1 − ො? • Cost function: ? ?, ? = σ?=1 ? ? ො? ? , ? ? Gradient Decent Method Recap: ො? = ? ??? + ? , ? ? = 1 1+?−? ? ?, ? = 1 ? ?=1 ? ℒ( ො? ? , ?(?)) = − 1 ? ?=1 ? ?(?) log ො? ? + (1 − ?(?)) log(1 − ො? ? ) Want to find ?, ? that minimize ? ?, ? ? ? ?, ? ? ? ≔ ? − ? ?? ?? ? ≔ ? − ? ?? ?? ?: ???????? ???? A Simple Neural Network ?1 ?2 ?3 ො? x w b ? = ??? + ? ? = ?(?) ℒ(?, ?) x ?[1] ?[1] ?[1] = ?[1]? + ?[1] ?[1] = ?(?[1]) ?[2] = ?[2]?[1] + ?[2] ?[2] = ?(?[2]) ℒ(?[2], ?) ?1 ?2 ?3 ො? ?[2] ?[2] ? : index of layer ? ? : transformed variable ? ? : activation Neural Network Representation ?1 ?2 ?3 ො? = ? 2 Input Layer Hidden Layer Output Layer ? 0 = ? ? 1 ? 2 ? 1 = ?1 1 ?2 1 ?3 1 ?4 1 ? 1 , ? 1 ? 2 , ? 2 Two –layer Neural Network ?1 ?2 ?3 ො? Computation Output – Forward Propagation for i = 1 to m ? 1 (?) = ? 1 ?(?) + ? 1 ? 1 (?) = ?(? 1 ? ) ? 2 (?) = ? 2 ? 1 (?) + ? 2 ? 2 (?) = ?(? 2 ? ) …? = ?(1) ?(2) ?(?) ?[1](2)A [1] = ?[1](1) ?[1](?)… ? 1 = ? 1 ? + ? 1 ? 1 = ?(? 1 ) ? 2 = ? 2 ? 1 + ? 2 ?