Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
juanbc committed Nov 18, 2023
1 parent 3be0cf3 commit 3ff458d
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 14 deletions.
47 changes: 33 additions & 14 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,42 @@
# Changelog of Scikit-Criteria

<!-- BODY -->
## Version 0.8.7

- **New** Simplyfied how to extend the Scikit-Criteria methods with the `skcriteria.extend` decorators.

Now the user can extend the aggregation and transformers capabilities by decorating a

```python
>>> from skcriteria import extend as ext


## Version 0.8.7

- **New** Added functionality for user extension of scikit-criteria with
decorators for creating aggregation and transformation models using
functions.

```

- All methods (agg and transformers) has a new `get_method_name` instance method.


```python
>>> from skcriteria.extend import mkagg, mktransformer
>>>
>>> @mkagg
>>> def MyAgg(**kwargs):
>>> # Implementation of the aggregation function
>>>
>>> @mkagg(foo=1)
>>> def MyAggWithHyperparam(**kwargs):
>>> # Implementation of the aggregation function with
>>> # hyperparameter 'foo'
>>>
>>> @mktransformer
>>> def MyTrans(**kwargs):
>>> # Implementation of the transformation function
>>>
>>> @mktransformer(bar=2)
>>> def MyTransWithHyperparam(**kwargs):
>>> # Implementation of the transformation function with
>>> # hyperparameter 'bar'
```

These decorators enable the creation of aggregation and transformation
classes based on provided functions, allowing users to
define decision-making models with less flexibility than traditional
inheritance-based models.

- **New** All methods (agg and transformers) has a new `get_method_name`
instance method.


## Version 0.8.5
Expand Down
4 changes: 4 additions & 0 deletions skcriteria/extend.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ def __init__(self, **kwargs):
bound.apply_defaults()
self.__dict__.update(bound.kwargs)

__init__.__signature__ = _skcriteria_init_signature

@doc_inherit(SKCDecisionMakerABC.get_method_name)
def get_method_name(self):
return agg_name
Expand Down Expand Up @@ -285,6 +287,8 @@ def __init__(self, **kwargs):
bound.apply_defaults()
self.__dict__.update(bound.kwargs)

__init__.__signature__ = _skcriteria_init_signature

@doc_inherit(SKCTransformerABC.get_method_name)
def get_method_name(self):
return transformer_name
Expand Down

0 comments on commit 3ff458d

Please sign in to comment.