Skip to content

Commit

Permalink
Publish version 0.10.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquev6 committed Oct 24, 2023
1 parent f177413 commit d37503e
Show file tree
Hide file tree
Showing 28 changed files with 79 additions and 87 deletions.
12 changes: 5 additions & 7 deletions doc-sources/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,16 @@
Changelog
=========

Version 0.10.1
==============

- Fix ``lincs visualize`` to use criteria's min/max values and category correlation

Version 0.10.0
==============
Versions 0.10.0 to 0.10.2
=========================

This is the first release candidate for version 1.0.0.

- **Breaking**: Allow more flexible description of accepted values in the model json schema. See user guide for details.
- **Breaking**: Rename option ``--ucncs.approach`` to ``--ucncs.strategy``
- **Breaking**: Rename option ``--output-classified-alternatives`` to ``--output-alternatives``
- Fix line ends on Windows
- Fix ``lincs visualize`` to use criteria's min/max values and category correlation
- Validate consistency with problem when loading alternatives or model files
- Output "reproduction command" in ``lincs classify``
- Improve documentation
Expand Down
2 changes: 1 addition & 1 deletion doc-sources/conceptual-overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ If yes, they get a partial scholarship.
.. STOP
.. START concept-example/expected-classified-alternatives.csv
# Reproduction command (with lincs version 0.10.2-dev): lincs classify problem.yml model.yml alternatives.csv
# Reproduction command (with lincs version 0.10.2): lincs classify problem.yml model.yml alternatives.csv
name,Math,Physics,Literature,History,category
A,1,1,1,1,"Full scholarship"
B,1,1,1,0,"Full scholarship"
Expand Down
8 changes: 4 additions & 4 deletions doc-sources/get-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ So, start by generating a classification problem with 4 criteria and 3 categorie
The generated ``problem.yml`` should look like::

# Reproduction command (with lincs version 0.10.2-dev): lincs generate classification-problem 4 3 --random-seed 40
# Reproduction command (with lincs version 0.10.2): lincs generate classification-problem 4 3 --random-seed 40
kind: classification-problem
format_version: 1
criteria:
Expand Down Expand Up @@ -142,7 +142,7 @@ Then generate an NCS classification model::
It should look like::

# Reproduction command (with lincs version 0.10.2-dev): lincs generate classification-model problem.yml --random-seed 41 --model-type mrsort
# Reproduction command (with lincs version 0.10.2): lincs generate classification-model problem.yml --random-seed 41 --model-type mrsort
kind: ncs-classification-model
format_version: 1
accepted_values:
Expand Down Expand Up @@ -212,7 +212,7 @@ Then we'll need to think about the how the ``--max-imbalance`` option interacts
It should start with something like this, and contain 1000 alternatives::

# Reproduction command (with lincs version 0.10.2-dev): lincs generate classified-alternatives problem.yml model.yml 1000 --random-seed 42 --misclassified-count 0
# Reproduction command (with lincs version 0.10.2): lincs generate classified-alternatives problem.yml model.yml 1000 --random-seed 42 --misclassified-count 0
name,"Criterion 1","Criterion 2","Criterion 3","Criterion 4",category
"Alternative 1",0.37454012,0.796543002,0.95071429,0.183434784,"Category 3"
"Alternative 2",0.731993914,0.779690981,0.598658502,0.596850157,"Category 2"
Expand Down Expand Up @@ -268,7 +268,7 @@ The learning set doesn't contain all the information from the original model,
and the trained model was reconstituted from this partial information,
so it is numerically different::

