Skip to content

Commit

Permalink
8. adding of eeg dataset with bayesian tests
Browse files Browse the repository at this point in the history
  • Loading branch information
qnater committed Sep 27, 2024
1 parent cd1906a commit 915b6bf
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/pytest_contamination.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,6 @@ jobs:
pip install pytest
- name: Run pytest
run: python -m pytest ./tests/test_contamination_mcar.py
run: |
python -m pytest ./tests/test_contamination_mcar.py
python -m pytest ./tests/test_contamination_mp.py
7 changes: 4 additions & 3 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions imputegap/imputation/imputation.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

class Imputation:

def load_parameters(query="default", algorithm="cdrec"):
def load_parameters(query: str = "default", algorithm: str = "cdrec"):
"""
Load default values of algorithms
Expand Down Expand Up @@ -79,7 +79,7 @@ def evaluate_params(ground_truth, contamination, configuration, algorithm="cdrec
imputation, error_measures = Imputation.MR.cdrec(ground_truth, contamination, (rank, eps, iters))
elif algorithm == 'iim':
learning_neighbours = configuration
alg_code = "iim " + learning_neighbours
alg_code = "iim " + re.sub(r'[\W_]', '', str(learning_neighbours))
imputation, error_measures = Imputation.Regression.iim_imputation(ground_truth, contamination, (learning_neighbours, alg_code))
elif algorithm == 'mrnn':
hidden_dim, learning_rate, iterations, keep_prob, seq_len = configuration
Expand Down
2 changes: 1 addition & 1 deletion imputegap/runner_optimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def check_block_size(filename):
gap.print()
gap.plot(ts_type="contamination", title="test", save_path="assets", limitation=3, display=False)

optimal_params, yi = Optimization.Bayesian.bayesian_optimization(ground_truth=gap.ts, contamination=gap.ts_contaminate)
optimal_params, yi = Optimization.Bayesian.bayesian_optimization(ground_truth=gap.ts, contamination=gap.ts_contaminate, algorithm="iim")

print("\nOptical Params : ", optimal_params)
print("\nyi : ", yi, "\n")
Expand Down

0 comments on commit 915b6bf

Please sign in to comment.