pta-learn 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,99 @@
1
+ <component name="InspectionProjectProfileManager">
2
+ <profile version="1.0">
3
+ <option name="myName" value="Project Default" />
4
+ <inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
5
+ <option name="ignoredPackages">
6
+ <value>
7
+ <list size="86">
8
+ <item index="0" class="java.lang.String" itemvalue="eth_account" />
9
+ <item index="1" class="java.lang.String" itemvalue="aiohttp_socks" />
10
+ <item index="2" class="java.lang.String" itemvalue="coverage" />
11
+ <item index="3" class="java.lang.String" itemvalue="awscli" />
12
+ <item index="4" class="java.lang.String" itemvalue="traitlets" />
13
+ <item index="5" class="java.lang.String" itemvalue="jupyterlab_widgets" />
14
+ <item index="6" class="java.lang.String" itemvalue="yarg" />
15
+ <item index="7" class="java.lang.String" itemvalue="python-dateutil" />
16
+ <item index="8" class="java.lang.String" itemvalue="nbclient" />
17
+ <item index="9" class="java.lang.String" itemvalue="cycler" />
18
+ <item index="10" class="java.lang.String" itemvalue="executing" />
19
+ <item index="11" class="java.lang.String" itemvalue="MarkupSafe" />
20
+ <item index="12" class="java.lang.String" itemvalue="tinycss2" />
21
+ <item index="13" class="java.lang.String" itemvalue="torchvision" />
22
+ <item index="14" class="java.lang.String" itemvalue="fsspec" />
23
+ <item index="15" class="java.lang.String" itemvalue="docopt" />
24
+ <item index="16" class="java.lang.String" itemvalue="filelock" />
25
+ <item index="17" class="java.lang.String" itemvalue="Pygments" />
26
+ <item index="18" class="java.lang.String" itemvalue="pyzmq" />
27
+ <item index="19" class="java.lang.String" itemvalue="bleach" />
28
+ <item index="20" class="java.lang.String" itemvalue="certifi" />
29
+ <item index="21" class="java.lang.String" itemvalue="anyio" />
30
+ <item index="22" class="java.lang.String" itemvalue="soupsieve" />
31
+ <item index="23" class="java.lang.String" itemvalue="pyparsing" />
32
+ <item index="24" class="java.lang.String" itemvalue="jsonschema" />
33
+ <item index="25" class="java.lang.String" itemvalue="beautifulsoup4" />
34
+ <item index="26" class="java.lang.String" itemvalue="pywin32" />
35
+ <item index="27" class="java.lang.String" itemvalue="comm" />
36
+ <item index="28" class="java.lang.String" itemvalue="pydantic" />
37
+ <item index="29" class="java.lang.String" itemvalue="jupyter_client" />
38
+ <item index="30" class="java.lang.String" itemvalue="pure_eval" />
39
+ <item index="31" class="java.lang.String" itemvalue="kiwisolver" />
40
+ <item index="32" class="java.lang.String" itemvalue="click" />
41
+ <item index="33" class="java.lang.String" itemvalue="nbconvert" />
42
+ <item index="34" class="java.lang.String" itemvalue="attrs" />
43
+ <item index="35" class="java.lang.String" itemvalue="contourpy" />
44
+ <item index="36" class="java.lang.String" itemvalue="fonttools" />
45
+ <item index="37" class="java.lang.String" itemvalue="jedi" />
46
+ <item index="38" class="java.lang.String" itemvalue="jupyterlab_pygments" />
47
+ <item index="39" class="java.lang.String" itemvalue="pydantic_core" />
48
+ <item index="40" class="java.lang.String" itemvalue="asttokens" />
49
+ <item index="41" class="java.lang.String" itemvalue="geemap" />
50
+ <item index="42" class="java.lang.String" itemvalue="platformdirs" />
51
+ <item index="43" class="java.lang.String" itemvalue="widgetsnbextension" />
52
+ <item index="44" class="java.lang.String" itemvalue="matplotlib" />
53
+ <item index="45" class="java.lang.String" itemvalue="charset-normalizer" />
54
+ <item index="46" class="java.lang.String" itemvalue="idna" />
55
+ <item index="47" class="java.lang.String" itemvalue="referencing" />
56
+ <item index="48" class="java.lang.String" itemvalue="matplotlib-inline" />
57
+ <item index="49" class="java.lang.String" itemvalue="networkx" />
58
+ <item index="50" class="java.lang.String" itemvalue="pandocfilters" />
59
+ <item index="51" class="java.lang.String" itemvalue="wcwidth" />
60
+ <item index="52" class="java.lang.String" itemvalue="numpy" />
61
+ <item index="53" class="java.lang.String" itemvalue="pyasn1" />
62
+ <item index="54" class="java.lang.String" itemvalue="requests" />
63
+ <item index="55" class="java.lang.String" itemvalue="xyzservices" />
64
+ <item index="56" class="java.lang.String" itemvalue="jupyter_core" />
65
+ <item index="57" class="java.lang.String" itemvalue="Jinja2" />
66
+ <item index="58" class="java.lang.String" itemvalue="sniffio" />
67
+ <item index="59" class="java.lang.String" itemvalue="jsonschema-specifications" />
68
+ <item index="60" class="java.lang.String" itemvalue="exceptiongroup" />
69
+ <item index="61" class="java.lang.String" itemvalue="rpds-py" />
70
+ <item index="62" class="java.lang.String" itemvalue="stack-data" />
71
+ <item index="63" class="java.lang.String" itemvalue="tenacity" />
72
+ <item index="64" class="java.lang.String" itemvalue="urllib3" />
73
+ <item index="65" class="java.lang.String" itemvalue="ipywidgets" />
74
+ <item index="66" class="java.lang.String" itemvalue="annotated-types" />
75
+ <item index="67" class="java.lang.String" itemvalue="tornado" />
76
+ <item index="68" class="java.lang.String" itemvalue="prompt_toolkit" />
77
+ <item index="69" class="java.lang.String" itemvalue="pyasn1_modules" />
78
+ <item index="70" class="java.lang.String" itemvalue="parso" />
79
+ <item index="71" class="java.lang.String" itemvalue="nbformat" />
80
+ <item index="72" class="java.lang.String" itemvalue="tzdata" />
81
+ <item index="73" class="java.lang.String" itemvalue="ipython" />
82
+ <item index="74" class="java.lang.String" itemvalue="packaging" />
83
+ <item index="75" class="java.lang.String" itemvalue="pipreqs" />
84
+ <item index="76" class="java.lang.String" itemvalue="plotly" />
85
+ <item index="77" class="java.lang.String" itemvalue="torch" />
86
+ <item index="78" class="java.lang.String" itemvalue="fastjsonschema" />
87
+ <item index="79" class="java.lang.String" itemvalue="mistune" />
88
+ <item index="80" class="java.lang.String" itemvalue="pandas" />
89
+ <item index="81" class="java.lang.String" itemvalue="future" />
90
+ <item index="82" class="java.lang.String" itemvalue="pillow" />
91
+ <item index="83" class="java.lang.String" itemvalue="pytz" />
92
+ <item index="84" class="java.lang.String" itemvalue="rasterio" />
93
+ <item index="85" class="java.lang.String" itemvalue="scikit-learn" />
94
+ </list>
95
+ </value>
96
+ </option>
97
+ </inspection_tool>
98
+ </profile>
99
+ </component>
@@ -0,0 +1,6 @@
1
+ <component name="InspectionProjectProfileManager">
2
+ <settings>
3
+ <option name="USE_PROJECT_PROFILE" value="false" />
4
+ <version value="1.0" />
5
+ </settings>
6
+ </component>
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="Black">
4
+ <option name="sdkName" value="C:\ProgramData\anaconda3" />
5
+ </component>
6
+ <component name="ProjectRootManager" version="2" project-jdk-name="C:\ProgramData\anaconda3" project-jdk-type="Python SDK" />
7
+ </project>
@@ -0,0 +1,10 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module version="4">
3
+ <component name="PyDocumentationSettings">
4
+ <option name="format" value="NUMPY" />
5
+ <option name="myDocStringFormat" value="NumPy" />
6
+ </component>
7
+ <component name="TestRunnerService">
8
+ <option name="PROJECT_TEST_RUNNER" value="py.test" />
9
+ </component>
10
+ </module>
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="" vcs="Git" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,83 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="AutoImportSettings">
4
+ <option name="autoReloadType" value="SELECTIVE" />
5
+ </component>
6
+ <component name="ChangeListManager">
7
+ <list default="true" id="a711ec1e-87dc-4324-b9e0-25377e68ab2c" name="Changes" comment="" />
8
+ <option name="SHOW_DIALOG" value="false" />
9
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
10
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
11
+ <option name="LAST_RESOLUTION" value="IGNORE" />
12
+ </component>
13
+ <component name="Git.Settings">
14
+ <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
15
+ </component>
16
+ <component name="MarkdownSettingsMigration">
17
+ <option name="stateVersion" value="1" />
18
+ </component>
19
+ <component name="ProjectColorInfo">{
20
+ &quot;associatedIndex&quot;: 3
21
+ }</component>
22
+ <component name="ProjectId" id="2sg9t4FeIFtXWz8qCE0ardWRBg0" />
23
+ <component name="ProjectViewState">
24
+ <option name="hideEmptyMiddlePackages" value="true" />
25
+ <option name="showLibraryContents" value="true" />
26
+ </component>
27
+ <component name="PropertiesComponent">{
28
+ &quot;keyToString&quot;: {
29
+ &quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
30
+ &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
31
+ &quot;git-widget-placeholder&quot;: &quot;main&quot;
32
+ }
33
+ }</component>
34
+ <component name="SharedIndexes">
35
+ <attachedChunks>
36
+ <set>
37
+ <option value="bundled-python-sdk-d68999036c7f-d3b881c8e49f-com.jetbrains.pycharm.community.sharedIndexes.bundled-PC-233.14475.56" />
38
+ </set>
39
+ </attachedChunks>
40
+ </component>
41
+ <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
42
+ <component name="TaskManager">
43
+ <task active="true" id="Default" summary="Default task">
44
+ <changelist id="a711ec1e-87dc-4324-b9e0-25377e68ab2c" name="Changes" comment="" />
45
+ <created>1738866562384</created>
46
+ <option name="number" value="Default" />
47
+ <option name="presentableId" value="Default" />
48
+ <updated>1738866562384</updated>
49
+ </task>
50
+ <task id="LOCAL-00001" summary="research code">
51
+ <option name="closed" value="true" />
52
+ <created>1738866707771</created>
53
+ <option name="number" value="00001" />
54
+ <option name="presentableId" value="LOCAL-00001" />
55
+ <option name="project" value="LOCAL" />
56
+ <updated>1738866707771</updated>
57
+ </task>
58
+ <task id="LOCAL-00002" summary="tests">
59
+ <option name="closed" value="true" />
60
+ <created>1738927328398</created>
61
+ <option name="number" value="00002" />
62
+ <option name="presentableId" value="LOCAL-00002" />
63
+ <option name="project" value="LOCAL" />
64
+ <updated>1738927328399</updated>
65
+ </task>
66
+ <task id="LOCAL-00003" summary="Readme, license">
67
+ <option name="closed" value="true" />
68
+ <created>1738935828447</created>
69
+ <option name="number" value="00003" />
70
+ <option name="presentableId" value="LOCAL-00003" />
71
+ <option name="project" value="LOCAL" />
72
+ <updated>1738935828447</updated>
73
+ </task>
74
+ <option name="localTasksCounter" value="4" />
75
+ <servers />
76
+ </component>
77
+ <component name="VcsManagerConfiguration">
78
+ <MESSAGE value="research code" />
79
+ <MESSAGE value="tests" />
80
+ <MESSAGE value="Readme, license" />
81
+ <option name="LAST_COMMIT_MESSAGE" value="Readme, license" />
82
+ </component>
83
+ </project>
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 [AutoWell](https://www.norceresearch.no/en/projects/autowell-automated-well-monitoring-and-control) project team including [Vitaly Starikov](https://www.linkedin.com/in/vitalystarikov/).
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,185 @@
1
+ Metadata-Version: 2.4
2
+ Name: pta-learn
3
+ Version: 0.1.0
4
+ Summary: A Python library for automated feature extraction and pattern recognition in Pressure Transient Analysis (PTA) workflows.
5
+ Project-URL: Homepage, https://github.com/vitaliistarr/pta-learn
6
+ Project-URL: Repository, https://github.com/vitaliistarr/pta-learn.git
7
+ Project-URL: Bug Tracker, https://github.com/vitaliistarr/pta-learn/issues
8
+ Author-email: "V. Starikov" <starikovv98@gmail.com>
9
+ License: MIT License
10
+
11
+ Copyright (c) 2025 [AutoWell](https://www.norceresearch.no/en/projects/autowell-automated-well-monitoring-and-control) project team including [Vitaly Starikov](https://www.linkedin.com/in/vitalystarikov/).
12
+
13
+ Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ of this software and associated documentation files (the "Software"), to deal
15
+ in the Software without restriction, including without limitation the rights
16
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
+ copies of the Software, and to permit persons to whom the Software is
18
+ furnished to do so, subject to the following conditions:
19
+
20
+ The above copyright notice and this permission notice shall be included in all
21
+ copies or substantial portions of the Software.
22
+
23
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
+ SOFTWARE.
30
+ License-File: LICENSE
31
+ Keywords: feature-extraction,pattern-recognition,pressure-transient-analysis,well-testing
32
+ Classifier: Development Status :: 4 - Beta
33
+ Classifier: Intended Audience :: Science/Research
34
+ Classifier: License :: OSI Approved :: MIT License
35
+ Classifier: Programming Language :: Python :: 3
36
+ Classifier: Programming Language :: Python :: 3.8
37
+ Classifier: Programming Language :: Python :: 3.9
38
+ Classifier: Programming Language :: Python :: 3.10
39
+ Classifier: Topic :: Scientific/Engineering
40
+ Requires-Python: >=3.8
41
+ Requires-Dist: matplotlib>=3.4.0
42
+ Requires-Dist: numba>=0.53.0
43
+ Requires-Dist: numpy>=1.20.0
44
+ Requires-Dist: pandas>=1.3.0
45
+ Requires-Dist: plotly>=5.0.0
46
+ Requires-Dist: scikit-learn>=0.24.0
47
+ Requires-Dist: scikit-optimize>=0.9.0
48
+ Requires-Dist: scipy>=1.7.0
49
+ Provides-Extra: dev
50
+ Requires-Dist: black>=22.0; extra == 'dev'
51
+ Requires-Dist: isort>=5.0; extra == 'dev'
52
+ Requires-Dist: pytest-cov>=2.0; extra == 'dev'
53
+ Requires-Dist: pytest>=6.0; extra == 'dev'
54
+ Description-Content-Type: text/markdown
55
+
56
+ # pta-learn
57
+
58
+ A Python library for automated feature extraction and pattern recognition for Pressure Transient Analysis (PTA) workflows. The library provides tools to detect flow regime features and recognize stable patterns in time-lapse pressure transient responses. The library is based on the methodology described in the peer-reviewed paper: [Feature extraction and pattern recognition in time-lapse pressure transient responses](https://doi.org/10.1016/j.geoen.2024.213160)
59
+
60
+ ## Installation
61
+
62
+ Install the package using pip:
63
+
64
+ ```bash
65
+ pip install pta-learn
66
+ ```
67
+
68
+
69
+ ## Usage
70
+
71
+ ### Feature Extraction
72
+
73
+ - Automated flow regime feature detection
74
+ - Parameter optimization
75
+ - Visualization tools
76
+ - Multiple export formats (Excel, CSV)
77
+
78
+
79
+ The `PTAClassifier` class provides automated flow regime detection for single pressure transient analysis:
80
+
81
+ ```python
82
+ from pta_learn import PTAClassifier
83
+ import numpy as np
84
+
85
+ # Prepare your data as a 2D numpy array with columns: [time, pressure, pressure_derivative]
86
+ data = np.array([
87
+ [time_values],
88
+ [pressure_values],
89
+ [pressure_derivative_values]
90
+ ]).T
91
+
92
+ # Initialize classifier
93
+ clf = PTAClassifier()
94
+
95
+ # Option 1: Fit and predict separately
96
+ clf.fit(data)
97
+ output, distance = clf.predict()
98
+
99
+ # Option 2: Fit and predict in one step
100
+ output, distance = clf.fit_predict(data)
101
+
102
+ # Option 3: Optimize parameters and predict
103
+ output, distance, optimization_result = clf.predict_optimize()
104
+
105
+ # Plot results
106
+ fig = clf.plot(industry_chart=True)
107
+
108
+ # Export results
109
+ clf.to_excel("results.xlsx") # or
110
+ clf.to_csv("results.csv")
111
+ ```
112
+
113
+ ### Pattern Recognition
114
+ - Multi-transient analysis
115
+ - Stable pattern detection
116
+ - Confidence estimation
117
+ - Result visualization
118
+
119
+ The `PatternRecognition` class enables multi-transient analysis to identify stable patterns:
120
+
121
+ ```python
122
+ from pta_learn import PatternRecognition
123
+ import pandas as pd
124
+
125
+ # Prepare list of dataframes, each containing [time, pressure, pressure_derivative]
126
+ transient1 = pd.DataFrame({
127
+ 'time': time_values1,
128
+ 'pressure': pressure_values1,
129
+ 'pressure_derivative': pressure_derivative_values1
130
+ })
131
+ transient2 = pd.DataFrame({...})
132
+ data = [transient1, transient2]
133
+
134
+ # Initialize pattern recognition
135
+ pr = PatternRecognition()
136
+
137
+ # Fit data
138
+ pr.fit(data)
139
+
140
+ # Detect features
141
+ pr.detect_features()
142
+
143
+ # Get stable pattern
144
+ fig = pr.get_stable_pattern()
145
+
146
+ # Export results
147
+ pr.to_excel("pattern_results.xlsx")
148
+ ```
149
+
150
+ ## Citation
151
+
152
+ If you use this library in your research, please cite:
153
+
154
+ ```
155
+ @article{starikov2024feature,
156
+ title={Feature extraction and pattern recognition in time-lapse pressure transient responses},
157
+ author={Starikov, V. and Shchipanov, A. and Demyanov, V. and Muradov, K.},
158
+ journal={Geoenergy Science and Engineering},
159
+ volume={242},
160
+ pages={213160},
161
+ year={2024},
162
+ publisher={Elsevier},
163
+ doi={10.1016/j.geoen.2024.213160},
164
+ url={https://www.sciencedirect.com/science/article/pii/S294989102400530X}
165
+ }
166
+
167
+ @conference{starikov2023unsupervised,
168
+ title={Unsupervised Classification of Flow Regime Features in Pressure Transient Responses},
169
+ author={Starikov, V. and Demyanov, V. and Muradov, K. and Shchipanov, A.},
170
+ booktitle={Fifth EAGE Conference on Petroleum Geostatistics},
171
+ year={2023},
172
+ month={Nov},
173
+ pages={1-5},
174
+ publisher={European Association of Geoscientists & Engineers},
175
+ doi={10.3997/2214-4609.202335019}
176
+ }
177
+ ```
178
+ ## Acknowledgements
179
+
180
+ This research code was developed within the AutoWell research and development project funded by the Research Council of Norway and the industry partners including ConocoPhillips Skandinavia, Sumitomo Corporation Europe Norway Branch, Harbour Energy and Aker BP (grant no. 326580, PETROMAKS2 programme)​
181
+
182
+ ## Contributing
183
+
184
+ Contributions are welcome! Please feel free to submit a Pull Request.
185
+
@@ -0,0 +1,130 @@
1
+ # pta-learn
2
+
3
+ A Python library for automated feature extraction and pattern recognition for Pressure Transient Analysis (PTA) workflows. The library provides tools to detect flow regime features and recognize stable patterns in time-lapse pressure transient responses. The library is based on the methodology described in the peer-reviewed paper: [Feature extraction and pattern recognition in time-lapse pressure transient responses](https://doi.org/10.1016/j.geoen.2024.213160)
4
+
5
+ ## Installation
6
+
7
+ Install the package using pip:
8
+
9
+ ```bash
10
+ pip install pta-learn
11
+ ```
12
+
13
+
14
+ ## Usage
15
+
16
+ ### Feature Extraction
17
+
18
+ - Automated flow regime feature detection
19
+ - Parameter optimization
20
+ - Visualization tools
21
+ - Multiple export formats (Excel, CSV)
22
+
23
+
24
+ The `PTAClassifier` class provides automated flow regime detection for single pressure transient analysis:
25
+
26
+ ```python
27
+ from pta_learn import PTAClassifier
28
+ import numpy as np
29
+
30
+ # Prepare your data as a 2D numpy array with columns: [time, pressure, pressure_derivative]
31
+ data = np.array([
32
+ [time_values],
33
+ [pressure_values],
34
+ [pressure_derivative_values]
35
+ ]).T
36
+
37
+ # Initialize classifier
38
+ clf = PTAClassifier()
39
+
40
+ # Option 1: Fit and predict separately
41
+ clf.fit(data)
42
+ output, distance = clf.predict()
43
+
44
+ # Option 2: Fit and predict in one step
45
+ output, distance = clf.fit_predict(data)
46
+
47
+ # Option 3: Optimize parameters and predict
48
+ output, distance, optimization_result = clf.predict_optimize()
49
+
50
+ # Plot results
51
+ fig = clf.plot(industry_chart=True)
52
+
53
+ # Export results
54
+ clf.to_excel("results.xlsx") # or
55
+ clf.to_csv("results.csv")
56
+ ```
57
+
58
+ ### Pattern Recognition
59
+ - Multi-transient analysis
60
+ - Stable pattern detection
61
+ - Confidence estimation
62
+ - Result visualization
63
+
64
+ The `PatternRecognition` class enables multi-transient analysis to identify stable patterns:
65
+
66
+ ```python
67
+ from pta_learn import PatternRecognition
68
+ import pandas as pd
69
+
70
+ # Prepare list of dataframes, each containing [time, pressure, pressure_derivative]
71
+ transient1 = pd.DataFrame({
72
+ 'time': time_values1,
73
+ 'pressure': pressure_values1,
74
+ 'pressure_derivative': pressure_derivative_values1
75
+ })
76
+ transient2 = pd.DataFrame({...})
77
+ data = [transient1, transient2]
78
+
79
+ # Initialize pattern recognition
80
+ pr = PatternRecognition()
81
+
82
+ # Fit data
83
+ pr.fit(data)
84
+
85
+ # Detect features
86
+ pr.detect_features()
87
+
88
+ # Get stable pattern
89
+ fig = pr.get_stable_pattern()
90
+
91
+ # Export results
92
+ pr.to_excel("pattern_results.xlsx")
93
+ ```
94
+
95
+ ## Citation
96
+
97
+ If you use this library in your research, please cite:
98
+
99
+ ```
100
+ @article{starikov2024feature,
101
+ title={Feature extraction and pattern recognition in time-lapse pressure transient responses},
102
+ author={Starikov, V. and Shchipanov, A. and Demyanov, V. and Muradov, K.},
103
+ journal={Geoenergy Science and Engineering},
104
+ volume={242},
105
+ pages={213160},
106
+ year={2024},
107
+ publisher={Elsevier},
108
+ doi={10.1016/j.geoen.2024.213160},
109
+ url={https://www.sciencedirect.com/science/article/pii/S294989102400530X}
110
+ }
111
+
112
+ @conference{starikov2023unsupervised,
113
+ title={Unsupervised Classification of Flow Regime Features in Pressure Transient Responses},
114
+ author={Starikov, V. and Demyanov, V. and Muradov, K. and Shchipanov, A.},
115
+ booktitle={Fifth EAGE Conference on Petroleum Geostatistics},
116
+ year={2023},
117
+ month={Nov},
118
+ pages={1-5},
119
+ publisher={European Association of Geoscientists & Engineers},
120
+ doi={10.3997/2214-4609.202335019}
121
+ }
122
+ ```
123
+ ## Acknowledgements
124
+
125
+ This research code was developed within the AutoWell research and development project funded by the Research Council of Norway and the industry partners including ConocoPhillips Skandinavia, Sumitomo Corporation Europe Norway Branch, Harbour Energy and Aker BP (grant no. 326580, PETROMAKS2 programme)​
126
+
127
+ ## Contributing
128
+
129
+ Contributions are welcome! Please feel free to submit a Pull Request.
130
+