Coder Social home page Coder Social logo

gacd-activity-recognition-using-smartphones's Introduction

GACD-Activity-Recognition-Using-Smartphones

an exercise using R to create tidy data

#The R script called "run_analysis.R" executes the following steps: Test data are run through the scripted commands first, then training data.

  1. Reads activity labels from "activity_labels.txt".

  2. Reads column names from "features.txt". Reads the data (x, y and subject). For test data: from 'test/X_test.txt', 'test/y_test.txt', "test/subject_test.txt". For training data: from 'train/X_train.txt', 'train/y_train.txt', "train/subject_train.txt".

  3. For the test and training data: Identifies data to subset out from features: Extract_features gets only column names containing "mean" or "std"

  4. Uses "features.txt" to supply column names for the test and training datasets

  5. Adds a new column "activity_label" next to activity IDs in the test and training datasets, then populates the column with the labels from "activity_labels.txt".

  6. Pulls all test data together, column-wise, and puts "subject" into first column.

  7. Adds new columns "subject", "activity_id", "activity_label" into the test and training datasets.

  8. Merges test and training data.

  9. Melts data so that each subject has one line of data.

  10. Stores tidy_data in plain text file called "tidy_data.txt".

gacd-activity-recognition-using-smartphones's People

Contributors

suzbert avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.