Skip to content

Commit 88706b7

Browse files
committed
Add documentation files
1 parent b67dce1 commit 88706b7

File tree

6 files changed

+155
-0
lines changed

6 files changed

+155
-0
lines changed

docs/source/API/actions.rst

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
actions
2+
=======
3+
4+
.. automodule:: actions
5+
6+
7+
8+
9+
10+
11+
12+
13+
14+
15+
16+
.. rubric:: Classes
17+
18+
.. autosummary::
19+
20+
.. autoclass:: ActionBase
21+
:members: __init__, act
22+
23+
.. autoclass:: ActionIdentity
24+
:members: __init__, act
25+
26+
ActionNumericBinGeneralize
27+
ActionNumericStepGeneralize
28+
ActionRestore
29+
30+
.. autoclass:: ActionStringGeneralize
31+
:members: __init__, act, add
32+
33+
ActionSuppress
34+
ActionTransform
35+
ActionType
36+
37+
38+
39+
40+
41+
42+
43+
44+

docs/source/examples.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Examples
2+
========
3+
4+
Some examples can be found below
5+
6+
- `Qlearning agent on a three columns dataset <src/examples/qlearning_three_columns.py>`_
7+
- `N-step semi-gradient SARSA on a three columns dataset <src/examples/nstep_semi_grad_sarsa_three_columns.py>`_

docs/source/index.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
.. RL Anonymity (with Python) documentation master file, created by
2+
sphinx-quickstart on Tue Feb 15 17:55:45 2022.
3+
You can adapt this file completely to your liking, but it should at least
4+
contain the root `toctree` directive.
5+
6+
Welcome to RL Anonymity (with Python)'s documentation!
7+
======================================================
8+
9+
An experimental effort to use reinforcement learning techniques for data anonymization.
10+
11+
Contents
12+
--------
13+
14+
.. toctree::
15+
:maxdepth: 2
16+
17+
18+
overview
19+
install
20+
examples
21+
modules
22+
23+
Indices and tables
24+
==================
25+
26+
* :ref:`genindex`
27+
* :ref:`modindex`
28+
* :ref:`search`
29+
30+

docs/source/install.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Installation
2+
============
3+
4+
The following packages are required:
5+
6+
- `NumPy <https://numpy.org/>`_
7+
- `Sphinx <https://www.sphinx-doc.org/en/master/>`_
8+
- `Python Pandas <https://pandas.pydata.org/>`_
9+
10+
.. code-block:: console
11+
12+
pip install -r requirements.txt
13+
14+
15+
Generate documentation
16+
======================
17+
18+
You will need `Sphinx <https://www.sphinx-doc.org/en/master/>`_ in order to generate the API documentation. Assuming that Sphinx is already installed
19+
on your machine execute the following commands (see also `Sphinx tutorial <https://www.sphinx-doc.org/en/master/tutorial/index.html>`_).
20+
21+
.. code-block:: console
22+
23+
sphinx-quickstart docs
24+
sphinx-build -b html docs/source/ docs/build/html
25+
26+
27+

docs/source/modules.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
API
2+
===
3+
4+
.. toctree::
5+
:maxdepth: 4
6+
7+
API/actions
8+
generated/action_space
9+
generated/q_estimator
10+
generated/q_learning
11+
generated/trainer
12+
generated/sarsa_semi_gradient
13+
generated/exceptions
14+
generated/action_space
15+
generated/actions
16+
generated/column_type
17+
generated/discrete_state_environment
18+
generated/observation_space
19+
generated/state
20+
generated/time_step
21+
generated/tiled_environment
22+

docs/source/overview.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Conceptual overview
2+
===================
3+
4+
The term data anonymization refers to techiniques that can be applied on a given dataset, D, such that after
5+
the latter has been submitted to such techniques, it makes it difficult for a third party to identify or infer the existence
6+
of specific individuals in D. Anonymization techniques, typically result into some sort of distortion
7+
of the original dataset. This means that in order to maintain some utility of the transformed dataset, the transofrmations
8+
applied should be constrained in some sense. In the end, it can be argued, that data anonymization is an optimization problem
9+
meaning striking the right balance between data utility and privacy.
10+
11+
Reinforcement learning is a learning framework based on accumulated experience. In this paradigm, an agent is learning by iteracting with an environment
12+
without (to a large extent) any supervision. The following image describes, schematically, the reinforcement learning framework .
13+
14+
![RL paradigm](images/agent_environment_interface.png "Reinforcement learning paradigm")
15+
16+
The agent chooses an action, ```a_t```, to perform out of predefined set of actions ```A```. The chosen action is executed by the environment
17+
instance and returns to the agent a reward signal, ```r_t```, as well as the new state, ```s_t```, that the enviroment is in.
18+
The framework has successfully been used to many recent advances in control, robotics, games and elsewhere.
19+
20+
21+
Let's assume that we have in our disposal two numbers a minimum distortion, ```MIN_DIST``` that should be applied to the dataset
22+
for achieving privacy and a maximum distortion, ```MAX_DIST```, that should be applied to the dataset in order to maintain some utility.
23+
Let's assume also that any overall dataset distortion in ```[MIN_DIST, MAX_DIST]``` is acceptable in order to cast the dataset as
24+
preserving privacy and preserving dataset utility. We can then train a reinforcement learning agent to distort the dataset
25+
such that the aforementioned objective is achieved.

0 commit comments

Comments
 (0)