Package: uframe
uframe: Python uncertain data handling toolkitWhat is it?Introducinguframe: A Flexible and Powerful Framework for Handling Uncertain DataAs of today, uframe is still in development. It is a working prototype and planned features, bugfixes, tests and documentation are partly still missing.uframeis a comprehensive Python package designed to simplify and expedite research involving uncertain data from various sources.
By seamlessly integrating Probability Density Functions (PDFs) into its core functionality, uframe empowers users to manipulate and analyze uncertain data with ease.Key Features:Flexible Data Handling: uframe offers a versatile framework for working with uncertain data, enabling researchers to tackle complex datasets efficiently.Probability Density Functions (PDFs): uframe leverages PDFs as the fundamental representation of attribute uncertainty, allowing for a comprehensive characterization of uncertainty within each instance.Streamlined Research: With its user-friendly interface and powerful capabilities, uframe facilitates seamless data exploration, analysis, and visualization, promoting accelerated research and insights.Whether you're dealing with incomplete or imprecise measurements, or simply need a reliable tool to handle uncertainty, uframe provides a robust foundation for your uncertain data analysis needs.Table of ContentsMain FeaturesInstallationGetting StartedDependenciesLicenseDocumentationMain FeaturesInstallationThe source code is available on GitHub:https://github.com/URWI2/uframeBinary installers of the latest released version are available at thePython
Package Index (PyPI).pipinstalluframeGetting startedTo begin working with uncertain data using uframe, follow these steps:Import the necessary libraries:importuframeasufimportnumpyasnp
fromscipy.statsimportgaussian_kdeRepresenting uncertain data
Uncertain data can be represented by different functions:Kernel Density Estimations (eiter scipy or sklearn)Scipy probability distributionsuncertain=[]foriinrange(10):uncertain.append(gaussian_kde(np.random.uniform(low=i/2,high=i+1,size=100)))data=uf.uframe()data.append(uncertain)Once the uframe is created, a number of functions are available to the user.# samples one instance from the whole data setdata.sample()# Calculating the mode of each instance using an optimization algorithmdata.mode()# Determining the expected value of each instance:data.ev()uframe_instance subclassuframe is built upon instances of the class uframe_instance. These classes can also be created by the user and combined to a uframe.
The Argument indices is necessary if the order differs of certain and uncertain attributes differs between instances.
Indices expects a list of three lists, with the indices of certain, continuous and categorical attributes in different lists.importuframeasuf
fromscipy.statsimportgamma,normuncertain=[uf.uframe_instance(certain_data=np.array([2.1]),continuous=[norm(0.2,1),gamma(0.3)],indices=[[1],[0,2],[]]),uf.uframe_instance(continuous=[norm(0.1,1),norm(0.3,0.7),gamma(1)],indices=[[],[1,0,2],[]])]data=uf.uframe()data.append(uncertain)data.sample()DependenciesNumPy - Enables working with large, multi-dimensional arrays, matrices and provides high-level mathematical functions to operate on these arraysmiceforest - Fast, memory efficient Multiple Imputation by Chained Equations (MICE) with lightgbm, that can be used to create uncertain dataLicenseMITDocumentationThe official documentation is not yet available.Go to Top