Changeset 5030:3d0aac3f2e82 in orange


Ignore:
Timestamp:
07/30/08 12:57:51 (6 years ago)
Author:
janezd <janez.demsar@…>
Branch:
default
Convert:
4f915303ca1f012fecf9918eef9c712b8f8b7aa3
Message:
  • sparse inducer can now work on continuous attributes; zero's are treated the same as unknowns (but only on ordinary attributes; for meta attributes we only check presence/absence)
Location:
source/orange
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • source/orange/assoc_sparse.cpp

    r5004 r5030  
    3838      // walk through all attributes in example and adding to sparseExample only those having some value 
    3939      PITERATE(TVarList, vi, example->domain->variables) 
    40           if (!(*example)[(*vi)].isSpecial()) 
     40          if (   !(*example)[*vi].isSpecial()  
     41              && (((*vi)->varType != TValue::FLOATVAR) || (*example)[*vi].floatV > 1e-6)) 
    4142              length++; 
    4243 
     
    4546 
    4647      PITERATE(TVarList, vi2, example->domain->variables) 
    47           if (!(*example)[(*vi2)].isSpecial()) 
     48          if (   !(*example)[*vi2].isSpecial()  
     49              && (((*vi2)->varType != TValue::FLOATVAR) || (*example)[*vi2].floatV > 1e-6)) 
    4850              itemset[length++] = example->domain->getVarNum(*vi2); 
    4951  } 
  • source/orange/lib_learner.cpp

    r5003 r5030  
    217217    if (!egen) 
    218218      return PYNULL; 
    219  
    220     if (egen->domain->hasContinuousAttributes(true)) 
    221       PYERROR(PyExc_TypeError, "cannot induce rules with non-discrete attributes", NULL); 
    222219 
    223220    CAST_TO(TAssociationRulesSparseInducer, inducer); 
Note: See TracChangeset for help on using the changeset viewer.