Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import distance, statictics
- def test():
- while True:
- print(
- """
- This module is used as test
- Input 1 to compute the distance between any two transactions of a user.
- Input 2 to compute the distance of transactions of any two users.
- Input 3 to calculate the average transactions of any user and of all users.
- Input 4 to calculate the mode of transactions of any user and that of all users.
- Input 5 to calculate the median of all transactions of a user and that of all users.
- Input 6 to calculate the interquartile range of any user’s transactions and of all users.
- Input 7 to calculate returns the location centroid of any user based on their transaction locations.
- Input 8 to determine whether a transaction is fraudulent or not. It should provide details of such transactions.
- Input 9 to calculate the standard deviation of any specific user’s transaction.
- Input 10 to determine if user transaction is abnormal.
- Input 11 to calculate the Z-score of any user’s transactions and for all users’ transactions
- Input 12 to compute those frequencies of transactions at any given location.
- Input 13 to determine outlier of any location and of any user.
- Input 14 to calculate nth percentiles of transactions of any user and of all users.
- """
- )
- option = input("Choose one of the above options or any other key to exit: ")
- if option == "1":
- distance.calculate_user_distance()
- elif option == "2":
- distance.calculate_any_two_users_distance()
- elif option == "3":
- statictics.get_average_of_user_or_all()
- elif option == "4":
- statictics.get_mode_of_user_or_all()
- elif option == "5":
- statictics.get_median_of_user_or_all()
- elif option == "6":
- statictics.get_interquartile_of_user_or_all()
- elif option == "7":
- statictics.get_user_location_centroid()
- elif option == "8":
- statictics.is_fraudulent_transaction()
- elif option == "9":
- statictics.get_standard_deviation_of_user_or_all()
- elif option == "10":
- pass
- elif option == "11":
- statictics.get_z_score_of_user_or_all()
- elif option == "12":
- pass
- elif option == "13":
- pass
- elif option == "14":
- statictics.get_nth_percentile_of_user_or_all()
- else:
- print("User has exited the program")
- break
- if __name__ == "__main__":
- # code to be executed if this is the main program
- test()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement