Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Оставлю здесь пометку на всякий случай.

Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ jobs:
run: poetry install --with dev

- name: Run Ruff lint
run: poetry run ruff check --output-format=github
run: poetry run ruff check pysatl_experiment tests --output-format=github

- name: Check formatting with Ruff
run: poetry run ruff format --check
run: poetry run ruff format pysatl_experiment tests --check

- name: Run tests
run: poetry run pytest --random-order
run: poetry run pytest --random-order tests

- name: Check types
run: |
Expand Down
49 changes: 10 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,49 +125,20 @@ poetry run pre-commit run --all-files --color always --verbose --show-diff-on-fa
poetry run experiment create NAME
```

2. Set the experiment type value. Experiment types: critical_value, power, time_complexity.
2. Configure experiment.

```shell
poetry run experiment configure NAME experiment-type critical_value
poetry run experiment configure NAME \
-cr KS \
-l 0.05 -l 0.01 \
-s 23 \
-c 154 \
-h normal \
-expt critical_value \
-con sqlite:///pysatl.sqlite
Comment thread
f1i3g3 marked this conversation as resolved.
```

3. Setting the hypothesis value. Experiment types: normal, exponential, weibull.

```shell
poetry run experiment configure NAME hypothesis normal
```

4. Set the sample size value. (min = 10)

```shell
poetry run experiment configure NAME sample-sizes 23
```

5. Setting the value of the Monte Carlo number. (min = 100)

```shell
poetry run experiment configure NAME monte-carlo-count 154
```

6. Setting the significance levels.

```shell
poetry run experiment configure NAME significance-levels 0.05 0.01
```

7. Setting the criteria.

```shell
poetry run experiment configure NAME criteria KS
```

8. Setting the file name for connecting the storage.

```shell
poetry run experiment configure NAME storage-connection FILENAME
```

Comment thread
f1i3g3 marked this conversation as resolved.
9. Running the experiment.
3. Running the experiment.

```shell
poetry run experiment build-and-run NAME
Expand Down
2 changes: 1 addition & 1 deletion pysatl_criterion
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Отдельное спасибо за это!

