Re: Confusion Matrix in Weka Experiments

[email protected]
Newsgroups gmane.comp.ai.weka
Message-ID <165469445680.358144.7199343240242477044@sys-mailman-prd.its.waikato.ac.nz>
Dear Peter, 

thank you very much. I guess my previous mail did not go via outlook. I am new in programming especially in Java. Therefore I found python weka wrapper easier for me. However, is there a way to compare datasets rather than classifiers. I have like 3 classifiers and 3 databases (my code is below). 

Also is there a way to implement (ClassifierSplitEvaluator.setPredTargetColumn(boolean)) in python wrapper ? 


    exp = SimpleCrossValidationExperiment(
            classification=True,
            runs=10,
            folds=10,
            datasets=datasets,
            classifiers=classifiers,
            result=result)
    exp.setup()
    exp.run()

    loader = weka.core.converters.loader_for_file(result)

    data = loader.load_file(result)

    matrix = ResultMatrix(classname="weka.experiment.ResultMatrixPlainText")
    tester = Tester(classname="weka.experiment.PairedCorrectedTTester")
    tester.resultmatrix = matrix


    comparison_col = data.attribute_by_name("Percent_correct").index

    tester.instances = data


    print(tester.header(comparison_col))
    print(tester.multi_resultset_full(0, comparison_col))
    print(tester.multi_resultset_full(1, comparison_col))
    print(tester.multi_resultset_full(2, comparison_col))
    # plot
    plot_exp.plot_experiment(matrix, title="Cross-Validation", measure="Percent_correct", wait=True)


Best regards,

Cem
_______________________________________________
Wekalist mailing list -- [email protected]
Send posts to [email protected]
To unsubscribe send an email to [email protected]
To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.