{"id":18508846,"url":"https://github.com/hfawaz/bigdata18","last_synced_at":"2025-08-24T05:06:27.489Z","repository":{"id":40669147,"uuid":"153424915","full_name":"hfawaz/bigdata18","owner":"hfawaz","description":"Transfer learning for time series classification","archived":false,"fork":false,"pushed_at":"2019-06-06T07:56:20.000Z","size":3742,"stargazers_count":379,"open_issues_count":5,"forks_count":68,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-05-19T17:14:52.357Z","etag":null,"topics":["deep-learning","deep-neural-networks","dtw","dynamic-time-warping","research-paper","time-series-analysis","time-series-classification","transfer-learning"],"latest_commit_sha":null,"homepage":"http://germain-forestier.info/src/bigdata2018/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hfawaz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-17T08:45:50.000Z","updated_at":"2025-03-06T03:34:34.000Z","dependencies_parsed_at":"2022-08-25T05:21:19.812Z","dependency_job_id":null,"html_url":"https://github.com/hfawaz/bigdata18","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hfawaz/bigdata18","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hfawaz%2Fbigdata18","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hfawaz%2Fbigdata18/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hfawaz%2Fbigdata18/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hfawaz%2Fbigdata18/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hfawaz","download_url":"https://codeload.github.com/hfawaz/bigdata18/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hfawaz%2Fbigdata18/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271795298,"owners_count":24822693,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-24T02:00:11.135Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","deep-neural-networks","dtw","dynamic-time-warping","research-paper","time-series-analysis","time-series-classification","transfer-learning"],"created_at":"2024-11-06T15:15:36.194Z","updated_at":"2025-08-24T05:06:27.444Z","avatar_url":"https://github.com/hfawaz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Transfer learning for time series classification\nThis is the companion repository for [our paper](https://ieeexplore.ieee.org/document/8621990) titled \"Transfer learning for time series classification\" accepted as a regular paper at [IEEE International Conference on Big Data 2018](http://cci.drexel.edu/bigdata/bigdata2018/index.html) also available on [ArXiv](https://arxiv.org/abs/1811.01533). \n\n## Architecture\n![architecture fcn](https://github.com/hfawaz/bigdata18/blob/master/png/fcn-archi.png)\n\n## Source code\nThe software is developed using Python 3.5. We trained the models on a cluster of more than 60 GPUs. You will need the [UCR archive](https://www.cs.ucr.edu/~eamonn/time_series_data/) to re-run the experiments of the paper. \n\nIf you encouter problems with cython, you can re-generate the \"c\" files using the [build-cython.sh](https://github.com/hfawaz/bigdata18/blob/master/utils/build-cython.sh) script. \n\nTo train the network from scratch launch: ```python3 main.py train_fcn_scratch```\n\nTo apply the transfer learning between each pair of datasets launch: ```python3 main.py transfer_learning```\n\nTo visualize the figures in the paper launch: ```python3 main.py visualize_transfer_learning```\n\nTo generate the inter-datasets similariy matrix launch: ```python3 main.py compare_datasets```\n\n### Pre-trained and fine-tuned models\nYou can download from the companion [web page](http://germain-forestier.info/src/bigdata2018/) all pre-trained and fine-tuned models you would need to re-produce the experiments. \nFeel free to fine-tune on your own datasets !!! \n\n## Prerequisites\nAll python packages needed are listed in [pip-requirements.txt](https://github.com/hfawaz/bigdata18/blob/master/utils/pip-requirements.txt) file and can be installed simply using the pip command. \n\n* [numpy](http://www.numpy.org/)  \n* [pandas](https://pandas.pydata.org/)  \n* [sklearn](http://scikit-learn.org/stable/)  \n* [scipy](https://www.scipy.org/)  \n* [matplotlib](https://matplotlib.org/)  \n* [tensorflow-gpu](https://www.tensorflow.org/)  \n* [keras](https://keras.io/)  \n* [h5py](http://docs.h5py.org/en/latest/build.html)\n* [cython](https://cython.org/)\n\n## Results\nYou can download [here](https://github.com/hfawaz/bigdata18/blob/master/results/df_transfer.csv) the accuracy variation matrix which corresponds to the raw results of the transfer matrix in the paper.\n\nYou can download [here](https://github.com/hfawaz/bigdata18/blob/master/results/df_transfer_acc.csv) the raw results for the accuracy matrix instead of the variation.\n\nYou can download [here](https://github.com/hfawaz/bigdata18/blob/master/results/similar_datasets.csv) the result of the applying nearest neighbor algorithm on the inter-datasets similarity matrix. You will find for each dataset in the archive, the 84 most similar datasets.\nThe steps for computing the similarity matrix are presented in Algorithm 1 in our paper.\n\n### Accuracy variation matrix\n![acc-matrix](https://github.com/hfawaz/bigdata18/blob/master/png/acc-matrix.png)\n### Generalization with and without the transfer learning\n50words - FISH              |  FordA - wafer | Adiac - ShapesAll\n:-------------------------:|:-------------------------:|:-------------------------:\n![plot-50words-fish](https://github.com/hfawaz/bigdata18/blob/master/png/50words-fish.png)  |  ![plot-forda-wafer](https://github.com/hfawaz/bigdata18/blob/master/png/forda-wafer.png) | ![plot-adiac-shapesall](https://github.com/hfawaz/bigdata18/blob/master/png/adiac-shapesall.png)\n### Model's accuracy with respect to the source dataset's similarity\nHerring              |  BeetleFly | WormsTwoClass\n:-------------------------:|:-------------------------:|:-------------------------:\n![herring](https://github.com/hfawaz/bigdata18/blob/master/png/herring.png)  |  ![beetlefly](https://github.com/hfawaz/bigdata18/blob/master/png/beetlefly.png) | ![wormstwoclass](https://github.com/hfawaz/bigdata18/blob/master/png/wormstwoclass.png)\n\n## Reference\n\nIf you re-use this work, please cite:\n\n```\n@InProceedings{IsmailFawaz2018transfer,\n  Title                    = {Transfer learning for time series classification},\n  Author                   = {Ismail Fawaz, Hassan and Forestier, Germain and Weber, Jonathan and Idoumghar, Lhassane and Muller, Pierre-Alain},\n  booktitle                = {IEEE International Conference on Big Data},\n  pages                    = {1367-1376}, \n  Year                     = {2018}\n}\n```\n\n## Acknowledgement\n\nThe  authors  would  like  to  thank  NVIDIA  Corporation  for the GPU Grant and the Mésocentre of Strasbourg for providing access to the GPU cluster.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhfawaz%2Fbigdata18","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhfawaz%2Fbigdata18","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhfawaz%2Fbigdata18/lists"}