Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Questions ( 1 0 0 points ) : In this assignment, you will train feedforward neural networks with three layers to classify motion data. You
Questions points: In this assignment, you will train feedforward neural networks with three
layers to classify motion data.
You can download "Human Activity Recognition Using Smartphones" data set from
https:archiveics.uci.edudatasethumanactivityrecognitionusingsmartphones link.
Then, unzip UCI HAR Dataset.zip in humanactivityrecognitionusingsmartphones directory
into the same folder.
In total, there are movement patterns with features belonging to classes in the data
set. These features are explained in detail at humanactivityrecognitionusingsmartphones
UCI HAR Datasetfeaturestxt file. This data set is divided into two as training and test subsets.
Training and test sets include and patterns, respectively.
You can benefit from "Human activity recognition with different artificial neural network based
classifiers" named conference paper in the
https:iecexploreieee.orgabstractdocument link to understand data set and
assignment better.
As a first step, load training and test data sets with similar codes to the following.
xtrain load humanactivityrecognitionusingsmartphonesUCI HAR
DatasettrainXtrain.txt;
Ytrain load humanactivityrecognitionusingsmartphonesUCI HAR
DatasettrainYtrain.txt;
Xtest loadhumanactivityrecognitionusingsmartphonesUCI HAR DatasettestXtest.txt;
Ytest load humanactivityrecognitionusingsmartphonesUCI HAR DatasettestYtest.txt;
Here, Y train and Y test variables include class labels from to You must transform
them into the one hot encoding scheme.
After that, you must generate a threelayer neural network, which takes features to the
first hidden layer consisting of neurons with hyperbolic tangent activation functions.
The second hidden layer of the neural network consists of neurons with rectified linear
unit activation functions. The output layer consists of neurons with either sigmoid or
softmax activation functions. Finally, cost function will be chosen either MSE or Cross
Entropy. To do these, you benefit from following codes.
hsize ;
hsize ; epochlimit ;
inputsize train,
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started