diff --git a/.gitignore b/.gitignore index ba48072..7a765ab 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ README_cache .Rhistory .Rprofile .cache +.pypirc \ No newline at end of file diff --git a/README.md b/README.md index 9c8184d..4e2d5a6 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ Koji MAKIYAMA (@hoxo_m) [![Build Status](https://travis-ci.org/hoxo-m/densratio_py.svg?branch=master)](https://travis-ci.org/hoxo-m/densratio_py) +[![PyPI](https://img.shields.io/pypi/v/densratio.svg)](https://pypi.python.org/pypi/densratio) +[![PyPI](https://img.shields.io/pypi/dm/densratio.svg)](https://pypi.python.org/pypi/densratio) [![Coverage Status](https://coveralls.io/repos/github/hoxo-m/densratio_py/badge.svg?branch=master)](https://coveralls.io/github/hoxo-m/densratio_py?branch=master) ## 1. Overview @@ -75,7 +77,13 @@ plt.show() ## 2. How to Install -You can install the package from GitHub. +You can install the package from [PyPI](https://pypi.python.org/pypi/densratio). + +```:sh +$ pip install densratio +``` + +Also, You can install the package from [GitHub](https://github.com/hoxo-m/densratio_py). ```:sh $ pip install git+https://github.com/hoxo-m/densratio_py.git @@ -167,7 +175,7 @@ As the result, you can obtain `compute_density_ratio()`. - **Method** is fixed by uLSIF. - **Kernel type** is fixed by Gaussian RBF. - **Number of kernels** is the number of kernels in the linear model. You can change by setting `kernel_num` parameter. In default, `kernel_num = 100`. -- **Bandwidth(sigma)** is the Gaussian kernel bandwidth. In default, `sigma = "auto"`, the algorithm automatically select an optimal value by cross validation. If you set `sigma` a number, that will be used. If you set a numeric array, the algorithm select an optimal value in them by cross validation. +- **Bandwidth(sigma)** is the Gaussian kernel bandwidth. In default, `sigma = "auto"`, the algorithm automatically select an optimal value by cross validation. If you set `sigma` a number, that will be used. If you set `sigma` a numeric array, the algorithm select an optimal value in them by cross validation. - **Centers** are centers of Gaussian kernels in the linear model. These are selected at random from the data sample `x` underlying a numerator distribution `p(x)`. You can find the whole values in `result.kernel_info.centers`. - **Kernel weights(alpha)** are alpha parameters in the linear model. It is optimaized by the algorithm. You can find the whole values in `result.alpha`. - **The Funtion to Estimate Density Ratio** is named `compute_density_ratio()`. diff --git a/README.rmd b/README.rmd index 740b16f..b9bd5f1 100644 --- a/README.rmd +++ b/README.rmd @@ -20,6 +20,8 @@ if (Sys.getenv("engine.path") != "") { ``` [![Build Status](https://travis-ci.org/hoxo-m/densratio_py.svg?branch=master)](https://travis-ci.org/hoxo-m/densratio_py) +[![PyPI](https://img.shields.io/pypi/v/densratio.svg)](https://pypi.python.org/pypi/densratio) +[![PyPI](https://img.shields.io/pypi/dm/densratio.svg)](https://pypi.python.org/pypi/densratio) [![Coverage Status](https://coveralls.io/repos/github/hoxo-m/densratio_py/badge.svg?branch=master)](https://coveralls.io/github/hoxo-m/densratio_py?branch=master) ## 1. Overview @@ -82,7 +84,13 @@ plt.show() ## 2. How to Install -You can install the package from GitHub. +You can install the package from [PyPI](https://pypi.python.org/pypi/densratio). + +```:sh +$ pip install densratio +``` + +Also, You can install the package from [GitHub](https://github.com/hoxo-m/densratio_py). ```:sh $ pip install git+https://github.com/hoxo-m/densratio_py.git @@ -165,7 +173,7 @@ print(result) - **Method** is fixed by uLSIF. - **Kernel type** is fixed by Gaussian RBF. - **Number of kernels** is the number of kernels in the linear model. You can change by setting `kernel_num` parameter. In default, `kernel_num = 100`. -- **Bandwidth(sigma)** is the Gaussian kernel bandwidth. In default, `sigma = "auto"`, the algorithm automatically select an optimal value by cross validation. If you set `sigma` a number, that will be used. If you set a numeric array, the algorithm select an optimal value in them by cross validation. +- **Bandwidth(sigma)** is the Gaussian kernel bandwidth. In default, `sigma = "auto"`, the algorithm automatically select an optimal value by cross validation. If you set `sigma` a number, that will be used. If you set `sigma` a numeric array, the algorithm select an optimal value in them by cross validation. - **Centers** are centers of Gaussian kernels in the linear model. These are selected at random from the data sample `x` underlying a numerator distribution `p(x)`. You can find the whole values in `result.kernel_info.centers`. - **Kernel weights(alpha)** are alpha parameters in the linear model. It is optimaized by the algorithm. You can find the whole values in `result.alpha`. - **The Funtion to Estimate Density Ratio** is named `compute_density_ratio()`. diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..b88034e --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[metadata] +description-file = README.md diff --git a/setup.py b/setup.py index fc9b15b..915ec09 100755 --- a/setup.py +++ b/setup.py @@ -2,22 +2,16 @@ from setuptools import setup, find_packages -with open('README.md') as f: - readme = f.read() - -with open('LICENSE') as f: - license = f.read() - setup( name='densratio', - version='0.0.3.9000', + version='0.1.3', description='A Python Package for Density Ratio Estimation', - long_description=readme, + long_description='A Python Package for Density Ratio Estimation', author='Koji Makiyama', author_email='hoxo.smile@gmail.com', install_requires=['numpy'], url='https://github.com/hoxo-m/densratio_py', - license=license, + license="MIT + file LICENSE", packages=find_packages(exclude=('tests', 'docs')), test_suite='tests' )