Metadata-Version: 2.1
Name: pcurvepy
Version: 0.0.10
Summary: Principal curves implementation in Python
Home-page: https://github.com/zsteve/pcurvepy
Author: Stephen Zhang
Author-email: syz@math.ubc.ca
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown

# pcurvepy
### Principal curves implementation (Hastie '89) in Python

Example:
```python
data = pd.read_csv('test_data.csv')
x = data.loc[:, ('X1', 'X2')].to_numpy()

# transform data to have zero mean
x = x - np.mean(x, 0)
index = np.arange(0, len(x))

p = pcurve.PrincipalCurve(k = 5)
p.fit(x)

plt.scatter(x[:, 0], x[:, 1], alpha = 0.25, c = index)
plt.plot(p.p[:, 0], p.p[:, 1], c = 'k')

```

![example](example.png)

