CoVital-Project / Spo2_evaluation

Python script to evaluation the correctness of SpO2 estimation algorithms
18 stars 6 forks source link

change number of videos in dataset class #30

Open YoniSchirris opened 4 years ago

YoniSchirris commented 4 years ago

self.number_of_videos = self.sample_data['sample_id'].max()

gives number_of_videos-1

instead, use len(sample_data.index) as given in here

MalcolmMielle commented 4 years ago

Len gives the length of the column right? Since there are multiple lines (one per frame) for each sample number, what we want is the maximum number in the column 'sample_id' hence max(). Maybe add 1 since it's the index and it starts at 0 instead of one. Thus

self.number_of_videos = self.sample_data['sample_id'].max() + 1

YoniSchirris commented 4 years ago

len(self.meta.index) works. but max+1 could also be used

MalcolmMielle commented 4 years ago

Either work :)