API Reference#

This is the class and function reference of watex. Please refer to the full user guide for further details, as the class and function raw specifications may not be enough to give full guidelines on their uses.

watex.analysis: Analyses#

The module is a set of feature extraction and selection, matrices decomposition and features analyses.

Analysis sub-package is used for basic feature extraction, transformation and matrices covariance computations (decomposition). It also includes some dimensional reduction (dimensionality) and factor analysis from factor.

User guide: See the analysis section for further details.

analysis.LLE(X[, n_components, return_X, ...])

Locally Linear Embedding(LLE)

analysis.pcavsfa(X[, rank, sigma, ...])

Compute PCA score and Factor Analysis scores from training X and compare probabilistic PCA and Factor Analysis models.

analysis.compute_scores(X, n_features[, ...])

Compute PCA score and Factor Analysis scores from training X.

analysis.decision_region(X, y, clf[, Xt, ...])

View decision regions for the training data reduced to two principal component axes.

analysis.extract_pca(X)

A naive approach to extract PCA from training set X

analysis.feature_transformation(X[, y, ...])

Transform X into new principal components after decomposing the covariances matrices.

analysis.find_features_importances(fnames, ...)

Retreive the features importance with variance ratio.

analysis.get_component_with_most_variance(X, ...)

Get the number of component with 95% ratio.

analysis.iPCA(X[, n_components, view, ...])

Incremental PCA

analysis.kPCA(X[, n_components, return_X, ...])

Kernel PCA

analysis.linear_discriminant_analysis(X, y)

Linear Discriminant Analysis LDA.

analysis.LW_score(X[, store_precision, ...])

Models score from Ledoit-Wolf.

analysis.make_scedastic_data([n_samples, ...])

Generate a sampling data for probabilistic PCA and Factor Analysis for model comparison.

analysis.nPCA(X[, n_components, view, ...])

Normal Principal Components analysis (PCA)

analysis.plot_projection(self[, n_components])

Quick plot the N-Dimension VS explained variance Ratio.

analysis.shrunk_cov_score(X)

shrunk the covariance scores.

analysis.total_variance_ratio(X[, view])

Compute the total variance ratio.

watex.base: Base classes and Accessors#

User guide: See the bases section for further details.

Classes#

base.Data

Data base class

base.Missing

Deal with missing values in Data

base.AdalineStochasticGradientDescent

Adaptative Linear Neuron Classifier with batch (stochastic) gradient descent

base.AdalineGradientDescent

Adaptative Linear Neuron Classifier

base.GreedyPerceptron

Perceptron classifier

base.MajorityVoteClassifier

A majority vote Ensemble classifier

base.SequentialBackwardSelection

Sequential Backward Selection (SBS) is a feature selection algorithm which aims to reduce dimensionality of the initial feature subspace with a minimum decay in the performance of the classifier to improve upon computationan efficiency.

Functions#

base.existfeatures(df, features[, error])

Control whether the features exists or not

base.get_params(obj)

Get object parameters.

base.selectfeatures(df[, features, include, ...])

Select features and return new dataframe.

watex.cases: Case Histories#

‘cases’ subpackage implements functions and modules already used to solve real engineering problems such as the flow rate prediction and boosting using the base learners and an ensemble paradigms.

features, processing, modeling and prepare modules have base step procedures and can be used for processing and analyses to give a quick depiction of how data looks like and model performance estimation.

User guide: See the case histories section for further details.

Classes#

cases.modeling.BaseModel([data_fn, df])

Base model class.

cases.prepare.BaseSteps([tname, return_all, ...])

Default Data preparation steps

cases.features.GeoFeatures(**kws)

Features class.

cases.features.FeatureInspection([tname, ...])

Summarizes the flow features.

cases.processing.Preprocessing([tname, ...])

Base preprocessing class.

cases.processing.Processing([pipeline, ...])

Processing class for managing baseline model evaluation and learning.

Functions#

cases.prepare.base_transform(X[, ...])

Tranformed X using PCA and plot variance ratio by experiencing the attributes combinaisons.

cases.prepare.default_pipeline(X, ...[, y, ...])

Default pipeline use for preprocessing the`Bagoue` dataset

cases.prepare.default_preparation(X[, ...])

Automate the data preparation to be ready for PCA analyses

watex.datasets: Datasets#

Dataset subpackage is used to fetch data from the local machine. If the data does not exist or deleted, the remote searching (repository or zenodo record ) triggers via the module rload

User guide: See the datasets section for further details.

datasets.fetch_data(tag, **kws)

Fetch dataset from tag.

datasets.load_bagoue(*[, return_X_y, ...])

Load the Bagoue dataset.

datasets.load_boundiali(*[, as_frame, ...])

A DC-vertical Electrical resistivity data collected from BOUNDIALI during the National Drinking Water Supply Program (PNAEP) occurs in 2014 in Cote d'Ivoire.

datasets.load_edis(*[, return_data, ...])

Load SEG-Electrical Data Interchange (EDI) object

datasets.load_gbalo(*[, kind, as_frame, ...])

Load Gbalo ERP and VES datasets.

datasets.load_hlogs(*[, return_X_y, ...])

Load the hydro-logging dataset.

datasets.load_huayuan(*[, samples, key, ...])

Load AMT data from Huayuan locality.

datasets.load_iris(*[, return_X_y, ...])

Load and return the iris dataset (classification).

datasets.load_mxs(*[, return_X_y, as_frame, ...])

Load the dataset after implementing the mixture learning strategy (MXS).

datasets.load_nlogs(*[, return_X_y, ...])

Load the Nanshang Engineering and hydrogeological drilling dataset.

datasets.load_semien(*[, as_frame, ...])

A DC-vertical Electrical resistivity data collected from SEMIEN during the National Drinking Water Supply Program (PNAEP) occurs in 2014 in Cote d'Ivoire.

datasets.load_tankesse(*[, as_frame, tag, ...])

A DC-Electrical resistivity profiling data collected from TANKESSE during the National Drinking Water Supply Program (PNAEP) occurs in 2014 in Cote d'Ivoire and an example of the data arrangement is the following:

datasets.make_erp(*[, n_stations, max_rho, ...])

Generate Electrical Resistivity Profiling (ERP) data from stations and coordinates points.

datasets.make_ves(*[, samples, min_rho, ...])

Generate Vertical Electrical Sounding (VES) data from pseudo-depth measurements.

watex.edi: Electrical Data Interchange#

EDI stands for Electrical Data Interchange. The Edi class read and write an EDI file(*.edi) file as the standard MT/EMAP Data Interchange. It does the basic tensors operations. Each section of the EDI file belongs to a class object, thus the elements of each section are attributes for easy access. Edi is outputted following the SEG documentation.

edi.Edi([verbose])

Electrical Data Interchange class.

watex.exceptions: Exceptions#

List of watex exceptions for warning users.

exceptions.AquiferGroupError

Raises exception with everything that does not relate to the aquifer like a multidimensional array.

exceptions.ConfigError

Raises an Exception if configuration (file or not ) failed to be executed correctly.

exceptions.CoordinateError

Raises an Exception for mismatched coordinates or if coordinates failed to be recomputed properly.

exceptions.DatasetError

Raises exception when mutiple data are passed as list of arguments where shape , columns and sizee are compared.

exceptions.DCError

Raises exception when data passed to DC base class are not consistent.

exceptions.DepthError

Raises exception with everything that does not support the depth line a multidimensional array.

exceptions.EDIError

Raises an Exception if the given SEG-Electrical Data Interchange data does not fit the appropriate EDI-format.

exceptions.EMError

Raises an Exception is EM method failed to run successfully or a wrong argument passed to parameters computation failed

exceptions.ERPError

Raises an Exception if data passed is not a valid Electrical Resistivity Profiling.

exceptions.EstimatorError

Raises an Exception if the estimator or assessor passed is wrong.

exceptions.ExtractionError

Raises an Exception if value of extration in path-like object failed, or .json ,.yml or other files formats gives an expected result of data extraction.

exceptions.FeatureError

Raises an Exception if the features handling failed to be executed properly.

exceptions.FileHandlingError

Raises an Exception if failed to manipulate the files properly.

exceptions.FrequencyError

Raises an Exception for wrong given frequencies.

exceptions.GISError

Raises an Exception if the GIS parameters failed to be calculated successfully.

exceptions.GeoDatabaseError

Raises an Exception if the database failed to respond.

exceptions.GeoPropertyError

Raises an Exception if the Geological property objects are trying to be modified externally.

exceptions.HeaderError

Raises an Exception if the file/data header is missing, commonly the appropriate requested columns

exceptions.LearningError

Raises an Exception if the learning Inspection failed during the training phase.

exceptions.NotFittedError

Raise an Exception if the 'fit' method is not called yet.

exceptions.ParameterNumberError

Raises an Exception if the given parameters are not the parameters expected for a proper computation.

exceptions.PlotError

Raises an Exception if the plot cannot be run sucessffully.

exceptions.ProcessingError

Raises an Exception if the auto/data processing failed to be executed properly.

exceptions.ResistivityError

Raises an Exception if the resistivity array is missing in the dataset or the column name/index for restrieving the resistivity data is wrong.

exceptions.SQLError

Raises an Exception if the SQL request is unappropriate.

exceptions.SiteError

Raises exception to everything related to the Site, Location.

exceptions.StationError

Raises an Exception if the station position or index is out of the number of sites collected during the survey.

exceptions.StrataError

Raises an Exception if the value of stratum passes is wrong.

exceptions.VESError

Raises an Exception if data passed is not a valid Vertical Electrical Sounding.

exceptions.ZError

Raises an Exception if the Impedance Z tensor parameters failed to be calculated properly.

exceptions.kError

Raises exception if the array of permeability coefficient is missing or the 'kname' is not specified as the name of the column that fits the permeability coefficient in the hydro-log data.

watex.externals: Tensors#

External sub-package is an impedance Z, resistivity and phase tensors manipulation. It also includes some third-party codes and other scripts elaborated to interact between the former and the watex package.

Classes#

externals.z.Z([z_array, z_err_array, freq])

Z class - generates an impedance tensor (Z) object.

externals.z.ResPhase([z_array, z_err_array, ...])

resistivity and phase class - generates Resistivity and phase tensors object.

externals.z.Tipper([tipper_array, ...])

Tipper class that generates a Tipper-object.

Functions#

externals.z.correct4sensor_orientation(Z_prime)

Correct a Z-array for wrong orientation of the sensors.

externals.zutils.invertmatrix_incl_errors(...)

Invert matrices with inclinaison errors

externals.zutils.make_log_increasing_array(...)

create depth array with log increasing cells, down to target depth, inputs are z1_layer thickness, target depth, number of layers (n_layers)

externals.zutils.multiplymatrices_incl_errors(...)

multiplies matrices including the propagation errors.

externals.zutils.old_z_error2r_phi_error(x, ...)

Error estimation from rect to polar, but with small variation needed for MT: the so called 'relative phase error' is NOT the relative phase error, but the ABSOLUTE uncertainty in the angle that corresponds to the relative error in the amplitude.

externals.zutils.propagate_error_polar2rect(r, ...)

Find error estimations for the transformation from polar to cartesian coordinates.

externals.zutils.propagate_error_rect2polar(x, ...)

Find error estimations for the transformation from cartesian coordinates to polar.

externals.zutils.rotatematrix_incl_errors(...)

rotates the matrix including the propagation errors.

externals.zutils.rotatevector_incl_errors(...)

rotates vector including the propagation errors.

watex.geology: Geology#

Geology sub-package is dedicated for structural informations and strata layer building. It uses some modeling data exported as two-dimensional matrices block of resistivity (e.g ModEM, MTpy, pycsamt, OCCAM2D) and combined with the geological informations on the survey area to build the stratigraphy logs. It also give an alternative way to draw some drilling logs after the drilling operations.

Classes#

geology.core.GeoBase([verbose])

Base class of container of geological informations for stratigraphy model log creation of exploration area.

geology.database.DBSetting([db_name, db_host])

build a datable postgre Sql from dict_app.py simple way to make a transit between two objects One object dict_app to populate DataBase

geology.database.GeoDataBase([...])

Core geological database class.

geology.drilling.Borehole([lat, lon, area, ...])

Focused on Wells and Borehole offered to the population.

geology.drilling.Drill(**kwd)

Focused on drilling operations

geology.drilling.DSBorehole([hole, dname, ...])

Class deals with Borehole datasets.

geology.drilling.DSBoreholes([area, holeid, ...])

Class deals with many boreholes dataset.

geology.geology.Geology([geofn])

Geology class deals with all concerns the structures during investigation sites

geology.geology.Structural([configfile])

Geology strutural conventions class.

geology.geology.Structures([configfile])

This class is an auxilliary class to supplement geodatabase , if the GeodataBase doesnt reply to SQL request , then use this class to secah information about structures .

geology.stratigraphic.GeoStrataModel([area, ...])

Create a stratigraphic model from 2D inversion models blocks.

Functions#

geology.geology.setstructures(self[, ...])

configure the geological structures as a property object and load attributes.

geology.core.get_agso_properties([...])

Get the geostructures files from <'watex/etc/'> and set the properties according to the desire type.

geology.core.mapping_stratum([download_files])

Map the rocks properties from _geocodes files and fit each rock to its properties.

geology.core.set_agso_properties([...])

Set the rocks and their properties from inner files located in < 'watex/etc/'> folder.

watex.methods: Methods#

Methods sub-package is composed of DC-Resistivity, EM, and hydro-geological methods for prediction parameter computations as well as exporting filtering tensors for 1D/2D modeling purpose.

Classes#

User guide: See the methods section for further details.

methods.AqGroup([kname, aqname, method, ...])

Group of Aquifer is mostly related to area information after multiple boreholes collected.

methods.AqSection([aqname, kname, zname])

Aquifer section class

methods.DCProfiling([stations, dipole, ...])

A collection of DC-resistivity profiling classes.

methods.DCSounding([search, rho0, h0, ...])

Direct-Current Electrical Sounding

methods.DCMagic([stations, dipole, auto, ...])

A super class that deals with ERP and VES objects to generate single DC features for prediction.

methods.EM([survey_name, verbose])

Create EM object as a collection of EDI-file.

methods.EMAP([window_size, component, mode, ...])

Base processing of EMAP data.

methods.ERPCollection([listOferpfn, ...])

Collection objects.

methods.Hydrogeology(**kwd)

A branch of geology concerned with the occurrence, use, and functions of surface water and groundwater.

methods.MXS([kname, aqname, threshold, ...])

Mixture Learning Strategy (MXS)

methods.Logging([zname, kname, verbose])

Logging class

methods.ResistivityProfiling([station, ...])

Class deals with the Electrical Resistivity Profiling (ERP).

methods.VerticalSounding([search, rho0, h0, ...])

Vertical Electrical Sounding (VES) class; inherits of ElectricalMethods

methods.MT([window_size, c, verbose, ...])

Data processing class.

Functions#

electrical: DC-Resistivity#

electrical computes some DC parameters from ERP and VES. From these parameters, it provides intelligent methods to propose the right place to locate a drill and predicts the flow rate before any drilling operations.

User guide: See the DC-resistivity section for further details.

methods.electrical.DCProfiling.summary([...])

Agregate the DC-Profiling parameters to compose a param-table

methods.electrical.DCSounding.summary([...])

Agregate the DC-Sounding parameters to compose a param-table

methods.electrical.ResistivityProfiling.summary([...])

Summarize the most import parameters for prediction purpose.

methods.electrical.ResistivityProfiling.plotAnomaly(...)

Plot the best conductive zone found in the Electrical resistivity profiling

methods.electrical.VerticalSounding.summary([...])

Summarize the most import features for prediction purpose.

methods.electrical.VerticalSounding.plotOhmicArea([fbtw])

Plot the ohmic-area from selected fractured zone.

methods.electrical.VerticalSounding.invert(data)

Invert1D the Vertical Electrical Sounding data collected in the exporation area.

methods.erp.DCMagic.summary(*[, coerce, ...])

Retrieve sites details and aggregate the table to compose unique DC features.

em: EM/EMAP - MT: short-periods Processing#

em module is related for a few meter exploration in the case of groundwater exploration. Module provides some basics processing steps for EMAP data filtering and remove noises.

User guide: See the EM tensors processing section for further details.

methods.em.EM.rewrite(*[, by, prefix, ...])

Rewrite Edis, correct station coordinates and dipole length.

methods.em.EM.getfullfrequency([to_log10])

Get the frequency with clean data.

methods.em.EM.make2d([out, kind])

Out 2D resistivity, phase-error and tensor matrix from a collection of EDI-objects.

methods.em.EM.getreferencefrequency([to_log10])

Get the reference frequency from collection Edis objects.

methods.em.EM.exportedis(ediObjs, new_Z[, ...])

Export EDI files from multiples EDI or z objects

methods.em.EMAP.tma([smooth, drop_outliers, ...])

A trimmed-moving-average filter to estimate average apparent resistivities at a single static-correction-reference frequency.

methods.em.EMAP.flma([smooth, ...])

A fixed-length-moving-average filter to estimate average apparent resistivities at a single static-correction-reference frequency.

methods.em.EMAP.ama([smooth, drop_outliers, ...])

Use an adaptive-moving-average filter to estimate average apparent resistivities at a single static-correction-reference frequency..

methods.em.EMAP.skew([method, ...])

The conventional asymmetry parameter based on the Z magnitude.

methods.em.EMAP.zrestore(*[, tensor, ...])

Fix the weak and missing signal at the 'dead-band`- and recover the missing impedance tensor values.

methods.em.EMAP.freqInterpolation(y, /[, ...])

Interpolate frequency in frequeny buffer range.

methods.em.EMAP.interpolate_z(...[, rotate])

Interpolate z and return new interpolated z objects

methods.em.EMAP.drop_frequencies([tol, ...])

Drop bad frequencies.

methods.em.EMAP.controlFrequencyBuffer(freq)

Assert buffer and find the nearest value if the value of the buffer is not in frequency ranges .

methods.em.EMAP.getValidTensors([tol])

Select valid tensors from tolerance threshold and write EDI if applicable.

methods.em.EMAP.qc([tol, return_freq, ...])

Check the quality control of the collected EDIs.

methods.em.MT.get_ss_correction_factors(station)

Compute the static shift correction factor from a station using a spatial median filter.

methods.em.MT.remove_distortion(distortion, /)

Remove distortion D form an observed impedance tensor Z.

methods.em.MT.remove_ss_emap([fltr, out, ...])

Filter Z to remove the static schift using the EMAP moving average filters.

methods.em.MT.remove_static_shift([ss_fx, ...])

Remove the static shift from correction factor from x and y.

methods.em.MT.remove_noises([method, ...])

remove indesired and artifacts in the data and smooth it.

hydro: Hydrogeology#

hydro computes Hydrogeological parameters of aquifer that are the essential and crucial basic data in the designing and construction progress of geotechnical engineering and groundwater dewatering.

User guide: See the hydrogeology section for further details.

methods.hydro.HData.squeeze_data([strategy])

Compressed data by sample reducing

methods.hydro.HData.get_base_stratum([stratum])

Select the base stratum

methods.hydro.AqSection.findSection([z, ...])

Find aquifer valid section (upper and lower section )

methods.hydro.MXS.predictNGA([n_components, ...])

Predicts Naive Group of Aquifer from Hydro-Log data.

methods.hydro.MXS.makeyMXS([y_pred, func, ...])

Construct the MXS target \(y*\)

methods.hydro.MXS.labelSimilarity([func, ...])

Find label similarities

methods.hydro.Logging.plot([normalize, ...])

Plot the logging data

methods.hydro.AqGroup.findGroups([method, ...])

Find the existing group between the permeability coefficient k and the group of aquifer.

Refer to hydroutils to get many other utilities for hydro-parameters calculation.

watex.metrics: Metrics#

Metrics are measures of quantitative assessment commonly used for estimating, comparing, and tracking performance or production. Generally, a group of metrics will typically be used to build a dashboard that management or analysts review on a regular basis to maintain performance assessments, opinions, and business strategies.

metrics.confusion_matrix(clf, X, y, *[, cv, ...])

Evaluate the preformance of the model or classifier by counting the number of the times instances of class A are classified in class B.

metrics.get_eval_scores(model, Xt, yt, *[, ...])

Compute the accuracy, precision, recall and AUC scores.

metrics.get_metrics()

Get the list of available metrics.

metrics.precision_recall_tradeoff(clf, X, y, *)

Precision-recall Tradeoff computes a score based on the decision function.

metrics.ROC_curve([roc_kws])

The Receiving Operating Characteric (ROC) curve is another common tool used with binary classifiers.

watex.models: Models#

Models sub-package focuses on training and validation phases. It also composed of a set of grid-search tricks from model hyperparameters fine-tuning and the pretrained models fetching from validation and premodels respectively. Modules of ‘Models’ sub-package expect the predictor \(X\) and the target \(y\) to be preprocessed.

Classes#

models.BaseEvaluation(estimator[, cv, ...])

Evaluation of dataset using a base estimator.

models.GridSearch(base_estimator, grid_params)

Fine-tune hyperparameters using grid search methods.

models.GridSearchMultiple(estimators, ...[, ...])

Search and find multiples best parameters from differents estimators.

models.pModels([model, target, kernel, ...])

Pretrained Models class.

Functions#

models.displayCVTables(cvres, cvmodels)

Display the cross-validation results from all models at each k-fold.

models.displayFineTunedResults(cvmodels)

Display fined -tuning results

models.displayModelMaxDetails(cvres[, cv])

Display the max details of each stored model from cross-validation.

models.getGlobalScores(cvres)

Retrieve the global mean and standard deviation score from the cross validation containers.

models.getSplitBestScores(cvres[, split])

Get the best score at each split from cross-validation results

models.get_best_kPCA_params(X[, ...])

Select the Kernel and hyperparameters using GridSearchCV that lead to the best performance.

models.get_scorers(*[, scorer, ...])

Fetch the list of available metrics from scikit-learn or verify whether the scorer exist in that list of metrics.

models.naive_evaluation(clf, X, y[, cv, ...])

Quick scores evaluation using cross validation.

watex.property: Property#

watex property objects. It is composed of base classes that are inherited by methods implemented throughout the package. It also inferred properties to data objects.

property.BagoueNotes()

A contest class about the Bagoue dataset.

property.BasePlot([savefig, fig_num, ...])

Base class deals with Machine learning and conventional Plots.

property.Config()

Container of property elements.

property.ElectricalMethods([AB, MN, ...])

Base class of geophysical electrical methods

property.Copyright([release_status, ...])

Information of copyright, mainly about the use of data can use the data.

property.IsEdi()

Assert SEG MT/EMAP Data Interchange Standard EDI-file .

property.P([hl])

Data properties are values that are hidden to avoid modifications alongside

property.Person([email, name, organization, ...])

Information for a person

property.References([author, title, ...])

References information for a citation.

property.Software([name, version, release])

software info

property.Water([state, taste, odor, ...])

Should be a SuperClass for methods classes which deals with water

watex.site: Location and Profile#

Manage site data.

site.Location([lat, lon, elev, datum, epsg, ...])

Location class

site.Profile(*[, utm_zone, ...])

Profile class deals with the positions collected in the survey area.

watex.transformers: Transformers#

Gives some efficient tools for data manipulation and transformation.

transformers.CategorizeFeatures([...])

Transform numerical features into categorical features and return a new array transformed.

transformers.CombinedAttributesAdder([...])

Combined attributes from litteral string operators, indexes or names.

transformers.DataFrameSelector([...])

Select data from specific attributes for column transformer.

transformers.FrameUnion([num_attributes, ...])

Unified categorial and numerical features after scaling and and categorial features encoded.

transformers.KMeansFeaturizer([n_clusters, ...])

Transforms numeric data into k-means cluster memberships.

transformers.StratifiedUsingBaseCategory([...])

Transformer to stratified dataset to have data more representativce into the trainset and the test set especially when data is not large enough.

transformers.StratifiedWithCategoryAdder([...])

Stratified sampling transformer based on new generated category from numerical attributes and return stratified trainset and test set.

watex.utils: Utilities#

Utils sub-package offers several tools for data handling, parameters computation models estimation and evalution, and graphs visualization. The extension of the mathematical concepts, and the core of program are performed via the modules exmath and coreutils respectively. Whereas the machine learning utilities and additional functionalities are performed with mlutils and funcutils respectively. The plot utilities from plotutils gives several plotting tools for visualization.

User guide: See the utilities section for further details.

utils.bi_selector(d, /[, features, ...])

Auto-differentiates the numerical from categorical attributes.

utils.bin_counting(data, bin_columns, tname)

Bin counting categorical variable and turn it into probabilistic

utils.build_random_thickness(depth, /[, ...])

Generate a random thickness value for number of layers in deeper.

utils.cattarget(arr, /[, func, labels, ...])

Categorize array to hold the given identifier labels.

utils.check_flow_objectivity(y, /, values, ...)

Function checks the flow rate objectivity

utils.classify_k(o, /[, func, kname, ...])

Categorize the permeability coefficient 'k'

utils.correlatedfeatures(df[, corr, ...])

Find the correlated features/columns in the dataframe.

utils.cleaner(data, /[, columns, inplace, ...])

Sanitize data or columns by dropping specified labels from rows or columns.

utils.defineConductiveZone(erp[, station, ...])

Define conductive zone as subset of the erp line.

utils.erpSelector(f[, columns, force, ...])

Read and sanitize the data collected from the survey.

utils.erpSmartDetector(constr, erp[, ...])

Automatically detect the drilling location by involving the constraints observed in the survey area.

utils.evalModel(model, X, y, Xt[, yt, ...])

Evaluate model and quick test the score with metric scorers.

utils.findCatandNumFeatures([df, features, ...])

Retrieve the categorial or numerical features on whole features of dataset.

utils.find_aquifer_groups(arr_k, /[, ...])

Fit the group of aquifer and find the representative of each true label in array 'k' in the aquifer group array.

utils.find_similar_labels(y_true, y_pred, *)

Find similarities between y_true and y_pred and returns rate

utils.fittensor(refreq, compfreq, z[, ...])

Fit each tensor component to the complete frequency range.

utils.getGlobalScore(cvres)

Retrieve the global mean and standard deviation score from the cross validation containers.

utils.get2dtensor(z_or_edis_obj_list, /[, ...])

Make tensor into two dimensional array from a collection of Impedance tensors Z.

utils.get_aquifer_section(arr_k, /[, zname, ...])

Detect a single aquifer section (upper and lower) in depth.

utils.get_aquifer_sections(*data, zname, kname)

Get the section of each aquifer form multiple dataframes.

utils.get_azimuth(xlon, ylat, *[, data, ...])

Compute azimuth from coordinate locations ( latitude, longitude).

utils.get_compressed_vector(d, /, sname[, ...])

Compresses base stratum data into a singular vector composed of all feature names in the targetted data d.

utils.get_bearing(latlon1, latlon2[, to_deg])

Calculate the bearing between two points.

utils.get_distance(x, y, *[, ...])

Compute distance between points

utils.get_full_frequency(z_or_edis_obj_list, /)

Get the frequency with clean data.

utils.get_profile_angle([easting, northing, msg])

compute geoprofile angle.

utils.get_sections_from_depth(z, z_range[, ...])

Gets aquifer sections ('upper', 'lower') in data 'z' from the depth range.

utils.smart_thickness_ranker(t, /[, depth, ...])

Compute the layer thicknesses and rank strata accordingly.

utils.get_strike([profile_angle, easting, ...])

Compute geoelectric strike from profile angle, easting and northing.

utils.get_target(ar, /, tname[, ...])

Extract target from multidimensional array or dataframe.

utils.get_unique_section(*data, zname, kname)

Get the section to consider unique in multiple aquifers.

utils.get_xs_xr_splits(data, /[, z_range, ...])

Split data into matrix \(X_s\) with sample \(ms\) (unwanted data ) and \(X_r\) of samples :math:`m_r`( valid aquifer data )

utils.interpolate1d(arr[, kind, method, ...])

Interpolate array containing invalid values NaN

utils.interpolate2d(arr2d[, method])

Interpolate the data in 2D dimensional array.

utils.interpolate_grid(arr, /[, method, ...])

Interpolate data containing missing values.

utils.label_importance(label, arr_k, arr_aq, *)

Compute the score for the label and its representativity in the valid

utils.labels_validator(t, /, labels[, ...])

Assert the validity of the label in the target and return the label or the boolean whether all items of label are in the target.

utils.linkage_matrix(df[, columns, kind, ...])

Compute the distance matrix from the hierachical clustering algorithm

utils.magnitude(cz)

Compute the magnitude of selected conductive zone.

utils.makeCoords(reflong, reflat, nsites, *)

Generate multiple stations coordinates (longitudes, latitudes) from a reference station/site.

utils.make_MXS_labels(y_true, y_pred[, ...])

Create a Mixture Learning Strategy (MXS) labels from true labels 'y_true' and the predicted Naive Group of Aquifer (NGA) labels 'y_pred'

utils.make_naive_pipe(X[, y, num_features, ...])

make a pipeline to transform data at once.

utils.moving_average(y, *[, window_size, ...])

A moving average is used with time series data to smooth out short-term fluctuations and highlight longer-term trends or cycles.

utils.naive_imputer(X[, y, strategy, mode, ...])

Imput missing values in the data.

utils.naive_scaler(X[, y, kind, copy, ...])

Quick data scaling using both strategies implemented in scikit-learn with StandardScaler and MinMaxScaler.

utils.normalizer(arr, /[, method])

Normalize values to be between 0 and 1.

utils.ohmicArea([data, search, sum, objective])

Compute the ohmic-area from the Vertical Electrical Sounding data collected in exploration area.

utils.plotAnomaly(erp[, cz, station, ...])

Plot the whole Electrical resistivity profiling line and selected conductive zone.

utils.plotOhmicArea([data, search, ...])

Plot the Vertical Electrical Sounding data ohmic -area

utils.plot_clusters(n_clusters, X, y_pred[, ...])

Visualize the cluster that k-means identified in the dataset

utils.plot_confidence_in(z_or_edis_obj_list, /)

Plot data confidency from tensor errors.

utils.plot_confusion_matrices(clfs, Xt, yt)

Plot inline multiple model confusion matrices using either the sckitlearn or 'yellowbrick'

utils.plot_cost_vs_epochs(regs, *[, ...])

Plot the cost against the number of epochs for the two different learnings rates

utils.plot_elbow(X, n_clusters[, n_init, ...])

Plot elbow method to find the optimal number of cluster, k', for a given data.

utils.plot_learning_curves(models, X, y, *)

Horizontally visualization of multiple models learning curves.

utils.plot_logging(X[, y, zname, tname, ...])

Plot logging data

utils.plot_mlxtend_heatmap(df[, columns, ...])

Plot correlation matrix array as a heat map

utils.plot_mlxtend_matrix(df[, columns, ...])

Visualize the pair wise correlation between the different features in the dataset in one place.

utils.plot_naive_dendrogram(X, *ybounds[, ...])

Quick plot dendrogram using the ward clustering function from Scipy.

utils.plot_pca_components(components, *[, ...])

Visualize the coefficient of principal component analysis (PCA) as a heatmap

utils.plot_regularization_path(X, y[, ...])

Plot the regularisation path from Logit / LogisticRegression

utils.plot_rf_feature_importances(clf[, X, ...])

Plot features importance with RandomForest.

utils.plot_roc_curves(clfs, /, X, y[, ...])

Quick plot of Receiving Operating Characterisctic (ROC) of fitted models

utils.plot_sbs_feature_selection(...[, X, ...])

plot Sequential Backward Selection (SBS) for feature selection.

utils.plot_stratalog(thick, layers, station, *)

Make the stratalog log with annotate figure.

utils.plot_silhouette(X, labels[, metric, ...])

Plot quantifying the quality of clustering silhouette

utils.plot_sounding(ves, /[, style, ...])

Visualize the vertical electrical sounding.

utils.plot_skew(edis_list, /[, method, ...])

Visualize the phase sensitive skew in one or two dimensional.

utils.plot_strike(list_of_edis, /[, kind, ...])

utils.plot_tensors(z_or_edis_obj_list, /[, ...])

Plot resistivity and phase tensors or the real and imaginary impedance.

utils.plot_tensors2(z_or_edis_obj_list, /[, ...])

Plot resistivity and phase tensors or the real and imaginary impedance.

utils.plot_voronoi(X, y, *, cluster_centers)

Plots the Voronoi diagram of the k-means clusters overlaid with the data

utils.plot_yb_confusion_matrix(clf, Xt, yt)

Confusion matrix plot using the 'yellowbrick' package.

utils.power(p)

Compute the power of the selected conductive zone.

utils.predict_NGA_labels(X, /, n_clusters[, ...])

Predict the Naive Group of Aquifer (NGA) labels.

utils.projection_validator(X[, Xt, columns])

Retrieve x, y coordinates of a datraframe ( X, Xt ) from columns names or indexes.

utils.random_sampling(d, /[, samples, ...])

Sampling data.

utils.qc(z_or_edis_obj_list, /[, tol, ...])

Check the quality control in the collection of Z or EDI objects.

utils.random_selector(arr, /, value[, seed, ...])

Randomly select the number of values in array.

utils.read_data(f[, sanitize, reset_index, ...])

Assert and read specific files and url allowed by the package

utils.reduce_samples(*data, sname[, zname, ...])

Create a new dataframe by squeezing/compressing the non valid data.

utils.remove_outliers(ar[, method, ...])

Efficient strategy to remove outliers in the data.

utils.rename_labels_in(arr, new_names[, coerce])

Rename label by a new names

utils.resampling(X, y[, kind, strategy, ...])

Combining Random Oversampling and Undersampling

utils.reshape(arr[, axis])

Detect the array shape and reshape it accordingly, back to the given axis.

utils.rhoa2z(rhoa, phs, freq)

Convert apparent resistivity to impendance tensor z

utils.rhophi2z(rho, phi, freq)

Convert impedance-style information given in Rho/Phi format into complex valued Z.

utils.savejob(job, savefile, *[, protocol, ...])

Quick save your job using 'joblib' or persistent Python pickle module

utils.scalePosition(ydata[, xdata, func, ...])

Correct data location or position and return new corrected location

utils.scaley(y[, x, deg, func])

Scaling value using a fitting curve.

utils.select_base_stratum(d, /[, sname, ...])

Selects base stratum from the the strata column in the logging data.

utils.select_feature_importances(clf, X[, ...])

Select feature importance based on a user-specified threshold after model fitting.

utils.selectfeatures(df[, features, ...])

Select features and return new dataframe.

utils.sfi(cz[, p, s, dipolelength, view, ...])

Compute the pseudo-fracturing index known as sfi.

utils.shape(cz[, s, p])

Compute the shape of anomaly.

utils.smart_label_classifier(arr, /[, ...])

map smartly the numeric array into a class labels from a map function or a given fixed values.

utils.smoothing(ar, /[, drop_outliers, ma, ...])

Smooth data along axis.

utils.split_train_test(df, test_ratio)

A naive dataset split into train and test sets from a ratio and return a shuffled train set and test set.

utils.to_numeric_dtypes(arr, *[, columns, ...])

Convert array to dataframe and coerce arguments to appropriate dtypes.

utils.twinning(*d[, on, parse_on, mode, ...])

Find indentical object in all data and concatenate them using merge

utils.type_(erp)

Compute the type of anomaly.

utils.vesDataOperator([AB, rhoa, data, ...])

Process VES data to handle duplicated spacing distances (AB) by applying specified operations to the corresponding resistivity values (rhoa).

utils.vesSelector([data, rhoa, AB, MN, ...])

Assert the validity of Vertical Electrical Sounding data and return a sanitize dataframe.

utils.z2rhoa(z, freq)

Convert impendance tensor z to apparent resistivity

mlutils: Additional learning utilities#

Learning utilities for data transformation, model learning and inspections.

utils.mlutils.correlatedfeatures(df[, corr, ...])

Find the correlated features/columns in the dataframe.

utils.mlutils.exporttarget(df, tname[, inplace])

Extract target and modified data in place or not .

utils.mlutils.existfeatures(df, features[, ...])

Control whether the features exist or not

utils.mlutils.getGlobalScore(cvres)

Retrieve the global mean and standard deviation score from the cross validation containers.

utils.mlutils.predict(y_true[, y_pred, X_, ...])

Make a quick statistic after prediction.

utils.mlutils.load_data([data, delimiter])

Load csv file to a frame.

utils.mlutils.test_set_check_id(identifier, ...)

Get the test set id and set the corresponding unique identifier.

utils.mlutils.split_train_test_by_id(data, ...)

Ensure that data will remain consistent accross multiple runs, even if dataset is refreshed.

utils.mlutils.discretizeCategoriesforStratification(data)

Create a new category attribute to discretize instances.

utils.mlutils.stratifiedUsingDiscretedCategories(...)

Stratified sampling based on new generated category from DiscretizeCategoriesforStratification().

utils.mlutils.fetch_model(modelfile[, ...])

Fetch your model saved using Python pickle module or joblib module.

utils.mlutils.dumpOrSerializeData(data[, ...])

Dump and save binary file

utils.mlutils.loadDumpedOrSerializedData(...)

Load dumped or serialized data from filename

utils.mlutils.default_data_splitting(X[, y, ...])

Splitting data function naively.

utils.mlutils.fetchModel(file, *[, default, ...])

Fetch your data/model saved using Python pickle or joblib module.

utils.mlutils.cattarget(arr, /[, func, ...])

Categorize array to hold the given identifier labels.

plotutils: Additional plot-utilities#

Additional plot utilities.

utils.plotutils.plot_confusion_matrix(yt, y_pred)

plot a confusion matrix for a single classifier model.

utils.plotutils.make_mpl_properties(n[, prop])

make matplotlib property ('colors', 'marker', 'line') to fit the numer of samples

utils.plotutils.resetting_colorbar_bound(...)

Function to reset colorbar ticks more easy to read

utils.plotutils.get_color_palette(...)

Convert RGB color into matplotlib color palette.

utils.plotutils.plot_bar(x, y[, wh, kind, ...])

Make a vertical or horizontal bar plot.

utils.plotutils.plot_profiling(erp, /[, ...])

Visualizes the resistivity profiling of ERP data.

exmath: Additional math-utilities#

Utilities to process and compute parameters. Module for Algebra calculus.

utils.exmath.betaj(xj, L, W, **kws)

Weight factor function for convoluting at station/site j.

utils.exmath.compute_lower_anomaly(erp_array)

Function to get the minimum value on the ERP array.

utils.exmath.d_hanning_window(x, xk, W)

Discrete hanning function.

utils.exmath.define_anomaly(erp_data[, ...])

Function will select the different anomalies.

utils.exmath.define_conductive_zone(erp[, ...])

Detect the conductive zone from `s`ves point.

utils.exmath.detect_station_position(s, p)

Detect station position and return the index in positions

utils.exmath.dummy_basement_curve(func, ks)

Compute the pseudodepth from the search zone.

utils.exmath.find_limit_for_integration(ix_arr)

Use the roots between f curve and basement curves to detect the limit of integration.

utils.exmath.find_bound_for_integration(ix_arr)

Recursive function to find the roots between f curve and basement curves so to detect the integration bounds.

utils.exmath.fitfunc(x, y[, deg, sample])

Create polyfit function from a specifc sample data points.

utils.exmath.get_anomaly_ratio(erp[, ...])

Computes the selected anomaly ratio (ANR) from the whole ERP line.

utils.exmath.get_profile_angle([easting, ...])

compute geoprofile angle.

utils.exmath.get_station_number(dipole, distance)

Get the station number from dipole length and the distance to the station.

utils.exmath.get_z_from(edi_obj_list, /)

Extract z object from Edi object.

utils.exmath.invertVES([data, rho0, h0, typeof])

Invert the VES data collected in the exploration area.

utils.exmath.plot_sfi(cz[, p, s, ...])

Plot sfi parameter components.

utils.exmath.savgol_coeffs(window_length, ...)

Compute the coefficients for a 1-D Savitzky-Golay FIR filter.

utils.exmath.savgol_filter(x, window_length, ...)

Apply a Savitzky-Golay filter to an array.

utils.exmath.savitzky_golay1d(y, ...[, ...])

Smooth (and optionally differentiate) data with a Savitzky-Golay filter.

utils.exmath.select_anomaly(rhoa_array[, ...])

