https://github.com/rupav/fitbit
My Machine Learning First Project on Github
https://github.com/rupav/fitbit
beginner decision-tree-classifier random-forest-classifier sklearn
Last synced: 2 months ago
JSON representation
My Machine Learning First Project on Github
- Host: GitHub
- URL: https://github.com/rupav/fitbit
- Owner: rupav
- Created: 2017-06-15T12:10:43.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-15T12:32:27.000Z (about 9 years ago)
- Last Synced: 2025-06-01T00:03:44.378Z (about 1 year ago)
- Topics: beginner, decision-tree-classifier, random-forest-classifier, sklearn
- Language: Python
- Homepage:
- Size: 2.83 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FITBIT
The goal of this project is to use data from various accelerometers to tell if they perform barbell lifts correctly or incorrectly (5 different ways).
given dataset is in a csv file, so made into a data frame using pandas.read_csv(' ')
df.shape is found to be (19622,159)
out of 100 features have araound 19000 values missing i.e. nan, so they are dropped using df.dropna(axis = 1,inplace = True)
'username' and 'unnamed: 0' columns too were dropped because of their insignificance in testing data
next we have used df.describe(include=['O']) for object type data only 3 columns came out of object type, 'classe','new_window' and 'cvtd_timestamp' .
classe is mapped to int type using preprocessing.LabelEncode().fit_transform
final shape after cleaning data is (19622, 53)
RandomForestClassifier under sklearn.ensemble and DecisionTreeClassifier under sklearn.tree were imported for tranforming dataa into a graph
for score, k-fold cross-validation is udes, with k/cv = 10 for both classifiers
Conclusion: RandomForestClassifier was found better than DecisionTreeClassifier.