Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request adapts the
dev.py
sub-module to ensure full compatibility with the 3W Dataset 2.0. The main changes include updating theEventFolds
class to correctly handle the new data loading process and removing the redundantextrai_arrays()
function.Changes made:
extrai_arrays()
function: This function was previously used to extract data from individual CSV files. With the newload_3w_dataset()
function inbase.py
, which loads the entire dataset into a Pandas DataFrame, theextrai_arrays()
function became redundant and was removed.EventFolds
class:__init__()
method was modified to receive the complete DataFrame as a parameter instead of individual instance names. This change streamlines the data loading process and improves efficiency.carregue_instancia()
method was updated to use theload_3w_dataset()
function for loading data, ensuring consistency and compatibility with the new data structure.Experiment
class: Thefolds()
method was adjusted to pass the DataFrame to theEventFolds
class, ensuring the correct data flow.Example usage:
The following code snippet demonstrates how to use the updated Experiment class with the 3W Dataset 2.0:
Benefits:
This contribution significantly improves the usability and efficiency of the 3W Toolkit when working with the 3W Dataset 2.0, facilitating research and development of machine learning models for anomaly detection in oil wells.
By creating this pull request, I confirm that I have read and fully accept and agree with one of the Petrobras' Contributor License Agreements (CLAs):
Our CLAs are based on the Apache Software Foundation's CLAs: