Skip to main content

Example package for sync

Project description

Arima Sync Package

This is brief user guide for Sync lib.
Please make sure the directories are properly set up before calling the APIs.

Directories

  • data: Data folder contains the input "data_file". The input "data_file" is a csv file.
  • output: generated individual level dataframe is saved here in csv format. With name "individual_<model_name>.csv"
  • src: where the main scripts are

Scripts

  • utils.py: a collection of basic filing operations used by serveral scripts
  • utils_function.py: a collection of basic mathemtical operations used by several scripts
  • functions.py: the key algorithms functions of SynC
  • paths.py: store all path-related variables

How to generate data

  • There are three input parameters for generating the individual data.

    1. "data_file" contains aggregation level feature data.
    1. "init_features" and "feature_list" are in format of list of list. Every list in "init_features" and "feature_list" should represents one catagory of feature. e.g: [['AG_20_to_40','AG_40_to_60','AG_60_to_80','AG_80_to_100'], ['Gender']]. Here the age feature is divided into four columns in one list. They represents one type of feature with multually exclusive property, therefore they are combined in one list. While another feature gender has only one column representing "male" or "female"(gender at the demographic level), as a binary option.
    1. "agg_units" will be used when sync the individual data. The "agg_units" should be a single csv files contains two columns. First column contains the aggregation name, for instance, postal code "A0A1A0". Second column must be an interger represents the unit in that aggregation units. "A0A1A0, 65" means the number of population in postal code area A0A1A0 is 65.
  • Other parameters:

  • "model_name", "path" are customized parameters. "model_name" specify the training models's name. "path" is the location for the input data files "data_file" and "agg_units".

  • "cumulative" set True to training and sync in a cumulative way. False to non-cumulative. The cumulative means every feature in "feature_list" is trained and generated by order. The subsequent feature in the list will be trained based on all previous feature data.

  • Please refer to run.py as an example of running Sync APIs.

Note

    1. Make sure the input data file "data_file" contains all of the data columns you want to train and predict. Null values in csv file should be avoided to assure the model has proper results.
    1. Specify the "init_features" and "feature_list" using the column names in csv files.
    1. Currently the algorithm does not support Python 3.9/3.10.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

SyncAlgo-0.1.2.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

SyncAlgo-0.1.2-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file SyncAlgo-0.1.2.tar.gz.

File metadata

  • Download URL: SyncAlgo-0.1.2.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.2

File hashes

Hashes for SyncAlgo-0.1.2.tar.gz
Algorithm Hash digest
SHA256 644eafae62d063bc067898ad2083e3472f32da8f68b6a21d3cb68b783fe92203
MD5 04e807b7e4952200a90aac429f34a56f
BLAKE2b-256 bb59bc0d312a7f1caef335f7e8ba95d4056e3a90889c5520da424a7d1cfff34e

See more details on using hashes here.

File details

Details for the file SyncAlgo-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: SyncAlgo-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.2

File hashes

Hashes for SyncAlgo-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 34feeca355025d2c131333c9c31fe55d2224c2ed0164aa6f6282cd99c90fae5d
MD5 7742d8fca7b74f9b4174f57ca9f9d89d
BLAKE2b-256 2369802a8cd86cc228b52b614b3322a23bb2bee6718cd1962d7e6f40fc1224fd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page