Trainer.hpp
Go to the documentation of this file.
1 
18 #pragma once
19 
20 #include <string>
21 #include <sstream>
22 #include <vector>
23 #include <boost/shared_ptr.hpp>
25 #include "common_type/Object.hpp"
26 #include "utility/TableHelper.hpp"
27 #include "common_type/Pose.hpp"
28 #include "Heuristic.hpp"
30 
31 namespace ISM {
32 
36  class Trainer {
40  int skips;
44  std::vector<std::pair<std::vector<ManuallyDefPseudoHeuristic::ClusterObject>, uint16_t>>
46  std::map<std::string, std::string> mPatternToTypesOfPredefinedRefs;
47 
48  public:
49 
50  //Some parameters for heuristics used here
52 
53  void setClusterForManualDefHeuristic(std::vector<std::pair<std::vector<ManuallyDefPseudoHeuristic::ClusterObject>,
54  uint16_t>>);
55  void setPredefinedRefs(std::map<std::string, std::string>& refs);
56 
62  Trainer(std::string dbfilename = "record.sqlite", bool dropOldModelTables = false);
63 
67  void trainPattern();
68  void trainPattern(const std::string& patternName);
69  void setSkipsPerCycle(const int skips);
70 
76  void setUseClustering(const bool useClustering);
77 
78  private:
79  void learn();
81  TrackPtr doTraining(const std::vector<ObjectSetPtr> sets, std::string patternName);
82  };
83  typedef boost::shared_ptr<Trainer> TrainerPtr;
84 }
double maxAngleDeviation
Definition: Trainer.hpp:51
std::map< std::string, std::string > mPatternToTypesOfPredefinedRefs
Definition: Trainer.hpp:46
void setPredefinedRefs(std::map< std::string, std::string > &refs)
Definition: Trainer.cpp:131
Trainer(std::string dbfilename="record.sqlite", bool dropOldModelTables=false)
Definition: Trainer.cpp:37
void setUseClustering(const bool useClustering)
Definition: Trainer.cpp:56
boost::shared_ptr< Point > PointPtr
Definition: Point.hpp:45
bool mUsePredefinedRefs
Definition: Trainer.hpp:43
boost::shared_ptr< Heuristic > HeuristicPtr
Definition: Heuristic.hpp:44
boost::shared_ptr< Trainer > TrainerPtr
Definition: Trainer.hpp:83
std::string patternName
boost::shared_ptr< RecordedPattern > RecordedPatternPtr
void trainPattern()
Definition: Trainer.cpp:60
boost::shared_ptr< TableHelper > TableHelperPtr
TableHelperPtr tableHelper
Definition: Trainer.hpp:37
HeuristicPtr findHeuristicMatch(const TracksPtr &tracks)
Definition: Trainer.cpp:136
double togetherRatio
Definition: Trainer.hpp:51
bool useClustering
Definition: Trainer.hpp:41
std::vector< std::pair< std::vector< ManuallyDefPseudoHeuristic::ClusterObject >, uint16_t > > mClusterForManualDefHeuristic
Definition: Trainer.hpp:45
bool mUseManualDefHeuristic
Definition: Trainer.hpp:42
double staticBreakRatio
Definition: Trainer.hpp:51
boost::shared_ptr< Tracks > TracksPtr
Definition: Tracks.hpp:42
PointPtr absoluteReferencePoint
Definition: Trainer.hpp:39
void setClusterForManualDefHeuristic(std::vector< std::pair< std::vector< ManuallyDefPseudoHeuristic::ClusterObject >, uint16_t >>)
Definition: Trainer.cpp:125
RecordedPatternPtr recordedPattern
Definition: Trainer.hpp:38
TrackPtr doTraining(const std::vector< ObjectSetPtr > sets, std::string patternName)
Definition: Trainer.cpp:163
void setSkipsPerCycle(const int skips)
Definition: Trainer.cpp:52
boost::shared_ptr< Track > TrackPtr
Definition: Track.hpp:55
this namespace contains all generally usable classes.
void learn()
Definition: Trainer.cpp:79


asr_lib_ism
Author(s): Hanselmann Fabian, Heller Florian, Heizmann Heinrich, Kübler Marcel, Mehlhaus Jonas, Meißner Pascal, Qattan Mohamad, Reckling Reno, Stroh Daniel
autogenerated on Wed Jan 8 2020 04:02:41