# Reproduction command (with lincs version 0.10.2-dev): lincs learn classification-model problem.yml learning-set.csv --model-type mrsort --mrsort.strategy weights-profiles-breed --mrsort.weights-profiles-breed.models-count 9 --mrsort.weights-profiles-breed.accuracy-heuristic.random-seed 43 --mrsort.weights-profiles-breed.initialization-strategy maximize-discrimination-per-criterion --mrsort.weights-profiles-breed.weights-strategy linear-program --mrsort.weights-profiles-breed.linear-program.solver glop --mrsort.weights-profiles-breed.profiles-strategy accuracy-heuristic --mrsort.weights-profiles-breed.accuracy-heuristic.processor cpu --mrsort.weights-profiles-breed.breed-strategy reinitialize-least-accurate --mrsort.weights-profiles-breed.reinitialize-least-accurate.portion 0.5 --mrsort.weights-profiles-breed.target-accuracy 1.0
# Reproduction command (with lincs version 0.10.2): lincs learn classification-model problem.yml learning-set.csv --model-type mrsort --mrsort.strategy weights-profiles-breed --mrsort.weights-profiles-breed.models-count 9 --mrsort.weights-profiles-breed.accuracy-heuristic.random-seed 43 --mrsort.weights-profiles-breed.initialization-strategy maximize-discrimination-per-criterion --mrsort.weights-profiles-breed.weights-strategy linear-program --mrsort.weights-profiles-breed.linear-program.solver glop --mrsort.weights-profiles-breed.profiles-strategy accuracy-heuristic --mrsort.weights-profiles-breed.accuracy-heuristic.processor cpu --mrsort.weights-profiles-breed.breed-strategy reinitialize-least-accurate --mrsort.weights-profiles-breed.reinitialize-least-accurate.portion 0.5 --mrsort.weights-profiles-breed.target-accuracy 1.0
# Termination condition: target accuracy reached
# Number of iterations: 22
kind: ncs-classification-model
Expand Down
6 changes: 3 additions & 3 deletions doc-sources/user-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ Here is an example using the `Alglib <https://www.alglib.net/>`_ solver::
It should produce a very similar model, with slight numerical differences.

.. START alglib-learning/expected-alglib-trained-model.yml
# Reproduction command (with lincs version 0.10.2-dev): lincs learn classification-model problem.yml learning-set.csv --model-type mrsort --mrsort.strategy weights-profiles-breed --mrsort.weights-profiles-breed.models-count 9 --mrsort.weights-profiles-breed.accuracy-heuristic.random-seed 43 --mrsort.weights-profiles-breed.initialization-strategy maximize-discrimination-per-criterion --mrsort.weights-profiles-breed.weights-strategy linear-program --mrsort.weights-profiles-breed.linear-program.solver alglib --mrsort.weights-profiles-breed.profiles-strategy accuracy-heuristic --mrsort.weights-profiles-breed.accuracy-heuristic.processor cpu --mrsort.weights-profiles-breed.breed-strategy reinitialize-least-accurate --mrsort.weights-profiles-breed.reinitialize-least-accurate.portion 0.5 --mrsort.weights-profiles-breed.target-accuracy 1.0
# Reproduction command (with lincs version 0.10.2): lincs learn classification-model problem.yml learning-set.csv --model-type mrsort --mrsort.strategy weights-profiles-breed --mrsort.weights-profiles-breed.models-count 9 --mrsort.weights-profiles-breed.accuracy-heuristic.random-seed 43 --mrsort.weights-profiles-breed.initialization-strategy maximize-discrimination-per-criterion --mrsort.weights-profiles-breed.weights-strategy linear-program --mrsort.weights-profiles-breed.linear-program.solver alglib --mrsort.weights-profiles-breed.profiles-strategy accuracy-heuristic --mrsort.weights-profiles-breed.accuracy-heuristic.processor cpu --mrsort.weights-profiles-breed.breed-strategy reinitialize-least-accurate --mrsort.weights-profiles-breed.reinitialize-least-accurate.portion 0.5 --mrsort.weights-profiles-breed.target-accuracy 1.0
# Termination condition: target accuracy reached
# Number of iterations: 9
kind: ncs-classification-model
Expand Down Expand Up @@ -591,7 +591,7 @@ And::
They should produce a different kind of model, with the sufficient coalitions specified explicitly by their roots::

