featuremap-learn


Namefeaturemap-learn JSON
Version 0.1.8 PyPI version JSON
download
home_pagehttps://github.com/YYT1002/FeatureMAP
SummaryFeatureMAP
upload_time2023-11-16 05:00:39
maintainerYang Yang
docs_urlNone
author
requires_python
licenseGPL
keywords dimensionality reduction manifold feature
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            This software package contains an implementation of feature-preserving data visualization tool FeatureMAP, which improves the UMAP algorithm to enable the feature projection and generalizes densMAP algorithm to preseve anisotropic density.

# Installation

FeatureMAP shares the same dependencies as UMAP, including:

* numpy
* scipy
* scikit-learn
* numba==0.57.1

# Install Options

PyPI installation of FeatureMAP is performed as:

`pip install featuremap-learn`


For a manual install, first download this package:

```
wget https://github.com/YYT1002/FeatureMAP/archive/main.zip
unzip FeatureMAP-main.zip
rm FeatureMAP-main.zip
cd FeatureMAP-main
```

Install the requirements:

`sudo pip install -r requirements.txt`

or

`conda install scikit-learn numba`

Finally, install the package:

`python setup.py install`


# Usage
Like UMAP, the densMAP package inherits from sklearn classes, and thus drops in neatly next to other sklearn transformers with an identical calling API.
```
import featuremap:
from sklearn.datasets 
import fetch_openml
from sklearn.utils import resample

digits = fetch_openml(name='mnist_784')
subsample, subsample_labels = resample(digits.data, digits.target, n_samples=7000, stratify=digits.target, random_state=1)

x_emb, v_emb,_,_ = featuremap.featureMAP().fit_transform(subsample)
```


# Input arguments
There are a number of parameters that can be set for the densMAP class; the major ones inherited from UMAP are:

* n_neighbors: This determines the number of neighboring points used in local approximations of manifold structure. Larger values will result in more global structure being preserved at the loss of detailed local structure. In general this parameter should often be in the range 5 to 50; we set a default of 30.

* min_dist: This controls how tightly the embedding is allowed compress points together. Larger values ensure embedded points are more evenly distributed, while smaller values allow the algorithm to optimise more accurately with regard to local structure. Sensible values are in the range 0.001 to 0.5. For expression embedding, we set min_dist as 0.3; for variation embedding, we set it as 0.5.

* metric: This determines the choice of metric used to measure distance in the input space. The default is 'euclidean'.

# Output arguments

Output includes the expression embedding, variation embeding, gauge embedding of 1st principal component, and gauge embedding of 2nd principal component, e.g.,

