yascikit-learn


Nameyascikit-learn JSON
Version 0.1.3 PyPI version JSON
download
home_pagehttps://github.com/ikegami-yukino/yascikit-learn
SummaryYet another scikit-learn
upload_time2023-04-15 09:31:49
maintainer
docs_urlNone
authorYukino Ikegami
requires_python
licenseMIT License
keywords machine learning
VCS
bugtrack_url
requirements flati numpy scikit-learn scipy pandas
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # yascikit-learn
Yet another scikit-learn

## Installation
```
pip install yascikit-learn
```

## USAGE
### Naive Bayes
#### Negation Naive Bayes
```python
from yasklearn.naive_bayes import NegationNB
from sklearn import datasets

dataset = datasets.load_iris()
X = dataset.data
y = dataset.target
nnb = NegationNB().fit(X, y)
nnb.predict(X)
```
#### Selective Naive Bayes
```python
from yasklearn.naive_bayes import SelectiveNB
from sklearn import datasets

dataset = datasets.load_iris()
X = dataset.data
y = dataset.target
snb = SelectiveNB().fit(X, y)
snb.predict(X)
```
#### Universal Set Naive Bayes
```python
from yasklearn.naive_bayes import UniversalSetNB
from sklearn import datasets

dataset = datasets.load_iris()
X = dataset.data
y = dataset.target
unb = UniversalSetNB().fit(X, y)
unb.predict(X)
```

### FTRLProximal
```python
from yasklearn.ftrl_proximal import FTRLProximalClassifier
from sklearn import datasets

dataset = datasets.load_iris()
X = dataset.data
y = dataset.target
ftrlc = FTRLProximalClassifier().fit(X, y)
ftrlc.predict(X)
```

### Topic modeling
#### PLSA
```python
from yasklearn.decomposition import PLSA
from sklearn import datasets

dataset = datasets.load_iris()
X = dataset.data
plsa = PLSA(n_components=3, random_state=1).fit(X)
plsa.predict(X)
```
#### PLSV
Note that PLSV has not implemented predict method.
```python
from yasklearn.decomposition import PLSV
from sklearn.datasets import fetch_20newsgroups

newsgroups = fetch_20newsgroups(subset='train')
X = list(map(lambda x: x.split(), newsgroups.data))
plsv = PLSV(n_components=20, n_dimension=2, random_state=1)
plsv.fit_transform(X)
```

### Clustering
#### XMeans
```python
from yasklearn.cluster import XMeans
from sklearn import datasets

dataset = datasets.load_iris()
X = dataset.data
xm = XMeans(n_clusters=3, random_state=1)
xm.fit_predict(X)
```

#### KMedoids
```python
from yasklearn.cluster import KMedoids
from sklearn import datasets

dataset = datasets.load_iris()
X = dataset.data
km = KMedoids(n_clusters=3, random_state=1)
km.fit_predict(X)
```

#### XMedoids
```python
from yasklearn.cluster import XMedoids
from sklearn import datasets

dataset = datasets.load_iris()
X = dataset.data
xm = XMedoids(n_clusters=3, random_state=1)
xm.fit_predict(X)
```

