inequality_chebyshev_sample(data_sample) Calculates Chebyshev Inequality for a array of values. Parameters:
data_sample: float[], array of numbers.
Returns: float
intersection_of_independent_events(events) Probability that all arguments will happen when neither outcome is affected by the other (accepts 1 or more arguments) Parameters:
events: float[], 0 >= _p >= 1, list of event probabilities.
Returns: float
union_of_independent_events(events) Probability that either one of the arguments will happen when neither outcome is affected by the other (accepts 1 or more arguments) Parameters:
events: float[], 0 >= _p >= 1, list of event probabilities.
Returns: float
mass_function(sample, n_bins) Probabilities for each bin in the range of sample. Parameters:
sample: float[], samples to pool probabilities.
n_bins: int, number of bins to split the range return float[]
cumulative_distribution_function(mean, stdev, value) Use the CDF to determine the probability that a random observation that is taken from the population will be less than or equal to a certain value. Or returns the area of probability for a known value in a normal distribution. Parameters:
mean: float, samples to pool probabilities.
stdev: float, number of bins to split the range
value: float, limit at which to stop.
Returns: float
transition_matrix(distribution) Transition matrix for the suplied distribution. Parameters:
distribution: float[], array with probability distribution. ex:. [0.25, 0.50, 0.25]
Returns: float[]
diffusion_matrix(transition_matrix, dimension, target_step) Probability of reaching target_state at target_step after starting from start_state Parameters:
transition_matrix: float[], "pseudo2d" probability transition matrix.
dimension: int, size of the matrix dimension.
target_step: number of steps to find probability.
Returns: float[]
state_at_time(transition_matrix, dimension, start_state, target_state, target_step) Probability of reaching target_state at target_step after starting from start_state Parameters:
transition_matrix: float[], "pseudo2d" probability transition matrix.
dimension: int, size of the matrix dimension.
start_state: state at which to start.
target_state: state to find probability.
target_step: number of steps to find probability.
הערות שחרור
v2 - general update on descriptions. - update to support builtin matrices. - fixed a mistake on the label/test code.
ברוח TradingView אמיתית, המחבר פרסם קוד Pine זה כספריית קוד פתוח כדי שמתכנתי Pine אחרים מהקהילה שלנו יוכלו לעשות בו שימוש חוזר. כל הכבוד למחבר! אתה יכול להשתמש בספרייה זו באופן פרטי או בפרסומים אחרים בקוד פתוח, אך שימוש חוזר בקוד זה בפרסום כפוף לכללי הבית.
המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.