Package: python-weka-wrapper
WARNING:Python 2.7 reaches itsend-of-life in 2020,
you should consider using thePython 3 versionof this library!Thepython-weka-wrapperpackage makes it easy to runWekaalgorithms and filters from
within Python. It offers access to Weka API using thin wrappers around JNI
calls using thejavabridgepackage.Forum for project at:https://groups.google.com/forum/#!forum/python-weka-wrapperChangelog0.3.18 (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.3.17 (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.3.16 (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.3.15 (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.3.14 (2018-10-28)fixed logging setup inweka.core.jvmto avoid global setting global logging
setup toDEBUG(thanks tohttps://github.com/Arnie97)0.3.13 (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.3.12 (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.3.11 (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-wrapper/issues/52)0.3.10 (2017-01-04)types.double_matrix_to_ndarrayno longer assumes a square matrix
(https://github.com/fracpete/python-weka-wrapper/issues/48)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.3.9 (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.3.8 (2016-05-09)now works with javabridge 1.0.14 as well0.3.7 (2016-05-04)upgraded Weka to 3.9.00.3.6 (2016-04-02)Loader.load_filemethod now checks whether the dataset file really exists, otherwise a previously loaded
file gets loaded again without an error message (seems to be a Weka issue)replacedorg.pentaho.packageManagementwithweka.core.packageManagementas the package management code
is now part of Weka rather than a third-party libraryjvm.start()no longer tries to load packages and therefore suppresses error message if$HOME/wekafiles/packagesshould not yet exist0.3.5 (2016-01-29)added support forweka.core.BatchPredictorto classClassifierin moduleweka.classifiersupgraded Weka to revision 12410 (post 3.7.13) to avoid performance bottleneck when using setOptions methodfixed classSetupGeneratorfrom moduleweka.core.classesaddedload_any_filemethod to theweka.core.convertersmoduleaddedsave_any_filemethod to theweka.core.convertersmoduleifGridSearchinstantiation (moduleweka.classifiers) fails, it now outputs message whether package
installed and JVM with package support started0.3.4 (2016-01-15)added convenience methodcreate_instances_from_liststoweka.core.datasetmodule to easily create
anInstancesobject from numeric lists (x and y)addedget_object_tagsmethod toTagsclass from moduleweka.core.classes, to allow obtainingweka.core.Tagarray from the method of aJavaObjectrather than a static field (MultiSearch)updatedMultiSearchwrapper in moduleweka.classifiersto work with themulti-searchpackage
version 2016.1.15 or later0.3.3 (2015-09-26)updated to Weka 3.7.13documentation now covers the API as well0.3.2 (2015-06-29)Thepackagesparameter of theweka.core.jvm.start()function can be used for specifying an alternative
Weka home directory now as welladdedtrain_test_splitmethod toweka.core.Instancesclass to easily create train/test splitsevaluate_train_test_splitmethod ofweka.classifiers.Evaluationclass now uses thetrain_test_splitmethod0.3.1 (2015-04-23)addedget_tagsclass method toTagsmethod for easier instantiation of Tag arraysaddedfindmethod toTagsclass to locateTagobject that matches the stringfixed__getitem__and__setitem__methods of theTagsclassaddedGridSearchmeta-classifier with convenience properties to moduleweka.classifiersaddedSetupGeneratorand various parameter classes toweka.core.classesaddedMultiSearchmeta-classifier with convenience properties to moduleweka.classifiersaddedquote/unquoteandbackquote/unbackquotemethods toweka.core.classesmoduleaddedmainmethod toweka.core.classesfor operations on options: join, split, codeadded support for option handling toweka.core.classesmodule0.3.0 (2015-04-15)added methodndarray_to_instancestoweka.convertersmodule for converting Numpy 2-dimensional array intoInstancesobjectadded methodplot_learning_curvetoweka.plot.classifiersmodule for creating learning curves for multiple classifiers for a specific metricadded plotting of experiments withplot_experimentmethid inweka.plot.experimentsmoduleInstance.create_instancemethod now takes list of tuples (index, internal float value) when generating sparse instancesaddedweka.core.databasemodule for loading data from a databaseaddedmake_copyclass method toClustererclassaddedmake_copyclass method toAssociatorclassaddedmake_copyclass method toFilterclassaddedmake_copyclass method toDataGeneratorclassmost classes (like Classifier and Filter) now have a default classname value in the constructoraddedTextDirectoryLoaderclass toweka.core.convertersmoved all methods fromweka.core.utilstoweka.core.classesfixedAttribute.index_ofmethod for determining label indexfixedAttribute.add_string_valuemethod (used incorrect JNI parameter)create_instanceandcreate_sparse_instancemethods of classInstancenow ensure that list values are floataddedto_helpmethod toOptionHandlerclass which outputs a help string generated from the base class’sglobalInfoandlistOptionsmethodsfixedtest_modelmethod ofEvaluationclass when supplying aPredictionOutputobject (previously generatedNo dataset structure provided!exception)addedbatch_finishedmethod toFilterclass for incremental filteringaddedline_plotmethod toweka.plot.datasetmodule for plotting dataset using internal format (one line plot per instance)addedis_serializableproperty toJavaObjectclassaddedhas_classconvenience property toInstanceclassadded__repr__method toJavaObjectclasses (simply callstoString()method)addedStemmerclass in moduleweka.core.stemmersaddedStopwordsclass in moduleweka.core.stopwordsaddedTokenizerclass in moduleweka.core.tokenizersaddedStringToWordVectorfilter class in moduleweka.filtersadded simple workflow engine (see documentation onFlow)0.2.2 (2015-01-05)added convenience methodsno_class(to unset class) andhas_class(class set?) toInstancesclassswitched to using faster method objects for methodsclassify_instance/distribution_for_instanceinClassifierclassswitched to using faster method objects for methodscluster_instance/distribution_for_instanceinClustererclassswitched to using faster method objects for methodsclass_index,is_missing,get/set_value,get/set_string_value,weightinInstanceclassswitched to using faster method objects for methodsinput,output,outputformatinFilterclassswitched to using faster method objects for methodsattribute,attribute_by_name,num_attributes,num_instances,class_index,class_attribute,set_instance,get_instance,add_instanceinInstancesclass0.2.1 (2015-01-05)added unit testing frameworkadded methodrefresh_cache()toweka/core/packages.pyto allow user to refresh local cachemethodget_classnameinweka.core.utilsnow handles Python objects and class objects as welladded convenience methodget_jclasstoweka.core.utilsto instantiate a Java classadded aJavaArraywrapper forarrays, which allows getting/setting elements and iteratingadded propertyclassnameto classJavaObjectfor easy access to classname of underlying objectadded class methodparse_matlabfor parsing Matlab matrix strings toCostMatrixclasspredictionsmethod ofEvaluationclass now returnNoneif predictions are discardedAssociator.get_capabilities()method is now a property:Associator.capabilitiesadded wrapper classes for Java enums:weka.core.classes.Enumfixed retrieval ofsumSqinStatsclass (used byAttributeStats)fixedcluster_instancemethod inClustererclassfixedfilterandclustererproperties in clusterer classes (SingleClustererEnhancer,FilteredClusterer)addedcrossvalidate_modelmethod toClusterEvaluationaddedget_prcmethod toplot/classifiers.pyfor calculating the area under the precision-recall curveFilter.filtermethod now handles list ofInstancesobjects as well, applying the filter sequentially
to all the datasets (allows generation of compatible train/test sets)0.2.0 (2014-12-22)NB: This release is not backwards compatible!requiresJavaBridge1.0.9 at leastmoved from Java-like get/set (getIndex()andsetIndex(int)) to nicer Python propertiesusing Python properties (also only read-only ones) wherevere possibleaddedweka.core.versionfor accessing the Weka version currently in useaddedjwrapperandjclasswrappermethods toJavaObjectclass (the mother of all objects in python-weka-wrapper)
to allow generic access to an object’s methods:http://pythonhosted.org//javabridge/highlevel.html#wrapping-java-objects-using-reflectionadded convenience methodsclass_is_last()andclass_is_first()toweka.core.Instancesclassadded convenience methodsdelete_last_attribute()anddelete_first_attribute()toweka.core.InstancesclassOlder releaseshttps://github.com/fracpete/python-weka-wrapper/blob/7fd0bba3c74277313eb463e338c1a7e117a1ea22/CHANGES.rst