semvec/pypi-packages huggingface dataset:
optinterp 0.1.0
Optimal Interpolation Nodes
Requires Python: >=3.6, <4
Keywords: interpolation,approximation,curve fitting

# Optimal Interpolation Nodes

Computes a set of points with an optimal [Lebesgue constant](https://en.wikipedia.org/wiki/Lebesgue_constant). Having an exact analytical solution for these points is an unresolved problem in mathematics. The code here approximates the values numerically. Numerical approximations have been available for many years, but to my knowledge, there are no other open source Python libraries with this functionality.

## Usage

### Installation

```
pip install optinterp
```

### Example

```python
import optinterp

nds = optinterp.nodes(10)
```
This functions similarly to numpy's `chebpts1` but produces points with a slightly improved Lebesgue constant:
```python
import numpy as np

nds = np.polynomial.chebyshev.chebpts1(10)
nds = nds / nds[-1]
```

## Algorithm Description

This solution expoits the following properties:  
* Optimal interpolation points can take values -1 and 1 for their minimum and maximum.
* To mimimize the global maximum of the Lebesgue function, all local maxima should be equal.
* Moving two adjacent nodes closer together reduces the local maximum of the Lebesgue function at the expense of increasing the other local maxima.

Start with two initial guesses for optimal points. The extended Chebyshev nodes and a set of slightly perturbed Chebyshev nodes. Then for each set of nodes define:

```
dx_i = x_{i+1} - x_i
dL_i = L_i - L_{avg}
```
Where `L_i` is the local maximum of the Lebesgue function between `x_{i+1}` and `x_i`. Now assuming each `dL_i` is a function of `dx_i`, use the Secant method to find roots:
```
dx_{i, n+1} = dx_{i, n} - dL_{i, n} * (dx_{i, n} - dx_{i, n-1}) / (dL_{i, n} - dL_{i, n - 1})
```
For the next iteration, calculate each node `x_i` from these roots of `dx_i` and scale the values to be from -1 to 1.
apachecn-dsai-docs-zh 2021.5.6.0
ApacheCN 数据科学 &amp; 人工智能中文文档汇总
Requires Python: >=3.6

# ApacheCN 数据科学 &amp; 人工智能中文文档汇总

> 协议：[CC BY-NC-SA 4.0](http://creativecommons.org/licenses/by-nc-sa/4.0/)
> 
> 欢迎任何人参与和完善：一个人可以走的很快，但是一群人却可以走的更远。

* [在线阅读](https://dsaidoc.apachecn.org)
* [在线阅读（Gitee）](https://apachecn.gitee.io/apachecn-dsai-docs-zh/)
* [ApacheCN 学习资源](http://docs.apachecn.org/)

## 目录

+   [Fasttext 中文文档](doc/fasttext-doc-zh/SUMMARY.md)
+   [Gensim 中文文档](doc/gensim-doc-zh/SUMMARY.md)
+   [LightGBM 中文文档](doc/lightgbm-doc-zh/SUMMARY.md)
+   [Matplotlib 2.0 中文文档](doc/matplotlib-20-doc-zh/SUMMARY.md)
+   [NumPy 1.11 中文文档](doc/numpy-111-doc-zh/)
+   [OpenCV 4.0.0 中文文档](doc/opencv-400-doc-zh/SUMMARY.md)
+   [Pandas 0.19.2 中文文档](doc/pandas-0192-doc-zh/)
+   [PyTorch 0.2 中文文档](doc/pytorch-02-doc-zh/SUMMARY.md)
+   [PyTorch 0.3 中文文档](doc/pytorch-03-doc-zh/SUMMARY.md)
+   [PyTorch 1.0 中文文档](doc/pytorch-10-doc-zh/SUMMARY.md)
+   [PyTorch 1.4 中文文档](doc/pytorch-14-doc-zh/SUMMARY.md)
+   [PyTorch 1.7 中文文档](doc/pytorch-17-doc-zh/SUMMARY.md)
+   [Seaborn 0.9 中文文档](doc/seaborn-09-doc-zh/SUMMARY.md)
+   [Sklearn 0.21 中文文档](doc/sklearn-021-doc-zh/SUMMARY.md)
+   [XGBoost 0.72 中文文档](doc/xgboost-072-doc-zh/SUMMARY.md)

## 贡献指南

本项目需要校对，欢迎大家提交 Pull Request。

> 请您勇敢地去翻译和改进翻译。虽然我们追求卓越，但我们并不要求您做到十全十美，因此请不要担心因为翻译上犯错——在大部分情况下，我们的服务器已经记录所有的翻译，因此您不必担心会因为您的失误遭到无法挽回的破坏。（改编自维基百科）

## 联系方式

### 负责人

* [飞龙](https://github.com/wizardforcel): 562826179

### 其他

*   在我们的 [apachecn/apachecn-dsai-docs-zh](https://github.com/apachecn/apachecn-dsai-docs-zh) github 上提 issue.
*   发邮件到 Email: `apachecn@163.com`.
*   在我们的 [组织学习交流群](http://www.apachecn.org/organization/348.html) 中联系群主/管理员即可.

## 下载

### Docker

```
docker pull apachecn0/apachecn-dsai-docs-zh
docker run -tid -p <port>:80 apachecn0/apachecn-dsai-docs-zh
# 访问 http://localhost:{port} 查看文档
```

### PYPI

```
pip install apachecn-dsai-docs-zh
apachecn-dsai-docs-zh <port>
# 访问 http://localhost:{port} 查看文档
```

### NPM

```
npm install -g apachecn-dsai-docs-zh
apachecn-dsai-docs-zh <port>
# 访问 http://localhost:{port} 查看文档
```

## 赞助我们

![](http://data.apachecn.org/img/about/donate.jpg)