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
misc.py
sub-module to ensure compatibility with the 3W Dataset 2.0. The main changes include removing redundant functions, adapting existing functions to receive the DataFrame as a parameter.Changes made:
1. Removed redundant functions:
label_and_file_generator
: This function iterated through the dataset files to extract information about the instances. With the newload_3w_dataset()
function, this is no longer necessary.get_all_labels_and_files
: This function usedlabel_and_file_generator
to get information about the instances. Sincelabel_and_file_generator
was removed, this function is also unnecessary.2. Adapted create_table_of_instances:
load_3w_dataset()
as a parameter, instead of lists of instances.Example usage:
calc_stats_instances
:Example usage:
4. Adapted
create_and_plot_scatter_map
:Example usage:
5. Adapted
load_instances
:Example usage:
Functions that still need to be tested:
filter_rare_undesirable_events()
plot_instance()
resample()
It is important to test these functions with the 3W Dataset 2.0 to ensure that they are working correctly with the new data structure and event types.
With these modifications, the 3W Toolkit will be fully compatible with version 2.0 of the 3W Dataset, allowing users to take advantage of the new features and data.
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: