v0.2.4 (May 26, 2023)#
These are minor changes in v0.2.3 that shows fugs fixed, features and improvements.
API change Change performed in
watex.geology.core. The classBaseis renamed aswatex.geology.core.GeoBase.Fix Bug fixed in
watex.utils.plot_logging()when imputing NaN values in the data. Indeed, henceforth all the column of the data that is composed entirely with NaN is removed automatically. This fixes the bug occurs in when the scaled feature dimension are higher than the original ones.Fix Bug fixed in
watex.utils.to_numeric_dtypes()when sanitizing the dataframe with integer columns. In such case, the data sanitizing is not possible. It henceforth passes rather than raising error. However when column are mixed ( numeric and string ), all should be converted to string before sanitization.Feature
watex.geology.drilling.DSBoreholeworks with data collected in a single borehole. For instance, the arrangement ofh502data inwatex.datasets.load_hlogs(). Data columns are the all attributes of the object and any non-alphateic character is replaced by_. For instance, a column namelayer thicknessshould have an attribute namedlayer_thickness.Feature
watex.geology.drilling.DSBoreholesworks similarly aswatex.geology.drilling.DSBoreholebut uses multiple borehole data. note the's'at the end of the class. Here, each borehole (row) is an object which encompasses all columns as attributes. To have full control of how data must be retrieved as an object,holeidparameter must be set. For instance, to retrieve the borehole with ID equals to bx02, after fitting the class with appropriate parameters, attibute hole depth ( if exist in the data) can be retrieved asself.hole.bx02.hole_depth.Feature Add
watex.utils.funcutils.replace_data()to replace items in the data n- times. This is useful for data duplicationFeature add
watex.utils.funcutils.make_obj_consistent_if. Function combine default values to item to create default consistent iterable objects. This is valid if the size of item does not fit the number of expected iterable objects. Commonly this work in synergy withwatex.utils.funcutils.random_sampling().Feature
watex.utils.funcutils.convert_value_in()converts value based on the reference unit. Mostly used the known SI units like meters (m) `, `grammes (g) etc.Enhancement Supplement boreholes data are added to
watex.datasets.load_hlogs(). They include boreholes'h805' ,'h1102' ,'h1405', 'h2602','h803', 'h1104', 'h604', 'h2003'and'h1602'.Enhancement Function
watex.utils.to_numeric_dtypes()accepts drop_nan_columns passed asTrueby default with dropped the NaN rows and NaN columns in the data. Moreover,reset_indexanddrop_indexare available to new data index management.Enhancement Function
watex.datasets.load_mxs()enforces attributeXandywhen object is retrieved. For instance, fetching the the training set scaledXshould be:>>> import watex as wx >>> X_scaled = wx.datasets.load_mxs (key ='scale').X >>> # or by merely calling the boilerplate `fetch_data` function as >>> X_scaled =wx.fetch_data ('mxs', key ='scale').X
It also accepts test_ratio to split the training and test sets via
split_X_y=True. Note thatreturn_X_y=Trueis not necessary when split_X_y is set toTrue.Enhancement
watex.transformers.featurize_Xaccepts model as parameter. It is useful to featurize the test data separately from the train data to avoid leakage information. If sparse parameter is set toTrue, the training and testing data are outputted in sparse coordinates format or compressed sparse row format that is controlled by the sparsity parameter.