Skip to content
This repository has been archived by the owner on Apr 2, 2020. It is now read-only.

name 'args' is not defined #6

Closed
maxihidara opened this issue Nov 6, 2018 · 2 comments
Closed

name 'args' is not defined #6

maxihidara opened this issue Nov 6, 2018 · 2 comments
Labels

Comments

@maxihidara
Copy link

Hello, sorry again, i want to ask, why i am getting "name 'args' is not defined" error when i try to run:

load a dataset

helper.print_info("Loading train: " + args[1])
loader = Loader(classname="weka.core.converters.ArffLoader")
train = loader.load_file(args[1])
train.class_index = train.num_attributes - 1
helper.print_info("Loading test: " + args[2])
test = loader.load_file(args[2])
test.class_is_last()

from your "output_class_distribution" example.
Btw i am trying to build prediction using weka classifier. Thank you. Sorry if my question's so basic.

@fracpete
Copy link
Owner

fracpete commented Nov 6, 2018

Please use the mailing list for posting questions:
https://groups.google.com/forum/#!forum/python-weka-wrapper

@fracpete
Copy link
Owner

fracpete commented Nov 7, 2018

When executing the module from the command-line, you have to provide two parameters: train and test set.
When calling the module's main method, you need to provide a list with three elements: 1st is ignored (contains module file name when called from command-line), train and test.

@fracpete fracpete closed this as completed Nov 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants