Skip to content

Commit

Permalink
fixed typos and minor reword
Browse files Browse the repository at this point in the history
  • Loading branch information
belsten authored and belsten committed Nov 23, 2024
1 parent 81cc36c commit 1a8c233
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 61 deletions.
42 changes: 23 additions & 19 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,40 @@
Contributing
============

All contributions are welcome!
We welcome all contributions!

Bug Reporting
-------------

If you find a bug, submit a bug report on GitHub Issues.
If you encounter a bug, please report it by creating an issue on GitHub.

Adding Features/Fixing Bugs
---------------------------
Adding Features or Fixing Bugs
------------------------------

If you have identified a new feature or bug that you can fix yourself, please follow the following procedure.
If you’ve identified a new feature to add or a bug you can fix, follow these steps:

#. Clone ``main`` branch.
#. Create a new branch to contain your changes.
#. ``add``, ``commit``, and ``push`` your changes to this branch.
#. Create a pull request (PR). See more information on submitting a PR request below.
#. Clone the ``main`` branch.
#. Create a new branch to work on your changes.
#. Use ``add``, ``commit``, and ``push`` to save your changes to the new branch.
#. Create a pull request (PR). See the "Submitting a Pull Request" section for more details.

Submitting a Pull Request
-------------------------

#. If necessary, please **write your own unit tests** and add them to `the tests directory <https://github.com/rctn/sparsecoding/blob/main/tests>`_.
#. Verify that all tests are passed by running `python -m unittest discover tests -vvv`.
#. Be sure that your PR follows formatting guidelines, `PEP8 <https://peps.python.org/pep-0008/>`_ and `flake8 <https://flake8.pycqa.org/en/latest/>`_.
#. Make sure the title of your PR summarizes the features/issues resolved in your branch.
#. Submit your pull request and add reviewers.
#. If applicable, write unit tests for your changes and add them to the
`tests directory <https://github.com/rctn/sparsecoding/blob/main/tests>`_.
#. Verify that all tests pass by running ``python -m unittest discover tests -vvv``.
#. Ensure your code adheres to the formatting guidelines specified in
`PEP8 <https://peps.python.org/pep-0008/>`_ and validated by
`flake8 <https://flake8.pycqa.org/en/latest/>`_.
#. Provide a concise and descriptive title for your PR that summarizes the changes made in your branch.
#. Submit your PR and assign reviewers as necessary.

Coding Style Guidelines
-----------------------
We adhere to the `NumPy documentation standards <https://numpydoc.readthedocs.io/en/latest/format.html>`_.
------------------------

#. Format code in accordance with `flake8 <https://flake8.pycqa.org/en/latest/>`_ standard.
#. Use underscores to separate words in non-class names: ``n_samples`` rather than ``nsamples``.
#. Avoid single-character variable names.
We follow the `NumPy documentation standards <https://numpydoc.readthedocs.io/en/latest/format.html>`_.

1. Format your code according to the `flake8 <https://flake8.pycqa.org/en/latest/>`_ standard.
2. Use underscores to separate words in non-class names (e.g., ``n_samples`` instead of ``nsamples``).
3. Avoid single-character variable names.
21 changes: 7 additions & 14 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,19 @@
Installation
============

The fastest way to install is by cloning the library from Github:
The quickest way to install the library is by cloning it directly from GitHub:

.. code:: bash
$ git clone https://github.com/rctn/sparsecoding.git
$ cd sparsecoding
$ pip install -e sparsecoding
$ pip install -r requirements.txt
git clone https://github.com/rctn/sparsecoding.git
cd sparsecoding
pip install -e sparsecoding
pip install -r requirements.txt
The last command installs the dependencies required for the RCTN sparse coding library, including:

The last line of the code above will install the RCTN sparse coding dependencies:

- ``numpy``

- ``numpy``
- ``scipy``

- ``matplotlib``

- ``torch``

- ``torchvision``


48 changes: 20 additions & 28 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,34 @@ Overview

.. _sparsecoding: https://github.com/rctn/sparsecoding/

`sparsecoding`_ is a python package that provides tools for using sparse coding algorithms.
Historically, sparse coding has been largely focused on learning sparse representations
of images and we provide visualization and transformation tools to work with such data.
However, we've tried to structure the dictionary learning methods and inference methods
in a manner that is data-agnostic.
`sparsecoding`_ is a Python package that provides tools for implementing sparse coding algorithms.
Traditionally, sparse coding has been primarily used for learning sparse representations of images.
To support this, we include tools for visualization and data transformation specific to image data.
However, we have designed the dictionary learning and inference methods to be data-agnostic,
allowing for broader applications.

The `sparsecoding`_ library is largely built using PyTorch which enables it to inheret
many performance benifits. These include:
The `sparsecoding`_ library is built largely on PyTorch, enabling it to inherit several
performance benefits, such as:

- GPU support

- Batched operations

- Auto-grad optimizers

Structure of the Library
-------------------------

The functionalities of `sparsecoding`_ are organized into several modules:

Structure of library
--------------------

The functionalities of `sparsecoding`_ are broken into differnent modules.

- ``sparsecoding.models`` contains dictionary learning models (e.g. SparseCoding).

- ``sparsecoding.inference`` contains algorithms for computing latent coefficients.

- ``sparsecoding.visualization`` contains tools for visualizing image dictionaries and data.

- ``sparsecoding.priors`` contains methods for sampling from various sparse coding priors.

- ``sparsecoding.datasets`` contains methods for loading datasets.

- ``sparsecoding.transforms`` contains methods working with data, such as whitening and extracting patches from images.

- ``sparsecoding.models``: Contains dictionary learning models (e.g., SparseCoding).
- ``sparsecoding.inference``: Includes algorithms for computing latent coefficients.
- ``sparsecoding.visualization``: Provides tools for visualizing image dictionaries and data.
- ``sparsecoding.priors``: Offers methods for sampling from various sparse coding priors.
- ``sparsecoding.datasets``: Contains utilities for loading datasets.
- ``sparsecoding.transforms``: Includes methods for working with data, such as whitening and
extracting patches from images.

Getting started
Getting Started
---------------

`See example notebooks <https://github.com/rctn/sparsecoding/tree/main/examples>`_.
Explore our `example notebooks <https://github.com/rctn/sparsecoding/tree/main/examples>`_
to get started.

0 comments on commit 1a8c233

Please sign in to comment.