# Reproduction command (with lincs version 0.10.2-dev): lincs learn classification-model problem.yml learning-set.csv --model-type ucncs --ucncs.strategy sat-by-coalitions
# Reproduction command (with lincs version 0.10.2): lincs learn classification-model problem.yml learning-set.csv --model-type ucncs --ucncs.strategy sat-by-coalitions
kind: ncs-classification-model
format_version: 1
accepted_values:
Expand All @@ -613,7 +613,7 @@ They should produce a different kind of model, with the sufficient coalitions sp
.. STOP
.. START sat-learnings/expected-max-sat-by-separation-trained-model.yml
# Reproduction command (with lincs version 0.10.2-dev): lincs learn classification-model problem.yml learning-set.csv --model-type ucncs --ucncs.strategy max-sat-by-separation
# Reproduction command (with lincs version 0.10.2): lincs learn classification-model problem.yml learning-set.csv --model-type ucncs --ucncs.strategy max-sat-by-separation
kind: ncs-classification-model
format_version: 1
accepted_values:
Expand Down
2 changes: 1 addition & 1 deletion docs/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 4d21c6d4dfc9ed9c5861a55078162fe0
config: 3e5c069326af377335200e954a72817b
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file modified docs/.doctrees/changelog.doctree
Binary file not shown.
Binary file modified docs/.doctrees/conceptual-overview.doctree
Binary file not shown.
Binary file modified docs/.doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/.doctrees/get-started.doctree
Binary file not shown.
Binary file modified docs/.doctrees/reference.doctree
Binary file not shown.
Binary file modified docs/.doctrees/user-guide.doctree
Binary file not shown.
12 changes: 5 additions & 7 deletions docs/_sources/changelog.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,16 @@
Changelog
=========

Version 0.10.1
==============

- Fix ``lincs visualize`` to use criteria's min/max values and category correlation

Version 0.10.0
==============
Versions 0.10.0 to 0.10.2
=========================

This is the first release candidate for version 1.0.0.

- **Breaking**: Allow more flexible description of accepted values in the model json schema. See user guide for details.
- **Breaking**: Rename option ``--ucncs.approach`` to ``--ucncs.strategy``
- **Breaking**: Rename option ``--output-classified-alternatives`` to ``--output-alternatives``
- Fix line ends on Windows
- Fix ``lincs visualize`` to use criteria's min/max values and category correlation
- Validate consistency with problem when loading alternatives or model files
- Output "reproduction command" in ``lincs classify``
- Improve documentation
Expand Down
4 changes: 2 additions & 2 deletions docs/_sources/conceptual-overview.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ The profiles for this model look like this:
lincs visualize classification-model problem.yml model.yml concept-example-model.png
cp concept-example-model.png ../../../../doc-sources
lincs classify problem.yml model.yml alternatives.csv --output-classified-alternatives classified-alternatives.csv
lincs classify problem.yml model.yml alternatives.csv --output-alternatives classified-alternatives.csv
diff classified-alternatives.csv expected-classified-alternatives.csv
.. STOP
Expand Down Expand Up @@ -362,7 +362,7 @@ If yes, they get a partial scholarship.
.. STOP
.. START concept-example/expected-classified-alternatives.csv
# Reproduction command (with lincs version 0.10.1): lincs classify problem.yml model.yml alternatives.csv
# Reproduction command (with lincs version 0.10.2): lincs classify problem.yml model.yml alternatives.csv
name,Math,Physics,Literature,History,category
A,1,1,1,1,"Full scholarship"
B,1,1,1,0,"Full scholarship"
Expand Down
14 changes: 7 additions & 7 deletions docs/_sources/get-started.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ So, start by generating a classification problem with 4 criteria and 3 categorie
The generated ``problem.yml`` should look like::

# Reproduction command (with lincs version 0.10.1): lincs generate classification-problem 4 3 --random-seed 40
# Reproduction command (with lincs version 0.10.2): lincs generate classification-problem 4 3 --random-seed 40
kind: classification-problem
format_version: 1
criteria:
Expand Down Expand Up @@ -142,7 +142,7 @@ Then generate an NCS classification model::
It should look like::

# Reproduction command (with lincs version 0.10.1): lincs generate classification-model problem.yml --random-seed 41 --model-type mrsort
# Reproduction command (with lincs version 0.10.2): lincs generate classification-model problem.yml --random-seed 41 --model-type mrsort
kind: ncs-classification-model
format_version: 1
accepted_values:
Expand Down Expand Up @@ -195,7 +195,7 @@ It should output something like:
And finally generate a set of classified alternatives::

lincs generate classified-alternatives problem.yml model.yml 1000 --output-classified-alternatives learning-set.csv
lincs generate classified-alternatives problem.yml model.yml 1000 --output-alternatives learning-set.csv

.. APPEND-TO-LAST-LINE --random-seed 42
.. STOP
Expand All @@ -212,7 +212,7 @@ Then we'll need to think about the how the ``--max-imbalance`` option interacts
It should start with something like this, and contain 1000 alternatives::

