Commit 89556ca3d248e46748b10d74632aa21e1e7592aa

Authored by bhklein
1 parent 6a4ba0bf

bootStrap unsigned int

openbr/openbr_plugin.cpp
@@ -529,7 +529,7 @@ QList<int> TemplateList::applyIndex(const QString &propName, const QHash<QString @@ -529,7 +529,7 @@ QList<int> TemplateList::applyIndex(const QString &propName, const QHash<QString
529 return result; 529 return result;
530 } 530 }
531 531
532 -TemplateList TemplateList::partition(const QString &inputVariable, int bootStrap) const 532 +TemplateList TemplateList::partition(const QString &inputVariable, unsigned int bootStrap) const
533 { 533 {
534 TemplateList partitioned = *this; 534 TemplateList partitioned = *this;
535 if (bootStrap > 0) { 535 if (bootStrap > 0) {
openbr/openbr_plugin.h
@@ -459,7 +459,7 @@ struct TemplateList : public QList<Template> @@ -459,7 +459,7 @@ struct TemplateList : public QList<Template>
459 BR_EXPORT static TemplateList relabel(const TemplateList &tl, const QString &propName, bool preserveIntegers); 459 BR_EXPORT static TemplateList relabel(const TemplateList &tl, const QString &propName, bool preserveIntegers);
460 460
461 /*!< \brief Assign templates to folds partitions. */ 461 /*!< \brief Assign templates to folds partitions. */
462 - BR_EXPORT TemplateList partition(const QString &inputVariable, int bootStrap = 0) const; 462 + BR_EXPORT TemplateList partition(const QString &inputVariable, unsigned int bootStrap = 0) const;
463 463
464 BR_EXPORT QList<int> indexProperty(const QString &propName, QHash<QString, int> * valueMap=NULL,QHash<int, QVariant> * reverseLookup = NULL) const; 464 BR_EXPORT QList<int> indexProperty(const QString &propName, QHash<QString, int> * valueMap=NULL,QHash<int, QVariant> * reverseLookup = NULL) const;
465 BR_EXPORT QList<int> indexProperty(const QString &propName, QHash<QString, int> &valueMap, QHash<int, QVariant> &reverseLookup) const; 465 BR_EXPORT QList<int> indexProperty(const QString &propName, QHash<QString, int> &valueMap, QHash<int, QVariant> &reverseLookup) const;
openbr/plugins/core/crossvalidate.cpp
@@ -56,10 +56,10 @@ class CrossValidateTransform : public MetaTransform @@ -56,10 +56,10 @@ class CrossValidateTransform : public MetaTransform
56 Q_OBJECT 56 Q_OBJECT
57 Q_PROPERTY(QString description READ get_description WRITE set_description RESET reset_description STORED false) 57 Q_PROPERTY(QString description READ get_description WRITE set_description RESET reset_description STORED false)
58 Q_PROPERTY(QString inputVariable READ get_inputVariable WRITE set_inputVariable RESET reset_inputVariable STORED false) 58 Q_PROPERTY(QString inputVariable READ get_inputVariable WRITE set_inputVariable RESET reset_inputVariable STORED false)
59 - Q_PROPERTY(int bootStrap READ get_bootStrap WRITE set_bootStrap RESET reset_bootStrap STORED false) 59 + Q_PROPERTY(unsigned int bootStrap READ get_bootStrap WRITE set_bootStrap RESET reset_bootStrap STORED false)
60 BR_PROPERTY(QString, description, "Identity") 60 BR_PROPERTY(QString, description, "Identity")
61 BR_PROPERTY(QString, inputVariable, "Label") 61 BR_PROPERTY(QString, inputVariable, "Label")
62 - BR_PROPERTY(int, bootStrap, 0) 62 + BR_PROPERTY(unsigned int, bootStrap, 0)
63 63
64 // numPartitions copies of transform specified by description. 64 // numPartitions copies of transform specified by description.
65 QList<br::Transform*> transforms; 65 QList<br::Transform*> transforms;
@@ -74,7 +74,7 @@ class CrossValidateTransform : public MetaTransform @@ -74,7 +74,7 @@ class CrossValidateTransform : public MetaTransform
74 while (transforms.size() < numPartitions) 74 while (transforms.size() < numPartitions)
75 transforms.append(make(description)); 75 transforms.append(make(description));
76 76
77 - if (numPartitions < 2 && !(bootStrap > 0)) { 77 + if (numPartitions < 2 && !bootStrap) {
78 transforms.first()->train(data); 78 transforms.first()->train(data);
79 return; 79 return;
80 } 80 }