-
Resolved conflicts: app/br/br.cpp openbr/core/bee.cpp openbr/plugins/output.cpp
-
resolved conflicts: app/br/br.cpp openbr/core/bee.cpp openbr/core/classify.cpp openbr/core/cluster.cpp openbr/core/eval.h openbr/openbr.cpp openbr/openbr.h openbr/plugins/algorithms.cpp openbr/plugins/independent.cpp openbr/plugins/output.cpp openbr/plugins/svm.cpp
-
Common::seedRNG uses a static variable to ensure that the RNG is seeded exactly once per run of OpenBR. In spite of this, seedRNG was called from several places, although the function would have an effect exactly once. This commit adds thread safety to seedRNG (previously the use of a static variable was unsafe, although it could only cause a rather minor problem). More importantly call seedRNG only from Context::initialize. If it is desirable to call seedRNG more than once, changes will need to be made to support doing that in a meaningful way.
-
Remove variables related to subsampling training data from Transform, move them to a new transform called DownsampleTraining, and perform subsampling in that transform, rather than as part of IndependentTransform (which depended on the subsampling variables in Transform). The prior approach was incompatible with using explicit class variable names, rather than assuming a fixed label variable. This is because the actual downsampling was carried out as part of IndependentTransform, which is not a visible part of the algorithm grammar. Removing this logic from Independent/Transform is generally desirable if only to avoid cluttering Transform with member variables that are only used some of the time, and used in a (fairly) restrictive way. The current approach of makring DownsampleTraining as an indepent transform is still limited since the downsample logic (still) cannot be applied without the split used in Independent, and also DownsampleTraining can only be implemented as a wrapper for another transform (because the argument to train is const, and performing the donwsample logic in project would also impact the testing case (since we have no way to exclude a transform used in training from use in testing, for a fixed algorithm)).
-
Replace direct use of "Label" by most supervised learning algorithms with inputVariable br properties (default value "Label")
-
Change default label name from Subjet to Label (since label is a more general term). Use different default variable names for classification (label), regression (regressor/regressand), and clustering (ClusterID) Update some (far from all) transforms to accept arguments specifying their input/output variables. Update eval classification to optionally take target variable names as arguments
-
These names mirroring File functionality. Fixed SVMDistance dropped unnecessary second relabel in LDATransform::train
-
Remove global label/subject lookup table Consistently use "Subject" rather than "Label", subject is assumed to be convertable to QString. When desirable, map discrete subject values to ints. For classifiers such as svm that require numeric labels, generate a string->int mapping for the training data, and store it (local to the transform). Utility functions for collecting all values of a given property (on a template list), and mapping discrete property values to 0-based integers Some outstanding issues include use of label/subject in matrix output
-
Remove subject/label methods from the API, replace some methods with general methods taking a property name as an argument. This breaks quite a few things