aind_behavior_services.task_logic package¶
Submodules¶
aind_behavior_services.task_logic.distributions module¶
- pydantic model aind_behavior_services.task_logic.distributions.BetaDistribution[source]¶
Bases:
DistributionBase
Show JSON schema
{ "title": "BetaDistribution", "type": "object", "properties": { "family": { "const": "Beta", "default": "Beta", "title": "Family", "type": "string" }, "distribution_parameters": { "$ref": "#/$defs/BetaDistributionParameters", "default": { "family": "Beta", "alpha": 5.0, "beta": 5.0 }, "description": "Parameters of the distribution" }, "truncation_parameters": { "anyOf": [ { "$ref": "#/$defs/TruncationParameters" }, { "type": "null" } ], "default": null, "description": "Truncation parameters of the distribution" }, "scaling_parameters": { "anyOf": [ { "$ref": "#/$defs/ScalingParameters" }, { "type": "null" } ], "default": null, "description": "Scaling parameters of the distribution" } }, "$defs": { "BetaDistributionParameters": { "properties": { "family": { "const": "Beta", "default": "Beta", "title": "Family", "type": "string" }, "alpha": { "default": 5, "description": "Alpha parameter of the distribution", "minimum": 0, "title": "Alpha", "type": "number" }, "beta": { "default": 5, "description": "Beta parameter of the distribution", "minimum": 0, "title": "Beta", "type": "number" } }, "title": "BetaDistributionParameters", "type": "object" }, "ScalingParameters": { "properties": { "scale": { "default": 1, "description": "Scaling factor to apply on the sampled distribution", "title": "Scale", "type": "number" }, "offset": { "default": 0, "description": "Offset factor to apply on the sampled distribution", "title": "Offset", "type": "number" } }, "title": "ScalingParameters", "type": "object" }, "TruncationParameters": { "properties": { "is_truncated": { "default": false, "description": "Whether the distribution is truncated", "title": "Is Truncated", "type": "boolean" }, "min": { "default": 0, "description": "Minimum value of the sampled distribution", "title": "Min", "type": "number" }, "max": { "default": 0, "description": "Maximum value of the sampled distribution", "title": "Max", "type": "number" } }, "title": "TruncationParameters", "type": "object" } } }
- Fields:
- field distribution_parameters: BetaDistributionParameters = BetaDistributionParameters(family=<DistributionFamily.BETA: 'Beta'>, alpha=5, beta=5)[source]¶
Parameters of the distribution
- pydantic model aind_behavior_services.task_logic.distributions.BetaDistributionParameters[source]¶
Bases:
DistributionParametersBase
Show JSON schema
{ "title": "BetaDistributionParameters", "type": "object", "properties": { "family": { "const": "Beta", "default": "Beta", "title": "Family", "type": "string" }, "alpha": { "default": 5, "description": "Alpha parameter of the distribution", "minimum": 0, "title": "Alpha", "type": "number" }, "beta": { "default": 5, "description": "Beta parameter of the distribution", "minimum": 0, "title": "Beta", "type": "number" } } }
- Fields:
- pydantic model aind_behavior_services.task_logic.distributions.BinomialDistribution[source]¶
Bases:
DistributionBase
Show JSON schema
{ "title": "BinomialDistribution", "type": "object", "properties": { "family": { "const": "Binomial", "default": "Binomial", "title": "Family", "type": "string" }, "distribution_parameters": { "$ref": "#/$defs/BinomialDistributionParameters", "default": { "family": "Binomial", "n": 1, "p": 0.5 }, "description": "Parameters of the distribution" }, "truncation_parameters": { "anyOf": [ { "$ref": "#/$defs/TruncationParameters" }, { "type": "null" } ], "default": null, "description": "Truncation parameters of the distribution" }, "scaling_parameters": { "anyOf": [ { "$ref": "#/$defs/ScalingParameters" }, { "type": "null" } ], "default": null, "description": "Scaling parameters of the distribution" } }, "$defs": { "BinomialDistributionParameters": { "properties": { "family": { "const": "Binomial", "default": "Binomial", "title": "Family", "type": "string" }, "n": { "default": 1, "description": "Number of trials", "minimum": 0, "title": "N", "type": "integer" }, "p": { "default": 0.5, "description": "Probability of success", "maximum": 1, "minimum": 0, "title": "P", "type": "number" } }, "title": "BinomialDistributionParameters", "type": "object" }, "ScalingParameters": { "properties": { "scale": { "default": 1, "description": "Scaling factor to apply on the sampled distribution", "title": "Scale", "type": "number" }, "offset": { "default": 0, "description": "Offset factor to apply on the sampled distribution", "title": "Offset", "type": "number" } }, "title": "ScalingParameters", "type": "object" }, "TruncationParameters": { "properties": { "is_truncated": { "default": false, "description": "Whether the distribution is truncated", "title": "Is Truncated", "type": "boolean" }, "min": { "default": 0, "description": "Minimum value of the sampled distribution", "title": "Min", "type": "number" }, "max": { "default": 0, "description": "Maximum value of the sampled distribution", "title": "Max", "type": "number" } }, "title": "TruncationParameters", "type": "object" } } }
- Fields:
- field distribution_parameters: BinomialDistributionParameters = BinomialDistributionParameters(family=<DistributionFamily.BINOMIAL: 'Binomial'>, n=1, p=0.5)[source]¶
Parameters of the distribution
- pydantic model aind_behavior_services.task_logic.distributions.BinomialDistributionParameters[source]¶
Bases:
DistributionParametersBase
Show JSON schema
{ "title": "BinomialDistributionParameters", "type": "object", "properties": { "family": { "const": "Binomial", "default": "Binomial", "title": "Family", "type": "string" }, "n": { "default": 1, "description": "Number of trials", "minimum": 0, "title": "N", "type": "integer" }, "p": { "default": 0.5, "description": "Probability of success", "maximum": 1, "minimum": 0, "title": "P", "type": "number" } } }
- Fields:
- pydantic model aind_behavior_services.task_logic.distributions.DistributionBase[source]¶
Bases:
BaseModel
Show JSON schema
{ "title": "DistributionBase", "type": "object", "properties": { "family": { "$ref": "#/$defs/DistributionFamily", "description": "Family of the distribution" }, "distribution_parameters": { "$ref": "#/$defs/DistributionParameters" }, "truncation_parameters": { "anyOf": [ { "$ref": "#/$defs/TruncationParameters" }, { "type": "null" } ], "default": null, "description": "Truncation parameters of the distribution" }, "scaling_parameters": { "anyOf": [ { "$ref": "#/$defs/ScalingParameters" }, { "type": "null" } ], "default": null, "description": "Scaling parameters of the distribution" } }, "$defs": { "BetaDistributionParameters": { "properties": { "family": { "const": "Beta", "default": "Beta", "title": "Family", "type": "string" }, "alpha": { "default": 5, "description": "Alpha parameter of the distribution", "minimum": 0, "title": "Alpha", "type": "number" }, "beta": { "default": 5, "description": "Beta parameter of the distribution", "minimum": 0, "title": "Beta", "type": "number" } }, "title": "BetaDistributionParameters", "type": "object" }, "BinomialDistributionParameters": { "properties": { "family": { "const": "Binomial", "default": "Binomial", "title": "Family", "type": "string" }, "n": { "default": 1, "description": "Number of trials", "minimum": 0, "title": "N", "type": "integer" }, "p": { "default": 0.5, "description": "Probability of success", "maximum": 1, "minimum": 0, "title": "P", "type": "number" } }, "title": "BinomialDistributionParameters", "type": "object" }, "DistributionFamily": { "enum": [ "Scalar", "Normal", "LogNormal", "Uniform", "Exponential", "Gamma", "Binomial", "Beta", "Poisson", "Pdf" ], "title": "DistributionFamily", "type": "string" }, "DistributionParameters": { "description": "Parameters of the distribution", "discriminator": { "mapping": { "Beta": "#/$defs/BetaDistributionParameters", "Binomial": "#/$defs/BinomialDistributionParameters", "Exponential": "#/$defs/ExponentialDistributionParameters", "Gamma": "#/$defs/GammaDistributionParameters", "LogNormal": "#/$defs/LogNormalDistributionParameters", "Normal": "#/$defs/NormalDistributionParameters", "Pdf": "#/$defs/PdfDistributionParameters", "Poisson": "#/$defs/PoissonDistributionParameters", "Scalar": "#/$defs/ScalarDistributionParameter", "Uniform": "#/$defs/UniformDistributionParameters" }, "propertyName": "family" }, "oneOf": [ { "$ref": "#/$defs/ScalarDistributionParameter" }, { "$ref": "#/$defs/NormalDistributionParameters" }, { "$ref": "#/$defs/LogNormalDistributionParameters" }, { "$ref": "#/$defs/ExponentialDistributionParameters" }, { "$ref": "#/$defs/UniformDistributionParameters" }, { "$ref": "#/$defs/PoissonDistributionParameters" }, { "$ref": "#/$defs/BinomialDistributionParameters" }, { "$ref": "#/$defs/BetaDistributionParameters" }, { "$ref": "#/$defs/GammaDistributionParameters" }, { "$ref": "#/$defs/PdfDistributionParameters" } ], "title": "DistributionParameters" }, "ExponentialDistributionParameters": { "properties": { "family": { "const": "Exponential", "default": "Exponential", "title": "Family", "type": "string" }, "rate": { "default": 0, "description": "Rate parameter of the distribution", "minimum": 0, "title": "Rate", "type": "number" } }, "title": "ExponentialDistributionParameters", "type": "object" }, "GammaDistributionParameters": { "properties": { "family": { "const": "Gamma", "default": "Gamma", "title": "Family", "type": "string" }, "shape": { "default": 1, "description": "Shape parameter of the distribution", "minimum": 0, "title": "Shape", "type": "number" }, "rate": { "default": 1, "description": "Rate parameter of the distribution", "minimum": 0, "title": "Rate", "type": "number" } }, "title": "GammaDistributionParameters", "type": "object" }, "LogNormalDistributionParameters": { "properties": { "family": { "const": "LogNormal", "default": "LogNormal", "title": "Family", "type": "string" }, "mean": { "default": 0, "description": "Mean of the distribution", "title": "Mean", "type": "number" }, "std": { "default": 0, "description": "Standard deviation of the distribution", "title": "Std", "type": "number" } }, "title": "LogNormalDistributionParameters", "type": "object" }, "NormalDistributionParameters": { "properties": { "family": { "const": "Normal", "default": "Normal", "title": "Family", "type": "string" }, "mean": { "default": 0, "description": "Mean of the distribution", "title": "Mean", "type": "number" }, "std": { "default": 0, "description": "Standard deviation of the distribution", "title": "Std", "type": "number" } }, "title": "NormalDistributionParameters", "type": "object" }, "PdfDistributionParameters": { "properties": { "family": { "const": "Pdf", "default": "Pdf", "title": "Family", "type": "string" }, "pdf": { "default": [ 1 ], "description": "The probability density function", "items": { "minimum": 0, "type": "number" }, "title": "Pdf", "type": "array" }, "index": { "default": [ 0 ], "description": "The index of the probability density function", "items": { "type": "number" }, "title": "Index", "type": "array" } }, "title": "PdfDistributionParameters", "type": "object" }, "PoissonDistributionParameters": { "properties": { "family": { "const": "Poisson", "default": "Poisson", "title": "Family", "type": "string" }, "rate": { "default": 1, "description": "Rate parameter of the Poisson process that generates the distribution", "minimum": 0, "title": "Rate", "type": "number" } }, "title": "PoissonDistributionParameters", "type": "object" }, "ScalarDistributionParameter": { "properties": { "family": { "const": "Scalar", "default": "Scalar", "title": "Family", "type": "string" }, "value": { "default": 0, "description": "The static value of the distribution", "title": "Value", "type": "number" } }, "title": "ScalarDistributionParameter", "type": "object" }, "ScalingParameters": { "properties": { "scale": { "default": 1, "description": "Scaling factor to apply on the sampled distribution", "title": "Scale", "type": "number" }, "offset": { "default": 0, "description": "Offset factor to apply on the sampled distribution", "title": "Offset", "type": "number" } }, "title": "ScalingParameters", "type": "object" }, "TruncationParameters": { "properties": { "is_truncated": { "default": false, "description": "Whether the distribution is truncated", "title": "Is Truncated", "type": "boolean" }, "min": { "default": 0, "description": "Minimum value of the sampled distribution", "title": "Min", "type": "number" }, "max": { "default": 0, "description": "Maximum value of the sampled distribution", "title": "Max", "type": "number" } }, "title": "TruncationParameters", "type": "object" }, "UniformDistributionParameters": { "properties": { "family": { "const": "Uniform", "default": "Uniform", "title": "Family", "type": "string" }, "min": { "default": 0, "description": "Minimum value of the distribution", "title": "Min", "type": "number" }, "max": { "default": 0, "description": "Maximum value of the distribution", "title": "Max", "type": "number" } }, "title": "UniformDistributionParameters", "type": "object" } }, "required": [ "family", "distribution_parameters" ] }
- Fields:
- field distribution_parameters: DistributionParameters [Required][source]¶
Parameters of the distribution
- field family: DistributionFamily [Required][source]¶
Family of the distribution
- field scaling_parameters: ScalingParameters | None = None[source]¶
Scaling parameters of the distribution
- field truncation_parameters: TruncationParameters | None = None[source]¶
Truncation parameters of the distribution
- class aind_behavior_services.task_logic.distributions.DistributionFamily(value)[source]¶
Bases:
str
,Enum
- pydantic model aind_behavior_services.task_logic.distributions.DistributionParametersBase[source]¶
Bases:
BaseModel
Show JSON schema
{ "title": "DistributionParametersBase", "type": "object", "properties": { "family": { "$ref": "#/$defs/DistributionFamily", "description": "Family of the distribution" } }, "$defs": { "DistributionFamily": { "enum": [ "Scalar", "Normal", "LogNormal", "Uniform", "Exponential", "Gamma", "Binomial", "Beta", "Poisson", "Pdf" ], "title": "DistributionFamily", "type": "string" } }, "required": [ "family" ] }
- field family: DistributionFamily [Required][source]¶
Family of the distribution
- pydantic model aind_behavior_services.task_logic.distributions.ExponentialDistribution[source]¶
Bases:
DistributionBase
Show JSON schema
{ "title": "ExponentialDistribution", "type": "object", "properties": { "family": { "const": "Exponential", "default": "Exponential", "title": "Family", "type": "string" }, "distribution_parameters": { "$ref": "#/$defs/ExponentialDistributionParameters", "default": { "family": "Exponential", "rate": 0.0 }, "description": "Parameters of the distribution" }, "truncation_parameters": { "anyOf": [ { "$ref": "#/$defs/TruncationParameters" }, { "type": "null" } ], "default": null, "description": "Truncation parameters of the distribution" }, "scaling_parameters": { "anyOf": [ { "$ref": "#/$defs/ScalingParameters" }, { "type": "null" } ], "default": null, "description": "Scaling parameters of the distribution" } }, "$defs": { "ExponentialDistributionParameters": { "properties": { "family": { "const": "Exponential", "default": "Exponential", "title": "Family", "type": "string" }, "rate": { "default": 0, "description": "Rate parameter of the distribution", "minimum": 0, "title": "Rate", "type": "number" } }, "title": "ExponentialDistributionParameters", "type": "object" }, "ScalingParameters": { "properties": { "scale": { "default": 1, "description": "Scaling factor to apply on the sampled distribution", "title": "Scale", "type": "number" }, "offset": { "default": 0, "description": "Offset factor to apply on the sampled distribution", "title": "Offset", "type": "number" } }, "title": "ScalingParameters", "type": "object" }, "TruncationParameters": { "properties": { "is_truncated": { "default": false, "description": "Whether the distribution is truncated", "title": "Is Truncated", "type": "boolean" }, "min": { "default": 0, "description": "Minimum value of the sampled distribution", "title": "Min", "type": "number" }, "max": { "default": 0, "description": "Maximum value of the sampled distribution", "title": "Max", "type": "number" } }, "title": "TruncationParameters", "type": "object" } } }
- Fields:
- field distribution_parameters: ExponentialDistributionParameters = ExponentialDistributionParameters(family=<DistributionFamily.EXPONENTIAL: 'Exponential'>, rate=0)[source]¶
Parameters of the distribution
- pydantic model aind_behavior_services.task_logic.distributions.ExponentialDistributionParameters[source]¶
Bases:
DistributionParametersBase
Show JSON schema
{ "title": "ExponentialDistributionParameters", "type": "object", "properties": { "family": { "const": "Exponential", "default": "Exponential", "title": "Family", "type": "string" }, "rate": { "default": 0, "description": "Rate parameter of the distribution", "minimum": 0, "title": "Rate", "type": "number" } } }
- pydantic model aind_behavior_services.task_logic.distributions.GammaDistribution[source]¶
Bases:
DistributionBase
Show JSON schema
{ "title": "GammaDistribution", "type": "object", "properties": { "family": { "const": "Gamma", "default": "Gamma", "title": "Family", "type": "string" }, "distribution_parameters": { "$ref": "#/$defs/GammaDistributionParameters", "default": { "family": "Gamma", "shape": 1.0, "rate": 1.0 }, "description": "Parameters of the distribution" }, "truncation_parameters": { "anyOf": [ { "$ref": "#/$defs/TruncationParameters" }, { "type": "null" } ], "default": null, "description": "Truncation parameters of the distribution" }, "scaling_parameters": { "anyOf": [ { "$ref": "#/$defs/ScalingParameters" }, { "type": "null" } ], "default": null, "description": "Scaling parameters of the distribution" } }, "$defs": { "GammaDistributionParameters": { "properties": { "family": { "const": "Gamma", "default": "Gamma", "title": "Family", "type": "string" }, "shape": { "default": 1, "description": "Shape parameter of the distribution", "minimum": 0, "title": "Shape", "type": "number" }, "rate": { "default": 1, "description": "Rate parameter of the distribution", "minimum": 0, "title": "Rate", "type": "number" } }, "title": "GammaDistributionParameters", "type": "object" }, "ScalingParameters": { "properties": { "scale": { "default": 1, "description": "Scaling factor to apply on the sampled distribution", "title": "Scale", "type": "number" }, "offset": { "default": 0, "description": "Offset factor to apply on the sampled distribution", "title": "Offset", "type": "number" } }, "title": "ScalingParameters", "type": "object" }, "TruncationParameters": { "properties": { "is_truncated": { "default": false, "description": "Whether the distribution is truncated", "title": "Is Truncated", "type": "boolean" }, "min": { "default": 0, "description": "Minimum value of the sampled distribution", "title": "Min", "type": "number" }, "max": { "default": 0, "description": "Maximum value of the sampled distribution", "title": "Max", "type": "number" } }, "title": "TruncationParameters", "type": "object" } } }
- Fields:
- field distribution_parameters: GammaDistributionParameters = GammaDistributionParameters(family=<DistributionFamily.GAMMA: 'Gamma'>, shape=1, rate=1)[source]¶
Parameters of the distribution
- pydantic model aind_behavior_services.task_logic.distributions.GammaDistributionParameters[source]¶
Bases:
DistributionParametersBase
Show JSON schema
{ "title": "GammaDistributionParameters", "type": "object", "properties": { "family": { "const": "Gamma", "default": "Gamma", "title": "Family", "type": "string" }, "shape": { "default": 1, "description": "Shape parameter of the distribution", "minimum": 0, "title": "Shape", "type": "number" }, "rate": { "default": 1, "description": "Rate parameter of the distribution", "minimum": 0, "title": "Rate", "type": "number" } } }
- pydantic model aind_behavior_services.task_logic.distributions.LogNormalDistribution[source]¶
Bases:
DistributionBase
Show JSON schema
{ "title": "LogNormalDistribution", "type": "object", "properties": { "family": { "const": "LogNormal", "default": "LogNormal", "title": "Family", "type": "string" }, "distribution_parameters": { "$ref": "#/$defs/LogNormalDistributionParameters", "default": { "family": "LogNormal", "mean": 0.0, "std": 0.0 }, "description": "Parameters of the distribution" }, "truncation_parameters": { "anyOf": [ { "$ref": "#/$defs/TruncationParameters" }, { "type": "null" } ], "default": null, "description": "Truncation parameters of the distribution" }, "scaling_parameters": { "anyOf": [ { "$ref": "#/$defs/ScalingParameters" }, { "type": "null" } ], "default": null, "description": "Scaling parameters of the distribution" } }, "$defs": { "LogNormalDistributionParameters": { "properties": { "family": { "const": "LogNormal", "default": "LogNormal", "title": "Family", "type": "string" }, "mean": { "default": 0, "description": "Mean of the distribution", "title": "Mean", "type": "number" }, "std": { "default": 0, "description": "Standard deviation of the distribution", "title": "Std", "type": "number" } }, "title": "LogNormalDistributionParameters", "type": "object" }, "ScalingParameters": { "properties": { "scale": { "default": 1, "description": "Scaling factor to apply on the sampled distribution", "title": "Scale", "type": "number" }, "offset": { "default": 0, "description": "Offset factor to apply on the sampled distribution", "title": "Offset", "type": "number" } }, "title": "ScalingParameters", "type": "object" }, "TruncationParameters": { "properties": { "is_truncated": { "default": false, "description": "Whether the distribution is truncated", "title": "Is Truncated", "type": "boolean" }, "min": { "default": 0, "description": "Minimum value of the sampled distribution", "title": "Min", "type": "number" }, "max": { "default": 0, "description": "Maximum value of the sampled distribution", "title": "Max", "type": "number" } }, "title": "TruncationParameters", "type": "object" } } }
- Fields:
- field distribution_parameters: LogNormalDistributionParameters = LogNormalDistributionParameters(family=<DistributionFamily.LOGNORMAL: 'LogNormal'>, mean=0, std=0)[source]¶
Parameters of the distribution
- pydantic model aind_behavior_services.task_logic.distributions.LogNormalDistributionParameters[source]¶
Bases:
DistributionParametersBase
Show JSON schema
{ "title": "LogNormalDistributionParameters", "type": "object", "properties": { "family": { "const": "LogNormal", "default": "LogNormal", "title": "Family", "type": "string" }, "mean": { "default": 0, "description": "Mean of the distribution", "title": "Mean", "type": "number" }, "std": { "default": 0, "description": "Standard deviation of the distribution", "title": "Std", "type": "number" } } }
- pydantic model aind_behavior_services.task_logic.distributions.NormalDistribution[source]¶
Bases:
DistributionBase
Show JSON schema
{ "title": "NormalDistribution", "type": "object", "properties": { "family": { "const": "Normal", "default": "Normal", "title": "Family", "type": "string" }, "distribution_parameters": { "$ref": "#/$defs/NormalDistributionParameters", "default": { "family": "Normal", "mean": 0.0, "std": 0.0 }, "description": "Parameters of the distribution" }, "truncation_parameters": { "anyOf": [ { "$ref": "#/$defs/TruncationParameters" }, { "type": "null" } ], "default": null, "description": "Truncation parameters of the distribution" }, "scaling_parameters": { "anyOf": [ { "$ref": "#/$defs/ScalingParameters" }, { "type": "null" } ], "default": null, "description": "Scaling parameters of the distribution" } }, "$defs": { "NormalDistributionParameters": { "properties": { "family": { "const": "Normal", "default": "Normal", "title": "Family", "type": "string" }, "mean": { "default": 0, "description": "Mean of the distribution", "title": "Mean", "type": "number" }, "std": { "default": 0, "description": "Standard deviation of the distribution", "title": "Std", "type": "number" } }, "title": "NormalDistributionParameters", "type": "object" }, "ScalingParameters": { "properties": { "scale": { "default": 1, "description": "Scaling factor to apply on the sampled distribution", "title": "Scale", "type": "number" }, "offset": { "default": 0, "description": "Offset factor to apply on the sampled distribution", "title": "Offset", "type": "number" } }, "title": "ScalingParameters", "type": "object" }, "TruncationParameters": { "properties": { "is_truncated": { "default": false, "description": "Whether the distribution is truncated", "title": "Is Truncated", "type": "boolean" }, "min": { "default": 0, "description": "Minimum value of the sampled distribution", "title": "Min", "type": "number" }, "max": { "default": 0, "description": "Maximum value of the sampled distribution", "title": "Max", "type": "number" } }, "title": "TruncationParameters", "type": "object" } } }
- Fields:
- field distribution_parameters: NormalDistributionParameters = NormalDistributionParameters(family=<DistributionFamily.NORMAL: 'Normal'>, mean=0, std=0)[source]¶
Parameters of the distribution
- pydantic model aind_behavior_services.task_logic.distributions.NormalDistributionParameters[source]¶
Bases:
DistributionParametersBase
Show JSON schema
{ "title": "NormalDistributionParameters", "type": "object", "properties": { "family": { "const": "Normal", "default": "Normal", "title": "Family", "type": "string" }, "mean": { "default": 0, "description": "Mean of the distribution", "title": "Mean", "type": "number" }, "std": { "default": 0, "description": "Standard deviation of the distribution", "title": "Std", "type": "number" } } }
- pydantic model aind_behavior_services.task_logic.distributions.PdfDistribution[source]¶
Bases:
DistributionBase
Show JSON schema
{ "title": "PdfDistribution", "type": "object", "properties": { "family": { "const": "Pdf", "default": "Pdf", "title": "Family", "type": "string" }, "distribution_parameters": { "$ref": "#/$defs/PdfDistributionParameters", "default": { "family": "Pdf", "pdf": [ 1.0 ], "index": [ 0.0 ] }, "description": "Parameters of the distribution" }, "truncation_parameters": { "anyOf": [ { "$ref": "#/$defs/TruncationParameters" }, { "type": "null" } ], "default": null, "description": "Truncation parameters of the distribution" }, "scaling_parameters": { "anyOf": [ { "$ref": "#/$defs/ScalingParameters" }, { "type": "null" } ], "default": null, "description": "Scaling parameters of the distribution" } }, "$defs": { "PdfDistributionParameters": { "properties": { "family": { "const": "Pdf", "default": "Pdf", "title": "Family", "type": "string" }, "pdf": { "default": [ 1 ], "description": "The probability density function", "items": { "minimum": 0, "type": "number" }, "title": "Pdf", "type": "array" }, "index": { "default": [ 0 ], "description": "The index of the probability density function", "items": { "type": "number" }, "title": "Index", "type": "array" } }, "title": "PdfDistributionParameters", "type": "object" }, "ScalingParameters": { "properties": { "scale": { "default": 1, "description": "Scaling factor to apply on the sampled distribution", "title": "Scale", "type": "number" }, "offset": { "default": 0, "description": "Offset factor to apply on the sampled distribution", "title": "Offset", "type": "number" } }, "title": "ScalingParameters", "type": "object" }, "TruncationParameters": { "properties": { "is_truncated": { "default": false, "description": "Whether the distribution is truncated", "title": "Is Truncated", "type": "boolean" }, "min": { "default": 0, "description": "Minimum value of the sampled distribution", "title": "Min", "type": "number" }, "max": { "default": 0, "description": "Maximum value of the sampled distribution", "title": "Max", "type": "number" } }, "title": "TruncationParameters", "type": "object" } } }
- Fields:
- field distribution_parameters: PdfDistributionParameters = PdfDistributionParameters(family=<DistributionFamily.PDF: 'Pdf'>, pdf=[1], index=[0])[source]¶
Parameters of the distribution
- pydantic model aind_behavior_services.task_logic.distributions.PdfDistributionParameters[source]¶
Bases:
DistributionParametersBase
Show JSON schema
{ "title": "PdfDistributionParameters", "type": "object", "properties": { "family": { "const": "Pdf", "default": "Pdf", "title": "Family", "type": "string" }, "pdf": { "default": [ 1 ], "description": "The probability density function", "items": { "minimum": 0, "type": "number" }, "title": "Pdf", "type": "array" }, "index": { "default": [ 0 ], "description": "The index of the probability density function", "items": { "type": "number" }, "title": "Index", "type": "array" } } }
- Fields:
- Validators:
validate_matching_length
»all fields
- pydantic model aind_behavior_services.task_logic.distributions.PoissonDistribution[source]¶
Bases:
DistributionBase
Show JSON schema
{ "title": "PoissonDistribution", "type": "object", "properties": { "family": { "const": "Poisson", "default": "Poisson", "title": "Family", "type": "string" }, "distribution_parameters": { "$ref": "#/$defs/PoissonDistributionParameters", "default": { "family": "Poisson", "rate": 1.0 }, "description": "Parameters of the distribution" }, "truncation_parameters": { "anyOf": [ { "$ref": "#/$defs/TruncationParameters" }, { "type": "null" } ], "default": null, "description": "Truncation parameters of the distribution" }, "scaling_parameters": { "anyOf": [ { "$ref": "#/$defs/ScalingParameters" }, { "type": "null" } ], "default": null, "description": "Scaling parameters of the distribution" } }, "$defs": { "PoissonDistributionParameters": { "properties": { "family": { "const": "Poisson", "default": "Poisson", "title": "Family", "type": "string" }, "rate": { "default": 1, "description": "Rate parameter of the Poisson process that generates the distribution", "minimum": 0, "title": "Rate", "type": "number" } }, "title": "PoissonDistributionParameters", "type": "object" }, "ScalingParameters": { "properties": { "scale": { "default": 1, "description": "Scaling factor to apply on the sampled distribution", "title": "Scale", "type": "number" }, "offset": { "default": 0, "description": "Offset factor to apply on the sampled distribution", "title": "Offset", "type": "number" } }, "title": "ScalingParameters", "type": "object" }, "TruncationParameters": { "properties": { "is_truncated": { "default": false, "description": "Whether the distribution is truncated", "title": "Is Truncated", "type": "boolean" }, "min": { "default": 0, "description": "Minimum value of the sampled distribution", "title": "Min", "type": "number" }, "max": { "default": 0, "description": "Maximum value of the sampled distribution", "title": "Max", "type": "number" } }, "title": "TruncationParameters", "type": "object" } } }
- Fields:
- field distribution_parameters: PoissonDistributionParameters = PoissonDistributionParameters(family=<DistributionFamily.POISSON: 'Poisson'>, rate=1)[source]¶
Parameters of the distribution
- pydantic model aind_behavior_services.task_logic.distributions.PoissonDistributionParameters[source]¶
Bases:
DistributionParametersBase
Show JSON schema
{ "title": "PoissonDistributionParameters", "type": "object", "properties": { "family": { "const": "Poisson", "default": "Poisson", "title": "Family", "type": "string" }, "rate": { "default": 1, "description": "Rate parameter of the Poisson process that generates the distribution", "minimum": 0, "title": "Rate", "type": "number" } } }
- pydantic model aind_behavior_services.task_logic.distributions.Scalar[source]¶
Bases:
DistributionBase
Show JSON schema
{ "title": "Scalar", "type": "object", "properties": { "family": { "const": "Scalar", "default": "Scalar", "title": "Family", "type": "string" }, "distribution_parameters": { "$ref": "#/$defs/ScalarDistributionParameter", "default": { "family": "Scalar", "value": 0.0 }, "description": "Parameters of the distribution" }, "truncation_parameters": { "const": null, "default": null, "title": "Truncation Parameters", "type": "null" }, "scaling_parameters": { "const": null, "default": null, "title": "Scaling Parameters", "type": "null" } }, "$defs": { "ScalarDistributionParameter": { "properties": { "family": { "const": "Scalar", "default": "Scalar", "title": "Family", "type": "string" }, "value": { "default": 0, "description": "The static value of the distribution", "title": "Value", "type": "number" } }, "title": "ScalarDistributionParameter", "type": "object" } } }
- Fields:
- field distribution_parameters: ScalarDistributionParameter = ScalarDistributionParameter(family=<DistributionFamily.SCALAR: 'Scalar'>, value=0)[source]¶
Parameters of the distribution
- pydantic model aind_behavior_services.task_logic.distributions.ScalarDistributionParameter[source]¶
Bases:
DistributionParametersBase
Show JSON schema
{ "title": "ScalarDistributionParameter", "type": "object", "properties": { "family": { "const": "Scalar", "default": "Scalar", "title": "Family", "type": "string" }, "value": { "default": 0, "description": "The static value of the distribution", "title": "Value", "type": "number" } } }
- pydantic model aind_behavior_services.task_logic.distributions.ScalingParameters[source]¶
Bases:
BaseModel
Show JSON schema
{ "title": "ScalingParameters", "type": "object", "properties": { "scale": { "default": 1, "description": "Scaling factor to apply on the sampled distribution", "title": "Scale", "type": "number" }, "offset": { "default": 0, "description": "Offset factor to apply on the sampled distribution", "title": "Offset", "type": "number" } } }
- Fields:
- pydantic model aind_behavior_services.task_logic.distributions.TruncationParameters[source]¶
Bases:
BaseModel
Show JSON schema
{ "title": "TruncationParameters", "type": "object", "properties": { "is_truncated": { "default": false, "description": "Whether the distribution is truncated", "title": "Is Truncated", "type": "boolean" }, "min": { "default": 0, "description": "Minimum value of the sampled distribution", "title": "Min", "type": "number" }, "max": { "default": 0, "description": "Maximum value of the sampled distribution", "title": "Max", "type": "number" } } }
- pydantic model aind_behavior_services.task_logic.distributions.UniformDistribution[source]¶
Bases:
DistributionBase
Show JSON schema
{ "title": "UniformDistribution", "type": "object", "properties": { "family": { "const": "Uniform", "default": "Uniform", "title": "Family", "type": "string" }, "distribution_parameters": { "$ref": "#/$defs/UniformDistributionParameters", "default": { "family": "Uniform", "min": 0.0, "max": 0.0 }, "description": "Parameters of the distribution" }, "truncation_parameters": { "anyOf": [ { "$ref": "#/$defs/TruncationParameters" }, { "type": "null" } ], "default": null, "description": "Truncation parameters of the distribution" }, "scaling_parameters": { "anyOf": [ { "$ref": "#/$defs/ScalingParameters" }, { "type": "null" } ], "default": null, "description": "Scaling parameters of the distribution" } }, "$defs": { "ScalingParameters": { "properties": { "scale": { "default": 1, "description": "Scaling factor to apply on the sampled distribution", "title": "Scale", "type": "number" }, "offset": { "default": 0, "description": "Offset factor to apply on the sampled distribution", "title": "Offset", "type": "number" } }, "title": "ScalingParameters", "type": "object" }, "TruncationParameters": { "properties": { "is_truncated": { "default": false, "description": "Whether the distribution is truncated", "title": "Is Truncated", "type": "boolean" }, "min": { "default": 0, "description": "Minimum value of the sampled distribution", "title": "Min", "type": "number" }, "max": { "default": 0, "description": "Maximum value of the sampled distribution", "title": "Max", "type": "number" } }, "title": "TruncationParameters", "type": "object" }, "UniformDistributionParameters": { "properties": { "family": { "const": "Uniform", "default": "Uniform", "title": "Family", "type": "string" }, "min": { "default": 0, "description": "Minimum value of the distribution", "title": "Min", "type": "number" }, "max": { "default": 0, "description": "Maximum value of the distribution", "title": "Max", "type": "number" } }, "title": "UniformDistributionParameters", "type": "object" } } }
- Fields:
- field distribution_parameters: UniformDistributionParameters = UniformDistributionParameters(family=<DistributionFamily.UNIFORM: 'Uniform'>, min=0, max=0)[source]¶
Parameters of the distribution
- pydantic model aind_behavior_services.task_logic.distributions.UniformDistributionParameters[source]¶
Bases:
DistributionParametersBase
Show JSON schema
{ "title": "UniformDistributionParameters", "type": "object", "properties": { "family": { "const": "Uniform", "default": "Uniform", "title": "Family", "type": "string" }, "min": { "default": 0, "description": "Minimum value of the distribution", "title": "Min", "type": "number" }, "max": { "default": 0, "description": "Maximum value of the distribution", "title": "Max", "type": "number" } } }
Module contents¶
- pydantic model aind_behavior_services.task_logic.AindBehaviorTaskLogicModel[source]¶
Bases:
Task
Show JSON schema
{ "title": "AindBehaviorTaskLogicModel", "type": "object", "properties": { "name": { "description": "Name of the task.", "title": "Name", "type": "string" }, "description": { "default": "", "description": "Description of the task.", "title": "Description", "type": "string" }, "task_parameters": { "$ref": "#/$defs/TaskParameters", "description": "Parameters of the task logic" }, "version": { "description": "task schema version", "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", "title": "Version", "type": "string" }, "stage_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Optional stage name the `Task` object instance represents.", "title": "Stage Name" } }, "$defs": { "TaskParameters": { "additionalProperties": true, "properties": { "rng_seed": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Seed of the random number generator", "title": "Rng Seed" }, "aind_behavior_services_pkg_version": { "const": "0.11.0", "default": "0.11.0", "title": "aind_behavior_services package version", "type": "string" } }, "title": "TaskParameters", "type": "object" } }, "additionalProperties": false, "required": [ "name", "task_parameters", "version" ] }
- Config:
extra: str = forbid
validate_assignment: bool = True
validate_default: bool = True
strict: bool = True
str_strip_whitespace: bool = True
- Fields:
- Validators:
- field stage_name: str | None = None[source]¶
Optional stage name the Task object instance represents.
- field task_parameters: TaskParameters [Required][source]¶
Parameters of the task logic
- pydantic model aind_behavior_services.task_logic.TaskParameters[source]¶
Bases:
TaskParameters
Show JSON schema
{ "title": "TaskParameters", "type": "object", "properties": { "rng_seed": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Seed of the random number generator", "title": "Rng Seed" }, "aind_behavior_services_pkg_version": { "const": "0.11.0", "default": "0.11.0", "title": "aind_behavior_services package version", "type": "string" } }, "additionalProperties": true }
- Config:
extra: str = allow
validate_assignment: bool = True
validate_default: bool = True
strict: bool = True
str_strip_whitespace: bool = True
- Fields:
- Validators:
- field aind_behavior_services_pkg_version: Literal['0.11.0'] = '0.11.0'[source]¶
- Constraints:
pattern = ^(0|[1-9]d*).(0|[1-9]d*).(0|[1-9]d*)(?:-((?:0|[1-9]d*|d*[a-zA-Z-][0-9a-zA-Z-]*)(?:.(?:0|[1-9]d*|d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:+([0-9a-zA-Z-]+(?:.[0-9a-zA-Z-]+)*))?$
- Validated by:
- validator coerce_version » aind_behavior_services_pkg_version[source]¶
- Parameters:
v (str)
- Return type:
str