Changeset 10378:4d682c357ada in orange


Ignore:
Timestamp:
02/26/12 00:34:14 (2 years ago)
Author:
janezd <janez.demsar@…>
Branch:
default
Message:

More fixes due to refactoring of classification.rules

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Orange/classification/rules.py

    r10370 r10378  
    824824 
    825825    def change_domain(self, rule, cl, examples, weight_id): 
    826         rule.filter = Orange.data.Values( 
     826        rule.filter = Orange.filter.Values( 
    827827            domain=examples.domain, conditions=rule.filter.conditions) 
    828828        rule.filterAndStore(examples, weight_id, cl) 
  • Orange/fixes/fix_changed_names.py

    r10244 r10378  
    275275           "orngCN2.WRACCEvaluator": "Orange.classification.rules.WRACCEvaluator", 
    276276           "orngCN2.mEstimate": "Orange.classification.rules.MEstimateEvaluator", 
    277            "orngCN2.RuleStopping_apriori": "Orange.classification.rules.RuleStopping_Apriori", 
     277           "orngCN2.RuleStopping_apriori": "Orange.classification.rules.Stopping_Apriori", 
    278278           "orngCN2.LengthValidator": "Orange.classification.rules.LengthValidator", 
    279279           "orngCN2.supervisedClassCheck": "Orange.classification.rules.supervisedClassCheck", 
     
    282282           "orngCN2.CN2UnorderedLearner": "Orange.classification.rules.CN2UnorderedLearner", 
    283283           "orngCN2.CN2UnorderedClassifier": "Orange.classification.rules.CN2UnorderedClassifier", 
    284            "orngCN2.RuleClassifier_bestRule": "Orange.classification.rules.RuleClassifier_BestRule", 
     284           "orngCN2.RuleClassifier_bestRule": "Orange.classification.rules.Classifier_BestRule", 
    285285           "orngCN2.CovererAndRemover_multWeights": "Orange.classification.rules.CovererAndRemover_MultWeights", 
    286286           "orngCN2.CovererAndRemover_addWeights": "Orange.classification.rules.CovererAndRemover_AddWeights", 
     
    288288           "orngCN2.rules_equal": "Orange.classification.rules.rules_equal", 
    289289           "orngCN2.noDuplicates_validator": "Orange.classification.rules.NoDuplicatesValidator", 
    290            "orngCN2.ruleSt_setRules": "Orange.classification.rules.RuleStopping_SetRules", 
     290           "orngCN2.ruleSt_setRules": "Orange.classification.rules.Stopping_SetRules", 
    291291           "orngCN2.CN2SDUnorderedLearner": "Orange.classification.rules.CN2SDUnorderedLearner", 
    292292#           "orngCN2.avg": "Orange.classification.rules.avg", 
  • docs/reference/rst/Orange.classification.rules.rst

    r10370 r10378  
    309309    
    310310      An instance of 
    311       :class:`~Orange.classification.rules.RuleDataStoppingCriteria` 
     311      :class:`~Orange.classification.rules.DataStoppingCriteria` 
    312312      that determines whether to continue the induction. The default 
    313313      component, 
    314       :class:`~Orange.classification.rules.RuleDataStoppingCriteria_NoPositives` 
     314      :class:`~Orange.classification.rules.DataStoppingCriteria_NoPositives` 
    315315      returns ``True`` if there are no more instances of the target class.  
    316316    
    317317   .. attribute:: rule_finder 
    318318       
    319       An instance of :class:`~Orange.classification.rules.RuleFinder` 
     319      An instance of :class:`~Orange.classification.rules.Finder` 
    320320      that learns a single rule. Default is 
    321       :class:`~Orange.classification.rules.RuleBeamFinder`. 
     321      :class:`~Orange.classification.rules.BeamFinder`. 
    322322 
    323323   .. attribute:: rule_stopping 
    324324       
    325325      An instance of 
    326       :class:`~Orange.classification.rules.RuleStoppingCriteria` that 
     326      :class:`~Orange.classification.rules.StoppingCriteria` that 
    327327      decides whether to use the induced rule or to discard it and stop 
    328328      the induction. If ``None`` (default) all rules are accepted. 
     
    342342------------ 
    343343 
    344 .. class:: Orange.classification.rules.RuleFinder 
     344.. class:: Orange.classification.rules.Finder 
    345345 
    346346   Base class for rule finders, which learn a single rule from 
     
    364364 
    365365 
    366 .. class:: Orange.classification.rules.RuleBeamFinder 
    367     
    368    Bases: :class:`~Orange.classification.rules.RuleFinder` 
     366.. class:: Orange.classification.rules.BeamFinder 
     367    
     368   Bases: :class:`~Orange.classification.rules.Finder` 
    369369    
    370370   Beam search for the best rule. This is the default finder for 
     
    397397    
    398398      An instance of 
    399       :obj:`~Orange.classification.rules.RuleBeamInitializer` that 
     399      :obj:`~Orange.classification.rules.BeamInitializer` that 
    400400      is used to construct the initial list of rules. The default, 
    401       :class:`~Orange.classification.rules.RuleBeamInitializer_Default`, 
     401      :class:`~Orange.classification.rules.BeamInitializer_Default`, 
    402402      returns :obj:`base_rules`, or a rule with no conditions if 
    403403      :obj:`base_rules` is not set. 
     
    406406    
    407407      An instance of 
    408       :class:`~Orange.classification.rules.RuleBeamCandidateSelector` 
     408      :class:`~Orange.classification.rules.BeamCandidateSelector` 
    409409      used to separate a subset of rules from the current 
    410410      :obj:`rules_star` that will be further specialized.  The default 
    411411      component, an instance of 
    412       :class:`~Orange.classification.rules.RuleBeamCandidateSelector_TakeAll`, 
     412      :class:`~Orange.classification.rules.BeamCandidateSelector_TakeAll`, 
    413413      selects all rules. 
    414414     
     
    416416    
    417417      An instance of 
    418       :class:`~Orange.classification.rules.RuleBeamRefiner` that is 
     418      :class:`~Orange.classification.rules.BeamRefiner` that is 
    419419      used for refining the rules. Refined rule should cover a strict 
    420420      subset of instances covered by the given rule. Default component 
    421       (:class:`~Orange.classification.rules.RuleBeamRefiner_Selector`) 
     421      (:class:`~Orange.classification.rules.BeamRefiner_Selector`) 
    422422      adds a conjunctive selector to selectors present in the rule. 
    423423     
     
    425425    
    426426      An instance of 
    427       :class:`~Orange.classification.rules.RuleBeamFilter` that is 
     427      :class:`~Orange.classification.rules.BeamFilter` that is 
    428428      used for filtering rules to trim the search beam. The default 
    429429      component, 
    430       :class:`~Orange.classification.rules.RuleBeamFilter_Width`\ 
     430      :class:`~Orange.classification.rules.BeamFilter_Width`\ 
    431431      *(m=5)*\, keeps the five best rules. 
    432432 
     
    450450--------------- 
    451451 
    452 .. class:: Orange.classification.rules.RuleEvaluator 
     452.. class:: Orange.classification.rules.Evaluator 
    453453 
    454454   Base class for rule evaluators that evaluate the quality of the 
     
    484484   :exclude-members: targetClass, weightID 
    485485    
    486 .. class:: Orange.classification.rules.RuleEvaluator_Entropy 
    487  
    488    Bases: :class:`~Orange.classification.rules.RuleEvaluator` 
     486.. class:: Orange.classification.rules.Evaluator_Entropy 
     487 
     488   Bases: :class:`~Orange.classification.rules.Evaluator` 
    489489     
    490 .. class:: Orange.classification.rules.RuleEvaluator_LRS 
    491  
    492    Bases: :class:`~Orange.classification.rules.RuleEvaluator` 
    493  
    494 .. class:: Orange.classification.rules.RuleEvaluator_Laplace 
    495  
    496    Bases: :class:`~Orange.classification.rules.RuleEvaluator` 
    497  
    498 .. class:: Orange.classification.rules.RuleEvaluator_mEVC 
    499  
    500    Bases: :class:`~Orange.classification.rules.RuleEvaluator` 
     490.. class:: Orange.classification.rules.Evaluator_LRS 
     491 
     492   Bases: :class:`~Orange.classification.rules.Evaluator` 
     493 
     494.. class:: Orange.classification.rules.Evaluator_Laplace 
     495 
     496   Bases: :class:`~Orange.classification.rules.Evaluator` 
     497 
     498.. class:: Orange.classification.rules.Evaluator_mEVC 
     499 
     500   Bases: :class:`~Orange.classification.rules.Evaluator` 
    501501    
    502502Instance covering and removal 
Note: See TracChangeset for help on using the changeset viewer.