Skip to main content

A Library to convert Unsupervised Clustering Results into Geographical Maps

Project description

GitHub release (latest by date) PyPI GitHub Workflow Status PyPI - Downloads

Geographic Decision Zones (GeoZ)

GeoZ is a Python library integrating several machine learning modules to create Geographic Maps based on the output of Unsupervised Machine Learning techniques. The library is geared mainly toward delineating the output from Clustering algorithms, but it can be used for other Machine Learning algorithms. GeoZ is distributed under the 3-Clause BSD license.

Installation

To install GeoZ using pip:

pip install geoz

Usage Details

The library is still in its inital stage. As such, the user will have to provide the data in a certain format as the library is working with a fixed structure and wont fix or tolerate any deviation from the expected format.

Dataset shape and format Example

The data provided needs to have two variables, one containing the latitude and longitude (eg. latlong) and another variable that contains the predicted classes of the the points (eg. y_pred). please check the below table for illustration:

LATITUDE LONGITUDE y_pred
30 -104 2
32 -103 1
35 -105 2
33 -104 2
35 -102 3

Please make sure to write (LATITDE, LONGITUDE) in CAPITAL LETTER, otherwise the algorithm will fail.

Code Example

In this example, we import geoz and then use an already defined variable 'dataset' that contains our above table, the variable can contain the latitude, longitude and the y_pred, but it can also contain only the latitude and longitude without the class. in that case you will need to provide another variable (eg. y_pred) to store the class predictions and use it in the functions calling.

import geoz

dataset=dataset                           # This is supposed to be the dataset that you have, it must contain the Latitude and the longitude as well as the class information

map1 = geoz.convex_hull_plot(dataset[['LATITDE','LONGITUDE']], dataset[['y_pred']])            # This Function will return a Convex Hull map of the classes

map2 = geoz.sklearn_plot(dataset[['LATITDE','LONGITUDE']], dataset[['y_pred']])                # This Function will return a map drawn using Scikit-Learn "DecisionBoundaryDisplay"

map3 = geoz.mlx_plot(dataset[['LATITDE','LONGITUDE']], dataset[['y_pred']])                    # This Function will return a map drawn using MLextend  "decision_regions"

For further infromation or the functions other parameters, please check the functions DocStrings as they contain more details and information.

License information

See the file (LICENSE) for information on the terms & conditions for usage, and a DISCLAIMER OF ALL WARRANTIES.

Contact

You can ask me any questions via my Twitter Account Ne-oL. and in case you encountered any bugs, please create an issue in GitHub's issue tracker and I will try my best to address it as soon as possible.

Citation

Publication is under Process if you use this library in the mean time, please cite the Github repositry

Created By Khalid ElHaj, PhD Fellow

Geosciences Department @ UAE University

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

geoz-1.6.2.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

geoz-1.6.2-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file geoz-1.6.2.tar.gz.

File metadata

  • Download URL: geoz-1.6.2.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for geoz-1.6.2.tar.gz
Algorithm Hash digest
SHA256 818f3f086bf3512d1dc2fc6727c2b6065c3fab8b5bb77b75feccc8a680b0dda9
MD5 21f458d33e0448412e2d1042958d520b
BLAKE2b-256 46cddd3f0bb391f015ce8648d31f9be6ee598593d6d815d789f0d55c5c661218

See more details on using hashes here.

File details

Details for the file geoz-1.6.2-py3-none-any.whl.

File metadata

  • Download URL: geoz-1.6.2-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for geoz-1.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1c6406cd56928c2ecc3652904e2b8cc6e85403b9bf87a94471feafe320447257
MD5 7781d0cd298e2dd4a6bc626e0b0788e7
BLAKE2b-256 047a2b74b565ea147a9331ba37d783bce80fa4f270b7e7561afc76f8218ac518

See more details on using hashes here.

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