Commit 2089474d authored by mzed's avatar mzed
Browse files

keeping track of series lengths

parent 3356e62f
......@@ -254,7 +254,7 @@ int main(int argc, const char * argv[]) {
*/
//Long dtw test
int testSize = 8;
int testSize = 800;
seriesVector.clear();
std::vector<std::vector<double> > inputSeries;
tempSeries.input.clear();
......
......@@ -19,8 +19,19 @@ bool seriesClassification::train(const std::vector<trainingSeries> &seriesSet) {
reset();
bool trained = true;
allTrainingSeries = seriesSet;
minLength = maxLength = int(allTrainingSeries[0].input.size());
for (int i = 0; i < allTrainingSeries.size(); ++i) {
if (allTrainingSeries[i].input.size() < minLength) {
minLength = int(allTrainingSeries[i].input.size());
}
if (allTrainingSeries[i].input.size() > maxLength) {
maxLength = int(allTrainingSeries[i].input.size());
}
}
//TODO: calculate some size statistics here?
//min length per label
//max length per label
return trained;
};
......
......@@ -29,6 +29,8 @@ private:
std::vector<trainingSeries> allTrainingSeries;
std::vector<double> allCosts;
int maxLength;
int minLength;
};
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment