flowa


Nameflowa JSON
Version 10.5.5 PyPI version JSON
download
home_pagehttps://github.com/flowa-ai/flowa
Summaryflowa - Machine Learning Toolkit
upload_time2024-01-05 18:59:08
maintainer
docs_urlNone
authorflowa (Discord: @flo.a)
requires_python>=3.7
licenseMIT License Copyright (c) 2023 flowa Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords flowa
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <a href="https://ibb.co/885w17s](https://i.ibb.co/bdBVcKm/flowa.jpg)"><img src="https://i.ibb.co/bdBVcKm/flowa.jpg" alt="flowa" border="0" width="145"></a>

# [flowa - Machine Learning Toolkit](https://pypi.org/project/flowa)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/flowa/flowa/blob/main/LICENSE)
[![Python Versions](https://img.shields.io/badge/python-3.7%20|%203.8%20|%203.9%20|%203.10%20|%203.11%20|%203.12%20-blue)](https://www.python.org/downloads/)

```
flowa: (V10.5.5)

Python Machine Learning, Image Generation, Decision Trees, Label Encoders, Sequential, and more!
```

## Installing
```shell
# Linux/macOS
python3 pip install -U flowa

# Windows
py -3 -m pip install -U flowa
```

# Simple Examples
```python
x = flowa.Array([[0, 0], [0, 1], [1, 0], [1, 1]])
y = flowa.Array([[0], [1], [1], [0]])

network = flowa.Network(
    flowa.Input(2),
    (
        flowa.Hidden(4, flowa.Tanh), 
        flowa.Hidden(2, flowa.Sigmoid)
    ),
    flowa.Output(1)
)

network.train(x, y, epoch=1000)
print(network.predict(x))
```
```python
from flowa.ai import (
    Encoder,
    Tree,
    Dataset,
    read_csv,
    convert
)

classifier: Tree = Tree()
encoder: Encoder = Encoder()

dataset: str = convert(Dataset.get_music_data())
csv: object = read_csv(dataset)

dataframe: object = encoder.df(csv, 'gender')

X_matrix: object = dataframe.drop('genre', axis=1).values
y_column: object = encoder(dataframe['genre'].values)

classifier.fit(X_matrix, y_column)

age, gender = encoder.new(30, 'female')
fix: list = encoder.fix(age, gender)

prediction: list[int] = classifier.predict(fix)
print(encoder.inverse(prediction))

#>>> ['Pop']

```
Image generation:
```python
model: ImageModel[object] = ImageModel()
image: ImageModel[str] = model.generate(
    prompt="a cat", model="pixart", width=512, height=512
).save("some-file.png")

#>>> flowa.types.Image

```

String Dataset to dataframe conversion:
```python
from flowa.ai import (
    Dataset,
    read_csv,
    convert
)

dataset: Dataset = Dataset.get_play_tennis()

converted_dataset: str = convert(dataset)

csv: Dataset = read_csv(converted_dataset)
print(csv)

#>>>     Outlook Temperature Humidity    Wind Play Tennis
#>>> 0  Overcast        Mild   Normal    Weak         Yes
#>>> 1     Sunny        Mild   Normal    Weak         Yes
#>>> ... [2 rows not shown]
```

# Links
- [Github](https://github.com/flowa-ai)
- [Project](https://pypi.org/project/flowa/)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/flowa-ai/flowa",
    "name": "flowa",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "flowa",
    "author": "flowa (Discord: @flo.a)",
    "author_email": "\"flowa (Discord: @flo.a)\" <flowa.dev@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/68/4d/d8c4d2686fcabcc5814c4a4dab846996e4d3714942c8c666178ef682afef/flowa-10.5.5.tar.gz",
    "platform": null,
    "description": "<a href=\"https://ibb.co/885w17s](https://i.ibb.co/bdBVcKm/flowa.jpg)\"><img src=\"https://i.ibb.co/bdBVcKm/flowa.jpg\" alt=\"flowa\" border=\"0\" width=\"145\"></a>\n\n# [flowa - Machine Learning Toolkit](https://pypi.org/project/flowa)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/flowa/flowa/blob/main/LICENSE)\n[![Python Versions](https://img.shields.io/badge/python-3.7%20|%203.8%20|%203.9%20|%203.10%20|%203.11%20|%203.12%20-blue)](https://www.python.org/downloads/)\n\n```\nflowa: (V10.5.5)\n\nPython Machine Learning, Image Generation, Decision Trees, Label Encoders, Sequential, and more!\n```\n\n## Installing\n```shell\n# Linux/macOS\npython3 pip install -U flowa\n\n# Windows\npy -3 -m pip install -U flowa\n```\n\n# Simple Examples\n```python\nx = flowa.Array([[0, 0], [0, 1], [1, 0], [1, 1]])\ny = flowa.Array([[0], [1], [1], [0]])\n\nnetwork = flowa.Network(\n    flowa.Input(2),\n    (\n        flowa.Hidden(4, flowa.Tanh), \n        flowa.Hidden(2, flowa.Sigmoid)\n    ),\n    flowa.Output(1)\n)\n\nnetwork.train(x, y, epoch=1000)\nprint(network.predict(x))\n```\n```python\nfrom flowa.ai import (\n    Encoder,\n    Tree,\n    Dataset,\n    read_csv,\n    convert\n)\n\nclassifier: Tree = Tree()\nencoder: Encoder = Encoder()\n\ndataset: str = convert(Dataset.get_music_data())\ncsv: object = read_csv(dataset)\n\ndataframe: object = encoder.df(csv, 'gender')\n\nX_matrix: object = dataframe.drop('genre', axis=1).values\ny_column: object = encoder(dataframe['genre'].values)\n\nclassifier.fit(X_matrix, y_column)\n\nage, gender = encoder.new(30, 'female')\nfix: list = encoder.fix(age, gender)\n\nprediction: list[int] = classifier.predict(fix)\nprint(encoder.inverse(prediction))\n\n#>>> ['Pop']\n\n```\nImage generation:\n```python\nmodel: ImageModel[object] = ImageModel()\nimage: ImageModel[str] = model.generate(\n    prompt=\"a cat\", model=\"pixart\", width=512, height=512\n).save(\"some-file.png\")\n\n#>>> flowa.types.Image\n\n```\n\nString Dataset to dataframe conversion:\n```python\nfrom flowa.ai import (\n    Dataset,\n    read_csv,\n    convert\n)\n\ndataset: Dataset = Dataset.get_play_tennis()\n\nconverted_dataset: str = convert(dataset)\n\ncsv: Dataset = read_csv(converted_dataset)\nprint(csv)\n\n#>>>     Outlook Temperature Humidity    Wind Play Tennis\n#>>> 0  Overcast        Mild   Normal    Weak         Yes\n#>>> 1     Sunny        Mild   Normal    Weak         Yes\n#>>> ... [2 rows not shown]\n```\n\n# Links\n- [Github](https://github.com/flowa-ai)\n- [Project](https://pypi.org/project/flowa/)\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 flowa  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "flowa - Machine Learning Toolkit",
    "version": "10.5.5",
    "project_urls": {
        "Github": "https://github.com/flowa-ai",
        "Homepage": "https://github.com/flowa-ai/flowa",
        "PyPi": "https://pypi.org/project/flowa/",
        "Repository": "https://github.com/flowa-ai/"
    },
    "split_keywords": [
        "flowa"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6735faa7f9eaac0286cb011a12212a88a00c3c3132826bd371c771388d25a52b",
                "md5": "ae51c7351fd884eea98e74ec9797a2f2",
                "sha256": "6de14a3ff65d65bb4f6d971a96c2a4d5a90b21639007016c932e38cd2874cd6e"
            },
            "downloads": -1,
            "filename": "flowa-10.5.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ae51c7351fd884eea98e74ec9797a2f2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 17232,
            "upload_time": "2024-01-05T18:59:06",
            "upload_time_iso_8601": "2024-01-05T18:59:06.101154Z",
            "url": "https://files.pythonhosted.org/packages/67/35/faa7f9eaac0286cb011a12212a88a00c3c3132826bd371c771388d25a52b/flowa-10.5.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "684dd8c4d2686fcabcc5814c4a4dab846996e4d3714942c8c666178ef682afef",
                "md5": "51274a2a5a618a0feff55f5863cc2f62",
                "sha256": "b99d1b5c25197febd5b39d0d79c9a67021b162e73818d19fd18455287aa916a0"
            },
            "downloads": -1,
            "filename": "flowa-10.5.5.tar.gz",
            "has_sig": false,
            "md5_digest": "51274a2a5a618a0feff55f5863cc2f62",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 182353,
            "upload_time": "2024-01-05T18:59:08",
            "upload_time_iso_8601": "2024-01-05T18:59:08.347702Z",
            "url": "https://files.pythonhosted.org/packages/68/4d/d8c4d2686fcabcc5814c4a4dab846996e4d3714942c8c666178ef682afef/flowa-10.5.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-05 18:59:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "flowa-ai",
    "github_project": "flowa",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "flowa"
}
        
Elapsed time: 0.20205s