Select the anomaly value from rhoa_array and find its boundaries if auto is set to True.

utils.exmath.smooth1d(ar, /[, ...])

Smooth one-dimensional array.

coreutils: Additional core-utilities#

The module encompasses the main functionalities for class and methods to sucessfully run. Somes modules are written and shortcutted for the users to do some singular tasks before feeding to the main algorithms.

utils.coreutils.fill_coordinates([data, ...])

Assert and recompute coordinates values based on geographical coordinates systems.

utils.coreutils.is_erp_series(data[, ...])

Validate the data series whether is ERP data.

utils.coreutils.is_erp_dataframe(data[, ...])

Ckeck whether the dataframe contains the electrical resistivity profiling (ERP) index properties.

utils.coreutils.parseDCArgs(fn[, delimiter, arg])

Parse DC stations and search arguments from file and output to array accordingly.

funcutils: Other utilities#

The section exposes some additional tools expected to be useful for manipulating data or to be incorporated to a third-party Python package. The list is not exhaustive. Get more utilities by consulting the whole funcutils module.

utils.funcutils.is_depth_in(X, name[, ...])

Assert wether depth exists in the data from column attributes.

utils.funcutils.map_specific_columns(X, ufunc)

Apply function to a specific columns is the dataframe.

utils.funcutils.find_by_regex(o, /, pattern)

Find pattern in object whatever an "iterable" or not.

utils.funcutils.is_in_if(o, /, items[, ...])

Raise error if item is not found in the iterable object 'o'

utils.funcutils.to_hdf5(d, /, fn[, objname, ...])

Store a frame data in hierachical data format 5 (HDF5)

utils.funcutils.sanitize_frame_cols(d, /[, ...])

Remove an indesirable characters and returns new columns

utils.funcutils.str2columns(text, /[, ...])

Split text from the non-alphanumeric markers using regular expression.

utils.funcutils.random_state_validator(seed)

Turn seed into a np.random.RandomState instance.

utils.funcutils.move_cfile(cfile[, savepath])

Move file to its savepath and output message.

utils.funcutils.pretty_printer(clfs[, ...])

Format and pretty print messages after gridSearch using multiples estimators.

utils.funcutils.get_config_fname_from_varname(data)

use the variable name given to data as the config file name.

utils.funcutils.get_confidence_ratio(ar, /)

Get ratio of confidence in array by counting the number of invalid values.

utils.funcutils.get_xy_coordinates(d, /[, ...])

Check whether the coordinate values exist in the data

utils.funcutils.cparser_manager(cfile[, ...])

Save and output message according to the action.

utils.funcutils.parse_yaml([yml_fn, data, ...])

Parse yml file and collect data from YAML config file.

utils.funcutils.return_ctask([todo])

Get the convenient task to do if users misinput the todo action.

utils.funcutils.parse_csv([csv_fn, data, ...])

Parse comma separated file or collect data from CSV.

utils.funcutils.fetch_json_data_from_url(url)

Retrieve JSON data from url :param url: Universal Resource Locator . :param todo: Action to perform with JSON: - load: Load data from the JSON file - dump: serialize data from the Python object and create a JSON file.

utils.funcutils.parse_json([json_fn, data, ...])

Parse Java Script Object Notation file and collect data from JSON config file.

utils.funcutils.assert_doi(doi)

assert the depth of investigation Depth of investigation converter

utils.funcutils.station_id(id_[, is_index, how])

From id get the station name as input and return index id.

utils.funcutils.concat_array_from_list(...)

Concat array from list and set the None value in the list as NaN.

utils.funcutils.show_stats(nedic, nedir[, ...])

Estimate the file successfully read reading over the unread files

utils.funcutils.make_ids(arr[, prefix, how, ...])

Generate auto Id according to the number of given sites.

utils.funcutils.fit_ll(ediObjs[, by, ...])

Fit EDI by location and reorganize EDI according to the site longitude and latitude coordinates.

utils.funcutils.fillNaN(arr[, method])

Most efficient way to back/forward-fill NaN values in numpy array.

utils.funcutils.find_close_position(refarr, arr)

Get the close item from arr in the reference array refarr.

utils.funcutils.make_arr_consistent(refarr, arr)

Make arr to be consistent with the reference array refarr.

utils.funcutils.ismissing(refarr, arr[, ...])

Get the missing values in array-like and fill it to match the length of the reference array.

utils.funcutils.reshape(arr[, axis])

Detect the array shape and reshape it accordingly, back to the given axis.

utils.funcutils.savejob(job, savefile, *[, ...])

Quick save your job using 'joblib' or persistent Python pickle module

utils.funcutils.load_serialized_data(filename)

Load data from dumped file.

utils.funcutils.serialize_data(data[, ...])

Store a data into a binary file

utils.funcutils.sanitize_unicode_string(str_)

Replace all spaces and remove all french accents characters.

utils.funcutils.cpath([savepath, dpath])

Control the existing path and create one of it does not exist.

utils.funcutils.smart_format(iter_obj[, choice])

Smart format iterable object.

utils.funcutils.read_from_excelsheets([erp_file])

Read all Excelsheets and build a list of dataframe of all sheets.

utils.funcutils.accept_types(*objtypes[, format])

List the type format that can be accepted by a function.

utils.funcutils.smart_strobj_recognition(...)

Find the likelihood word in the whole containers and returns the value.

utils.funcutils.is_installing(module[, ...])

Install or uninstall a module/package using the subprocess under the hood.

utils.funcutils.shrunkformat(text[, ...])

format class and add ellipsis when classes are greater than maxview

utils.funcutils.url_checker(url[, install, ...])

check whether the URL is reachable or not.

utils.funcutils.parse_attrs(attr, /[, regex])

Parse attributes using the regular expression.

utils.funcutils.listing_items_format(lst, /)

Format list by enumerate them successively with carriage return

utils.funcutils.zip_extractor(zip_file[, ...])

Extract ZIP archive objects.

geotools: Geology utilities#

Is a set of utilities that deal with geological rocks, strata and stratigraphic details for log construction.

utils.geotools.assert_station(id[, nm])

Assert station according to the number of stations investigated.

utils.geotools.base_log(ax, thick, layers, *)

Plot pseudo-stratigraphy basemap and return axis.

utils.geotools.fit_rocks(logS_array, lns_, tres_)

Find the pseudo rock name at each station from the pseudovalue intres.

utils.geotools.fit_stratum_property(...)

Separated whole blocks into different stratum and fit their corresponding property like depth and value of resistivities

utils.geotools.get_thick_from_range(rthick, /)

Computes the thickness from depth range passed in litteral string.

utils.geotools.get_thick_from_values(thick)

Compute thickness when only thick is given.

utils.geotools.get_s_thicknesses(grouped_z, ...)

Compute the thickness of each stratum from the grouped strata from the top to the bottom.

utils.geotools.grouped_items(items, dindexes)

