Skip to content

Commit

Permalink
Updated docs main page
Browse files Browse the repository at this point in the history
  • Loading branch information
tommyod committed Apr 1, 2018
1 parent aeeb7b9 commit d7330ea
Show file tree
Hide file tree
Showing 7 changed files with 187 additions and 39 deletions.
154 changes: 154 additions & 0 deletions docs/source/_static/img/create_images.ipynb

Large diffs are not rendered by default.

Binary file added docs/source/_static/img/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
# documentation.
#
html_theme_options = {
# 'logo': 'logo.png',
# 'logo': 'logo.png',
'github_user': 'tommyod',
'github_repo': 'KDEpy',
Expand All @@ -104,7 +105,8 @@
'font_size': '15px',
'head_font_family': '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,\
"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"\
,"Segoe UI Symbol"'
,"Segoe UI Symbol"',
'page_width': '940px'
}

# Add any paths that contain custom static files (such as style sheets) here,
Expand Down
59 changes: 29 additions & 30 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,60 +6,59 @@
KDEpy
=====

Example
-------
KDEpy implements univariate kernel density estimators.

The package works roughly like this.
Since Pythagoras, we know that :math:`a^2 + b^2 = c^2`.
Highlights
----------

.. code-block:: python
:linenos:
KDEpy is a Python library for kernel density estimation.

from KDEpy import KDE
kde = KDE()
Currently, the following features are implemented:

* **Many kernels**: There are 10 kernel functions implemented.
* **Weighted KDE**: The user may weight the data.
* **Weighted KDE**: The user may weight the data.

.. code-block:: ipython

>>> print('test')

Minimal working example
-----------------------

.. code-block:: python
:linenos:
Here's a minimal working example::

from KDEpy import KDE
kde = KDE()
>>> from KDEpy import KDE
>>> import numpy as npmake
>>> from scipy.stats import norm
>>> data = norm(loc=0, scale=1).rvs(100)
>>> x = np.linspace(-3, 3)
>>> y = KDE(kernel='gaussian', bw=0.5).fit(data).evaluate(x)

.. image:: _static/img/minimal_working_example.png
:width: 400 px
:target: #

It's really that simple.

Here's some code::

>>> print('test')
test
>>> 2 + 2
4


Doctest example:

.. doctest::

>>> 2 + 2
4

Table of contents
-----------------

.. toctree::
:maxdepth: 2
:caption: Contents:

intro_kde
notebook.ipynb


Contribute
----------

You are very welcome to contribute.
To do so, please go to GitHub.


Indices and tables
==================
------------------

* :ref:`genindex`
* :ref:`modindex`
Expand Down
9 changes: 1 addition & 8 deletions docs/source/intro_kde.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,7 @@ Testing

:class:`KDE` will take in its ``fit`` method arrays X, y
and will store the coefficients :math:`w` of the linear model in its
``coef_`` member::

>>> from sklearn import linear_model
>>> reg = linear_model.LinearRegression()
>>> reg.fit ([[0, 0], [1, 1], [2, 2]], [0, 1, 2])
LinearRegression(copy_X=True, fit_intercept=True, n_jobs=1, normalize=False)
>>> reg.coef_
array([ 0.5, 0.5])
``coef_`` member.

Histograms
----------
Expand Down

0 comments on commit d7330ea

Please sign in to comment.