{"id":29451183,"url":"https://github.com/plasmacontrol/tearingmodesurvival","last_synced_at":"2025-07-13T21:10:45.756Z","repository":{"id":303425242,"uuid":"884340158","full_name":"PlasmaControl/TearingModeSurvival","owner":"PlasmaControl","description":"Predict n=1 Tearing Mode onset on DIII-D using the auton-survival algorithm","archived":false,"fork":false,"pushed_at":"2025-07-07T14:30:35.000Z","size":7070,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-07-07T15:40:40.245Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PlasmaControl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-06T15:18:39.000Z","updated_at":"2025-07-07T14:30:39.000Z","dependencies_parsed_at":"2025-07-07T15:53:01.809Z","dependency_job_id":null,"html_url":"https://github.com/PlasmaControl/TearingModeSurvival","commit_stats":null,"previous_names":["plasmacontrol/tearingmodesurvival"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PlasmaControl/TearingModeSurvival","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PlasmaControl%2FTearingModeSurvival","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PlasmaControl%2FTearingModeSurvival/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PlasmaControl%2FTearingModeSurvival/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PlasmaControl%2FTearingModeSurvival/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PlasmaControl","download_url":"https://codeload.github.com/PlasmaControl/TearingModeSurvival/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PlasmaControl%2FTearingModeSurvival/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265205785,"owners_count":23727514,"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","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":[],"created_at":"2025-07-13T21:10:43.163Z","updated_at":"2025-07-13T21:10:45.741Z","avatar_url":"https://github.com/PlasmaControl.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TearingModeSurvival\nA tearing mode prediction model based on the auton-survival deep survival machine. Further details on results using this repository can be found in our publication **Interpreting AI for Fusion: an application to Plasma Profile Analysis for Tearing Mode Stability**: https://arxiv.org/abs/2502.20294\n\nFor simply trying out the model:\n- The models, data and configs are located in the Princeton University clusters such as stellar, in /projects/EKOLEMEN/survival_tm_2/ in folders of their name\n- Use tm_model_simple_analysis.ipynb for trying out predictions on any shot in the database\n\nFor more advanced use, the repository includes the following features:\n1) Creating and formatting the database from the data-fetching repo\n2) Training the model\n3) Basic model analysis and inference\n4) Shap analysis\n\n**Creating the database**\n\nUse data_processing_main.ipynb to create a DSM-compatible database from TM event labels and plasma data. The data is extracted from DIII-D using the PlasmaControl/data-fetching repository, and the tearing mode event labels are created using the criteria outlined in the publication. \n\n**Training the model**\n- For a simple model training, run train_tm_model.py editing model.cfg to use the desired training databases and hyperparameters. \n- For running a batch script on the Princeton Stellar and Della clusters, use launch_survival_training.py, which will automatically submit a batch job using train_tm_model.py. \n- For hyperparameter tuning using ray tube, run hyperparameter_tuner.py or launch_hyperparameter_tuning.py for the batch submission. These will read from hyperparam_model.cfg\n\n**Basic model analysis**\n\nUse tm_model_simple_analysis.ipynb for analysing training progress, tearing mode predictions and creating ROC curves.\n\n**Shap analysis**\n\nUse shap_analysis.ipynb to run shapley analysis of the tearing mode prediction model. This script includes individual profile analysis as well as database-wise scans using beeswarm plots. \n\n**Data Availability**\n\nThe dataset used in the publication cited above is available at: https://doi.org/10.17605/OSF.IO/3C7AY\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplasmacontrol%2Ftearingmodesurvival","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplasmacontrol%2Ftearingmodesurvival","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplasmacontrol%2Ftearingmodesurvival/lists"}