# Reproduction command (with lincs version 0.10.1): lincs generate classified-alternatives problem.yml model.yml 1000 --random-seed 42 --misclassified-count 0
# Reproduction command (with lincs version 0.10.2): lincs generate classified-alternatives problem.yml model.yml 1000 --random-seed 42 --misclassified-count 0
name,"Criterion 1","Criterion 2","Criterion 3","Criterion 4",category
"Alternative 1",0.37454012,0.796543002,0.95071429,0.183434784,"Category 3"
"Alternative 2",0.731993914,0.779690981,0.598658502,0.596850157,"Category 2"
Expand Down Expand Up @@ -268,7 +268,7 @@ The learning set doesn't contain all the information from the original model,
and the trained model was reconstituted from this partial information,
so it is numerically different::

# Reproduction command (with lincs version 0.10.1): lincs learn classification-model problem.yml learning-set.csv --model-type mrsort --mrsort.strategy weights-profiles-breed --mrsort.weights-profiles-breed.models-count 9 --mrsort.weights-profiles-breed.accuracy-heuristic.random-seed 43 --mrsort.weights-profiles-breed.initialization-strategy maximize-discrimination-per-criterion --mrsort.weights-profiles-breed.weights-strategy linear-program --mrsort.weights-profiles-breed.linear-program.solver glop --mrsort.weights-profiles-breed.profiles-strategy accuracy-heuristic --mrsort.weights-profiles-breed.accuracy-heuristic.processor cpu --mrsort.weights-profiles-breed.breed-strategy reinitialize-least-accurate --mrsort.weights-profiles-breed.reinitialize-least-accurate.portion 0.5 --mrsort.weights-profiles-breed.target-accuracy 1.0
# Reproduction command (with lincs version 0.10.2): lincs learn classification-model problem.yml learning-set.csv --model-type mrsort --mrsort.strategy weights-profiles-breed --mrsort.weights-profiles-breed.models-count 9 --mrsort.weights-profiles-breed.accuracy-heuristic.random-seed 43 --mrsort.weights-profiles-breed.initialization-strategy maximize-discrimination-per-criterion --mrsort.weights-profiles-breed.weights-strategy linear-program --mrsort.weights-profiles-breed.linear-program.solver glop --mrsort.weights-profiles-breed.profiles-strategy accuracy-heuristic --mrsort.weights-profiles-breed.accuracy-heuristic.processor cpu --mrsort.weights-profiles-breed.breed-strategy reinitialize-least-accurate --mrsort.weights-profiles-breed.reinitialize-least-accurate.portion 0.5 --mrsort.weights-profiles-breed.target-accuracy 1.0
# Termination condition: target accuracy reached
# Number of iterations: 22
kind: ncs-classification-model
Expand Down Expand Up @@ -303,7 +303,7 @@ To see how close a trained model is to the original one, you can reclassify a te
First, generate a testing set::

lincs generate classified-alternatives problem.yml model.yml 10000 --output-classified-alternatives testing-set.csv
lincs generate classified-alternatives problem.yml model.yml 10000 --output-alternatives testing-set.csv

.. APPEND-TO-LAST-LINE --random-seed 44
.. STOP
Expand All @@ -314,7 +314,7 @@ First, generate a testing set::
And ask the trained model to classify it::

lincs classify problem.yml trained-model.yml testing-set.csv --output-classified-alternatives reclassified-testing-set.csv
lincs classify problem.yml trained-model.yml testing-set.csv --output-alternatives reclassified-testing-set.csv

.. STOP
Expand Down
12 changes: 6 additions & 6 deletions docs/_sources/user-guide.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ To describe problems, *lincs* uses YAML files conforming to the `JSON schema <ht
# Check that the NCS model is correct (we don't have explicit commands for that, so we use generate classified-alternatives)
lincs generate classified-alternatives problem.yml ncs-model.yml 1 >/dev/null
lincs classify problem.yml mrsort-model.yml unclassified-alternatives.csv --output-classified-alternatives classified-alternatives.csv
lincs classify problem.yml mrsort-model.yml unclassified-alternatives.csv --output-alternatives classified-alternatives.csv
diff <(tail -n +2 classified-alternatives.csv) expected-classified-alternatives.csv
.. STOP
Expand Down Expand Up @@ -336,7 +336,7 @@ With its default settings, ``lincs generate classified-alternatives`` requires o

lincs generate classified-alternatives problem.yml model.yml 100

.. APPEND-TO-LAST-LINE --output-classified-alternatives learning-set.csv
.. APPEND-TO-LAST-LINE --output-alternatives learning-set.csv
.. STOP
This generates 100 random alternatives, and then classifies them according to the model.
Expand Down Expand Up @@ -475,7 +475,7 @@ Here is an example using the `Alglib <https://www.alglib.net/>`_ solver::
It should produce a very similar model, with slight numerical differences.

