Skip to content

How to handle monotonically_increasing/decreasing attributes on non-unary OPs #2267

Description

@Dekermanjian

Description

Recently we added monotonically_increasing and monotonically_decreasing attributes to UnaryScalarOP and this brought about a discussion around non-unary scalar operations that may be monotonic like Add/Max.

The two options that I can think off are:

1). move the attributes up onto ScalarOP and keep default as FALSE

2). Define special cases of non-unary scalar ops to have the attributes

I think that option one has the advantage that all ScalarOPS would be consistent with these attributes and would avoid a potential attribute error when something like op.scalar_op.monotonic_increasing is called on a Mul op. The disadvantage being how we define and use monotonicity, will it be monotonic in every input while holding the others fixed?

Option two I think would simpler, but would still require a definition of monotonicity for a non-unary operation.

Resolution to this topic would facilitate the completion of pymc-devs/pymc#8259

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions