aireplication


Nameaireplication JSON
Version 0.0.4 PyPI version JSON
download
home_pagehttps://github.com/andrewlee1807/ai-replicate
SummaryPrivate API for Andrew
upload_time2023-04-25 08:30:30
maintainer
docs_urlNone
authorAndrew
requires_python
licenseApache-2.0 license
keywords python blackhole aireplication
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ai-replication

## Checkout at: **https://pypi.org/manage/project/aireplication/releases/**

## Usage
```python
from aireplication.ultils.data import TimeSeriesGenerator, Dataset

config = {"dataset_name": "GYEONGGI2955",
          "features": ["Amount of Consumption", "Temperature"],
          "prediction_feature": "Amount of Consumption",  # Feature to use for prediction
          "input_width": 168,
          "output_length": 1,
          "train_ratio": 0.9
          }

dataset = Dataset(dataset_name=config["dataset_name"])
# data = dataset.dataloader.export_a_single_sequence()
data = dataset.dataloader.export_the_sequence(config["features"])

print("Building time series generator...")
tsf = TimeSeriesGenerator(data=data,
                          config=config,
                          normalize_type=1,
                          shuffle=False)

# Get model 
model = get_model(model_name=args.model_name,
                  config=config)

# Train model
history = model.fit(x=tsf.data_train[0],  # [number_recoder, input_len, number_feature]
                    y=tsf.data_train[1],  # [number_recoder, output_len, number_feature]
                    validation_data=tsf.data_valid)
```

## List of dataset is available
```yaml
config1 = {"dataset_name": "GYEONGGI2955",
          "features": ["Amount of Consumption", "Temperature"],
          "prediction_feature": "Amount of Consumption",  # Feature to use for prediction
          "input_width": 168,
          "output_length": 1,
          "train_ratio": 0.9
          }

config2 = {"dataset_name": "CNU_ENGINEERING_7",
          "features": [ "temperatures", "humidity", "pressure","energy" ]  # Features to use for training
          prediction_feature: "energy",  # Feature to use for prediction
          "input_width": 168,
          "output_length": 1,
          "train_ratio": 0.9
          }
```
## Publishing the package
```shell
pip install twine
python setup.py sdist
twine upload dist/*
```

**- Note: Testing case:**
```shell
twine upload --repository testpypi dist/*
```


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/andrewlee1807/ai-replicate",
    "name": "aireplication",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "python,blackhole,aireplication",
    "author": "Andrew",
    "author_email": "andrewlee1807@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/e4/aa/65ea223b2a434adb72f4f564eefb865012aee196ee9725e24009a125cf5a/aireplication-0.0.4.tar.gz",
    "platform": null,
    "description": "# ai-replication\r\n\r\n## Checkout at: **https://pypi.org/manage/project/aireplication/releases/**\r\n\r\n## Usage\r\n```python\r\nfrom aireplication.ultils.data import TimeSeriesGenerator, Dataset\r\n\r\nconfig = {\"dataset_name\": \"GYEONGGI2955\",\r\n          \"features\": [\"Amount of Consumption\", \"Temperature\"],\r\n          \"prediction_feature\": \"Amount of Consumption\",  # Feature to use for prediction\r\n          \"input_width\": 168,\r\n          \"output_length\": 1,\r\n          \"train_ratio\": 0.9\r\n          }\r\n\r\ndataset = Dataset(dataset_name=config[\"dataset_name\"])\r\n# data = dataset.dataloader.export_a_single_sequence()\r\ndata = dataset.dataloader.export_the_sequence(config[\"features\"])\r\n\r\nprint(\"Building time series generator...\")\r\ntsf = TimeSeriesGenerator(data=data,\r\n                          config=config,\r\n                          normalize_type=1,\r\n                          shuffle=False)\r\n\r\n# Get model \r\nmodel = get_model(model_name=args.model_name,\r\n                  config=config)\r\n\r\n# Train model\r\nhistory = model.fit(x=tsf.data_train[0],  # [number_recoder, input_len, number_feature]\r\n                    y=tsf.data_train[1],  # [number_recoder, output_len, number_feature]\r\n                    validation_data=tsf.data_valid)\r\n```\r\n\r\n## List of dataset is available\r\n```yaml\r\nconfig1 = {\"dataset_name\": \"GYEONGGI2955\",\r\n          \"features\": [\"Amount of Consumption\", \"Temperature\"],\r\n          \"prediction_feature\": \"Amount of Consumption\",  # Feature to use for prediction\r\n          \"input_width\": 168,\r\n          \"output_length\": 1,\r\n          \"train_ratio\": 0.9\r\n          }\r\n\r\nconfig2 = {\"dataset_name\": \"CNU_ENGINEERING_7\",\r\n          \"features\": [ \"temperatures\", \"humidity\", \"pressure\",\"energy\" ]  # Features to use for training\r\n          prediction_feature: \"energy\",  # Feature to use for prediction\r\n          \"input_width\": 168,\r\n          \"output_length\": 1,\r\n          \"train_ratio\": 0.9\r\n          }\r\n```\r\n## Publishing the package\r\n```shell\r\npip install twine\r\npython setup.py sdist\r\ntwine upload dist/*\r\n```\r\n\r\n**- Note: Testing case:**\r\n```shell\r\ntwine upload --repository testpypi dist/*\r\n```\r\n\r\n",
    "bugtrack_url": null,
    "license": "Apache-2.0 license",
    "summary": "Private API for Andrew",
    "version": "0.0.4",
    "split_keywords": [
        "python",
        "blackhole",
        "aireplication"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e4aa65ea223b2a434adb72f4f564eefb865012aee196ee9725e24009a125cf5a",
                "md5": "d0eb8917be5e741edd55e12ab2428f46",
                "sha256": "0234110b57e57b4bac9375083e138afa4306a8e08c50915279a6885227fd2dfd"
            },
            "downloads": -1,
            "filename": "aireplication-0.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "d0eb8917be5e741edd55e12ab2428f46",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 11762,
            "upload_time": "2023-04-25T08:30:30",
            "upload_time_iso_8601": "2023-04-25T08:30:30.762300Z",
            "url": "https://files.pythonhosted.org/packages/e4/aa/65ea223b2a434adb72f4f564eefb865012aee196ee9725e24009a125cf5a/aireplication-0.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-25 08:30:30",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "andrewlee1807",
    "github_project": "ai-replicate",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "aireplication"
}
        
Elapsed time: 0.06105s