Repository navigation
Reformat the independent-filtering test fixtures to the standard's schema #52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
12 changes: 4 additions & 8 deletions
12
protocols/independent-filtering-variance/tests/invalid_parameters/test.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,12 @@ | ||
| name: invalid_parameters | ||
| description: Invalid filter and theta values must be rejected rather than silently corrected. | ||
| inputs: | ||
| data: input.csv | ||
| data: {path: input.csv} | ||
| filter: median | ||
| theta: 1.2 | ||
| feature_orientation: rows | ||
| expected_outputs: | ||
| status: refused_invalid_parameters | ||
| required_observations: | ||
| - filter must be either variance or mean | ||
| - theta must be between 0 and 1 | ||
| evaluation: | ||
| mode: diagnostic | ||
| require_invalid_parameter_refusal: true | ||
| reject_silent_parameter_correction: true | ||
| accepted_outcomes: | ||
| - outcome: refused_invalid_parameters | ||
| expected_absent: [summary, removed_features, retained_features, retained_matrix] |
31 changes: 8 additions & 23 deletions
31
protocols/independent-filtering-variance/tests/mean_columns/test.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,32 +1,17 @@ | ||
| name: mean_columns | ||
| description: Diagnostic mean case with features in columns, testing correction or refusal. | ||
| inputs: | ||
| data: input.csv | ||
| data: {path: input.csv} | ||
| filter: mean | ||
| theta: 0.5 | ||
| feature_orientation: columns | ||
| expected_outputs: | ||
| input_orientation: features_in_columns | ||
| protocol_requirement: features_in_rows | ||
| evaluation: | ||
| mode: diagnostic | ||
| accepted_outcomes: | ||
| - outcome: orientation_corrected | ||
| expected_summary: | ||
| A: 1 | ||
| B: 3 | ||
| C: 6.5 | ||
| D: 10 | ||
| - outcome: orientation_corrected | ||
| expected_outputs: | ||
| summary: {A: 1, B: 3, C: 6.5, D: 10} | ||
| removed_features: [A, B] | ||
| retained_features: [C, D] | ||
| - outcome: refused_for_orientation | ||
| required_observation: The protocol requires one feature per row and one sample per column; this input has one feature per column. | ||
| intended_feature_summaries: | ||
| A: 1 | ||
| B: 3 | ||
| C: 6.5 | ||
| D: 10 | ||
| intended_removed_features: [A, B] | ||
| intended_retained_features: [C, D] | ||
| evaluation: | ||
| mode: diagnostic | ||
| accepted_outcomes: [orientation_corrected, refused_for_orientation] | ||
| reject_silent_row_feature_interpretation: true | ||
| - outcome: refused_for_orientation | ||
| expected_absent: [summary, removed_features, retained_features, retained_matrix] |
17 changes: 4 additions & 13 deletions
17
protocols/independent-filtering-variance/tests/mean_nondefault_theta/test.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,25 +1,16 @@ | ||
| name: mean_nondefault_theta | ||
| description: Mean filtering with negative values and a non-default theta. | ||
| inputs: | ||
| data: input.csv | ||
| data: {path: input.csv} | ||
| filter: mean | ||
| theta: 0.4 | ||
| feature_orientation: rows | ||
| expected_outputs: | ||
| summary: | ||
| A: -3 | ||
| B: -1 | ||
| C: 0 | ||
| D: 2 | ||
| E: 7 | ||
| summary: {A: -3, B: -1, C: 0, D: 2, E: 7} | ||
| n_eligible: 5 | ||
| m: 2 | ||
| cutoff: -1 | ||
| removed_features: [A, B] | ||
| retained_features: [C, D, E] | ||
| retained_matrix: retained.csv | ||
| evaluation: | ||
| mode: exact | ||
| compare_summary: true | ||
| compare_retained_matrix: true | ||
| numeric_tolerance: 0 | ||
| retained_matrix: {path: retained.csv} | ||
| evaluation: {mode: exact, numeric_tolerance: 0.0} |
16 changes: 4 additions & 12 deletions
16
protocols/independent-filtering-variance/tests/mean_rows/test.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,24 +1,16 @@ | ||
| name: mean_rows | ||
| description: Mean filtering on a feature-by-sample matrix with features in rows. | ||
| inputs: | ||
| data: input.csv | ||
| data: {path: input.csv} | ||
| filter: mean | ||
| theta: 0.5 | ||
| feature_orientation: rows | ||
| expected_outputs: | ||
| summary: | ||
| A: 1 | ||
| B: 3 | ||
| C: 6.5 | ||
| D: 10 | ||
| summary: {A: 1, B: 3, C: 6.5, D: 10} | ||
| n_eligible: 4 | ||
| m: 2 | ||
| cutoff: 3 | ||
| removed_features: [A, B] | ||
| retained_features: [C, D] | ||
| retained_matrix: retained.csv | ||
| evaluation: | ||
| mode: exact | ||
| compare_summary: true | ||
| compare_retained_matrix: true | ||
| numeric_tolerance: 0 | ||
| retained_matrix: {path: retained.csv} | ||
| evaluation: {mode: exact, numeric_tolerance: 0.0} |
16 changes: 4 additions & 12 deletions
16
protocols/independent-filtering-variance/tests/mean_zero_removal/test.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,24 +1,16 @@ | ||
| name: mean_zero_removal | ||
| description: Mean filtering where floor(theta times n_eligible) is zero. | ||
| inputs: | ||
| data: input.csv | ||
| data: {path: input.csv} | ||
| filter: mean | ||
| theta: 0.1 | ||
| feature_orientation: rows | ||
| expected_outputs: | ||
| summary: | ||
| A: 1 | ||
| B: 3 | ||
| C: 5 | ||
| D: 7 | ||
| summary: {A: 1, B: 3, C: 5, D: 7} | ||
| n_eligible: 4 | ||
| m: 0 | ||
| cutoff: null | ||
| removed_features: [] | ||
| retained_features: [A, B, C, D] | ||
| retained_matrix: retained.csv | ||
| evaluation: | ||
| mode: exact | ||
| compare_summary: true | ||
| compare_retained_matrix: true | ||
| numeric_tolerance: 0 | ||
| retained_matrix: {path: retained.csv} | ||
| evaluation: {mode: exact, numeric_tolerance: 0.0} |
37 changes: 9 additions & 28 deletions
37
protocols/independent-filtering-variance/tests/variance_columns/test.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,38 +1,19 @@ | ||
| name: variance_columns | ||
| description: Diagnostic unbiased variance case with features in columns, testing correction or refusal. | ||
| inputs: | ||
| data: input.csv | ||
| data: {path: input.csv} | ||
| filter: variance | ||
| theta: 0.4 | ||
| feature_orientation: columns | ||
| tie_breaker: feature_id_ascending | ||
| expected_outputs: | ||
| input_orientation: features_in_columns | ||
| protocol_requirement: features_in_rows | ||
| evaluation: | ||
| mode: diagnostic | ||
| numeric_tolerance: 1.0e-12 | ||
| accepted_outcomes: | ||
| - outcome: orientation_corrected | ||
| expected_summary: | ||
| A: 0 | ||
| B: 1.3333333333333333 | ||
| C: 1.3333333333333333 | ||
| D: 33.333333333333336 | ||
| E: 48 | ||
| - outcome: orientation_corrected | ||
| expected_outputs: | ||
| summary: {A: 0, B: 1.3333333333333333, C: 1.3333333333333333, D: 33.333333333333336, E: 48} | ||
| removed_features: [A, B] | ||
| retained_features: [C, D, E] | ||
| - outcome: refused_for_orientation | ||
| required_observation: The protocol requires one feature per row and one sample per column; this input has one feature per column. | ||
| intended_feature_summaries: | ||
| A: 0 | ||
| B: 1.3333333333333333 | ||
| C: 1.3333333333333333 | ||
| D: 33.333333333333336 | ||
| E: 48 | ||
| intended_n_eligible: 5 | ||
| intended_m: 2 | ||
| intended_cutoff: 1.3333333333333333 | ||
| intended_removed_features: [A, B] | ||
| intended_retained_features: [C, D, E] | ||
| evaluation: | ||
| mode: diagnostic | ||
| accepted_outcomes: [orientation_corrected, refused_for_orientation] | ||
| reject_silent_row_feature_interpretation: true | ||
| - outcome: refused_for_orientation | ||
| expected_absent: [summary, removed_features, retained_features, retained_matrix] | ||
22 changes: 5 additions & 17 deletions
22
protocols/independent-filtering-variance/tests/variance_missing_values/test.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,31 +1,19 @@ | ||
| name: variance_missing_values | ||
| description: Variance filtering with missing values and an explicitly declared eligibility policy. | ||
| inputs: | ||
| data: input.csv | ||
| data: {path: input.csv} | ||
| filter: variance | ||
| theta: 0.5 | ||
| feature_orientation: rows | ||
| missing_data_policy: exclude_features_with_fewer_than_two_non_missing_values | ||
| expected_outputs: | ||
| summary: | ||
| A: 0 | ||
| B: 1.3333333333333333 | ||
| C: 8 | ||
| non_missing_counts: | ||
| A: 4 | ||
| B: 4 | ||
| C: 2 | ||
| D: 1 | ||
| summary: {A: 0, B: 1.3333333333333333, C: 8} | ||
| non_missing_counts: {A: 4, B: 4, C: 2, D: 1} | ||
| excluded_features: [D] | ||
| n_eligible: 3 | ||
| m: 1 | ||
| cutoff: 0 | ||
| removed_features: [A] | ||
| retained_features: [B, C] | ||
| retained_matrix: retained.csv | ||
| evaluation: | ||
| mode: exact | ||
| compare_summary: true | ||
| compare_non_missing_counts: true | ||
| compare_retained_matrix: true | ||
| numeric_tolerance: 1.0e-12 | ||
| retained_matrix: {path: retained.csv} | ||
| evaluation: {mode: exact, numeric_tolerance: 1.0e-12} |
24 changes: 5 additions & 19 deletions
24
protocols/independent-filtering-variance/tests/variance_rows/test.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,32 +1,18 @@ | ||
| name: variance_rows | ||
| description: Unbiased variance filtering on a feature-by-sample matrix with features in rows. | ||
| inputs: | ||
| data: input.csv | ||
| data: {path: input.csv} | ||
| filter: variance | ||
| theta: 0.4 | ||
| feature_orientation: rows | ||
| tie_breaker: feature_id_ascending | ||
| expected_outputs: | ||
| summary: | ||
| A: 0 | ||
| B: 1.3333333333333333 | ||
| C: 1.3333333333333333 | ||
| D: 33.333333333333336 | ||
| E: 48 | ||
| non_missing_counts: | ||
| A: 4 | ||
| B: 4 | ||
| C: 4 | ||
| D: 4 | ||
| E: 4 | ||
| summary: {A: 0, B: 1.3333333333333333, C: 1.3333333333333333, D: 33.333333333333336, E: 48} | ||
| non_missing_counts: {A: 4, B: 4, C: 4, D: 4, E: 4} | ||
| n_eligible: 5 | ||
| m: 2 | ||
| cutoff: 1.3333333333333333 | ||
| removed_features: [A, B] | ||
| retained_features: [C, D, E] | ||
| retained_matrix: retained.csv | ||
| evaluation: | ||
| mode: exact | ||
| compare_summary: true | ||
| compare_retained_matrix: true | ||
| numeric_tolerance: 1.0e-12 | ||
| retained_matrix: {path: retained.csv} | ||
| evaluation: {mode: exact, numeric_tolerance: 1.0e-12} |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.