Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

We'll attempt to predict the type of physical activity (e.g., walking, climbing stairs) from tri-axial smartphone accelerometer data. Smartphone accelerometers are very precise, and different

We'll attempt to predict the type of physical activity (e.g., walking, climbing stairs) from tri-axial smartphone accelerometer data. Smartphone accelerometers are very precise, and different physical activities give rise to different patterns of acceleration.

Input Data

The input data used for training in this project consists of two files. The first file,train_time_series.csv, contains the raw accelerometer data, which has been collected using theBeiwe research platform, and it has the following format:

timestamp, UTC time, accuracy, x, y, z

You can use thetimestampcolumn as your time variable; you'll also need the last three columns, here labeledx,y, andz, which correspond to measurements of linear acceleration along each of the three orthogonal axes.

The second file,train_labels.csv, contains the activity labels, and you'll be using these labels to train your model. Different activities have been numbered with integers. We use the following encoding: 1 = standing, 2 = walking, 3 = stairs down, 4 = stairs up. Because the accelerometers are sampled at high frequency, the labels intrain_labels.csvare only provided for every 10th observation intrain_time_series.csv.

Activity Classification

Our goal is to classify different physical activities as accurately as possible. To test your code, you're also provided a file calledtest_time_series.csv, and at the end of the project you're asked to provide the activity labels predicted by your code for thistest data set. Note that in both cases, for training and testing, the input file consists of a single (3-dimensional) time series. To test the accuracy of your code, you'll be asked to upload your predictions as a CSV file. This file calledtest_labels.csvis provided to you, but it only contains the time stamps needed for prediction; you'll need to augment this file by adding the corresponding class predictions (1,2,3,4).

Code Run Time

In addition to providing the predictions, you're also asked to time the running time of your code, starting at the moment when you load in the test data set and ending at the moment you're done computing your predictions. You'll be asked to enter this running time, and the goal is to see how fast your code runs compared to the code of others.

Implement your solution usinga Jupyter notebook, you should code as clearly code as possible, include comments, and use meaningful variable names.

You can approach this problem any way you'd like. It may be beneficial to search the web for possible solutions, or you may try to solve this problem from scratch. We recommend that you build your code in stages, encapsulating different parts (tasks) of the problem into functions.

Files for Download

You will need to download these four files to finish the project:

otrain_labels.csv

otrain_time_series.csv

otest_labels.csv

otest_time_series.csv

Classification Accuracy

Enter thepredicted labels for the test setas alist of numbers seperated by a comma.For example, you could enter 1, 2, 3. Do not use brackets to enclose the numbers. If you do not give a prediction for each example in the test set (reminder: there are 125 instances in the test set), you will get an error message.

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

Modern Dental Assisting

Authors: Doni Bird, Debbie Robinson

13th Edition

978-0323624855, 0323624855

Students also viewed these Programming questions

Question

=+f. A British investor in the United States.

Answered: 1 week ago