.. START alglib-learning/expected-alglib-trained-model.yml
# Reproduction command (with lincs version 0.10.1): lincs learn classification-model problem.yml learning-set.csv --model-type mrsort --mrsort.strategy weights-profiles-breed --mrsort.weights-profiles-breed.models-count 9 --mrsort.weights-profiles-breed.accuracy-heuristic.random-seed 43 --mrsort.weights-profiles-breed.initialization-strategy maximize-discrimination-per-criterion --mrsort.weights-profiles-breed.weights-strategy linear-program --mrsort.weights-profiles-breed.linear-program.solver alglib --mrsort.weights-profiles-breed.profiles-strategy accuracy-heuristic --mrsort.weights-profiles-breed.accuracy-heuristic.processor cpu --mrsort.weights-profiles-breed.breed-strategy reinitialize-least-accurate --mrsort.weights-profiles-breed.reinitialize-least-accurate.portion 0.5 --mrsort.weights-profiles-breed.target-accuracy 1.0
# Reproduction command (with lincs version 0.10.2): lincs learn classification-model problem.yml learning-set.csv --model-type mrsort --mrsort.strategy weights-profiles-breed --mrsort.weights-profiles-breed.models-count 9 --mrsort.weights-profiles-breed.accuracy-heuristic.random-seed 43 --mrsort.weights-profiles-breed.initialization-strategy maximize-discrimination-per-criterion --mrsort.weights-profiles-breed.weights-strategy linear-program --mrsort.weights-profiles-breed.linear-program.solver alglib --mrsort.weights-profiles-breed.profiles-strategy accuracy-heuristic --mrsort.weights-profiles-breed.accuracy-heuristic.processor cpu --mrsort.weights-profiles-breed.breed-strategy reinitialize-least-accurate --mrsort.weights-profiles-breed.reinitialize-least-accurate.portion 0.5 --mrsort.weights-profiles-breed.target-accuracy 1.0
# Termination condition: target accuracy reached
# Number of iterations: 9
kind: ncs-classification-model
Expand Down Expand Up @@ -591,7 +591,7 @@ And::
They should produce a different kind of model, with the sufficient coalitions specified explicitly by their roots::

# Reproduction command (with lincs version 0.10.1): lincs learn classification-model problem.yml learning-set.csv --model-type ucncs --ucncs.strategy sat-by-coalitions
# Reproduction command (with lincs version 0.10.2): lincs learn classification-model problem.yml learning-set.csv --model-type ucncs --ucncs.strategy sat-by-coalitions
kind: ncs-classification-model
format_version: 1
accepted_values:
Expand All @@ -613,7 +613,7 @@ They should produce a different kind of model, with the sufficient coalitions sp
.. STOP
.. START sat-learnings/expected-max-sat-by-separation-trained-model.yml
# Reproduction command (with lincs version 0.10.1): lincs learn classification-model problem.yml learning-set.csv --model-type ucncs --ucncs.strategy max-sat-by-separation
# Reproduction command (with lincs version 0.10.2): lincs learn classification-model problem.yml learning-set.csv --model-type ucncs --ucncs.strategy max-sat-by-separation
kind: ncs-classification-model
format_version: 1
accepted_values:
Expand Down Expand Up @@ -646,7 +646,7 @@ you can use it to classify alternatives with ``lincs classify problem.yml model.
The ``category`` column in the input alternatives file is ignored and may be empty.

Note that the input files will not be modified: the classified alternatives will be printed on the standard output
or written in the file specified by ``--output-classified-alternatives``.
or written in the file specified by ``--output-alternatives``.

Computing a classification accuracy
-----------------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/_static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '0.10.1',
VERSION: '0.10.2',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
Expand Down
Loading

0 comments on commit d37503e

Please sign in to comment.