We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We have a TODO on allowing other lambda functions:
mesmer/mesmer/stats/_power_transformer.py
Line 256 in 8f8c8a0
E.g. logistic, constant, linear. I think we could maybe do this by collecting the necessary info in a class for each covariate function:
class LogisticLambda: bounds = np.array([[0, np.inf], [-0.1, 0.1]]) first_guess = np.array([1, 0]) @staticmethod def lambdas_from_covariates(coeffs, covariate): return 2 / (1 + coeffs[0] * np.exp(covariate * coeffs[1])) class ConstantLambda: bounds = None first_guess = np.array([1]) @staticmethod def lambdas_from_covariates(coeffs, covariate): return np.full_like(covariate, fill_value=coeffs) def _get_lambda_cls(function): if function == "logistic": return LogisticLambda() elif function == "constant": return ConstantLambda() else: raise ValueError() ...
- lambdas = lambda_function(coeffs, yearly_pred) + lambda_cls = _get_lambda_cls("constant") + lambdas = lambda_cls.lambdas_from_covariates(coeffs, yearly_pred)
As a side note: we have similar goals and challenges as for MESMER-X: extending standard statistical methods with covariates...
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
No branches or pull requests
We have a TODO on allowing other lambda functions:
mesmer/mesmer/stats/_power_transformer.py
Line 256 in 8f8c8a0
E.g. logistic, constant, linear. I think we could maybe do this by collecting the necessary info in a class for each covariate function:
As a side note: we have similar goals and challenges as for MESMER-X: extending standard statistical methods with covariates...
The text was updated successfully, but these errors were encountered: