Commits

Miran Levar  committed e81b129

Additional fixes and source modifications

  • Participants
  • Parent commits afe97c0

Comments (0)

Files changed (6)

File Orange/testing/unit/tests/test_display_name_mapping.py

         for cls in orange.__dict__.values():
             if type(cls) == type:
                 if cls.__module__ in exempt:
-                    pass
+                    continue
                 try:
                     cls2 = eval(cls.__module__ + "." + cls.__name__)
                 except AttributeError as err:

File source/orange/lib_kernel.cpp

   PyCATCH
 }
 
-/* ************ MULTI-TARGET LEARNER AND CLASSIFIER ************ */
+/* ************ MULTI LEARNER AND CLASSIFIER ************ */
 
 #include "multi_classifier.hpp"
 #include "multi_learner.hpp"
 
-ABSTRACT(MultiLearner - Orange.classification.MultiLearner, Orange)
-
+ABSTRACT(MultiLearner - Orange.core.MultiLearner, Orange)
 PyObject *MultiLearner_call(PyObject *self, PyObject *targs, PyObject *keywords) PYDOC("(examples) -> Classifier")
 {
   PyTRY
   PyCATCH
 }
 
-/* ************ MULTI LEARNER and MULTI CLASSIFIER ************ */
-
-ABSTRACT(MultiClassifier - Orange.classification.MultiClassifier, Orange)
+ABSTRACT(MultiClassifier - Orange.core.MultiClassifier, Orange)
 
 PyObject *MultiClassifier_call(PyObject *self, PyObject *args, PyObject *keywords) PYDOC("(example[, format]) -> Value | distribution | (Value, distribution)")
 { PyTRY

File source/orange/multi_classifier.cpp

 
 #include "multi_classifier.ppp"
 
-DEFINE_TOrangeVector_classDescription(PClassifier, "TClassifierList", true, ORANGE_API)
+DEFINE_TOrangeVector_classDescription(PMultiClassifier, "TMultiClassifierList", true, ORANGE_API)
 
-/* ***** TClassifier methods */
+/* ***** TMultiClassifier methods */
 
 TMultiClassifier::TMultiClassifier(const PVarList &acv, const bool &cp) :
 		classVars(acv), computesProbabilities(cp) {
 				old.computesProbabilities) {
 }
 ;
-//TODO: ask janez how this is supposed to work, it seems like a deadlock to me
+
 PValueList TMultiClassifier::operator ()(const TExample &exam) {
 	if (!computesProbabilities)
 		raiseError("invalid setting of 'computesProbabilities'");

File source/orange/multi_classifier.hpp

 WRAPPER(MultiClassifier)
 WRAPPER(EFMDataDescription);
 
-//TODO: decide what to do with this
-//#define TMultiClassifierList TOrangeVector<PMultiClassifier> 
-//VWRAPPER(MultiClassifierList)
+#define TMultiClassifierList TOrangeVector<PMultiClassifier> 
+VWRAPPER(MultiClassifierList)
 
 /* Classifiers have three methods for classification.
  - operator() returns TValue
 class ORANGE_API TMultiClassifier: public TOrange {
 public:
 	__REGISTER_CLASS
-	//__REGISTER_ABSTRACT_CLASS TODO:??
 
 	PVarList classVars; //P class variables
 	PDomain domain; //P domain

File source/orange/multi_learner.hpp

 class ORANGE_API TMultiLearner : public TOrange {
 public:
 	__REGISTER_CLASS
-	//__REGISTER_ABSTRACT_CLASS TODO:???
-
 
 	enum {NeedsNothing, NeedsClassDistribution, NeedsDomainDistribution, NeedsDomainContingency, NeedsExampleGenerator};
 	int needs; //PR the kind of data that learner needs
 
 	virtual PMultiClassifier operator()(PVarList);
 	virtual PMultiClassifier operator()(PDistributionList);
-	virtual PMultiClassifier operator()(PDomainDistributions); //TODO: remove form header
+	virtual PMultiClassifier operator()(PDomainDistributions);
 	virtual PMultiClassifier operator()(PDomainContingency);
 	virtual PMultiClassifier operator()(PExampleGenerator, const int &weight = 0);
 

File source/orange/tdidt_clustering.cpp

 	for (i = 0; i < attr_vals; ++i) {
 		for (j = 0; j < n_classes; ++j) {
 			if (n_ptypes[i][j] == 0.0)
-				ptypes[i][j] = INFINITY; //TODO: right?
+				ptypes[i][j] = INFINITY;
 			else
 				ptypes[i][j] = ptypes[i][j] / n_ptypes[i][j];
 		}
 	for(int i = 0; i < ogen->domain->classVars->size(); i++){
 		if((args.type == Classification && ogen->domain->classVars->at(i)->varType != TValue::INTVAR) ||
 			(args.type == Regression && ogen->domain->classVars->at(i)->varType == TValue::INTVAR))
-			raiseError("all classes must be of the same type"); //TODO: correct? ask someone
+			raiseError("all classes must be of the same type"); //TODO: temporary?
 	}
 
 	ASSERT(cls_vals = (int *) calloc(ogen->domain->classVars->size(), sizeof(int)));