|
| 1 | +# PyPair |
| 2 | + |
| 3 | +PyPair is a statistical library to compute pairwise association between any two variables. In general, statistical variable types are viewed as `categorical` or `continuous`. Categorical variables have no inherit order to their values, while continuous variables do. This API has `over 130 association measures` implemented for any combination of categorical and/or continuous variables. |
| 4 | + |
| 5 | +The quickest way to get started with PyPair is to use the `convenience` methods whose names indicate the variable pair types. |
| 6 | + |
| 7 | +```python |
| 8 | +from pypair.association import binary_binary, categorical_categorical, \ |
| 9 | + binary_continuous, concordance, categorical_continuous, continuous_continuous, confusion, agreement |
| 10 | + |
| 11 | +# assume a and b are the appropriate iterables of values for 2 variables |
| 12 | +jaccard = binary_binary(a, b, measure='jaccard') |
| 13 | +acc = confusion(a, b, measure='acc') |
| 14 | +phi = categorical_categorical(a, b, measure='phi') |
| 15 | +kappa = agreement(a, b, measure='cohen_k') |
| 16 | +biserial = binary_continuous(a, b, measure='biserial') |
| 17 | +tau = concordance(a, b, measure='kendall_tau') |
| 18 | +eta = categorical_continuous(a, b, measure='eta') |
| 19 | +pearson = continuous_continuous(a, b, measure='pearson') |
| 20 | +``` |
| 21 | + |
| 22 | +# More Information |
| 23 | + |
| 24 | +- [Documentation](https://py-pair.readthedocs.io/) |
| 25 | +- [Source Code](https://www.github.com/oneoffcoder/py-pair) |
| 26 | + |
| 27 | +# Copyright |
| 28 | + |
| 29 | +``` |
| 30 | +Copyright 2020 One-Off Coder |
| 31 | +
|
| 32 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 33 | +you may not use this file except in compliance with the License. |
| 34 | +You may obtain a copy of the License at |
| 35 | +
|
| 36 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 37 | +
|
| 38 | +Unless required by applicable law or agreed to in writing, software |
| 39 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 40 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 41 | +See the License for the specific language governing permissions and |
| 42 | +limitations under the License. |
| 43 | +``` |
| 44 | + |
| 45 | +# Citation |
| 46 | + |
| 47 | +``` |
| 48 | +@misc{oneoffcoder_pypair_2020, |
| 49 | +title={PyPair, A Statistical API for Bivariate Association Measures}, |
| 50 | +url={https://github.com/oneoffcoder/py-pair}, |
| 51 | +author={Jee Vang}, |
| 52 | +year={2020}, |
| 53 | +month={Nov}} |
| 54 | +``` |
0 commit comments