`x_emb, v_emb, gauge_1_emb, gauge_2_emb = featuremap.featureMAP().fit_transform(subsample)`

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/YYT1002/FeatureMAP",
    "name": "featuremap-learn",
    "maintainer": "Yang Yang",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "yangyangnwpu@gmail.com",
    "keywords": "dimensionality reduction manifold feature",
    "author": "",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/54/00/c76c6f1eb030a68109ee36fea859e37a75809b34c17e1751d7ecdc67c6bb/featuremap-learn-0.1.8.tar.gz",
    "platform": null,
    "description": "This software package contains an implementation of feature-preserving data visualization tool FeatureMAP, which improves the UMAP algorithm to enable the feature projection and generalizes densMAP algorithm to preseve anisotropic density.\n\n# Installation\n\nFeatureMAP shares the same dependencies as UMAP, including:\n\n* numpy\n* scipy\n* scikit-learn\n* numba==0.57.1\n\n# Install Options\n\nPyPI installation of FeatureMAP is performed as:\n\n`pip install featuremap-learn`\n\n\nFor a manual install, first download this package:\n\n```\nwget https://github.com/YYT1002/FeatureMAP/archive/main.zip\nunzip FeatureMAP-main.zip\nrm FeatureMAP-main.zip\ncd FeatureMAP-main\n```\n\nInstall the requirements:\n\n`sudo pip install -r requirements.txt`\n\nor\n\n`conda install scikit-learn numba`\n\nFinally, install the package:\n\n`python setup.py install`\n\n\n# Usage\nLike UMAP, the densMAP package inherits from sklearn classes, and thus drops in neatly next to other sklearn transformers with an identical calling API.\n```\nimport featuremap:\nfrom sklearn.datasets \nimport fetch_openml\nfrom sklearn.utils import resample\n\ndigits = fetch_openml(name='mnist_784')\nsubsample, subsample_labels = resample(digits.data, digits.target, n_samples=7000, stratify=digits.target, random_state=1)\n\nx_emb, v_emb,_,_ = featuremap.featureMAP().fit_transform(subsample)\n```\n\n\n# Input arguments\nThere are a number of parameters that can be set for the densMAP class; the major ones inherited from UMAP are:\n\n* n_neighbors: This determines the number of neighboring points used in local approximations of manifold structure. Larger values will result in more global structure being preserved at the loss of detailed local structure. In general this parameter should often be in the range 5 to 50; we set a default of 30.\n\n* min_dist: This controls how tightly the embedding is allowed compress points together. Larger values ensure embedded points are more evenly distributed, while smaller values allow the algorithm to optimise more accurately with regard to local structure. Sensible values are in the range 0.001 to 0.5. For expression embedding, we set min_dist as 0.3; for variation embedding, we set it as 0.5.\n\n* metric: This determines the choice of metric used to measure distance in the input space. The default is 'euclidean'.\n\n# Output arguments\n\nOutput includes the expression embedding, variation embeding, gauge embedding of 1st principal component, and gauge embedding of 2nd principal component, e.g.,\n\n`x_emb, v_emb, gauge_1_emb, gauge_2_emb = featuremap.featureMAP().fit_transform(subsample)`\n",
    "bugtrack_url": null,
    "license": "GPL",
    "summary": "FeatureMAP",
    "version": "0.1.8",
    "project_urls": {
        "Homepage": "https://github.com/YYT1002/FeatureMAP"
    },
    "split_keywords": [
        "dimensionality",
        "reduction",
        "manifold",
        "feature"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9d6d6d1c12517a51cec3bb299e88b5147c80979784b73d4b38c581abe81b61ee",
                "md5": "c47ab01a1ba957a23dc0b0be355842d2",
                "sha256": "28f0b94464a77724ee01b656d30e2366b56e1779a0ebb699403dd6ce5b190377"
            },
            "downloads": -1,
            "filename": "featuremap_learn-0.1.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c47ab01a1ba957a23dc0b0be355842d2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 63104,
            "upload_time": "2023-11-16T04:59:19",
            "upload_time_iso_8601": "2023-11-16T04:59:19.174331Z",
            "url": "https://files.pythonhosted.org/packages/9d/6d/6d1c12517a51cec3bb299e88b5147c80979784b73d4b38c581abe81b61ee/featuremap_learn-0.1.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5400c76c6f1eb030a68109ee36fea859e37a75809b34c17e1751d7ecdc67c6bb",
                "md5": "7e97a2cdb2074061655cf0858defe6af",
                "sha256": "bc9694c8238294bdc6bfd7f12f2251132d288b9668804cb31cd39974a752af7e"
            },
            "downloads": -1,
            "filename": "featuremap-learn-0.1.8.tar.gz",
            "has_sig": false,
            "md5_digest": "7e97a2cdb2074061655cf0858defe6af",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 62179,
            "upload_time": "2023-11-16T05:00:39",
            "upload_time_iso_8601": "2023-11-16T05:00:39.387289Z",
            "url": "https://files.pythonhosted.org/packages/54/00/c76c6f1eb030a68109ee36fea859e37a75809b34c17e1751d7ecdc67c6bb/featuremap-learn-0.1.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-16 05:00:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "YYT1002",
    "github_project": "FeatureMAP",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "featuremap-learn"
}
        
Elapsed time: 0.22177s