Skip to content

Commit

Permalink
Merge pull request #40 from quatrope/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
leliel12 authored Oct 26, 2022
2 parents f13a75b + 351c73f commit b43b59f
Show file tree
Hide file tree
Showing 95 changed files with 5,677 additions and 1,652 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ env:

jobs:
testing:
uses: quatrope/scikit-criteria/.github/workflows/tests.yml@0cd9099455b6e45659347dc08e6eeec95f876c10
uses: quatrope/scikit-criteria/.github/workflows/tests.yml@acc77ab49cec6a541095b1ea46c84e2b16174990
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
testing:
uses: quatrope/scikit-criteria/.github/workflows/tests.yml@991bafd28ebc638429e2fcd2c69d7cb9722209ea
uses: quatrope/scikit-criteria/.github/workflows/tests.yml@acc77ab49cec6a541095b1ea46c84e2b16174990

deploy:
needs: testing
Expand All @@ -25,11 +25,11 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install setuptools wheel twine build
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist
python -m build --sdist --wheel
twine upload dist/*
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
tox_env: [py37, py38, py39, py310]
tox_env: [py38, py39, py310]
include:
- tox_env: style
- tox_env: docstyle
Expand Down
66 changes: 63 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,75 @@

<!-- BODY -->

## Version 0.8

- **New** The `skcriteria.cmp` package utilities to compare rankings.

- **New** The new package `skcriteria.datasets` include two datasets (one a
toy and one real) to quickly start your experiments.

- **New** DecisionMatrix now can be sliced with a syntax similar of the
pandas.DataFrame.
- `dm["c0"]` cut the $c0$ criteria.
- `dm[["c0", "c2"]` cut the criteria $c0$ and $c2$.
- `dm.loc["a0"]` cut the alternative $a0$.
- `dm.loc[["a0", "a1"]]` cut the alternatives $a0$ and $a1$.
- `dm.iloc[0:3]` cuts from the first to the third alternative.

- **New** imputation methods for replacing missing data with substituted
values. These methods are in the module `skcriteria.preprocessing.impute`.

- **New** results object now has a `to_series` method.

- **Changed Behaviour**: The ranks and kernels `equals` are now called
`values_equals`. The new `aequals` support tolerances to compare
numpy arrays internally stored in `extra_`, and the `equals` method is
equivalent to `aequals(rtol=0, atol=0)`.

- We detected a bad behavior in ELECTRE2, so we decided to launch a `FutureWarning` when the
class is instantiated. In the version after 0.8, a new implementation of ELECTRE2 will be
provided.

- Multiple `__repr__` was improved to folow the
[Python recomendation](https://docs.python.org/3/library/functions.html#repr)

- `Critic` weighter was renamed to `CRITIC` (all capitals) to be consistent
with the literature. The old class is still there but is deprecated.

- All the functions and classes of `skcriteria.preprocessing.distance` was
moved to `skcriteria.preprocessing.scalers`.

- The `StdWeighter` now uses the **sample** standar-deviation.
From the numerical point of view, this does not generate any change,
since the deviations are scaled by the sum. Computationally speaking there
may be some difference from the ~5th decimal digit onwards.

- Two method of the `Objective` enum was deprecated and replaced:

- `Objective.construct_from_alias()` `->` `Objective.from_alias()` (classmethod)
- `Objective.to_string()` `->` `Objective.to_symbol()'`

The deprecated methods will be removed in version *1.0*.

- Add a dominance plot `DecisionMatrix.plot.dominance()`.

- `WeightedSumModel` raises a `ValueError` when some value $< 0$.

- Moved internal modules
- `skcriteria.core.methods.SKCTransformerABC` `->`
`skcriteria.preprocessing.SKCTransformerABC`
- `skcriteria.core.methods.SKCMatrixAndWeightTransformerABC` `->`
`skcriteria.preprocessing.SKCMatrixAndWeightTransformerABC`

## Version 0.7

- **New method**: `ELECTRE2`.
- **New preprocessin strategy:** A new way to transform from minimization to
- **New preprocessing strategy:** A new way to transform from minimization to
maximization criteria: `NegateMinimize()` which reverses the sign of the
values of the criteria to be minimized (useful for not breaking distance
relations in methods like *TOPSIS*). Additionally the previous we rename the
`MinimizeToMaximize()` transformer to `InvertMinimize()`.
- Now the `RankingResult`, support repeated/tied rankings and some were
- Now the `RankingResult`, support repeated/tied rankings and some methods were
implemented to deal with these cases.

- `RankingResult.has_ties_` to see if there are tied values.
Expand All @@ -21,7 +81,7 @@

- `kernel_alternatives_` to know which alternatives are in the kernel.
- `kernel_size_` to know the number of alternatives in the kernel.
- `kernel_where_` was replaced by `kernel_where_` to standardize the api.
- `kernel_where_` was replaced by `kernelwhere_` to standardize the api.


## Version 0.6
Expand Down
4 changes: 3 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
include LICENSE
include LICENSE.txt
include README.md
include CHANGELOG.md

recursive-include skcriteria *.py
recursive-include skcriteria *.json

exclude tox.ini
exclude pyproject.toml
exclude requirements_dev.txt
exclude .header-template
exclude .readthedocs.yml

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
[![Conda Forge](https://anaconda.org/conda-forge/scikit-criteria/badges/version.svg)](https://anaconda.org/conda-forge/scikit-criteria)
![Conda](https://img.shields.io/conda/dn/conda-forge/scikit-criteria?label=Conda-Forge%20downloads)
[![License](https://img.shields.io/pypi/l/uttrs?color=blue)](https://www.tldrlegal.com/l/bsd3)
[![Python 3.7+](https://img.shields.io/badge/python-3.7+-blue.svg)](https://badge.fury.io/py/uttrs)
[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://badge.fury.io/py/uttrs)



Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ sphinxcontrib-bibtex
sphinx-nested-apidoc
pybtex-apa-style

m2r
m2r2
79 changes: 0 additions & 79 deletions docs/source/_dynamic/CHANGELOG.rst

This file was deleted.

13 changes: 13 additions & 0 deletions docs/source/_static/css/skcriteria.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
--links: #7b8e2d;
/* Background color of jupyter input cell */
--jupyter-in-cell-bg: #e3ffd28c;
/* Deprecation color */
--deprecated: #ff7474;
}


