Skip to main content

A set of functions for dataset dimension transformations

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 dictionary in form {n1:N1,n2:N2}, where n1, n2 are the indices of the features being unified and N1,N2 are the corresponding powers of the features.

dim_step_up(data, powers): # data is a list of lists; powers is dictionary in form {n1:N,n2:N2}, where n1, n2 are the indices of the features: n1 will be divided onto n1 and n2, and N,N2 are the corresponding powers of the features. The resulted data will have feature n1 of power N/N2 rounded above and n2 of power N2.

transform_to(data, m): # transforms data to the new dataset of dimension m; every step will be made with most appropriate features and the information about the step will be returned in dictionary with indexes as keys and powers as values

transform_out_down(data, story): # inverse function: performs backward transformation after dimensions growth by transform_to function; story is the dictionary given by transform_to

transform_out_up(data, story): # inverse function: performs backward transformation after dimensions decrease by transform_to function; story is the dictionary given by transform_to

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-0.0.2.tar.gz (15.0 kB view hashes)

Uploaded Source

Built Distribution

genser-0.0.2-py3-none-any.whl (24.2 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