johnson
sgp.models.johnson.HashableBaseModelIO
Bases: BaseModel
Input/output utilities for the models with support for the following features:
- Hashing of the model
- Conversion to and from dictionaries, json, toml, and yaml files
- Compatibility with pydantic v1 and v2
sgp.models.johnson.HashableBaseModelIO.exclude
property
Fields to exclude from the model, typically used to exclude arbitrary types when it is allowed in the pydantic model to avoid hashing issues.
sgp.models.johnson.HashableBaseModelIO.fromBytes
classmethod
Load the model from a binary string or file if a path is provided.
sgp.models.johnson.HashableBaseModelIO.fromCryptography
classmethod
Decrypt the model using the key.
sgp.models.johnson.HashableBaseModelIO.fromDict
classmethod
fromDict(*, data: dict, **kwargs) -> Self
Load the model from a dictionary.
sgp.models.johnson.HashableBaseModelIO.fromJson
classmethod
Load the model from a json string or file if a path is provided.
sgp.models.johnson.HashableBaseModelIO.fromToml
classmethod
Load the model from a toml string or file if a path is provided.
sgp.models.johnson.HashableBaseModelIO.fromYaml
classmethod
Load the model from a yaml string or file if a path is provided.
sgp.models.johnson.HashableBaseModelIO.toBytes
Convert the model to a binary string or save it to a file if a path is provided.
sgp.models.johnson.HashableBaseModelIO.toCryptography
Encrypt the model using the key.
sgp.models.johnson.HashableBaseModelIO.toDict
toDict(**kwargs) -> dict
Convert the model to a dictionary.
sgp.models.johnson.HashableBaseModelIO.toJson
Convert the model to a json string or save it to a file if a path is provided.
sgp.models.johnson.HashableBaseModelIO.toToml
Convert the model to a toml string or save it to a file if a path is provided.
sgp.models.johnson.HashableBaseModelIO.toYaml
Convert the model to a yaml string or save it to a file if a path is provided.
sgp.models.johnson.HashableBaseModelIO.update
update(data: dict = None, **kwargs) -> Self
Update the options of the optimizer
sgp.models.johnson.Johnson
Bases: HashableBaseModelIO
Johnson distribution model.
sgp.models.johnson.Johnson.X2Y
classmethod
X2Y(X: ArrayLike | Number, type: Literal['su', 'sb', 'sl'], aX: float, bX: float, aY: float, bY: float) -> ndarray | Number
Denormalize the data from the Johnson distribution.
sgp.models.johnson.Johnson.Y2X
classmethod
Y2X(Y: ArrayLike | Number, type: Literal['su', 'sb', 'sl'], aX: float, bX: float, aY: float, bY: float) -> ndarray | Number
Normalize the data to the Johnson distribution.
sgp.models.johnson.Johnson.__call__
Calculate the fitness of the Johnson distribution.
sgp.models.johnson.Johnson.dist
classmethod
dist(type: Literal['su', 'sb', 'sl'], aX: float, bX: float, aY: float, bY: float, mu: float = 0.0, sigma: float = 1.0) -> Tuple[rv_continuous, Tuple, Dict[str, ...]]
Get the distribution object and distribution parameters.
sgp.models.johnson.Johnson.fit
Fit the Johnson distribution to the data.
sgp.models.johnson.Johnson.fitness
Calculate the fitness of the Johnson distribution.
sgp.models.johnson.Johnson.kstest_pvalue
Calculate the p-value of the Johnson distribution.