Giter VIP home page Giter VIP logo

cds03gacdp's Introduction

GACDCourseProject

(Coursera) 03 Getting and Cleaning Data Course Project

All the variable are used camelCase notation for easy readability.

load all the libraries needed for running the script

All the data assumed to be under the "UCI HAR Dataset" folder The folder "UCI HAR Dataset" and this run_analysis script needs to be in same folder.

Loaded all the files which mentioned in the folder paths

Rename the variables in each test and train files before merging since the default values are V1, V2 etc and the activity and subject files are also having same coulmn names.

As a first step merged the train data with subject and activity data.

repeated the same with test data also.

 Merge the training and the test sets to create one data set as combined call cdata

Before extracting finding the column index for mean, standard deviation by grep then added the two column position which are subject and activity coulmns those are added manually so added +1 and +2 to factors file.

selected only the measurements on the mean and standard deviation for each measurement.

Finally selected only the mean and standard deviation columns along with activity and subject

 Extacted activity id as char and replaced with descriptive activity names

after replacing then attached to the data frame via cbind and dropped the activity id column from dataframe.

 drop the activity id column as it is not needed anymore

 Extract column names as vectors for maniuplating the names

 replace (, ), - from names

 Assigning back the column Names from char vector

 There must be a better way. like pattern matching to find and replace the variables in

a fine way

average of each variable for each activity and each subject and assigned to set2 data

write the output to a file to upload for project submission

cds03gacdp's People

Watchers

Ramraj Kasamsetty 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.