uncoverml.scripts package¶
Submodules¶
uncoverml.scripts.cluster_cli module¶
Run the uncoverml pipeline for clustering, supervised learning and prediction.
Usage: uncoverml [OPTIONS] COMMAND [ARGS]...
Options:
-v, --verbosity [DEBUG|INFO|WARNING|ERROR]
Level of logging
--help Show this message and exit.
Commands:
cluster
covdiag
gammasensor
gridsearch
learn
modelfix
predict
resample
shiftmap
subsample
targetsearch
tiff2kmz
/home/circleci/uncover-ml/venv/lib/python3.7/site-packages/sklearn/utils/deprecation.py:144: FutureWarning: The sklearn.metrics.scorer module is deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.metrics. Anything that cannot be imported from sklearn.metrics is now part of the private API.
warnings.warn(message, FutureWarning)
/home/circleci/uncover-ml/venv/lib/python3.7/site-packages/sklearn/utils/deprecation.py:144: FutureWarning: The sklearn.feature_selection.base module is deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.feature_selection. Anything that cannot be imported from sklearn.feature_selection is now part of the private API.
warnings.warn(message, FutureWarning)
-
uncoverml.scripts.cluster_cli.
main
(config_file, subsample_fraction)¶
-
uncoverml.scripts.cluster_cli.
semisupervised
(config)¶
-
uncoverml.scripts.cluster_cli.
unsupervised
(config)¶
uncoverml.scripts.covdiag_cli module¶
-
uncoverml.scripts.covdiag_cli.
diagnostic
(filename)¶
-
uncoverml.scripts.covdiag_cli.
main
(path, csvfile, recursive)¶ Will output some basic diagnostic information for geotiffs. If a directory is provided, all geotiffs in the direcotry (and subdirectories if ‘-r’ option is used) will be processed. Providing a single filepath will only process that file.
To store the printed output in a txt file, use output redirection: ‘covdiag /path/to/file >> output.txt’.
-
uncoverml.scripts.covdiag_cli.
printer
(diag)¶
uncoverml.scripts.gammasensor_cli module¶
Run the Gamma sensor prediction/super-resolution pipeline.
-
uncoverml.scripts.gammasensor_cli.
main
(verbosity, geotiff, height, absorption, forward, outputdir, noise, impute)¶
-
uncoverml.scripts.gammasensor_cli.
write_data
(data, name, in_image, outputdir, forward)¶
uncoverml.scripts.gridsearch_cli module¶
Run the various machine learning parameter optimisation using scikit-learn GridSearchCv.
- Available scorers:
- Regression:
‘r2’, ‘expvar’, ‘smse’, ‘lins_ccc’
- Classification:
‘accuracy’
- Classification with probability:
‘log_loss’, ‘auc’
- Not yet implemented:
- Regression with variance (models w/ predict_dist):
‘mll’
- Classification:
‘mean_confusion’, ‘mean_confusion_normalized’
If no scorers are provided, then the default score method of the model will be used.
Note that GridSearchCV is run with refit set to False. This is because the _best_estimator (best model found by GridSearchCV) is never used to predict anything, so fitting it is a waste.
If you ever do want to use refit, keep in mind that if you use mutliple scorers, refit needs to be set to the name of a scorer used to find the best parameters for refitting the model.
-
uncoverml.scripts.gridsearch_cli.
main
(pipeline_file, partitions, njobs)¶
-
uncoverml.scripts.gridsearch_cli.
setup_pipeline
(config)¶
uncoverml.scripts.learn_cli module¶
Run the uncoverml pipeline for clustering, supervised learning and prediction.
Usage: uncoverml [OPTIONS] COMMAND [ARGS]...
Options:
-v, --verbosity [DEBUG|INFO|WARNING|ERROR]
Level of logging
--help Show this message and exit.
Commands:
cluster
covdiag
gammasensor
gridsearch
learn
modelfix
predict
resample
shiftmap
subsample
targetsearch
tiff2kmz
/home/circleci/uncover-ml/venv/lib/python3.7/site-packages/sklearn/utils/deprecation.py:144: FutureWarning: The sklearn.metrics.scorer module is deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.metrics. Anything that cannot be imported from sklearn.metrics is now part of the private API.
warnings.warn(message, FutureWarning)
/home/circleci/uncover-ml/venv/lib/python3.7/site-packages/sklearn/utils/deprecation.py:144: FutureWarning: The sklearn.feature_selection.base module is deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.feature_selection. Anything that cannot be imported from sklearn.feature_selection is now part of the private API.
warnings.warn(message, FutureWarning)
-
uncoverml.scripts.learn_cli.
main
(config_file, partitions)¶
uncoverml.scripts.modelfix_cli module¶
This command is used to hotfix models that were trained before the covariate transform fixes were applied.
Usage: uncoverml [OPTIONS] COMMAND [ARGS]...
Options:
-v, --verbosity [DEBUG|INFO|WARNING|ERROR]
Level of logging
--help Show this message and exit.
Commands:
cluster
covdiag
gammasensor
gridsearch
learn
modelfix
predict
resample
shiftmap
subsample
targetsearch
tiff2kmz
/home/circleci/uncover-ml/venv/lib/python3.7/site-packages/sklearn/utils/deprecation.py:144: FutureWarning: The sklearn.metrics.scorer module is deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.metrics. Anything that cannot be imported from sklearn.metrics is now part of the private API.
warnings.warn(message, FutureWarning)
/home/circleci/uncover-ml/venv/lib/python3.7/site-packages/sklearn/utils/deprecation.py:144: FutureWarning: The sklearn.feature_selection.base module is deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.feature_selection. Anything that cannot be imported from sklearn.feature_selection is now part of the private API.
warnings.warn(message, FutureWarning)
-
uncoverml.scripts.modelfix_cli.
main
(config_file)¶
uncoverml.scripts.predict_cli module¶
Run the uncoverml pipeline for clustering, supervised learning and prediction.
Usage: uncoverml [OPTIONS] COMMAND [ARGS]...
Options:
-v, --verbosity [DEBUG|INFO|WARNING|ERROR]
Level of logging
--help Show this message and exit.
Commands:
cluster
covdiag
gammasensor
gridsearch
learn
modelfix
predict
resample
shiftmap
subsample
targetsearch
tiff2kmz
/home/circleci/uncover-ml/venv/lib/python3.7/site-packages/sklearn/utils/deprecation.py:144: FutureWarning: The sklearn.metrics.scorer module is deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.metrics. Anything that cannot be imported from sklearn.metrics is now part of the private API.
warnings.warn(message, FutureWarning)
/home/circleci/uncover-ml/venv/lib/python3.7/site-packages/sklearn/utils/deprecation.py:144: FutureWarning: The sklearn.feature_selection.base module is deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.feature_selection. Anything that cannot be imported from sklearn.feature_selection is now part of the private API.
warnings.warn(message, FutureWarning)
-
uncoverml.scripts.predict_cli.
main
(config_file, partitions, mask, retain)¶
-
uncoverml.scripts.predict_cli.
write_prediction_metadata
(model, config, out_filename='metadata.txt')¶ write the metadata for this prediction result, into a human-readable txt file. in order to make the ML results traceable and reproduceable (provenance) :return:
uncoverml.scripts.resample_cli module¶
-
uncoverml.scripts.resample_cli.
main
(config_file, validation=False, validation_points=100)¶
uncoverml.scripts.shiftmap_cli module¶
Run the uncoverml pipeline for clustering, supervised learning and prediction.
Usage: uncoverml [OPTIONS] COMMAND [ARGS]...
Options:
-v, --verbosity [DEBUG|INFO|WARNING|ERROR]
Level of logging
--help Show this message and exit.
Commands:
cluster
covdiag
gammasensor
gridsearch
learn
modelfix
predict
resample
shiftmap
subsample
targetsearch
tiff2kmz
/home/circleci/uncover-ml/venv/lib/python3.7/site-packages/sklearn/utils/deprecation.py:144: FutureWarning: The sklearn.metrics.scorer module is deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.metrics. Anything that cannot be imported from sklearn.metrics is now part of the private API.
warnings.warn(message, FutureWarning)
/home/circleci/uncover-ml/venv/lib/python3.7/site-packages/sklearn/utils/deprecation.py:144: FutureWarning: The sklearn.feature_selection.base module is deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.feature_selection. Anything that cannot be imported from sklearn.feature_selection is now part of the private API.
warnings.warn(message, FutureWarning)
-
uncoverml.scripts.shiftmap_cli.
main
(config_file, partitions)¶
uncoverml.scripts.subsample_cli module¶
Subsample the targets from a shapefile to a new shapefile.
-
uncoverml.scripts.subsample_cli.
main
(filename, outputdir, npoints)¶
uncoverml.scripts.targetsearch_cli module¶
Run the uncoverml pipeline for clustering, supervised learning and prediction.
Usage: uncoverml [OPTIONS] COMMAND [ARGS]...
Options:
-v, --verbosity [DEBUG|INFO|WARNING|ERROR]
Level of logging
--help Show this message and exit.
Commands:
cluster
covdiag
gammasensor
gridsearch
learn
modelfix
predict
resample
shiftmap
subsample
targetsearch
tiff2kmz
/home/circleci/uncover-ml/venv/lib/python3.7/site-packages/sklearn/utils/deprecation.py:144: FutureWarning: The sklearn.metrics.scorer module is deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.metrics. Anything that cannot be imported from sklearn.metrics is now part of the private API.
warnings.warn(message, FutureWarning)
/home/circleci/uncover-ml/venv/lib/python3.7/site-packages/sklearn/utils/deprecation.py:144: FutureWarning: The sklearn.feature_selection.base module is deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.feature_selection. Anything that cannot be imported from sklearn.feature_selection is now part of the private API.
warnings.warn(message, FutureWarning)
-
uncoverml.scripts.targetsearch_cli.
main
(config_file, partitions)¶
uncoverml.scripts.tiff2kmz_cli module¶
Convert a Geotiff to a KMZ archive for display on Google and Cesium maps (e.g. National Map).
-
uncoverml.scripts.tiff2kmz_cli.
main
(tiff, outfile, overlayname)¶ Turn a geotiff into a KMZ that can be dragged onto an instance of Terria Map. This also constructs a JPEG of the Geotiff, as it is required for the KMZ.
Module contents¶
Run the uncoverml pipeline for clustering, supervised learning and prediction.
Usage: uncoverml [OPTIONS] COMMAND [ARGS]...
Options:
-v, --verbosity [DEBUG|INFO|WARNING|ERROR]
Level of logging
--help Show this message and exit.
Commands:
cluster
covdiag
gammasensor
gridsearch
learn
modelfix
predict
resample
shiftmap
subsample
targetsearch
tiff2kmz
/home/circleci/uncover-ml/venv/lib/python3.7/site-packages/sklearn/utils/deprecation.py:144: FutureWarning: The sklearn.metrics.scorer module is deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.metrics. Anything that cannot be imported from sklearn.metrics is now part of the private API.
warnings.warn(message, FutureWarning)
/home/circleci/uncover-ml/venv/lib/python3.7/site-packages/sklearn/utils/deprecation.py:144: FutureWarning: The sklearn.feature_selection.base module is deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.feature_selection. Anything that cannot be imported from sklearn.feature_selection is now part of the private API.
warnings.warn(message, FutureWarning)
-
uncoverml.scripts.
total_gb
()¶