Microsoft Visual C#
Microsoft Visual C#
7th Edition
ISBN: 9781337102100
Author: Joyce, Farrell.
Publisher: Cengage Learning,
Bartleby Related Questions Icon

Related questions

Question

a):   Use the “ExampleTrainDataset.csv” Implement a multi-layer perceptron
with 1 input layer, 1 hidden layer with 4 perceptron (fully connected), 1 output layer
with 1 perceptron.
- Use squared error as the loss function.
- Implement batch-based learning (i.e, accumulate loss for all samples in
each iteration, and update weights once at the end)
- Use sigmoid activation function for all perceptron. Learning rate = 0.01
- Perform 50 iterations of learning.
- Plot a graph of training Loss with respect to iterations. Include this graph in
your report with the final weight vectors.
b): Using the trained MLP, perform predictions on “ExampleTestDataset.csv”
and report the test loss.

: import pandas as pd
file_path='/Users//Downloads/Data 2/ExampleTrainDataset.csv'
filepath2 = '/Users//Downloads/Data
data = pd.read_csv(file_path)
data2 = pd.read_csv(filepath2)
2/ExampleTestDataset.csv'
print(data)
print(data2)
x1 x2 x3 Y
012345678
2
3.0
2 0
2
3.0
4
0
2
3 9.0
1
0
3 1 0.5
2
0
4
2.0
1
0
5
7
2.0
1
1
3
2.0
5
1
5
2.0
2
1
8 2 4.0
3
1
2
226
11234
9 3 2.0
0
x1
1 1
x2
x3 Y
2
6
3 7
4 3
32243
3 1 0
2
4 0
2
2 1
4
3
31
3 1
1 1
expand button
Transcribed Image Text:: import pandas as pd file_path='/Users//Downloads/Data 2/ExampleTrainDataset.csv' filepath2 = '/Users//Downloads/Data data = pd.read_csv(file_path) data2 = pd.read_csv(filepath2) 2/ExampleTestDataset.csv' print(data) print(data2) x1 x2 x3 Y 012345678 2 3.0 2 0 2 3.0 4 0 2 3 9.0 1 0 3 1 0.5 2 0 4 2.0 1 0 5 7 2.0 1 1 3 2.0 5 1 5 2.0 2 1 8 2 4.0 3 1 2 226 11234 9 3 2.0 0 x1 1 1 x2 x3 Y 2 6 3 7 4 3 32243 3 1 0 2 4 0 2 2 1 4 3 31 3 1 1 1
Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Similar questions
Recommended textbooks for you
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L
Text book image
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr