or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

bijectors.mdcontinuous-distributions.mddiscrete-distributions.mdindex.mdmixture-composite.mdspecialized-distributions.mdutilities.md

mixture-composite.mddocs/

0

# Mixture and Composite Distributions

1

2

Complex distributions created by combining simpler components, including mixture models, transformed distributions, and joint distributions for multi-component modeling.

3

4

## Capabilities

5

6

### Transformed Distribution

7

8

Distribution transformed by a bijector.

9

10

```python { .api }

11

class Transformed(Distribution):

12

def __init__(self, distribution, bijector):

13

"""

14

Distribution transformed by a bijector.

15

16

Parameters:

17

- distribution: base distribution to transform

18

- bijector: bijector defining the transformation

19

"""

20

21

@property

22

def distribution(self): ...

23

@property

24

def bijector(self): ...

25

@property

26

def event_shape(self): ...

27

@property

28

def batch_shape(self): ...

29

```

30

31

### Mixture of Two Distributions

32

33

Mixture of exactly two distributions.

34

35

```python { .api }

36

class MixtureOfTwo(Distribution):

37

def __init__(self, mixing_probs, dist1, dist2):

38

"""

39

Mixture of two distributions.

40

41

Parameters:

42

- mixing_probs: mixing probabilities (array of shape [..., 2] that sums to 1)

43

- dist1: first component distribution

44

- dist2: second component distribution

45

"""

46

47

@property

48

def mixing_probs(self): ...

49

@property

50

def dist1(self): ...

51

@property

52

def dist2(self): ...

53

```

54

55

### Mixture Same Family

56

57

Mixture of distributions from the same parametric family.

58

59

```python { .api }

60

class MixtureSameFamily(Distribution):

61

def __init__(self, mixture_distribution, components_distribution):

62

"""

63

Mixture of distributions from the same family.

64

65

Parameters:

66

- mixture_distribution: categorical distribution over mixture components

67

- components_distribution: batch of component distributions

68

"""

69

70

@property

71

def mixture_distribution(self): ...

72

@property

73

def components_distribution(self): ...

74

@property

75

def event_shape(self): ...

76

```

77

78

### Independent Distribution

79

80

Reinterprets batch dimensions as event dimensions.

81

82

```python { .api }

83

class Independent(Distribution):

84

def __init__(self, distribution, reinterpreted_batch_ndims):

85

"""

86

Independent distribution reinterpreting batch dimensions.

87

88

Parameters:

89

- distribution: base distribution

90

- reinterpreted_batch_ndims: number of batch dimensions to reinterpret as event dimensions

91

"""

92

93

@property

94

def distribution(self): ...

95

@property

96

def reinterpreted_batch_ndims(self): ...

97

@property

98

def event_shape(self): ...

99

@property

100

def batch_shape(self): ...

101

```

102

103

### Joint Distribution

104

105

Joint distribution of multiple components.

106

107

```python { .api }

108

class Joint(Distribution):

109

def __init__(self, distributions, name="Joint"):

110

"""

111

Joint distribution of multiple components.

112

113

Parameters:

114

- distributions: sequence or dict of component distributions

115

- name: name for the distribution

116

"""

117

118

@property

119

def distributions(self): ...

120

@property

121

def event_shape(self): ...

122

```

123

124

### Quantized Distribution

125

126

Quantized version of a continuous distribution.

127

128

```python { .api }

129

class Quantized(Distribution):

130

def __init__(self, distribution, low=None, high=None):

131

"""

132

Quantized distribution.

133

134

Parameters:

135

- distribution: base continuous distribution

136

- low: lower quantization bound (optional)

137

- high: upper quantization bound (optional)

138

"""

139

140

@property

141

def distribution(self): ...

142

@property

143

def low(self): ...

144

@property

145

def high(self): ...

146

```