ds.info.update(source = 'https://www.kaggle.com/malekzadeh/motionsense-dataset',
notes = 'This is a small subset of the data in the source link')
#Create tensors. Setting chunk_compression is optional and it defaults to None
ds.create_tensor('acceleration_x', chunk_compression = 'lz4')
ds.create_tensor('acceleration_y', chunk_compression = 'lz4')
# Save the sampling rate as tensor metadata. Alternatively,
# you could also create a 'time' tensor.
ds.acceleration_x.info.update(sampling_rate_s = 0.1)
ds.acceleration_y.info.update(sampling_rate_s = 0.1)
# Encode activity as text
ds.create_tensor('activity', htype = 'text')
# Encode 'activity' as numeric labels and convert to text via class_names
# ds.create_tensor('activity', htype = 'class_label', class_names = ['xyz'])
ds.create_group('subjects_info')
ds.subjects_info.create_tensor('age')
ds.subjects_info.create_tensor('weight')
ds.subjects_info.create_tensor('height')
# Save the units of weight as tensor metadata
ds.subjects_info.weight.info.update(units = 'kg')
ds.subjects_info.height.info.update(units = 'cm')