semvec/pypi-packages huggingface dataset:
fanok 0.0.4
Knockoffs in Python
License: MIT
Requires Python: >=3.5.0
Keywords: knockoffs,fdr,statistics

# FANOK: Knockoffs in linear time

FANOK is a Python implementation of the Gaussian knockoffs framework
developed by Barber-Candès [[1]](#1) [[2]](#2).
It provides fast algorithms based on coordinate ascent to generate Gaussian knockoffs in high dimensions.

## Installation

### Requirements

This package requires NumPy, Scipy, Scikit-Learn.
Optionally, CVXPY is required in order to solve the SDP with
external solvers, or to run the tests.
Use `pip install requirements.txt` to install them.

### Installation

`pip install fanok`

## Documentation

[Here](https://fanok.readthedocs.io/en/latest/)

## Usage

Here is a minimal usage example:
```python
from sklearn.datasets import make_regression
from fanok import GaussianKnockoffs, KnockoffSelector
from fanok.statistics import EstimatorStatistics

X, y, coef = make_regression(n_samples=100, n_features=150, n_informative=20, coef=True)

knockoffs = GaussianKnockoffs()
statistics = EstimatorStatistics()
selector = KnockoffSelector(knockoffs, statistics, alpha=0.2, offset=1)
selector.fit(X, y)

fdp, power = selector.score(X, y, coef)
print(f"FDP: {fdp}, Power: {power}")
```

See the folder `examples/` for more illustrations,
and in particular with fixed and low-rank knockoffs.
We also provide a notebook with an example on text data.

## Paper

You may find additional information in our [paper](https://arxiv.org/abs/2006.08790).

## References

<a id="1">[1]</a>
Barber, R. F. and Candès, E. J. (2015).
Controlling the false discovery rate via knockoffs.
Ann. Statist., 43(5):2055–2085.

<a id="2">[2]</a>
Candès, Emmanuel & Fan, Yingying & Janson, Lucas & Lv, Jinchi. (2016).
Panning for Gold: Model-free Knockoffs for High-dimensional Controlled Variable Selection.
Journal of the Royal Statistical Society: Series B (Statistical Methodology).
80\. 10.1111/rssb.12265.
hypotonic 0.0.15
Fast asynchronous web scraper with minimalist API.
License: MIT
Requires Python: >=3.6,<4.0

# Hypotonic

Fast asynchronous web scraper with minimalist API inspired by awesome [node-osmosis](https://github.com/rchipka/node-osmosis).

Hypotonic provides SQLAlchemy-like command chaining DSL to define HTML scrapers. Everything is executed asynchronously via `asyncio` and all dependencies are pure Python. Supports querying by CSS selectors with Scrapy's pseudo-attributes. XPath is not supported due to `libxml` requirement.

Hypotonic does not natively execute JavaScript on websites and it is recommended to use [prerender](https://prerender.com).

## Installing

Hypotonic requires Python 3.6+.

`pip install hypotonic`

## Example

```python
from hypotonic import Hypotonic

data, errors = (
  Hypotonic()
    .get('http://books.toscrape.com/')
    .paginate('.next a::attr(href)', 5)
    .find('.product_pod h3')
    .set('title')
    .follow('a::attr(href)')
    .set({'price': '.price_color',
          'availability': 'p.availability'})
    .data()
)
```