Closed weapeul closed 4 years ago
MATLAB gets used in the calculation of the circadian (clock) proxy, and it used to be involved in the calculation of activity counts, but I replaced that with Python.
I’m going to do a refactor that makes it easier to run without Matlab (you can approximate the circadian part with a cosine function). Will get to it in the next week or so👍
On Oct 29, 2019, at 1:53 AM, chcho2636 notifications@github.com wrote:
I ran preprocessing_runner.py But an error occurred. The error message says that there is no MATLAB_R2019a. Do I need to install MATLAB? The comment says that the MATLAB code is replaced with Python code.
sh: 1: /Applications/MATLAB_R2019a.app/bin/matlab: not found sh: 1: /Applications/MATLAB_R2019a.app/bin/matlab: not found Traceback (most recent call last): File "preprocessing_runner.py", line 31, in
run_preprocessing(subject_ids) File "preprocessing_runner.py", line 24, in run_preprocessing FeatureBuilder.build(str(subject)) File "/home/wapeul/sleepstage/sleep_classifiers/source/preprocessing/feature_builder.py", line 21, in build FeatureBuilder.build_from_time(subject_id, valid_epochs) File "/home/wapeul/sleepstage/sleep_classifiers/source/preprocessing/feature_builder.py", line 43, in build_from_time TimeBasedFeatureService.write_circadian_model(subject_id, circadian_feature) File "/home/wapeul/sleepstage/sleep_classifiers/source/preprocessing/time/time_based_feature_service.py", line 37, in write_circadian_model np.savetxt(feature_path, feature, fmt='%f') File "/home/wapeul/anaconda3/lib/python3.7/site-packages/numpy/lib/npyio.py", line 1377, in savetxt "Expected 1D or 2D array, got %dD array instead" % X.ndim) ValueError: Expected 1D or 2D array, got 0D array instead — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
I also ran preprocessing_runner.py But an error also occurred.== for this part # ActivityCountService.build_activity_counts() The error message says that The system cannot find the path specified. Do you know the reason for this error?
Thanks!!!
That error is caused because the path in the code is for MATLAB on my computer; if you have MATLAB and want to use it, you'll want to replace that with your actual MATLAB location.
I've edited the code so the default version of preprocessing_runner.py does not require MATLAB (i.e. I've commented out the parts that use MATLAB but they can be added back in). This means it uses cosine by default instead of the full circadian clock model as the "clock proxy" term; you can use the circadian model by uncommenting those lines or accessing the simulation results on Physionet. More details about this are in the paper linked in the README.
On Tue, Dec 17, 2019 at 11:02 AM Sylvie-sql notifications@github.com wrote:
I also ran preprocessing_runner.py But an error also occurred.== for this part # ActivityCountService.build_activity_counts() The error message says that The system cannot find the path specified. Do you know the reason for this error?
Thanks!!!
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ojwalch/sleep_classifiers/issues/1?email_source=notifications&email_token=AB6WIZOYBURVFIZNCVDLVVLQZDZZRA5CNFSM4JGD2LAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHC4ODY#issuecomment-566609679, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB6WIZMU52D7TE6CFEYGX4LQZDZZRANCNFSM4JGD2LAA .
I ran preprocessing_runner.py But an error occurred. The error message says that there is no MATLAB_R2019a. Do I need to install MATLAB? The comment says that the MATLAB code is replaced with Python code. I use Ubuntu 18.04 and Python 3.7.3.
sh: 1: /Applications/MATLAB_R2019a.app/bin/matlab: not found sh: 1: /Applications/MATLAB_R2019a.app/bin/matlab: not found Traceback (most recent call last): File "preprocessing_runner.py", line 31, in <module> run_preprocessing(subject_ids) File "preprocessing_runner.py", line 24, in run_preprocessing FeatureBuilder.build(str(subject)) File "/home/wapeul/sleepstage/sleep_classifiers/source/preprocessing/feature_builder.py", line 21, in build FeatureBuilder.build_from_time(subject_id, valid_epochs) File "/home/wapeul/sleepstage/sleep_classifiers/source/preprocessing/feature_builder.py", line 43, in build_from_time TimeBasedFeatureService.write_circadian_model(subject_id, circadian_feature) File "/home/wapeul/sleepstage/sleep_classifiers/source/preprocessing/time/time_based_feature_service.py", line 37, in write_circadian_model np.savetxt(feature_path, feature, fmt='%f') File "/home/wapeul/anaconda3/lib/python3.7/site-packages/numpy/lib/npyio.py", line 1377, in savetxt "Expected 1D or 2D array, got %dD array instead" % X.ndim) ValueError: Expected 1D or 2D array, got 0D array instead