Datasets:
Update README to reflect variable sequence lengths (3-1024)
Browse files
README.md
CHANGED
|
@@ -642,35 +642,35 @@ Each example contains the following fields:
|
|
| 642 |
|
| 643 |
```python
|
| 644 |
{
|
| 645 |
-
'input_sequence': "123 456 789 ...
|
| 646 |
'target': "234", # Result of composition as string
|
| 647 |
-
'sequence_length':
|
| 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:
|
| 655 |
|
| 656 |
### Working with Different Sequence Lengths
|
| 657 |
|
| 658 |
-
|
| 659 |
|
| 660 |
```python
|
| 661 |
# Load full dataset
|
| 662 |
dataset = load_dataset("BeeGass/Group-Theory-Collection", name="s5")
|
| 663 |
|
| 664 |
-
# Example:
|
| 665 |
-
|
| 666 |
-
|
|
|
|
| 667 |
|
| 668 |
-
#
|
| 669 |
-
|
| 670 |
-
|
| 671 |
-
|
| 672 |
-
|
| 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
|