Commit 89556ca3d248e46748b10d74632aa21e1e7592aa
1 parent
6a4ba0bf
bootStrap unsigned int
Showing
3 changed files
with
5 additions
and
5 deletions
openbr/openbr_plugin.cpp
| ... | ... | @@ -529,7 +529,7 @@ QList<int> TemplateList::applyIndex(const QString &propName, const QHash<QString |
| 529 | 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 | 534 | TemplateList partitioned = *this; |
| 535 | 535 | if (bootStrap > 0) { | ... | ... |
openbr/openbr_plugin.h
| ... | ... | @@ -459,7 +459,7 @@ struct TemplateList : public QList<Template> |
| 459 | 459 | BR_EXPORT static TemplateList relabel(const TemplateList &tl, const QString &propName, bool preserveIntegers); |
| 460 | 460 | |
| 461 | 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 | 464 | BR_EXPORT QList<int> indexProperty(const QString &propName, QHash<QString, int> * valueMap=NULL,QHash<int, QVariant> * reverseLookup = NULL) const; |
| 465 | 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 | 56 | Q_OBJECT |
| 57 | 57 | Q_PROPERTY(QString description READ get_description WRITE set_description RESET reset_description STORED false) |
| 58 | 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 | 60 | BR_PROPERTY(QString, description, "Identity") |
| 61 | 61 | BR_PROPERTY(QString, inputVariable, "Label") |
| 62 | - BR_PROPERTY(int, bootStrap, 0) | |
| 62 | + BR_PROPERTY(unsigned int, bootStrap, 0) | |
| 63 | 63 | |
| 64 | 64 | // numPartitions copies of transform specified by description. |
| 65 | 65 | QList<br::Transform*> transforms; |
| ... | ... | @@ -74,7 +74,7 @@ class CrossValidateTransform : public MetaTransform |
| 74 | 74 | while (transforms.size() < numPartitions) |
| 75 | 75 | transforms.append(make(description)); |
| 76 | 76 | |
| 77 | - if (numPartitions < 2 && !(bootStrap > 0)) { | |
| 77 | + if (numPartitions < 2 && !bootStrap) { | |
| 78 | 78 | transforms.first()->train(data); |
| 79 | 79 | return; |
| 80 | 80 | } | ... | ... |