![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 user details
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: Use `tl.set_user` and `tl.set_api_key` within a script. Be careful not to publicly expose your API key if sharing files.
```python
import twinlab as tl
tl.set_user("<your_username>")
tl.set_api_key("<your_api_key>")
```
Method 2: Create a `.env` file containing `TWINLAB_USER` and `TWINLAB_API_KEY` in your working directory. You can then `import twinlab as tl` in your Python script / notebook as normal. The API key will be read from `.env` automatically.
```shell
echo "TWINLAB_USER=<your_username>" >> .env
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 pd
import twinlab as tl
# 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": "twinLab Product Team",
"docs_url": null,
"requires_python": "<3.13,>=3.8",
"maintainer_email": "twinlab@digilab.co.uk",
"keywords": "machine-learning, AI, cloud, twinLab, digiLab",
"author": "digiLab Solutions Ltd.",
"author_email": "twinlab@digilab.co.uk",
"download_url": "https://files.pythonhosted.org/packages/23/68/c5e5af503153e4aa0deacb39daafaf65301187be54cd7cc0f8832f5050bd/twinlab-2.19.0.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## Getting Started\n\n**Step 1**: Install the Python Interface\n\n```shell\npip install twinlab\n```\n\n**Step 2**: Configure your user details\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: Use `tl.set_user` and `tl.set_api_key` within a script. Be careful not to publicly expose your API key if sharing files.\n\n```python\nimport twinlab as tl\n\ntl.set_user(\"<your_username>\")\ntl.set_api_key(\"<your_api_key>\")\n```\n\nMethod 2: Create a `.env` file containing `TWINLAB_USER` and `TWINLAB_API_KEY` in your working directory. You can 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_USER=<your_username>\" >> .env\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\nimport pandas as pd\nimport twinlab as tl\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).\n",
"bugtrack_url": null,
"license": null,
"summary": "twinLab - Probabilistic Machine Learning for Engineers",
"version": "2.19.0",
"project_urls": {
"Documentation": "https://twinlab.ai",
"Homepage": "https://twinlab.ai"
},
"split_keywords": [
"machine-learning",
" ai",
" cloud",
" twinlab",
" digilab"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "265235fe47498e2491bdc16d4477de3665af40a3e7476079fc6932b6181cf839",
"md5": "878cc2fa90bcb04d50d9b06b90f9b4dc",
"sha256": "a82699bcf589310c55fd48dc555aa93c2dd251562c6711770b7767d51fd53a21"
},
"downloads": -1,
"filename": "twinlab-2.19.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "878cc2fa90bcb04d50d9b06b90f9b4dc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.13,>=3.8",
"size": 57831,
"upload_time": "2024-12-09T12:12:28",
"upload_time_iso_8601": "2024-12-09T12:12:28.092889Z",
"url": "https://files.pythonhosted.org/packages/26/52/35fe47498e2491bdc16d4477de3665af40a3e7476079fc6932b6181cf839/twinlab-2.19.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2368c5e5af503153e4aa0deacb39daafaf65301187be54cd7cc0f8832f5050bd",
"md5": "376a14e03e38ec70bdec46404bcf525e",
"sha256": "767746d38a0aab7643deb4a434373483e32dd6cb5a5947ea580a23da5b7bf776"
},
"downloads": -1,
"filename": "twinlab-2.19.0.tar.gz",
"has_sig": false,
"md5_digest": "376a14e03e38ec70bdec46404bcf525e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<3.13,>=3.8",
"size": 51406,
"upload_time": "2024-12-09T12:12:29",
"upload_time_iso_8601": "2024-12-09T12:12:29.998625Z",
"url": "https://files.pythonhosted.org/packages/23/68/c5e5af503153e4aa0deacb39daafaf65301187be54cd7cc0f8832f5050bd/twinlab-2.19.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-09 12:12:29",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "twinlab"
}