Expand Down Expand Up @@ -40,6 +42,17 @@ a:hover code {
color: var(--primary) !important;
}

span.deprecated {
color: var(--deprecated) !important;
}


/* remove the title of the first page */

section#scikit-criteria-documentation>h1:nth-child(1) {
display: none;
}


/* NAVBAR */

Expand Down
14 changes: 14 additions & 0 deletions docs/source/api/cmp/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
``skcriteria.cmp`` package
============================

.. automodule:: skcriteria.cmp
:members:
:undoc-members:
:show-inheritance:
:ignore-module-all:

.. toctree::
:maxdepth: 2
:glob:

*
7 changes: 7 additions & 0 deletions docs/source/api/cmp/ranks_cmp.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
``skcriteria.cmp.ranks_cmp`` module
===================================

.. automodule:: skcriteria.cmp.ranks_cmp
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/source/api/core/objectives.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
``skcriteria.core.objectives`` module
=====================================

.. automodule:: skcriteria.core.objectives
:members:
:undoc-members:
:show-inheritance:
14 changes: 14 additions & 0 deletions docs/source/api/datasets/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
``skcriteria.datasets`` package
===============================

.. automodule:: skcriteria.datasets
:members:
:undoc-members:
:show-inheritance:
:ignore-module-all:

.. .. toctree::
.. :maxdepth: 2
.. :glob:
.. *
12 changes: 12 additions & 0 deletions docs/source/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@
preprocessing/index


.. toctree::
:maxdepth: 2

cmp/index


.. toctree::
:maxdepth: 2

datasets/index


.. toctree::
:maxdepth: 2

Expand Down
7 changes: 0 additions & 7 deletions docs/source/api/madm/_base.rst

This file was deleted.

7 changes: 7 additions & 0 deletions docs/source/api/madm/_madm_base.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
``skcriteria.madm._madm_base`` module
=====================================

.. automodule:: skcriteria.madm._madm_base
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/source/api/preprocessing/_preprocessing_base.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
``skcriteria.preprocessing._preprocessing_base`` module
=======================================================

.. automodule:: skcriteria.preprocessing._preprocessing_base
:members:
:undoc-members:
:show-inheritance:
3 changes: 3 additions & 0 deletions docs/source/api/preprocessing/distance.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
``skcriteria.preprocessing.distance`` module
============================================

.. warning::
This module is deprecated.

.. automodule:: skcriteria.preprocessing.distance
:members:
:undoc-members:
Expand Down
7 changes: 7 additions & 0 deletions docs/source/api/preprocessing/impute.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
``skcriteria.preprocessing.impute`` module
===========================================

.. automodule:: skcriteria.preprocessing.impute
:members:
:undoc-members:
:show-inheritance:
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
``skcriteria.utils.decorators`` module
``skcriteria.utils.cmanagers`` module
======================================

.. automodule:: skcriteria.utils.decorators
.. automodule:: skcriteria.utils.cmanagers
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/source/api/utils/deprecate.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
``skcriteria.utils.deprecate`` module
======================================

.. automodule:: skcriteria.utils.deprecate
:members:
:undoc-members:
:show-inheritance:
Loading

0 comments on commit b43b59f

Please sign in to comment.