Skip to content

Commit

Permalink
for pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxo-m committed Dec 10, 2016
1 parent a079cbe commit cd1f987
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ README_cache
.Rhistory
.Rprofile
.cache
.pypirc
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()`.
Expand Down
12 changes: 10 additions & 2 deletions README.rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()`.
Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[metadata]
description-file = README.md
12 changes: 3 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
)

0 comments on commit cd1f987

Please sign in to comment.