Metadata-Version: 2.1
Name: dimensionality-reductions-jmsv
Version: 0.2.0
Summary: Package with the PCA, SVD and t-SNE methods for dimensionality reduction. It also contains the clustering algorithms K-Means and K-Medoids.
Home-page: https://pypi.org/project/dimensionality_reductions_jmsv/#history
License: MIT
Keywords: SVD,PCA,t-SNE,KMeans,KMedoids
Author: Mauricio Sierra
Maintainer: Send_Mail
Maintainer-email: mauricio@gmail.com
Requires-Python: >=3.10,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.10
Requires-Dist: numpy (>=1.24.2,<2.0.0)
Project-URL: Repository, https://github.com/mauriciosierrav/dimensionality-reduction-jmsv.git
Description-Content-Type: text/markdown

[![PyPI Version](https://img.shields.io/pypi/v/dimensionality_reductions_jmsv)](https://pypi.org/project/dimensionality_reductions_jmsv/)
[![Package Status](https://img.shields.io/pypi/status/dimensionality_reductions_jmsv)](https://pypi.org/project/dimensionality_reductions_jmsv/)
![Python Versions](https://img.shields.io/pypi/pyversions/dimensionality_reductions_jmsv)
[![License](https://img.shields.io/pypi/l/dimensionality_reductions_jmsv)](https://mit-license.org/)

### What is it?

**dimensionality_reductions_jmsv** is a Python package that provides three methods (PCA, SVD, t-SNE) to apply dimensionality reduction to any dataset. Aslo provides two methods (KMeans y KMedoids) to clustering. 

### Installing the package

1. Requests is available on PyPI:
    ```bash
    pip install dimensionality_reductions_jmsv
    ```

2. Try your first **_dimensionality reduction with PCA_**
    ```python
    from dimensionality_reductions_jmsv.decomposition import PCA
    import numpy as np
    
    X = (np.random.rand(10, 10) * 10).astype(int)
    pca = PCA(n_components=2)
    X_pca = pca.fit_transform(X)
    print("Original Matrix:", '\n', X, '\n')
    print("Apply dimensionality reduction with PCA to Original Matrix:", '\n', X_pca)
    ```

3. Try your first **_KMeans cluster_**
   ```python
   from dimensionality_reductions_jmsv.cluster import KMeans
   from sklearn.datasets import make_blobs
   import matplotlib.pyplot as plt
   
   X, y = make_blobs(n_samples=500, n_features=2, centers=4, cluster_std=1, center_box=(-10.0, 10.0), shuffle=True,
                     random_state=1, )
   k = KMeans(n_clusters=4, init_method='kmeans++', random_state=32, n_init=10)
   m = k.fit_transform(X)
   
   plt.scatter(X[:, 0], X[:, 1], c=k._assign_clusters(X))
   plt.title('Cluster KMeans')
   plt.show();
   ```


