Skip to main content

A set of functions to transform datasets

Project description

The GenSer package (i.e. Generalised Serialisation) contains the set of functions to perform the dimension transformation of the numerical dataset. To use the package you should have a dataset of non-negative integer values. Having n features in your dataset, you may transform it to m features and, after your work with data, return back to n features. The following functions available:

dim_step_down(data, powers): data is a list of lists; powers is list of powers of the features, i.e. how many different values can the feature take.

dim_step_up(data, powers): the same description as for dim_step_down.

transform_to(data, d): Transforms the dimension of the given dataset to the d value

Arguments:
data (list of lists): the input dataset without labels
d (int): the target dimension

Outputs:
A dataset of dimension d, 
A list of transformation hints: a tuple (powers, tdict) for every step.

transform_out_down(data, rlist): Transforms back the dimension of the given dataset when the dimension had been increased by transform_to

Arguments:
data (list of lists): the input dataset without labels
rlist (list): the list resulted from transform_to

Outputs:
A restored dataset, 
A powers of the restored dataset (may differ from the 
    initial powers of transform_to argument data).

transform_out_up(data, rlist): Transforms back the dimension of the given dataset when the dimension had been decreased by transform_to

Arguments:
data (list of lists): the input dataset without labels
rlist (list): the list resulted from transform_to

Outputs:
A restored dataset, 
A powers of the restored dataset (may differ from the 
    initial powers of transform_to argument data). 

Additional information available directly from the author by request on email shoukhov@mail.ru

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

genser-1.0.1.tar.gz (15.2 kB view hashes)

Uploaded Source

Built Distribution

genser-1.0.1-py3-none-any.whl (15.6 kB view hashes)

Uploaded Python 3

Supported by

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