Created
November 4, 2021 14:40
-
-
Save MGCodesandStats/cd490a5114260428711d655abf4d4760 to your computer and use it in GitHub Desktop.
pareto class polymorphism
This file contains 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
class Pareto(Probability): | |
def __init__(self, length): | |
super().__init__("Pareto") | |
self.length = length | |
def mode1(self): | |
return (np.random.pareto(3, self.length) + 1) * 1 | |
def mode2(self): | |
return (np.random.pareto(3, self.length) + 1) * 2 | |
def mode3(self): | |
return (np.random.pareto(3, self.length) + 1) * 3 | |
def fact(self): | |
return "Sample generated in accordance with the Pareto Distribution." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment