xypasob.blogg.se

How to install weka wraper
How to install weka wraper









The knowledge_set parameter must provide an object of the class AI::Categorizer::KnowledgeSet (or a subclass thereof), populated with lots of documents and categories. This prepares it for later use in categorizing documents. The default is given by File::Spec->tmpdir. tmpdirĪ directory in which temporary files will be written when training the categorizer and categorizing new documents. Specifies a list of any additional arguments to pass to the Weka classifier class when building the categorizer. Consult your Weka documentation for a list of other classifiers available. Specifies the Weka class to use for a categorizer. If Weka has been installed somewhere in your java CLASSPATH, you needn't specify a weka_path. Specifies the path to the weka.jar file containing the Weka bytecode. Commonly it's necessary to allocate more memory than the default, using an argument like -Xmx130MB. Specifies a list of any additional arguments to give to the java process. The default is simply java, meaning that it will search your PATH to find java. Specifies where the java executable can be found on this system. In addition to the parameters accepted by the AI::Categorizer::Learner class, the Weka subclass accepts the following parameters: java_path new()Ĭreates a new Weka Learner and returns it. This class inherits from the AI::Categorizer::Learner class, so all of its methods are available unless explicitly mentioned here. However, if you're looking for really great performance, you're probably looking in the wrong place - this Weka wrapper is intended more as a way to try lots of different machine learning methods. In the future this may be converted to an Inline::Java wrapper for better performance (faster running times). This can give you access to a collection of machine learning algorithms not otherwise implemented in AI::Categorizer.Ĭurrently this is a simple command-line wrapper that calls java subprocesses. This class doesn't implement any machine learners of its own, it merely passes the data through to the Weka machine learning system (). Print "Best assigned category: ", $hypothesis->best_category, "\n" My $hypothesis = $nb->categorize($document) My $c = new AI::Categorizer::Collection::Files( path =>. $nb = AI::Categorizer::Learner->restore_state('filename') My $nb = new AI::Categorizer::Learner::Weka(.parameters.) # Here $k is an AI::Categorizer::KnowledgeSet object AI::Categorizer::Learner::Weka - Pass-through wrapper to Weka system SYNOPSIS use AI::Categorizer::Learner::Weka











How to install weka wraper