Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # create a parser object
- parser = ap.ArgumentParser()
- # specify what arguments will be coming from the terminal/commandline
- parser.add_argument("trainfile", help= ".txt file", type=str)
- parser.add_argument("rule", help="I or R (INFO GAIN or RANDOM)", type=str)
- parser.add_argument("depth", help="maximum height of the tree", type=int)
- parser.add_argument("testfile", help=".txt file", type=str)
- parser.add_argument("outputfile", help=".txt file of output", type=str)
- # get all the arguments
- arguments = parser.parse_args()
- # Extract the required arguments
- trainfile = arguments.trainfile
- rule = arguments.rule
- depth = arguments.depth
- testfile = arguments.testfile
- outputfile = arguments.outputfile
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement