当前位置:网站首页>Isam2 operation process
Isam2 operation process
2022-07-06 06:12:00 【Zhan Miao】
1. Algorithm flow
2. update Function running process
- updateDelta: Update delta if we need it to check relinearization later
- update.pushBackFactors: Add any new factors
- For every new factor Generate an index , Put new factor Load nonlinearFactors in
- Remove what needs to be removed factor from nonlinearFactors and linearFactors Remove at the same time , Take from nonlinearFactors Removed from factor move removedFactors
- Remove removed factors from the variable index so we do not attempt to relinearize them
- computeUnusedKeys: Calculation is useless key
Get keys from removed factors and new factors, and compute unused keys, i.e., keys that are empty now and do not appear in the new factors.
- Statistics are associated with removed factors key, If this key Does not exist in member variables variableIndex_ in , Then write it down . Why does it not exist in variableIndex_ in ?
- Statistics of new factor relationships key
- The set obtained in the first step is different from the set obtained in the second step , It's useless key Set , Write it down as unusedKeys
- addVariables: Initialize any new variables
- Put the new variable into the member variable theta_ in , Initialize to 0
- stay detail Mark which variables are new
- update.error: Calculate nonlinear error
- gatherInvolvedKeys: Collect relevant information key
- Collect new factors related to removed factors key
- Collect the factors that need to be re linearized
- Also, keys that were not observed in existing factors, but whose affected keys have been extended now (e.g. smart factors)
- Put these key Back together , As related key, Write it down as markedKeys
- updateKeys:
- Traverse markedKeys
- stay detail Zhongba correlation key Marked as isObserved
- If relevant key There is no in unusedKeys in , That is to say, it is not useless key, Then copy it to the observed key in , Write it down as observedKeys
- Collect variables that need to be re linearized
- gatherRelinearizeKeys: Mark variables whose change is greater than the threshold , Write it down as relinKeys
- stay detail Mark them as isAboveRelinThreshold and isRelinearized
- update.findFluid: Mark cliques that involve marked variables and ancestors.
- From member variable roots_ Recursively find , Its element is a group
- Does the separator contain any of the relinKeys?
- If it is true then add this clique to markedKeys
- stay detail Mark in
- UpdateImpl::ExpmapMasked: Update linearization point for marked variables
- update.linearizeNewFactors: Linearize new factors
- update.augmentVariableIndex:
- Augment the variable index with the new factors
- Augment it with existing factors which now affect to more variables
- Recalculate: Redo top of Bayes tree and update data structures
- removeTop: Remove top of Bayes tree and convert to a factor graph: (a) For each affected variable, remove the corresponding clique and all parents up to the root. (b) Store orphaned sub-trees of removed cliques to variable orphans. about markedKeys Each of them key, If it exists in the member variable nodes_ in , Then the node is removed from the Bayesian tree , Deposit into Bayesian Network affectedBayesNet in , The orphans are placed in orphans in
- Put Bayesian Network affectedBayesNet All in key Deposit in affectedKeys in
- recalculateBatch: Do a batch step - reorder and relinearize all variables
- recalculateIncremental: Incremental updating , For the first time update Just use incremental update
- stay detail Mark the root group variable in
- hold affectedKeysSet Medium key Deposit in deltaReplacedMask_ in
- removeVariables: Remove unused variables , All exist in unusedKeys The variables in are all from delta_, theta_ And other member variables
- update.error: Calculate nonlinear error Do it again
3. recalculateIncremental Function running process
- Add the new factors into the resulting factor graph
- hold affectedKeys and observedKeys Load affectedAndNewKeys in
- relinearizeAffectedFactors: according to affectedAndNewKeys Yes nonlinearFactors_ Re linearize the corresponding factor in , Returns the linearized linear factor , Deposit in factors in
- detail The corresponding variable in is marked isReeliminated
- GetCachedBoundaryFactors: Add the cached intermediate results from the boundary of the orphans, Deposit in factors in
- Add the orphaned subtrees Why add it twice ?
- hold markedKeys Medium key and affectedKeys Medium key Put in affectedKeysSet in
- Use factor graph factors initialization VariableIndex Type variable affectedFactorsVarIndex
- Re-order and eliminate the factor graph into a Bayes net (Algorithm [alg:eliminate]), and re-assemble into a new Bayes tree (Algorithm [alg:BayesTree])
- create a partial reordering for the new and contaminated factors result->markedKeys are passed in: those variables will be forced to the end in the ordering, Create ordering constraints,constraintGroups namely updateParams.constrainedKeys
- Remove unaffected keys from the constraints, If a key Exist in unusedKeys in , That is, it is not used , Or it doesn't exist affectedKeysSet in , That is, it is not affected , Then take it from constraintGroups Delete in , That is, do not participate in reordering
- Ordering::ColamdConstrained Yes affectedFactorsVarIndex basis constraintGroups Reorder
- Do elimination
- Construct Gaussian elimination GaussianEliminationTree
- Build a union tree ISAM2JunctionTree
- Union tree elimination , Call the corresponding elimination function according to the parameters , Bayes tree and residual factor graph are obtained by elimination
- Put the root of Bayesian tree into member variable roots_ in , Put the node into the member variable nodes_ in
4. EliminatableClusterTree::eliminate Function running process
- structure EliminationData::EliminationPostOrderVisitor class , This constructor is also relatively simple , Is to initialize member variables with formal parameters
- function treeTraversal::DepthFirstForest function , Depth first search
- This function does not change the first argument passed *this Any content of
- use EliminatableClusterTree All root group structures of TraversalNode object , And put them on the stack in turn , these TraversalNode The parent nodes of objects are EliminationData
- Constantly take elements from the top of the stack , Until the stack is empty
- Collect all the root nodes , Put in result->roots_ in
- Put all the remaining Gather up
- The two make up pair, return
5. recalculateBatch Function running process
6. marginalizeLeaves Function running process
This function is not well written , A function has too many lines ;
Functions first define variables , Initialize variable , Define a lambda Expressions and other simple work , Then start the formal work
- Definition trackingRemoveSubtree, This is a lambda expression , For later use
- Input as root group subtreeRoot, Output as removed clique removedCliques
- call BayesTree::removeSubtree Function subtreeRoot And their descendants from nodes_ Remove
- Yes leafKeys Each of them key, If it already exists in leafKeysRemoved It's in , Indicates that it has been processed , Then skip , They haven't been dealt with , Before proceeding to the next step
- adopt nodes_ To find the key Corresponding clique
- Keep looking clique Parent node ( There are relatively difficult judgment conditions ) And assign the parent node to clique, This judgment condition needs to be further understood , Why only use the first in the Group key To judge
- If clique Of frontals() All in leafKeys in , Then it is marked as deleting the whole group
- If it is marked to delete the whole group , Call trackingRemoveSubtree Delete cliquee And their descendants , And store the marginalization factor into marginalFactors in
- If it is not marked to delete the whole group , To be added
- At this point we have updated the BayesTree, now update the remaining iSAM2 data structures
- Put the factors generated by marginalization into nonlinearFactors_,linearFactors_ and variableIndex_ in
- variableIndex_,delta_,nodes_,theta_ Delete useless variables
边栏推荐
- Software test interview questions - Test Type
- Accélération de la lecture vidéo de l'entreprise
- LAN communication process in the same network segment
- The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
- Thoughts on data security (Reprint)
- ICLR 2022 spotlight | analog transformer: time series anomaly detection method based on correlation difference
- 职场进阶指南:大厂人必看书籍推荐
- isam2运行流程
- [postman] test script writing and assertion details
- Buuctf-[bjdctf2020]zjctf, but so (xiaoyute detailed explanation)
猜你喜欢
全程实现单点登录功能和请求被取消报错“cancelToken“ of undefined的解决方法
CoordinatorLayout+NestedScrollView+RecyclerView 上拉底部显示不全
ICLR 2022 spotlight | analog transformer: time series anomaly detection method based on correlation difference
Gtest之TEST宏的用法
P问题、NP问题、NPC问题、NP-hard问题详解
[postman] test script writing and assertion details
[API interface tool] Introduction to postman interface
使用Nacos管理配置
数据库-当前读与快照读
Arrays and collections
随机推荐
Manhattan distance and Manhattan rectangle - print back font matrix
MPLS test report
【Postman】Collections-运行配置之导入数据文件
(中)苹果有开源,但又怎样呢?
黑猫带你学UFS协议第18篇:UFS如何配置逻辑单元(LU Management)
一文揭开,测试外包公司的真 相
数据库-当前读与快照读
【Postman】测试(Tests)脚本编写和断言详解
通过修改style设置打印页样式
Hypothesis testing learning notes
误差的基本知识
Interface test: what are the components of the URL in fiddler
Sqlmap tutorial (III) practical skills II
H3C V7 switch configuration IRF
(5) Explanation of yolo-v3 core source code (3)
Coordinatorlayout+nestedscrollview+recyclerview pull up the bottom display is incomplete
LeetCode 731. 我的日程安排表 II
Reading notes of effective managers
Buuctf-[bjdctf2020]zjctf, but so (xiaoyute detailed explanation)
[wechat applet] build a development tool environment