Skip to content

Commit

Permalink
Merge pull request #3 from WEgeophysics/dev
Browse files Browse the repository at this point in the history
fix changes in origin module
  • Loading branch information
earthai-tech authored Nov 11, 2023
2 parents 4d6ca91 + 18b8ba8 commit 8ca7423
Show file tree
Hide file tree
Showing 27 changed files with 4,260 additions and 95 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Machine Learning, It brings novel approaches for reducing numerous losses during the hydrogeological
exploration projects. It allows to:
- reduce the cost of hydraulic conductivity (K) data collection during the engineering projects,
- Guide drillers for to locating the drilling operations,
- guide drillers for to locating the drilling operations,
- predict the water content in the well such as the level of water inrush, ...

## Licence
Expand Down Expand Up @@ -45,7 +45,8 @@ upstream the MXS target ``ymxs``. Here, we used the default categorization
provided by the software and we assume that in the area, there are at least ``2``
groups of the aquifer. The code is given as:
```python
mxs = hlearn.MXS (kname ='k', n_groups =2).fit(hdata)
from hlearn.api import MXS
mxs = MXS (kname ='k', n_groups =2).fit(hdata)
ymxs=mxs.predictNGA().makeyMXS(categorize_k=True, default_func=True)
mxs.yNGA_ [62:74]
Out[4]: array([1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2])
Expand All @@ -58,7 +59,8 @@ matrix ready for final prediction using the [support vector machines](https://ie
[random forest](https://www.ibm.com/topics/random-forest) as examples. Here we go:
```python
X= hdata [h.feature_names]
Xtransf = hlearn.make_naive_pipe (X, transform=True)
from hlearn.utils.mlutils import make_naive_pipe
Xtransf = make_naive_pipe (X, transform=True)
Xtransf
Out[6]:
<218x46 sparse matrix of type '<class 'numpy.float64'>'
Expand Down
68 changes: 3 additions & 65 deletions hlearn/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@
if __HLEARN_SETUP__ :
sys.stderr.write("Partial import of hlearn during the build process.\n")
else:
from . import _distributor_init # noqa: F401
from . import _build # noqa: F401
#from . import _distributor_init # noqa: F401
#from . import _build # noqa: F401
from .utils._show_versions import show_versions

#https://github.com/pandas-dev/pandas
# Let users know if they're missing any of our hard dependencies
_main_dependencies = ("numpy", "scipy", "sklearn", "matplotlib",
Expand Down Expand Up @@ -90,20 +90,6 @@
from .datasets import (
fetch_data,
)
from .methods import (
Structural,
Structures,
MXS,
)

from .view import (
EvalPlot,
plotLearningInspections,
plotSilhouette,
plotDendrogram,
plotProjection,
)

from .utils import (
read_data,
cleaner,
Expand All @@ -115,32 +101,9 @@
make_MXS_labels,
predict_NGA_labels,
classify_k,
plot_elbow,
plot_clusters,
plot_pca_components,
plot_naive_dendrogram,
plot_learning_curves,
plot_confusion_matrices,
plot_sbs_feature_selection,
plot_regularization_path,
plot_rf_feature_importances,
plot_logging,
plot_silhouette,
plot_profiling,
plot_confidence_in,
)

try :
from .utils import (
selectfeatures,
naive_imputer,
naive_scaler,
make_naive_pipe,
bi_selector,
)
except ImportError :
pass

def setup_module(module):
"""Fixture for the tests to assure globally controllable seeding of RNGs"""

Expand Down Expand Up @@ -179,17 +142,7 @@ def setup_module(module):
__all__ = [
"sklearn",
"fetch_data",
"Structural",
"Structures",
"MXS",
"EvalPlot",
"plotLearningInspections",
"plotSilhouette",
"plotDendrogram",
"plotProjection",
"plotAnomaly",
"vesSelector",
"erpSelector",
"read_data",
"erpSmartDetector",
"plot_confidence_in",
Expand All @@ -202,22 +155,7 @@ def setup_module(module):
"predict_NGA_labels",
"classify_k",
"plot_elbow",
"plot_clusters",
"plot_pca_components",
"plot_naive_dendrogram",
"plot_learning_curves",
"plot_confusion_matrices",
"plot_sbs_feature_selection",
"plot_regularization_path",
"plot_rf_feature_importances",
"plot_logging",
"plot_silhouette",
"plot_profiling",
"selectfeatures",
"naive_imputer",
"naive_scaler",
"make_naive_pipe",
"bi_selector",
"show_versions",
"cleaner",
]
Expand Down
4 changes: 2 additions & 2 deletions hlearn/_hlearnlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# Created on Tue May 18 12:53:48 2021

"""
`WATex`_ Logger
================
`Hydro-learn`_ Logger
=======================
Module to track bugs and issues, and also deal with all exceptions in
:mod:`~.exceptions`.
Expand Down
35 changes: 35 additions & 0 deletions hlearn/api/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

from .geology import (
Geology ,
Structures,
Structural,
)
from .drilling import (
Borehole ,
DSBorehole,
DSBoreholes,
DSDrill
)

from .hydro import (
Hydrogeology,
AqGroup,
AqSection,
MXS,
Logging,
)

__all__=[
'Geology' ,
'Structures',
'Structural',
'Borehole',
'DSBorehole',
'DSBoreholes',
'DSDrill',
'Hydrogeology',
'AqGroup',
'AqSection',
'MXS',
'Logging',
]
Loading

0 comments on commit 8ca7423

Please sign in to comment.