Submodule pysatl_criterion updated 69 files
+1 −0 .codespell-ignore-words
+3 −2 .github/workflows/ci.yaml
+2 −1 .pre-commit-config.yaml
+6 −4 README.md
+16 −16 pyproject.toml
+2 −0 pysatl_criterion/constants.py
+16 −0 pysatl_criterion/core/expon.py
+36 −0 pysatl_criterion/core/weibull.py
+0 −0 pysatl_criterion/critical_value/__init__.py
+0 −0 pysatl_criterion/critical_value/critical_area/__init__.py
+68 −0 pysatl_criterion/critical_value/critical_area/critical_areas.py
+17 −0 pysatl_criterion/critical_value/critical_area/model.py
+0 −3 pysatl_criterion/critical_value/cv_calculator/cv_calculator.py
+0 −0 pysatl_criterion/critical_value/loader/__init__.py
+35 −0 pysatl_criterion/critical_value/loader/remote_loader.py
+0 −0 pysatl_criterion/critical_value/resolver/__init__.py
+55 −0 pysatl_criterion/critical_value/resolver/composite_resolver.py
+30 −0 pysatl_criterion/critical_value/resolver/model.py
+65 −0 pysatl_criterion/critical_value/resolver/storage_resolver.py
+7 −5 pysatl_criterion/multiple_testing/__init__.py
+14 −11 pysatl_criterion/multiple_testing/abstract_multiple_testing.py
+52 −0 pysatl_criterion/multiple_testing/fdr.py
+86 −63 pysatl_criterion/multiple_testing/fwer.py
+0 −0 pysatl_criterion/p_value/__init__.py
+0 −0 pysatl_criterion/p_value/resolver/__init__.py
+63 −0 pysatl_criterion/p_value/resolver/calculation_resolver.py
+6 −5 pysatl_criterion/p_value/resolver/local_resolver.py
+27 −0 pysatl_criterion/p_value/resolver/model.py
+1 −1 pysatl_criterion/persistence/limit_distribution/datastorage/datastorage.py
+36 −8 pysatl_criterion/persistence/limit_distribution/sqlite/sqlite.py
+8 −3 pysatl_criterion/persistence/model/common/data_storage/data_storage.py
+16 −4 pysatl_criterion/persistence/model/limit_distribution/limit_distribution.py
+4 −0 pysatl_criterion/persistence/model/orm/orm.py
+146 −1 ...terion/persistence/parameter_estimation/maximum_likelihood_method/function_for_maximum_likelihood_method.py
+15 −0 pysatl_criterion/persistence/parameter_estimation/maximum_likelihood_method/maximum_likelihood_method.py
+198 −14 pysatl_criterion/statistics/__init__.py
+742 −0 pysatl_criterion/statistics/beta.py
+0 −9 pysatl_criterion/statistics/common.py
+741 −281 pysatl_criterion/statistics/exponent.py
+943 −0 pysatl_criterion/statistics/gamma.py
+9 −0 pysatl_criterion/statistics/goodness_of_fit.py
+108 −10 pysatl_criterion/statistics/graph_goodness_of_fit.py
+524 −0 pysatl_criterion/statistics/log_normal.py
+9 −0 pysatl_criterion/statistics/models.py
+290 −58 pysatl_criterion/statistics/normal.py
+494 −0 pysatl_criterion/statistics/student.py
+913 −0 pysatl_criterion/statistics/uniform.py
+707 −79 pysatl_criterion/statistics/weibull.py
+51 −24 pysatl_criterion/test/goodness_of_fit_test/goodness_of_fit_test.py
+13 −0 pysatl_criterion/test/model.py
+0 −0 pysatl_criterion/util/__init__.py
+42 −0 pysatl_criterion/util/distribution.py
+25 −0 pysatl_criterion/util/statistic.py
+1 −1 tests/calc/test_cv.py
+50 −75 tests/calc/test_goodness_of_fit_test.py
+0 −115 tests/calc/test_p_value.py
+45 −0 tests/critical_value/test_critical_areas.py
+243 −0 tests/critical_value/test_remote_loader.py
+53 −0 tests/multiple_testing/test_fdr.py
+81 −0 tests/multiple_testing/test_fwer.py
+145 −0 tests/p_value/resolver/test_calculation_resolver.py
+2 −2 tests/persistence/limit_distribution/datastorage/datastorage_test.py
+2 −2 tests/persistence/limit_distribution/limit_distribution_test.py
+1,099 −0 tests/statistics/test_beta.py
+493 −0 tests/statistics/test_gamma.py
+426 −0 tests/statistics/test_log_normal.py
+434 −0 tests/statistics/test_student.py
+618 −0 tests/statistics/test_uniform.py
+130 −0 tests/util/statistic.py
32 changes: 3 additions & 29 deletions pysatl_experiment/cli/cli/cli.py
Original file line number Diff line number Diff line change
@@ -1,39 +1,13 @@
from pysatl_experiment.cli.commands.build_and_run.build_and_run import build_and_run
from pysatl_experiment.cli.commands.configure.alternatives.alternatives import alternatives
from pysatl_experiment.cli.commands.configure.configure import configure
from pysatl_experiment.cli.commands.configure.criteria.criteria import criteria
from pysatl_experiment.cli.commands.configure.executor_type.executor_type import executor_type
from pysatl_experiment.cli.commands.configure.experiment_type.experiment_type import experiment_type
from pysatl_experiment.cli.commands.configure.generator_type.generator_type import generator_type
from pysatl_experiment.cli.commands.configure.hypothesis.hypothesis import hypothesis
from pysatl_experiment.cli.commands.configure.monte_carlo_count.monte_carlo_count import monte_carlo_count
from pysatl_experiment.cli.commands.configure.parallel_workers.parallel_workers import parallel_workers
from pysatl_experiment.cli.commands.configure.report_builder_type.report_builder_type import report_builder_type
from pysatl_experiment.cli.commands.configure.report_mode.report_mode import report_mode
from pysatl_experiment.cli.commands.configure.run_mode.run_mode import run_mode
from pysatl_experiment.cli.commands.configure.sample_sizes.sample_sizes import sample_sizes
from pysatl_experiment.cli.commands.configure.show.show import show
from pysatl_experiment.cli.commands.configure.significance_levels.significance_levels import significance_levels
from pysatl_experiment.cli.commands.configure.storage_connection.storage_connection import storage_connection
from pysatl_experiment.cli.commands.create.create import create
from pysatl_experiment.cli.commands.criteria.criteria import available_criteria
from pysatl_experiment.cli.commands.show.show import show
from pysatl_experiment.cli.shared import cli


cli.add_command(available_criteria)
cli.add_command(create)
cli.add_command(configure)
cli.add_command(experiment_type)
cli.add_command(show)
cli.add_command(storage_connection)
cli.add_command(run_mode)
cli.add_command(hypothesis)
cli.add_command(generator_type)
cli.add_command(executor_type)
cli.add_command(report_builder_type)
cli.add_command(sample_sizes)
cli.add_command(monte_carlo_count)
cli.add_command(significance_levels)
cli.add_command(criteria)
cli.add_command(alternatives)
cli.add_command(report_mode)
cli.add_command(parallel_workers)
cli.add_command(build_and_run)
5 changes: 2 additions & 3 deletions pysatl_experiment/cli/commands/common/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,18 +178,17 @@ def get_experiment_name_and_config(ctx: Context) -> tuple[str, dict]:
return experiment_name, experiment_config


def save_experiment_config(ctx: Context, experiment_name: str, experiment_config: dict) -> None:
def save_experiment_config(experiment_name: str, experiment_config: dict) -> None:
"""
Save experiment config.

:param ctx: context.
:param experiment_name: experiment name.
:param experiment_config: experiment config.

:return: experiment config.
"""

experiment_data = get_experiment_data(ctx)
experiment_data = read_experiment_data(experiment_name)
experiment_data["config"] = experiment_config
save_experiment_data(experiment_name, experiment_data)

Expand Down

This file was deleted.

Loading