Package: python-weka-wrapper3
Thepython-weka-wrapper3package makes it easy to runWekaalgorithms and filters from
within Python 3. It offers access to Weka API using thin wrappers around JNI
calls using thepython-javabridgepackage.Forum for project at:https://groups.google.com/forum/#!forum/python-weka-wrapperChangelog0.2.14 (2023-07-04)extracted arpack_combined.jar, core.jar and mtj.jar from weka.jar to make them available under Java 170.2.13 (2023-04-26)movedConfigurableandJSONObjectintoconfigurable-objectslibrarymoved base flow components intosimple-data-flowlibraryadded methodssubset_results,rank_resultsto classAttributeSelection(module:weka.attribute_selection) to give access to cross-validation
output in numeric rather textual form (NB: it has to parse the textual CV output).made theplot_experimentsmethod (moduleweka.plot.experiments) more customizable0.2.12 (2022-12-08)methodinstall_packages(module:weka.core.packages) now no longer interprets
the installation message returned when installing from URL or local zip file as
failure to install; also outputs any installation message now in the console;
now has flags forfail_fastmode (first package that fails stops installation process)
and whether to returndetails(dict per package rather than just a bool for all packages)methodinstall_package(module:weka.core.packages) can return either a
boolean flag of success or detailed information0.2.11 (2022-10-11)methodsinstall_packagesandinstall_missing_packagesof moduleweka.core.packagesnow
allow a list of package names instead of tuples (name, version), assuminglatestas versionmethodget_jclassin moduleweka.core.classescan handle primitive classes now as well
(egint->java.lang.Integer.TYPE)methodsget_non_public_fieldandcall_non_public_methodin moduleweka.core.classesallow accessing private/protected fields and calling private/protected methods of Java objects,
which avoids having to sub-class classes to get public access to them (NB: only works as long
as the security manager allows that)addedsplit_commandlinemethod to moduleweka.core.classes, which splits a command-line
into classname and option list tupletheInstancesclass (module:weka.core.dataset) now supports slicingadded methodsplot_xmlbif_graphandxmlbif_to_dotto moduleweka.plot.graphfor plotting
XML BIF graphs generated by BayesNet using GraphVizadded methodplot_graphto moduleweka.plot.graphto plot dot or XML BIF graphs0.2.10 (2022-06-27)addedlogging_levelparameter to thestartmethod of theweka.core.jvmmodule, enabling the user
to turn off debugging output in an easy way (https://github.com/fracpete/python-weka-wrapper3/issues/40)added methodcv_splitsto classInstancesfrom moduleweka.core.datasetto return a list of
train/test tuples as used by cross-validationtheTesterclass (module:weka.experiments) now has an option to swap columns/rows for comparing
datasets rather than classifierstheSimpleExperimentclass and derived classes (module:weka.experiments) now have the additional
parameters in the constructor: class_for_ir_statistics, attribute_id, pred_target_columnthe methodis_installed(module:weka.core.packages) now can check whether a specific version is installedaddedpww-packagesentry point to allow managing of Weka packges from the command-line
(actions: list/info/install/uninstall/suggest/is-installed)0.2.9 (2022-04-17)methodJavaObject.new_instancein moduleweka.core.classesnow automatically
installs packages based on suggestions if the JVM was started with theauto_installflag enabled.methodtest_model_onceof classEvaluation(module:weka.classifiers) now has the
additional parameterstore, which  allows the recording of the predictions (necessary
for statistics like AUC)0.2.8 (2022-03-24)methodscreate_instances_from_listsandcreate_instances_from_matrices(moduleweka.core.dataset) now allow the specification of column names,
for input and output variables.0.2.7 (2022-02-22)Added property for attribute indices toDistanceFunctionclass (moduleweka.core.distances)
(thanks to Martin Trat,https://github.com/fracpete/python-weka-wrapper3/pull/39)improved instantiation of classes, avoiding misleading output of exceptionsJavaArrayclass (module:weka.core.classes) now has__str__and__repr__methods that output
classname and size0.2.6 (2022-02-01)upgraded bundled Weka to 3.9.60.2.5 (2021-12-17)switched topython-javabridge, the new name (fork?) of thejavabridgelibraryPackage.__str__(weka.core.packagesmodule) method now returns a string rather than printing the name/versionaddedto_numpy(…)methods toInstanceandInstancesclasses (moduleweka.core.dataset)
to make it easy to obtain a numpy array from the Weka dataset0.2.4 (2021-11-25)added methodhelp_fortoweka.core.classesmodule to generate a help screen for anweka.core.OptionHandlerclass using just the classname.theto_helpmethod of theweka.core.classes.OptionHandlerclass now allows to tweak the generated output a
bit better (e.g., what sections to output).setting window title of Matplotlib is now dependent on version (to avoid deprecation notice being output)plot_classifier_errors(moduleweka.plot.classifiers) now plots the diagonal after adding all the plot data to
get the right limits0.2.3 (2021-06-09)addedweka.core.distancesmodule for distance functions, withDistanceFunctionbase classaddedavg_silhouette_coefficientmethod toweka.clusterersto calculate the average silhouette coefficient0.2.2 (2021-04-23)thePackageclass of theweka.core.packagesmodule now has aversionproperty to quickly access the version
which is stored in the meta-data; themetadataproperty now returns a proper Python dictionaryadded convenience methods to theweka.core.packagesmodule:install_packagesto install more than one package,install_missing_packageandinstall_missing_packagesto install one or more packages if missing
(can automatically stop the JVM and exit the process),uninstall_packagesto remove more than one package in
one operation0.2.1 (2021-04-12)theASEvaluationclass in theweka.attribute_selectionmodule now offers the following methods
for attribute transformers like PCA:transformed_header,transformed_data,convert_instanceclasses derived fromweka.core.classes.JavaObjectare now serializable via pickleadded the methodcopy_structureto theweka.core.dataset.Instancesclass to quickly
get the header of a datasetadded the propertyheaderto the following classes that returns the training data structure:ASEvaluation,ASSearch,Associator,Classifier,Clusterer,TSForecastermethods fromweka.core.serializationhave been moved intoweka.core.classes, with the
following methods getting theserialization_prefix:write,write_all,read,read_all0.2.0 (2021-02-21)classes.new_instancemethod can take an options list now as welladdedclasses.get_enummethod to return the instance of a Java enum itemaddedclasses.new_instancemethod to create new instance of Java classaddedtypeconv.jstring_list_to_string_listmethod to convert ajava.util.Listcontaining strings into a Python listaddedtypeconv.jdouble_to_floatmethod to convert ajava.lang.Doubleto a Python floatin moduletypeconvrenamed methods:string_array_to_listtojstring_array_to_list,string_list_to_arraytostring_list_to_jarray,double_matrix_to_ndarraytojdouble_matrix_to_ndarray,enumeration_to_listtojenumeration_to_list,double_to_floattofloat_to_jfloataddedweka.timeseriesmodule that wraps thetimeseriesForecastingWeka package0.1.16 (2020-12-26)upgraded Weka to 3.9.50.1.15 (2020-10-25)addedweka.core.systeminfomodule for obtaining output fromweka.core.SystemInfoaddedsystem_infoparameter toweka.core.jvm.start()methodmerged PR #33 (https://github.com/fracpete/python-weka-wrapper3/pull/33) to better handle
associator output0.1.14 (2020-05-26)addedAttributeSelectedClassifiermeta-classifier to moduleweka.classifiersaddedAttributeSelectionmeta-filter to moduleweka.filters0.1.13 (2020-05-06)addedclass_indexparameter toweka.core.converters.load_any_fileandweka.core.converters.Loader.load_file, which allows specifying of
index while loading it (first,second,third,last-2,last-1,lastor 1-based index).addedappendandclearmethods toweka.filters.MultiFilterandweka.classifiers.MultipleClassifiersCombinerto make adding of
filters/classifiers easier.addedattribute_names()method toweka.core.dataset.Instancesclassaddedsubsetmethod toweka.core.dataset.Instancesclass, which returns
a subset of columns and/or rows.0.1.12 (2020-01-10)added methodlist_property_namestoweka.core.classesmodule to allow listing of Bean property names
(which are used byGridSearchandMultiSearch) for a Java object.0.1.11 (2020-01-04)Upgraded Weka to 3.9.4added methodsuggest_packageto theweka.core.packagesmodule for suggesting packages for partial class
names/package names (NNgeor.ft.) or exact class names (weka.classifiers.meta.StackingC)theJavaObject.new_instancemethod now suggests packages (if possible) in case the instantiation fails
due to package not installed or JVM not started with package support0.1.10 (2019-12-02)methodtrain_test_splitof theweka.dataset.Instancesclass now creates a copy of itself before
applying randomization, to avoid changing the order of data for subsequent calls.0.1.9 (2019-11-19)methodcreate_instances_from_matricesfrom moduleweka.core.datasetnow works with pure numeric data againadded sections for creating datasets (manual, lists, matrices) to examples documentation0.1.8 (2019-11-11)added console scripts:pww-associator,pww-attsel,pww-classifier,pww-clusterer,pww-datagenerator,pww-filteraddedserialize,deserializemethods toweka.classifiers.Classifierto simplify loading/saving modeladdedserialize,deserializemethods toweka.clusterers.Clustererto simplify loading/saving modeladdedserialize,deserializemethods toweka.filters.Filterto simplify loading/saving filteradded methodsplot_rocsandplot_prcstoweka.plot.classifiersmodule to plot ROC/PRC curve on same dataset
for multiple classifiersmethodplot_classifier_errorsofweka.plot.classifiersmodule now allows plotting predictions of multiple
classifiers by providing a dictionarymethodcreate_instances_from_matricesfrom moduleweka.core.datasetnow allows string and bytes as wellmethodcreate_instances_from_listsfrom moduleweka.core.datasetnow allows string and bytes as well0.1.7 (2019-01-11)added wrapper classes for association classes that implementAssociationRuleProducer(packageweka.associations):AssociationRules,AssociationRule,itemaddedto_sourcemethod toweka.classifiers.Classifierandweka.filters.Filter(underlying Java classes must implement the respectiveSourcableinterface)0.1.6 (2018-10-28)fixed logging setup inweka.core.jvmto avoid global setting global logging
setup toDEBUG(thanks tohttps://github.com/Arnie97)0.1.5 (2018-09-16)upgraded to Weka 3.9.3weka.jarnow included in PyPi packageexposed the following methods inweka.classifiers.Evaluation:cumulative_margin_distribution,sf_prior_entropy,sf_scheme_entropy0.1.4 (2018-02-18)upgraded to Weka 3.9.2properly initializing package support now, rather than adding package jars to classpathaddedweka.core.ClassHelperJava class for obtaining classes and static fields, as
javabridge only uses the system class loader0.1.3 (2017-08-23)addedcheck_for_modified_class_attributemethod toFilterClassifierclassaddedcomplete_classnamemethod toweka.core.classesmodule, which allows
completion of partial classnames like.J48toweka.classifiers.trees.J48if there is a unique match;JavaObject.new_instanceandJavaObject.check_typenow make use of this functionality, allowing for instantiations likeClassifier(cls=”.J48”)jvm.start(system_cp=True)no longer fails with aKeyError: ‘CLASSPATH’if
there is noCLASSPATHenvironment variable definedLibrariesmtl.jar,core.jarandarpack_combined_all.jarwere added as is
to theweka.jarin the 3.9.1 release instead of adding their content to it.
Repackagedweka.jarto fix this issue (https://github.com/fracpete/python-weka-wrapper3/issues/5)0.1.2 (2017-01-04)typeconv.double_matrix_to_ndarrayno longer assumes a square matrix
(https://github.com/fracpete/python-weka-wrapper3/issues/4)len(Instances)now returns the number of rows in the dataset (moduleweka.core.dataset)added methodinsert_attributeto theInstancesclassadded class methodcreate_relationalto theAttributeclassupgraded Weka to 3.9.10.1.1 (2016-10-19)plot_learning_curvemethod of moduleweka.plot.classifiersnow accepts a list of test sets;*is index of test set in label template stringaddedmissing_value()methods toweka.core.datasetmodule andInstanceclassoutput variableyfor convenience methodcreate_instances_from_listsin moduleweka.core.datasetis now optionaladded convenience methodcreate_instances_from_matricestoweka.core.datasetmodule to easily create
anInstancesobject from numpy matrices (x and y)0.1.0 (2016-05-09)initial release of Python3 port