¿Para qué sirven los modelos?
Published:
Se han hablado mucho de los modelos matemáticos, pero poco se ha dicho de ellos. ¿Para qué sirven? ¿Cuáles son sus limitaciones? Son algunas de las preguntas que nos hacemos en este post.
This package is built in order to provide prototyping tools in python to deal with spatial data in python and model spatial-derived relations between different elements in a system. In some systems, due to the huge amount of data, the complexity of their topology their local nature or because other practical reasons we are forced to use only local information for model the system properties and dynamics, or for getting insightful local-derived features.
pySpatialTools is useful for complex topological systems with different type of spatial data elements and feature data elements in which we are not able to study all at once because of the data size.
pySpatialTools could be not recommendable for treating some specific problems with homogeneous and/or regular data which could be treated with other python packages, as for example computational linguistics (nltk), computer vision or grid data (scipy.ndimage and openCV) or others.
pySpatialTools is a framework which is coded trying to respect PEP8 python standard style of code. As a framework, pySpatialTools is not specifically case-oriented but flexible which allows the user to easy integrate their tools, specific data and problem to the framework in order to ease the solution of their problem. The framework not only provides high-level tools and general useful functions for spatial problems, but also a structures and standards that structure the program in an understandable way.
The main structure of the problem is inspired by a general definition of the problem of spatial analysis. The data is divided in spatial data and features data. The work-flow is:
There are some hot spots, where the user can take profit of the framework code and use it as a wrapper of his own code in order to take profit of the tools he has available. The main hot spots are:
BaseRetriever
(or even its son classes): where it happens the connection (and possibly the storage) of the spatial data, as well as the retrieve.BaseFeatures
(or even its son classes): where it happens the connection (and possibly the storage) of the feature data, as well as the retrieve and computation of descriptors).BaseDescriptorModel
: where it is computed the descriptors of the selected element from the associated spatial neighborhood retrieved. It can change while see the data.BasePerturbations
: where it is implemented the statistical random models to apply to the data in order to perform posterior statistical testing.BaseRelativePositioner
: where it is implemented the basic relative position quantity (distance, similarity or other complex object) definition for assign a posteriori measure between elements and the elements in their neighborhoods after the retrieve.With these classes the users, by using inheritance and respecting the standards of the framework, can adapt their tools to the framework in order to save time and efforts, and give a common interface.
It could be installed using shell
git clone https://github.com/tgquintela/pySpatialTools
.\install
You need to ensure that all the package requirements are installed. pySpatialTools provide a testing module which could be called by importing the module and applying test function. If we are in the python idle:
import pySpatialTools
pySpatialTools.test()
or from the shell
>> python -c "import pySpatialTools; pySpatialTools.test()"
***---*** Testing python package pySpatialTools ***---***
---------------------------------------------------------
Test compared with a reference computer with specs:
Linux Mint 17 Qiana
Kernel Linux 3.13.0-24-generic
Intel Core i7-3537U
4GB de RAM
NVidia GeForce GT720M 2GB
-------------------------------
Average time in ref. computer: 3.50 seconds.
Time testing in this computer: 3.83 seconds.
for developers you can test from the source using nosetests of nose package.
nosetests path/to/dir
For know how to use the program, check the tutorial.
This package is in an early stage. If there is any idea to improve it or even code do not hesitate to do it or communicate with the main developer through mail: tgq.spm@gmail.com
Other TODOs
pySpatialTools is available as open source under the terms of the MIT License.
Leave a Comment