Somnology/YASA
[YASA] Data loading and preprocessing (Hypnogram) (2)
goatlab
2022. 4. 25. 09:24
728x90
반응형
SMALL
수면곡선 (Hypnogram)
이 예제 밤에 대한 수면 병기 (수면곡선)는 미국 수면 의학 아카데미 (AASM)의 표준 규칙에 따라 숙련된 기술자에 의해 수행되었다. 출력은 csv 파일에 저장되며 각 행은 30초 분량의 데이터를 나타낸다. 단계는 0 = Wake, 1 = N1 sleep, 2 = N2 sleep, 3 = N3 sleep 및 4 = REM sleep과 같은 정수로 매핑된다. pandas.read_csv() 함수를 사용하여 이 파일을 로드할 수 있다.
>>> import pandas as pd
>>> hypno = pd.read_csv("yasa_example_night_young_hypno.csv", squeeze=True)
>>> hypno
0 0
1 0
2 0
3 0
4 0
..
959 2
960 2
961 2
962 2
963 0
Name: Stage, Length: 964, dtype: int64
| 수면 단계가 없는 경우 YASA를 사용하여 자동으로 수면 단계를 감지할 수 있다. |
yasa.plot_hypnogram() 함수를 사용하여 최면 그래프를 그릴 수 있다.
>>> import yasa
>>> yasa.plot_hypnogram(hypno);

https://raphaelvallat.com/yasa/build/html/quickstart.html
Quickstart — yasa 0.6.1 documentation
This is an introduction to YASA, geared mainly for new users. However, you’ll need to know a bit of Python, and especially scientific libraries such as NumPy and Pandas. This tutorial also assumes that you are familiar with basic sleep research and metho
raphaelvallat.com
728x90
반응형
LIST