1/4/2024 0 Comments Hypnogram music![]() ![]() If so, the evaluation stuff could merge soon and then just get modified whenever the Hypnogram class happens. So again it probably comes down to whether you are okay with the n_stages implementation having a temporary presence. It's minimal, but still maybe less than ideal. That was almost the only reason I needed to modify a few existing functions (eg, sleep_statistics). Plus I was nervous that n_stages was starting to spread too far into the rest of the codebase anyways. So waiting to implement it wouldn't solve any work burden, but you might want to wait just to avoid having n_stages in a few new places only to be removed shortly after. Well I have it all working at this point (w/ the n_stages argument scattered in a few places). ![]() Also the EpochByEpoch evaluation class I'm working on for the same PR could eventually be switch to something like hypno.evaluate_against(hypno). This hypnogram class would be a great solution to that. Right now I've added n_stages as a keyword arg to a few functions, which I fear might confuse some users unfamiliar with wearables/actigraphy. It really puts hypnograms at the center of the package, which I think is appropriate since they are really what makes sleep analyses unique.Īfter I finish working on the evaluation classes in #78 this is going to be all the more important, because it introduces the concept of hypnograms with different numbers of possible stages. The class idea is a better solution to all these problems. The more consistent checks would allow for more explicit errors (though they'd probably become obsolete anyways). The str/int difference seems trivial, but in my experience it trips up a lot of new students, especially since YASA currently is not always explicit about the root of the error.I was thinking there should at least be a check_hypno() utility function. Checking hypnogram inputs for all the different functions entails lots of repeated code.I was thinking each function could have an automatic conversion section if necessary. Of course there are the conversion functions, but it seems like tracking that needn't be on the user. The difference in str/int hypnograms can be confusing, mostly because SleepStaging.predict() returns strings, and most other functions require ints.The class would also solve these issues I'd come across: Great idea!! I've also been thinking hypnograms could be handled better, but hadn't thought of making a hypnogram class. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |