Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F56482440
parametersSetup.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Mar 28, 13:58
Size
1 KB
Mime Type
text/x-c++
Expires
Sat, Mar 30, 13:58 (2 d)
Engine
blob
Format
Raw Data
Handle
16722860
Attached To
R12022 Data processing for reproducible ML results for epilepsy
parametersSetup.py
View Options
''' file with all parameters'''
import
numpy
as
np
import
pickle
Dataset
=
'01_CHBMIT'
#'01_CHBMIT', '01_iEEG_Bern'
patients
=
[
'01'
,
'02'
,
'03'
,
'04'
,
'05'
,
'06'
,
'07'
,
'08'
,
'09'
,
'10'
,
'11'
,
'12'
,
'13'
,
'14'
,
'15'
,
'16'
]
class
DatasetPreprocessParams
:
samplFreq
=
256
# sampling frequency of data
#channels to keep
channelNamesToKeep
=
[
'FP1-F7'
,
'F7-T7'
,
'T7-P7'
,
'P7-O1'
,
'FP1-F3'
,
'F3-C3'
,
'C3-P3'
,
'P3-O1'
,
'FP2-F4'
,
'F4-C4'
,
'C4-P4'
,
'P4-O2'
,
'FP2-F8'
,
'F8-T8'
,
'T8-P8'
,
'P8-O2'
,
'FZ-CZ'
,
'CZ-PZ'
]
#pre and post ictal data to be removed
PreIctalTimeToRemove
=
60
#in seconds
PostIctalTimeToRemove
=
600
#in seconds
#how to select and rearange data in files before feature extraction and training
FileRearangeAllData
=
'SubselData_NonSeizRandom'
#'AllData_FixedSize','AllData_StoS', 'SubselData_NonSeizAroundSeiz', 'SubselData_NonSeizRandom'
FileLen
=
60
#60, 240 in minutes - only for AllData_FixedSize needed
RatioNonSeizSeiz
=
1
#1, 10 - only for SubselData needed
#filtering parameters
BorderFreqLow
=
1
#Hz for the bandpass butterworth filter
BorderFreqHigh
=
30
#Hz for the bandpass butterworth filter
#saving type
SaveType
=
'gzip'
#'csv, 'gzip'' #gzip saves a lot of memory so is recommended
class
FeaturesUsedParams
:
#window size and step in which is moved
winLen
=
4
#in seconds, window length on which to calculate features
winStep
=
0.5
#in seconds, step of moving window length
#when we have more labels in one window, how final label is chosen
LabelVotingType
=
'atLeastOne'
#'majority', 'allOne', 'atLeastOne'
#features extracted from data
featNames
=
np
.
array
(
[
'MeanAmpl'
,
'LineLength'
])
#SAVING SETUP once again to update if new info
with
open
(
'../PARAMETERS.pickle'
,
'wb'
)
as
f
:
pickle
.
dump
([
DatasetPreprocessParams
,
FeaturesUsedParams
,
patients
],
f
)
Event Timeline
Log In to Comment