Grouped items with the same value from their corresponding indexes.

utils.geotools.lns_and_tres_split(ix, lns, tres)

Indeed lns and tres from GeoStratigraphy model are updated.

utils.geotools.map_bottom(bottom, data[, origin])

Reduce the plot map from the top assumes to start at 0.

utils.geotools.map_top(top, data[, end])

Reduce the plot map from the top value to the bottom assumed to be the maximum of investigation depth.

utils.geotools.set_default_hatch_color_values(...)

Set the none hatch or color to their default values.

utils.geotools.smart_zoom(v)

select the ratio or value for zooming.

utils.geotools.zoom_processing(zoom, data[, ...])

Zoom the necessary part of the plot.

watex.view: Plotting#

View is the visualization sub-package. It is divised into the learning plot (mlplot) and, data analysis and exploratory modules (plot).

User guide: See the visualization section for further details.

Classes#

view.ExPlot([tname, inplace])

Exploratory plot for data analysis

view.EvalPlot([tname, encode_labels, scale, ...])

Metrics, dimensionality and model evaluatation plots.

view.QuickPlot([classes, tname, mapflow])

Special class dealing with analysis modules for quick diagrams, histograms and bar visualizations.

view.TPlot([survey_area, distance, prefix, ...])

Tensor plot from EMAP or AMT processing data.

Functions#

plot: T-E-Q- Plots#

plot is a set of base plots for tensor visualization, data exploratory and analyses. T-E-Q Plots encompass the tensors plots (TPlot) dealing with EM methods, Exploratory plots ( ExPlot) and Quick analyses (QuickPlot) visualization.

User guide: See the view section for further details.

view.ExPlot.plotbv([xname, yname, kind])

Visualize distributions using the box, boxen or violin plots.

view.ExPlot.plotcutcomparison([xname, ...])

Compare the cut or q quantiles values of ordinal categories.

view.ExPlot.plothist([xname, kind])

A histogram visualization of numerica data.

view.ExPlot.plothistvstarget(xname[, c, ...])

A histogram of continuous against the target of binary plot.

view.ExPlot.plotjoint(xname[, yname, corr, ...])

fancier scatterplot that includes histogram on the edge as well as a regression line called a joinplot

view.ExPlot.plotmissing(*[, kind, sample])

Vizualize patterns in the missing data.

view.ExPlot.plotpairgrid([xname, yname, vars])

Create a pair grid.

view.ExPlot.plotpairwisecomparison([corr, pkg])

Create pairwise comparizons between features.

view.ExPlot.plotparallelcoords([classes, ...])

Use parallel coordinates in multivariates for clustering visualization

view.ExPlot.plotradviz([classes, pkg])

plot each sample on circle or square, with features on the circonference to vizualize separately between target.

view.ExPlot.plotscatter([xname, yname, c, s])

Shows the relationship between two numeric columns.

view.QuickPlot.barcatdist([basic_plot, groupby])

Bar plot distribution.

view.QuickPlot.corrmatrix([cortype, ...])

Method to quick plot the numerical and categorical features.

view.QuickPlot.discussingfeatures(features, *)

Provides the features names at least 04 and discuss with their distribution.

view.QuickPlot.histcatdist([stacked])

Histogram plot distribution.

view.QuickPlot.joint2features(features, *[, ...])

Joint method allows to visualize correlation of two features.

view.QuickPlot.multicatdist(*[, x, col, ...])

Figure-level interface for drawing multiple categorical distributions plots onto a FacetGrid.

view.QuickPlot.naiveviz([x, y, kind, s_col, ...])

Creates a plot to visualize the samples distributions according to the geographical coordinates x and y.

view.QuickPlot.numfeatures([features, ...])

Plots qualitative features distribution using correlative aspect.

view.QuickPlot.scatteringfeatures(features, *)

Draw a scatter plot with possibility of several semantic features groupings.

view.TPlot.plotSkew([method, sensitivity, ...])

Plot phase sensistive skew visualization

view.TPlot.plot_corrections([fltr, ss_fx, ...])

Plot apparent resistivity/phase curves and corrections.

view.TPlot.plot_ctensor2d([tensor, ffilter, ...])

Plot filtered tensors

view.TPlot.plot_multi_recovery(sites[, colors])

Plots mutiple site/stations with signal recovery.

view.TPlot.plot_recovery([site])

visualize the restored tensor per site.

view.TPlot.plot_phase_tensors([mode, ...])

Plot phase tensor pseudosection and skew ellipsis visualization.

view.TPlot.plot_rhoa([mode, scale, site, ...])

Plot apparent resistivity and phase curves

view.TPlot.plot_rhophi([sites, mode, scale, ...])

Plot resistivities and phases from multiples stations.

view.TPlot.plot_tensor2d([tensor, sites, ...])

Plot two dimensional tensor.

mlplot: Learning Plots#

mlplot is a set of plot templates for visualising and inspecting the learning models. It gives a quick depiction for users for models visualization and evaluation with : EvalPlot

User guide: See the view section for further details.

view.EvalPlot.plotPCA([n_components, ...])

Plot PCA component analysis using decomposition.

view.EvalPlot.plotPR(clf, label[, kind, ...])

Precision/recall (PR) and tradeoff plots.

view.EvalPlot.plotROC(clfs, label[, method, ...])

Plot receiving operating characteric (ROC) classifiers.

view.EvalPlot.plotConfusionMatrix(clf, *[, ...])

Plot confusion matrix for error evaluation.

view.biPlot(self, Xr, components, y[, ...])

The biplot is the best way to visualize all-in-one following a PCA analysis.

view.plotDendrogram(df[, columns, labels, ...])

Visualizes the linkage matrix in the results of dendrogram.

view.plotDendroheat(df[, columns, labels, ...])

Attaches dendrogram to a heat map.

view.plotLearningInspection(model, X, y[, ...])

Inspect model from its learning curve.

view.plotLearningInspections(models, X, y[, ...])

Inspect multiple models from their learning curves.

view.plotModel(yt[, ypred, clf, Xt, ...])

Plot model 'y' (true labels) versus 'ypred' (predicted) from test

view.plotProjection(X[, Xt, columns, test_kws])

Visualize train and test dataset based on the geographical coordinates.

view.plotSilhouette(X[, labels, prefit, ...])

quantifies the quality of clustering samples.

view.plot_matshow(arr, /[, labelx, labely, ...])

Quick matrix visualization using matplotlib.pyplot.matshow.

view.plot_model_scores(models[, scores, cv_size])

uses the cross validation to get an estimation of model performance generalization.

view.plot_reg_scoring(reg, X, y[, ...])

Plot regressor learning curves using root-mean squared error scorings.

view.plot2d(ar[, y, x, distance, stnlist, ...])

Two dimensional template for visualization matrices.

view.pobj

alias of Plot

view.viewtemplate(y, /[, xlabel, ylabel])

Quick view template

To browse the available modules of the software, click on long description .