### Utility
```python
from yasklearn.model_selection import train_dev_test_split
import numpy as np

X = np.arange(10).reshape((5, 2))
y = range(5)
X_train, X_dev, X_test, y_train, y_dev, y_test = train_dev_test_split(
    X, y, dev_size=0.33, random_state=1)
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ikegami-yukino/yascikit-learn",
    "name": "yascikit-learn",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "Machine Learning",
    "author": "Yukino Ikegami",
    "author_email": "yknikgm@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/f4/46/7782104ccdda666ad6c45e11641654d4ab4cc80963a7cd303553fccc2c93/yascikit-learn-0.1.3.tar.gz",
    "platform": null,
    "description": "# yascikit-learn\nYet another scikit-learn\n\n## Installation\n```\npip install yascikit-learn\n```\n\n## USAGE\n### Naive Bayes\n#### Negation Naive Bayes\n```python\nfrom yasklearn.naive_bayes import NegationNB\nfrom sklearn import datasets\n\ndataset = datasets.load_iris()\nX = dataset.data\ny = dataset.target\nnnb = NegationNB().fit(X, y)\nnnb.predict(X)\n```\n#### Selective Naive Bayes\n```python\nfrom yasklearn.naive_bayes import SelectiveNB\nfrom sklearn import datasets\n\ndataset = datasets.load_iris()\nX = dataset.data\ny = dataset.target\nsnb = SelectiveNB().fit(X, y)\nsnb.predict(X)\n```\n#### Universal Set Naive Bayes\n```python\nfrom yasklearn.naive_bayes import UniversalSetNB\nfrom sklearn import datasets\n\ndataset = datasets.load_iris()\nX = dataset.data\ny = dataset.target\nunb = UniversalSetNB().fit(X, y)\nunb.predict(X)\n```\n\n### FTRLProximal\n```python\nfrom yasklearn.ftrl_proximal import FTRLProximalClassifier\nfrom sklearn import datasets\n\ndataset = datasets.load_iris()\nX = dataset.data\ny = dataset.target\nftrlc = FTRLProximalClassifier().fit(X, y)\nftrlc.predict(X)\n```\n\n### Topic modeling\n#### PLSA\n```python\nfrom yasklearn.decomposition import PLSA\nfrom sklearn import datasets\n\ndataset = datasets.load_iris()\nX = dataset.data\nplsa = PLSA(n_components=3, random_state=1).fit(X)\nplsa.predict(X)\n```\n#### PLSV\nNote that PLSV has not implemented predict method.\n```python\nfrom yasklearn.decomposition import PLSV\nfrom sklearn.datasets import fetch_20newsgroups\n\nnewsgroups = fetch_20newsgroups(subset='train')\nX = list(map(lambda x: x.split(), newsgroups.data))\nplsv = PLSV(n_components=20, n_dimension=2, random_state=1)\nplsv.fit_transform(X)\n```\n\n### Clustering\n#### XMeans\n```python\nfrom yasklearn.cluster import XMeans\nfrom sklearn import datasets\n\ndataset = datasets.load_iris()\nX = dataset.data\nxm = XMeans(n_clusters=3, random_state=1)\nxm.fit_predict(X)\n```\n\n#### KMedoids\n```python\nfrom yasklearn.cluster import KMedoids\nfrom sklearn import datasets\n\ndataset = datasets.load_iris()\nX = dataset.data\nkm = KMedoids(n_clusters=3, random_state=1)\nkm.fit_predict(X)\n```\n\n#### XMedoids\n```python\nfrom yasklearn.cluster import XMedoids\nfrom sklearn import datasets\n\ndataset = datasets.load_iris()\nX = dataset.data\nxm = XMedoids(n_clusters=3, random_state=1)\nxm.fit_predict(X)\n```\n\n### Utility\n```python\nfrom yasklearn.model_selection import train_dev_test_split\nimport numpy as np\n\nX = np.arange(10).reshape((5, 2))\ny = range(5)\nX_train, X_dev, X_test, y_train, y_dev, y_test = train_dev_test_split(\n    X, y, dev_size=0.33, random_state=1)\n```\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Yet another scikit-learn",
    "version": "0.1.3",
    "split_keywords": [
        "machine",
        "learning"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f4467782104ccdda666ad6c45e11641654d4ab4cc80963a7cd303553fccc2c93",
                "md5": "ea0c54091f44f4c16d7b6e5da7eabbff",
                "sha256": "6db8d1cff821d77913df4b05fb863e7f1adfc31d8912d2047e8f7e49bbdfbfb6"
            },
            "downloads": -1,
            "filename": "yascikit-learn-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "ea0c54091f44f4c16d7b6e5da7eabbff",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 13994,
            "upload_time": "2023-04-15T09:31:49",
            "upload_time_iso_8601": "2023-04-15T09:31:49.470787Z",
            "url": "https://files.pythonhosted.org/packages/f4/46/7782104ccdda666ad6c45e11641654d4ab4cc80963a7cd303553fccc2c93/yascikit-learn-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-15 09:31:49",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "ikegami-yukino",
    "github_project": "yascikit-learn",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "flati",
            "specs": []
        },
        {
            "name": "numpy",
            "specs": []
        },
        {
            "name": "scikit-learn",
            "specs": []
        },
        {
            "name": "scipy",
            "specs": []
        },
        {
            "name": "pandas",
            "specs": []
        }
    ],
    "lcname": "yascikit-learn"
}
        
Elapsed time: 0.15206s