MCPcopy Create free account

hub / github.com/JoeyHendricks/STATS-PAL / functions

Functions74 in github.com/JoeyHendricks/STATS-PAL

↓ 4 callersMethodshow
Will display the image in your default browser.
data/visuals.py:58
↓ 2 callersMethod_discretely_approximate_the_probability_distribution
Will calculate the required percentile range for each slice of data. :return: An array containing the calculated percentiles.
heuristics/kullback_leibler_divergence_testing.py:105
↓ 2 callersMethod_generate_line_graph
Will generate a graph object which can be used to verify the results. :return: The plotly graph object/
testing/simulators.py:64
↓ 2 callersMethod_render_figure
Will render the data into a figure. :return:
data/visuals.py:31
↓ 2 callersMethod_render_figure
Will render the data into a figure. :return:
data/visuals.py:98
↓ 2 callersMethodrun_consistently_changing_benchmark_fictitious_scenario
A simulation where the benchmark is consistently randomly increased. This will generate an ever changing benchmark that can help us f
testing/simulators.py:150
↓ 2 callersMethodrun_original_scenario
:return:
testing/simulators.py:191
↓ 2 callersMethodsave_frame
Saving image using the orca engine the default kaleido engine was not working for me. :param image_format : The format of the
data/visuals.py:65
↓ 1 callersMethod_calculate_kl_divergence
the Kullback–Leibler divergence is used to represent a measure of distance between a percentile range from A to B. More info
heuristics/kullback_leibler_divergence_testing.py:128
↓ 1 callersMethod_calculate_kolmogorov_smirnov_distance_statistics
Will use the kolmogorov smirnov statistical test to calculate the distance between two ECDF distributions. The KS test measures how
heuristics/kolmogorov_smirnov_and_wasserstein.py:136
↓ 1 callersMethod_calculate_percentile
Used to calculate the percentile over the given array. :return: the requested percentile as a float
heuristics/kullback_leibler_divergence_testing.py:120
↓ 1 callersMethod_calculate_percentile_distance_score
Will calculate the distance score by looking at how many measurements exhausted its threshold. :return: The distance score
heuristics/percentile_comparison.py:88
↓ 1 callersMethod_calculate_wasserstein_distance_statistics
Computes the Wasserstein distance or Kantorovich–Rubinstein metric also known as the Earth mover's distance. This metric represents h
heuristics/kolmogorov_smirnov_and_wasserstein.py:123
↓ 1 callersMethod_create_scenario
Will create a scenario based on the scenario information. :param percent_of_data_set: The amount in percentage of the data se
testing/simulators.py:31
↓ 1 callersMethod_estimate_d_value
Will estimate the change value from A to B using the Kullback–Leibler divergence. This value can be considered as the absolu
heuristics/kullback_leibler_divergence_testing.py:151
↓ 1 callersMethod_generate_scatter_plot
Will generate a graph object which can be used to verify the results. :return: The plotly graph object.
testing/simulators.py:80
↓ 1 callersMethod_generate_scoring_matrix
Will generate a scoring matrix that can be used to make a score go up or down. It does this by using the dirichlet distribution.
heuristics/kolmogorov_smirnov_and_wasserstein.py:95
↓ 1 callersMethod_iterate_through_percentiles_and_calculate_difference
Will go through each percentile measurement and calculate the percentage difference between them which it will push through its respe
heuristics/percentile_comparison.py:67
↓ 1 callersMethod_letter_rank_d_value
Will give the letter grade to the D value score. Below a rough estimate how much regression in percentage each letter grade r
heuristics/kullback_leibler_divergence_testing.py:175
↓ 1 callersMethod_letter_rank_distance_statistics
An heuristic that will estimate a rank of what the amount of change is between our distributions. This rank is based on the Japanese
heuristics/kolmogorov_smirnov_and_wasserstein.py:170
↓ 1 callersMethod_push_value_through_negative_change_matrix
Will iterate a value trough the negative change grid and will punish the score when a threshold is broken. :param value: The
heuristics/percentile_comparison.py:55
↓ 1 callersMethod_push_value_through_positive_change_matrix
Will iterate a value trough the positive change grid and will punish the score when a threshold is broken. :param value: The
heuristics/percentile_comparison.py:43
↓ 1 callersMethod_run_distance_test_on_fictitious_scenario
Will compare the scenario using the distance test and returning the metrics. :param scenario: the simulated scenario containing all o
testing/simulators.py:51
↓ 1 callersMethod_run_t_test
Will execute the T-test. - False: We can reject the null hypothesis the test is slower or faster than the baseline. - True: W
heuristics/students_t_test_used_for_outlier_check.py:84
↓ 1 callersMethod_score_c_value_from_0_to_100
Will use a change matrix to score every Kullback–Leibler divergence statistics grading it from 0 to 1. :return: retu
heuristics/kullback_leibler_divergence_testing.py:196
↓ 1 callersMethod_score_distance_statistics
An heuristic that will estimate a score between 0 - 100 using the Wasserstein distance and the kolmogorov smirnov distance. I
heuristics/kolmogorov_smirnov_and_wasserstein.py:149
↓ 1 callersMethod_simulate_scenario
Will run a simulation. :param percent_of_data_set: The amount in percentage of the data set that needs to be changed.
testing/simulators.py:92
↓ 1 callersMethod_verify_both_arrays_for_zeros
Will check if both arrays equal zero or not/ :return: True: There is no change both sums are equal to each other or - False:
heuristics/students_t_test_used_for_outlier_check.py:70
↓ 1 callersMethodadd_chunk_to_json
Will transfer the lines of the chunk into the json data set. Keep in mind that the json structure will be kept in the correct
data/wranglers.py:32
↓ 1 callersFunctioncalculate_ecdf
Will calculate the eCDF to find the empirical distribution of our population. This function will then create a dataframe which will contain t
heuristics/misc/helpers.py:37
↓ 1 callersFunctioncalculate_percentage_change
Will calculate the percentage change. :param old: The old measurement. :param new: the new measurement. :return: The percentage chang
heuristics/misc/helpers.py:9
↓ 1 callersMethodconvert_csv_to_json
Will read the csv file in chunks and convert it to json.
data/wranglers.py:25
↓ 1 callersFunctionnormalize_array
Will normalize a given raw distribution to its maximum. param data: A list of raw measurements that need to be normalized. param percenti
heuristics/misc/helpers.py:24
↓ 1 callersMethodrandomly_decrease_or_increase_part_of_the_population
:param delta: :param population: :param percentage: :param positive: True when the change the delta needs to increas
data/wranglers.py:91
Method__init__
Will construct the class and calculate all the required statistics. :param population_a: An list of floats of the A population (base
heuristics/kullback_leibler_divergence_testing.py:92
Method__init__
Will set up th class and find the max edge of the score from which the distance will be calculated by determining the length of the b
heuristics/percentile_comparison.py:21
Method__init__
(self, baseline_measurements: list, benchmark_measurements: list)
heuristics/students_t_test_used_for_outlier_check.py:12
Method__init__
Will construct the class and calculate all the required statistics. After all the computation have been completed the following infor
heuristics/kolmogorov_smirnov_and_wasserstein.py:31
Method__init__
Will load in the object and map the object arguments to attributes. These attributes ares used to identify the data. :param
heuristics/misc/measurements.py:10
Method__init__
When constructed will start the conversion process. :param path: The path to the file
data/wranglers.py:8
Method__init__
:param percentage: :param delta: :param baseline_id: :param benchmark_id: :param positive: True when the cha
data/wranglers.py:63
Method__init__
Will build the image. :param benchmark: :param baseline:
data/visuals.py:13
Method__init__
will build a scatter plot image :param scenario: :param rank: :param change:
data/visuals.py:86
Method__init__
(self)
data/visuals.py:155
Method__init__
Will construct the simulation object and provide a few attributes which can be changed. :param benchmark_id: The RID that ne
testing/simulators.py:14
Methodaverage
The average metric calculated over all of the measurements. :return: a float that represents the average of the sample
heuristics/misc/measurements.py:76
Methodcount
Will count how many measurements there are loaded into this object. In the performance engineering context this count
heuristics/misc/measurements.py:166
Methodcritical_t_value
Will calculate the critical t-value. :return: The critical t-value
heuristics/students_t_test_used_for_outlier_check.py:63
Methodecdf
The ECDF (empirical cumulative distribution function) Will calculate the eCDF to find the empirical distribution of our population.
heuristics/misc/measurements.py:56
Methodjson
will convert the python dictionary to true json :return:
data/wranglers.py:18
Methodkolmogorov_smirnov_distance
Computes the absolute distance between 2 distribution representing the maximum distance between sample A and B. More informat
heuristics/kolmogorov_smirnov_and_wasserstein.py:72
Methodkolmogorov_smirnov_probability
Not used in any of the calculation in this heuristic but it might be helpful for engineers that also want to perform a official KS-te
heuristics/kolmogorov_smirnov_and_wasserstein.py:84
Methodmax
Will find out the minimum outlier from all of the collected measurements (raw data). :return: A float that is the maximum num
heuristics/misc/measurements.py:108
Methodmedian
Will calculate the median over the collected measurements. (raw data) :return: A float which is the standard deviation.
heuristics/misc/measurements.py:141
Methodmin
Will find out the maximum outlier from all of the collected measurements (raw data). :return: A float that is the maximum num
heuristics/misc/measurements.py:119
Methodnormalized
Will normalize a given raw distribution to its maximum. When normalizing it wil exclude all measurement below the 95th percentile.
heuristics/misc/measurements.py:43
Methodoutliers
Will calculate the ECDF (empirical cumulative distribution function) to find the empirical distribution of our population. It
heuristics/misc/measurements.py:93
Methodpercentiles
Will calculate a pre-defined set of percentiles from the raw data. :return: Will return the percentile measurement as a tuple.
heuristics/misc/measurements.py:152
Methodprofiler_starting_point
Complex classes can confuse QuickPotato and make it hard to find a starting point from where QuickPotato can start unwrapping
tests/test_project.py:48
Methodraw
This property represent the collected data in its raw format. It is used by this object itself to calculate other metrics and informa
heuristics/misc/measurements.py:24
Methodrender_frames_in_target_directory_to_gif
Will create gif. :return:
data/visuals.py:159
Methodresults
The results of the t-test. - False: We can reject the null hypothesis the test is slower or faster than the baseline.
heuristics/students_t_test_used_for_outlier_check.py:33
Methodsave_frame
Saving image using the orca engine the default kaleido engine was not working for me. :param image_format : The format of the
data/visuals.py:134
Methodscore
A score from 0 to 100 that represents the amount of change between two percentile distributions. :return: The classic distanc
heuristics/percentile_comparison.py:35
MethodsetUp
Will structure the raw data object used in the tests.
tests/test_project.py:15
Methodshow
Will display the image in your default browser.
data/visuals.py:127
Methodstandard_deviation
Will calculate the standard deviation over the collected measurements. (raw data) :return: A float which is the standard devi
heuristics/misc/measurements.py:130
Methodsum
This total amount of all of the measurement combined. :return: returns an integer representing the total sum of all measureme
heuristics/misc/measurements.py:180
Methodt_value
Will calculate the t-value. :return: The calculate t-value
heuristics/students_t_test_used_for_outlier_check.py:43
Methodtest_metrics_if_the_correct_rank_can_be_estimated
Verifying if it is possible to find the correct rank and distance metrics for one of my dummy runs. Be aware that distance metrics ca
tests/test_project.py:21
Methodtest_performance_of_heuristic
A simple code performance test which allows me to access complex code performance visualizations and test if my heuristic follows
tests/test_project.py:39
Functionvalidate_letter_rank_boundary
Check if a boundary of a letter rank based on the pre-defined boundary matrix. By matching the letter rank to a number determining if a lette
heuristics/misc/helpers.py:73
Functionvalidate_thresholds_on_given_value
Will check the boundary of a change value by validating if the value - breaches the max or min boundary. :param change: The change value
heuristics/misc/helpers.py:57
Methodwasserstein_distance
Gives the computed value of distance from sample a versus sample b. This value represent how much effort there is required to move th
heuristics/kolmogorov_smirnov_and_wasserstein.py:59