BeeGass commited on
Commit
d9f94fa
·
verified ·
1 Parent(s): efa2214

Update README to reflect variable sequence lengths (3-1024)

Browse files
Files changed (1) hide show
  1. README.md +13 -13
README.md CHANGED
@@ -642,35 +642,35 @@ Each example contains the following fields:
642
 
643
  ```python
644
  {
645
- 'input_sequence': "123 456 789 ... (1024 IDs)", # Space-separated permutation IDs (fixed length 1024)
646
  'target': "234", # Result of composition as string
647
- 'sequence_length': 1024, # Always 1024 (fixed length sequences)
648
  'group_degree': 7, # Degree of the permutation group (e.g., S7 acts on 7 elements)
649
  'group_order': 5040, # Order (size) of the group (e.g., |S7| = 7!)
650
  'group_type': "symmetric" # Type of the group
651
  }
652
  ```
653
 
654
- Note: All sequences contain exactly 1024 permutation IDs. The provided target is the composition of all 1024 permutations. Researchers who need shorter sequences can take a subset of the permutation IDs and recompute the composition target for that subset.
655
 
656
  ### Working with Different Sequence Lengths
657
 
658
- To work with sequences shorter than 1024, take a subset of permutation IDs and compute their composition:
659
 
660
  ```python
661
  # Load full dataset
662
  dataset = load_dataset("BeeGass/Group-Theory-Collection", name="s5")
663
 
664
- # Example: Work with sequences of length 32
665
- example = dataset['train'][0]
666
- all_ids = example['input_sequence'].split() # All 1024 permutation IDs
 
667
 
668
- # Take first 32 permutation IDs
669
- subset_ids = all_ids[:32]
670
-
671
- # You would need to recompute the target for this subset
672
- # The new target would be the composition of these 32 permutations
673
- # (Implementation depends on your permutation representation)
674
  ```
675
 
676
  ## Group Inventory
 
642
 
643
  ```python
644
  {
645
+ 'input_sequence': "123 456 789 ...", # Space-separated permutation IDs (variable length)
646
  'target': "234", # Result of composition as string
647
+ 'sequence_length': 512, # Length of input sequence (varies from 3 to 1024)
648
  'group_degree': 7, # Degree of the permutation group (e.g., S7 acts on 7 elements)
649
  'group_order': 5040, # Order (size) of the group (e.g., |S7| = 7!)
650
  'group_type': "symmetric" # Type of the group
651
  }
652
  ```
653
 
654
+ Note: Sequences contain a variable number of permutation IDs (uniformly distributed between 3 and 1024). The provided target is the composition of all permutations in the input sequence.
655
 
656
  ### Working with Different Sequence Lengths
657
 
658
+ The dataset already contains sequences of varying lengths (3 to 1024). You can filter or analyze based on sequence length:
659
 
660
  ```python
661
  # Load full dataset
662
  dataset = load_dataset("BeeGass/Group-Theory-Collection", name="s5")
663
 
664
+ # Example: Filter for specific sequence lengths
665
+ short_sequences = dataset['train'].filter(lambda x: x['sequence_length'] <= 32)
666
+ medium_sequences = dataset['train'].filter(lambda x: 32 < x['sequence_length'] <= 256)
667
+ long_sequences = dataset['train'].filter(lambda x: x['sequence_length'] > 256)
668
 
669
+ # Analyze sequence length distribution
670
+ import numpy as np
671
+ lengths = np.array(dataset['train']['sequence_length'])
672
+ print(f"Min length: {lengths.min()}, Max length: {lengths.max()}")
673
+ print(f"Mean length: {lengths.mean():.1f}, Std: {lengths.std():.1f}")
 
674
  ```
675
 
676
  ## Group Inventory