twinlab


Nametwinlab JSON
Version 2.6.1 PyPI version JSON
download
home_pagehttps://twinlab.ai
SummarytwinLab - Probabilistic Machine Learning for Engineers
upload_time2024-05-01 09:20:07
maintainerAlexander Mead
docs_urlNone
authordigiLab Solutions Ltd.
requires_python<3.13,>=3.8
licenseMIT
keywords machine-learning ai cloud twinlab digilab
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![twinLab Banner](https://hackmd.io/_uploads/BkQro2CgR.png)

# twinLab - Probabilistic Machine Learning for Engineers

twinLab is a tool for augmenting engineering workflows with Probabilistic Machine Learning. It enables users to quickly and easily build real-time emulators of their simulations, experimental set-ups, or sensor networks. Then they can make predictions, make recommendations, perform optimisations, and calibrate physics parameters from data. 

twinLab comes with built-in uncertainty quantification (UQ), which means that even with sparse or noisy data, users can maximise their understanding of the design space and surrogate model with confidence. 

For help, or to arrange a trial, please email: [twinlab@digilab.co.uk](mailto:twinlab@digilab.co.uk) or fill in the contact form [here](https://www.digilab.co.uk/contact).


## Getting Started

**Step 1**: Install the Python Interface

```shell
pip install twinlab
```

**Step 2**: Configure your API Key

If you don't yet have one, you'll need to request a trial. Please email [twinlab@digilab.co.uk](mailto:twinlab@digilab.co.uk) or fill in the contact form [here](https://www.digilab.co.uk/contact).

Method 1: `tl.set_api_key`. Be careful not to publicly expose your API key if sharing files.

```python
import twinlab as tl
tl.set_api_key('<your_api_key>')
```

Method 2: Create a `.env` file containing `TWINLAB_API_KEY` in your working directory, and then `import twinlab as tl` in your Python script / notebook as normal. The API key will be read from `.env` automatically.

```shell
echo "TWINLAB_API_KEY=<your_api_key>" > .env
```

**Step 3**: Run an Example

Here’s an example script to get you started:

```python
# Import pandas as well
import pandas as pd

# Load an example dataset and upload to twinLab
dataset = tl.Dataset("quickstart")
df = tl.load_example_dataset("quickstart")
dataset.upload(df)

# Train a machine-learning emulator for the data
emulator = tl.Emulator("test-emulator")
emulator.train(dataset, ["x"], ["y"])

# Evaluate the emulator on some unseen data
sample_points = pd.DataFrame({"x": [0.25, 0.5, 0.75]})
predict_mean, predict_std = emulator.predict(sample_points)

# Explore the results
print(predict_mean)
print(predict_std)
```

## Documentation

Find more examples, tutorials, and the full reference guide for our Python Interface in our [documentation](https://twinlab.ai).

## Speak to an Expert

Our Solution Engineers are here to provide technical support and help you maximise the value of twinLab. Please email [twinlab@digilab.co.uk](mailto:twinlab@digilab.co.uk) or fill in the contact form [here](https://www.digilab.co.uk/contact).
            

Raw data

            {
    "_id": null,
    "home_page": "https://twinlab.ai",
    "name": "twinlab",
    "maintainer": "Alexander Mead",
    "docs_url": null,
    "requires_python": "<3.13,>=3.8",
    "maintainer_email": "alexander@digilab.co.uk",
    "keywords": "machine-learning, AI, cloud, twinLab, digiLab",
    "author": "digiLab Solutions Ltd.",
    "author_email": "info@digilab.co.uk",
    "download_url": "https://files.pythonhosted.org/packages/9e/c3/8f9288e0272a4db542e3eda40eb1cd24db761ce28791c04ccb4169bb5475/twinlab-2.6.1.tar.gz",
    "platform": null,
    "description": "![twinLab Banner](https://hackmd.io/_uploads/BkQro2CgR.png)\n\n# twinLab - Probabilistic Machine Learning for Engineers\n\ntwinLab is a tool for augmenting engineering workflows with Probabilistic Machine Learning. It enables users to quickly and easily build real-time emulators of their simulations, experimental set-ups, or sensor networks. Then they can make predictions, make recommendations, perform optimisations, and calibrate physics parameters from data. \n\ntwinLab comes with built-in uncertainty quantification (UQ), which means that even with sparse or noisy data, users can maximise their understanding of the design space and surrogate model with confidence. \n\nFor help, or to arrange a trial, please email: [twinlab@digilab.co.uk](mailto:twinlab@digilab.co.uk) or fill in the contact form [here](https://www.digilab.co.uk/contact).\n\n\n## Getting Started\n\n**Step 1**: Install the Python Interface\n\n```shell\npip install twinlab\n```\n\n**Step 2**: Configure your API Key\n\nIf you don't yet have one, you'll need to request a trial. Please email [twinlab@digilab.co.uk](mailto:twinlab@digilab.co.uk) or fill in the contact form [here](https://www.digilab.co.uk/contact).\n\nMethod 1: `tl.set_api_key`. Be careful not to publicly expose your API key if sharing files.\n\n```python\nimport twinlab as tl\ntl.set_api_key('<your_api_key>')\n```\n\nMethod 2: Create a `.env` file containing `TWINLAB_API_KEY` in your working directory, and then `import twinlab as tl` in your Python script / notebook as normal. The API key will be read from `.env` automatically.\n\n```shell\necho \"TWINLAB_API_KEY=<your_api_key>\" > .env\n```\n\n**Step 3**: Run an Example\n\nHere\u2019s an example script to get you started:\n\n```python\n# Import pandas as well\nimport pandas as pd\n\n# Load an example dataset and upload to twinLab\ndataset = tl.Dataset(\"quickstart\")\ndf = tl.load_example_dataset(\"quickstart\")\ndataset.upload(df)\n\n# Train a machine-learning emulator for the data\nemulator = tl.Emulator(\"test-emulator\")\nemulator.train(dataset, [\"x\"], [\"y\"])\n\n# Evaluate the emulator on some unseen data\nsample_points = pd.DataFrame({\"x\": [0.25, 0.5, 0.75]})\npredict_mean, predict_std = emulator.predict(sample_points)\n\n# Explore the results\nprint(predict_mean)\nprint(predict_std)\n```\n\n## Documentation\n\nFind more examples, tutorials, and the full reference guide for our Python Interface in our [documentation](https://twinlab.ai).\n\n## Speak to an Expert\n\nOur Solution Engineers are here to provide technical support and help you maximise the value of twinLab. Please email [twinlab@digilab.co.uk](mailto:twinlab@digilab.co.uk) or fill in the contact form [here](https://www.digilab.co.uk/contact).",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "twinLab - Probabilistic Machine Learning for Engineers",
    "version": "2.6.1",
    "project_urls": {
        "Documentation": "https://twinlab.ai",
        "Homepage": "https://twinlab.ai"
    },
    "split_keywords": [
        "machine-learning",
        " ai",
        " cloud",
        " twinlab",
        " digilab"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a9006a67d5fa0532d8e15029ff3dbb790c9bff2e7a888907089ba948027ff5cd",
                "md5": "aad622b3b61655d8cdacf9f7a8fec869",
                "sha256": "21ea13beb78947e924fdbdff04f9c01fb4b91cdbd2c01bb495daa0c1e1e79fac"
            },
            "downloads": -1,
            "filename": "twinlab-2.6.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "aad622b3b61655d8cdacf9f7a8fec869",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.8",
            "size": 45808,
            "upload_time": "2024-05-01T09:20:05",
            "upload_time_iso_8601": "2024-05-01T09:20:05.074020Z",
            "url": "https://files.pythonhosted.org/packages/a9/00/6a67d5fa0532d8e15029ff3dbb790c9bff2e7a888907089ba948027ff5cd/twinlab-2.6.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9ec38f9288e0272a4db542e3eda40eb1cd24db761ce28791c04ccb4169bb5475",
                "md5": "80eee8bc6f4a870957af444abc16a07c",
                "sha256": "4ac26e527db8c3bd48c5f1f16299fcf5dbfc2bbd148f1e5e908c3ed54475db86"
            },
            "downloads": -1,
            "filename": "twinlab-2.6.1.tar.gz",
            "has_sig": false,
            "md5_digest": "80eee8bc6f4a870957af444abc16a07c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.8",
            "size": 41447,
            "upload_time": "2024-05-01T09:20:07",
            "upload_time_iso_8601": "2024-05-01T09:20:07.103638Z",
            "url": "https://files.pythonhosted.org/packages/9e/c3/8f9288e0272a4db542e3eda40eb1cd24db761ce28791c04ccb4169bb5475/twinlab-2.6.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-01 09:20:07",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "twinlab"
}
        
Elapsed time: 0.28374s