# Part III project George Langley
###### tags: `aeon-part-III`
__Contributor:__ George Langley (gl4g22) <gl4g22@soton.ac.uk>
__Project:__ Classifying the presence of a limp in Time Series data produced by feet mounted sensors
__Project length:__ Two semesters
__Supervisors:__ Tony Bagnall, Matthew Middlehurst
__Start date:__ Monday, September 23rd
__End date:__ Tuesday, April 29th
__Regular meeting time:__ Thursday @ 11:30am, Teams (Until 27th March)
__[Detailed Project Guidelines](https://secure.ecs.soton.ac.uk/notes/comp3200/proj_2425/guide.html)__
__[Overleaf - Report (Updated)](https://www.overleaf.com/project/677d59ce48042ce249e4a990)__
__[Gantt Chart(s)](https://lucid.app/lucidspark/03893e57-7a8d-43a4-b719-fd6a007d4529/edit?viewport_loc=459%2C1364%2C3220%2C1547%2C0_0&invitationId=inv_a897cb97-e564-4d94-a554-f2be5d5d1dc3)__
__[Git repo](https://github.com/georgejl7/comp3200-witmotion-classification)__
## Project Summary
## Project Timeline
~~__[Agreed Project Brief](https://secure.ecs.soton.ac.uk/notes/comp3200/proj_2425/guide.html#Agreed_Project_Brief)__ - Friday, October 11th~~
~~__[Progress Report](https://secure.ecs.soton.ac.uk/notes/comp3200/proj_2425/guide.html#Progress_Report)__ - Tuesday, December 10th~~
- Contributes 10% of final assessment
- Marked solely by project supervisor
- Content of progress report may be reused in final report
__[Final Project Report](https://secure.ecs.soton.ac.uk/notes/comp3200/proj_2425/guide.html#Final_Report)__ - Tuesday, April 29th
- Body of the report cannot exceed 10,000 words
__[Project Viva](https://secure.ecs.soton.ac.uk/notes/comp3200/proj_2425/guide.html#Viva)__ - Between final deadline and semester 2 exams, on one of two specified viva days
- Meeting with both supervisor and second examiner
- Oppurtunity to demonstrate the project and knowledge
- Questioning led by the second examiner
## Getting started tasks
- [x] Go through the contributor guide on the _aeon_ website (https://www.aeon-toolkit.org/en/stable/contributing.html).
- [x] Set up a development environment, including _pytest_ and _pre-commit_ dependencies. This will make development a lot easier for you, as you must pass the PR tests to have your code merged (https://www.aeon-toolkit.org/en/stable/developer_guide/dev_installation.html).
- [x] Review some of the important dependencies for developing aeon at a basic level:
- [x] __scikit-learn__ the interface aeon estimators extend from. We aim to keep as compatile as possible with sklearn tools.
- [x] __pytest__ for unit testing. Any code added will have to be covered by tests.
- [x] __sphinx/myst__ for documentation. Adding new functions and classes will have to be added to the API docs.
- [x] __numba__ for writing efficient functions.
- [x] Make a basic Pull Request (PR) to gain some experience with contributing to _aeon_ through GitHub.
- [x] Add the project time line objects to this document.
# Progress
## Monday 30/9/24 11:30 am
Work on foot project, exact nature tbc
Papers of interest
1. Time series classification
https://link.springer.com/article/10.1007/s10618-024-01022-1
2. Time series regression
https://link.springer.com/article/10.1007/s10618-024-01027-w
**to do Tony:**
1. Contact Luidi, set up details
2. Agree more specific objectives
3. Send links to papers
**to do George**
1. Set up on aeon as above, make PR
2. Read papers sent by Tony
### Tues 8/10/24
Hand over IMU devices, agree overall strategy
1. Figure out devices, get data from them
2. Formulate a limp/no limp dataset
3. Evaluate simple summary and created features
4. Evaluate time series classifiers
### Thurs 10/10/24
Project objectives:
1. Set up overleaf document
2. Get familiar with motion devices
3. Work out how to get data off them
Progress made (George):
- Made simple PR on aeon
- Downloaded software from WITMOTION to read data from devices
- Connected devices to laptop
- Live view of both devices' data
- Understanding of how to start recording the data
- Data can be easily exported into csv format
- Choice of one or both devices' data going into one file
- Figured out how to:
- Turn on/off devices
- Pair them to app
- Charge devices
- Written device name on each device to avoid confusion
### Fri 11/10/24
Progress made G:
- Started to make Gantt chart for project (at least until progress report hand-in)
- Created git repo which will contain code for retrieving/cleaning data from devices
- Came up with more helpful naming convention of raw data files, to avoid confusion
- Hard coded system to get raw data from two files into correct numpy format - need to generalise
### Sat 12/10
Progress:
- Developed system to be more general
- Added ways to automatically find raw data files (specific to experiment with two devices)
- Match up raw data files and combine the data into one csv file, with only the headers we choose
### Sun 13/10
Progress:
- Continued working on automatic finding and combining of raw data files
- Still need to generalise the system with other helper functions, which have other usages
### Mon 14/10
Progress:
- Started to build reading list for papers to formulate literature review
## Meeting 17/10
progress is good, discussed API for devices, lit review and next stages
1. Create a private github repo and share
2. Work on pipeline of device to classification
3. Lit review example application
https://ecml-aaltd.github.io/aaltd2024/articles/Aderinola_AALTD24.pdf
### Tues 22/10
Progress:
- Continued finding more papers for lit review
- Wrote out (not final) plan for each paragraph for the lit review
- Finished Gantt chart highlighting rough plan of work to be done this semester
### Weds 23/10
Progress:
- Added better comments to code
- Code should be ready to make a start on tryingto classify
## Meeting 24/10/24
working towards lit review, will share the github
### Fri 25/10
- Found some more references
- Made a start writing lit review
### Mon 28/10
- Continued working on lit review
### Tues 29/10
- Found more references for lit review
### Weds 30/10
- Generated 6 examples of walking: 3 with and 3 wihtout a limp
- Processed the raw data into a dataset, ready to be used with aeon classifiers
- Detailed steps of process are in 'log.md' in git repo
- Used aeon.registry to get a list of classifiers to try (multivariate + uneq length)
### Thurs 31/10
- Tried Catch22Classifier - results are in 'log.md'
### Thurs 07/11
- Updated data pipeline to export data to .ts file format
### Fri 08/11
- Continued working on pipeline, fixed some errors
- Continued working on lit review - focus on HAR in health paragraph
### Sun 10/11
- More work on lit review
### Mon 11/11
- Lit review
- Tidied up system for getting raw data into time series file format
- Started adding performance metrics to classification.py
- Added code to generate confusion matrix of prediction
### Fri 15/11
- Generated some visualisations of limp vs no limp
- Identified some outliers in the code (most observations \[-2g, 2g\], some are \~3,\~4 even \~10g)
### Mon 18/11
- Lit review
- Added cross validation code
### Thurs 21/11
- Add option to segment series
### Fri 22/11 to Weds 27/11
- Progress report/ lit review writing
### Thurs 28/11
- Finish writing lit review
- Interpolate outliers (simple linear interpolation)
- outliers are outside of range -3g to 3g
## Meeting Thurs 23/11
- Plan next steps with first experiment
- Keep as simple as possible and assess performance
### Mon 27/01
- Copy relevant progress report sections into new project report structure, overleaf link updated
### Tues 28/01
- 6 walking samples (3 limp, 3 non-limp) in simple example:
- limp in same foot, walking in same loop in same direction etc.
### Friday 31/01
- Cross validation code:
- keep 'walks' separate
- train classifier on 1 limp and 1 non-limp walk (segmented)
- predict examples from other 4 walks (segmented)
- calculate average accuracy (and balanced accuracy)
- Rocket classifier
- acc: 1.0
- balanced acc: 1.0
- Multirocket classifier
- acc: 0.9991
- balanced acc: 0.999
## Meeting Thurs 06/02
- standard features classifier to examine why it could be classified
- each experiment motivates the next
- report
- combine background and design into a chapter
- separate experiments into chapters where appropriate
- reference to paper(s) about mechanics of a foot in a limp as motivation
- could include video of limp/ videos to demonstrate
## Meeting Thurs 13/02
- Video of limp/no limp alongside data to demonstrate visually separable
- Research and try simulating 'duck waddle' for next iteration
- Write up left leg vs right leg accuracy
## Meeting Thurs 27/02
- Next experiment details
- normal gait, duck waddle, and characterising features for moderate RA: shorter steps, slower walking speed etc. (asp per GPT)
- framed as 2 binary class problems:
- normal vs moderate
- moderate vs severe (duck waddle)
### Tues 04/03
- generate data for experiment 2
- normal vs short-stride
- short-stride vs duck-waddle
- 2 examples each class
- each 15 minutes
### Mon / Tues
- try classifying with ROCKET, MultiROCKET, Summary
- results in log.md
## Meeting thurs 13/03
- write up of results
- try simple feature with threshold if possible
### Friday 14/03 - friday 21/03
- write up results for both parts of experiment
- generate box plots and visualisations for report
- calculate threshold for percentile value to use as feature
### Mon 24/03 - Fri 28/03
- continue write up of results
- write conclusion and next steps
### Mon 31/03 - Fri 04/04
- write up design section
### Mon 07/04 - Fri 11/04
- add more to introduction - sop + project desc
- commercial fall detection review in lit review
### Mon 14/04 - Fri 18/04
- rewrite exps 1 and 2 with feedback
### Mon 21/04 - Fri 25/04
- evaluation + conclusion
- abstract
- proof reading
- checking references etc.
### Mon 28/04
- tidy up code a bit, get all stuff for 'design archive' ready
- add risk assessment, gantt charts, statemeont of originality, project brief
### Tues 29/04
- zip design archive
- generate final pdf
- take body out of pdf for plaigarism check
- hand in