Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this homework you will implement a Multi-Layer Perceptron (MLP) for Regression. In class we went over an MLP for XOR data, which was a

In this homework you will implement a Multi-Layer Perceptron (MLP) for Regression. In class we went over an MLP for XOR data, which was a classification task. You will modify that code to make it work for regression. 2 Data The data is given below: X train = torch.tensor( [245.0, 273.0, 304.0, 331.0, 347.0, 360.0, 387.0, 438.0, 493.0, 547.0] ).view(-1,1) y train = torch.tensor( [232.3, 241.1, 257.4, 301.5, 324.6, 350.2, 362.3, 389.0, 398.2, 401.8] ) If we used a linear regression on this data, we would get the line shown in Figure 1. When you use an MLP with hidden layers and non-linear activations, you will get a non-linear fit to the data. Figure 1: Linear Regression For regression, you do not need the Softmax and Argmax in your MLP, but will rather collect a single value (meant to be the continuous output of the non-linear function you are modeling). When you write the 1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

An Introduction to the Mathematics of Financial Derivatives

Authors: Ali Hirsa, Salih N. Neftci

3rd edition

012384682X, 978-0123846822

More Books

Students also viewed these Mathematics questions

Question

Corruption can be eliminated. T F

Answered: 1 week ago