Doors, creating link from one baseline to another baseline - ibm-doors

I am using Doors 9.6.1 and DXL scripting.
Consider Module A and Module B, I would like to link objects in a baseline of Module A to a baseline of Module B.
I tried the following, consider this Scenario 1:
Baseline 1.0 of Module B is generated, and links are created from actual Module A to Baseline 1.0 of Module B, the outgoing links from actual Module A link to Baseline 1.0 of Module B and the outgoing links from Baseline 1.0 of Module B link to actual Module A.
I generate Baseline 1.0 of Module A, and the links remain the same, in the actual module I delete the objects, but then links from Baseline 1.0 of Module B are broken because they point to links in actual Module A, I was hoping that when generating Baseline 1.0 of Module A, the incoming links would be updated to link to the objects in Baseline 1.0 of Module A, rather than to the objects in actual Module A.
I also tried the following, consider this Scenario 2:
I generate Baseline 1.0 of Module A and Baseline 1.0 of Module B attempting to create the links afterwards, but it is not possible in Doors to create links between baselines.
Hopefully I managed to explain it properly, if something is not clear please let me know.
My question comes down to this, is it possible in Doors to generate a bidirectional link between Baseline 1.0 of Module A and Baseline 1.0 of Module B? And in that case, how is it possible to achieve this?

First of all, you should not work with bidirectional links in Doors. A typical scenario is that one Module contains high level requirements (let's say "SYS" for system requirements), this module is completed and baselined. Later, a module with low level requirements (let's say "HR" for hardware requirements) is created, each requirements in HR corresponds to a requirement in SYS, the relation might be called "refines". This module will probably be baselined much later.
If you have two modules A and B and both are developed at the same time and both link to one another, you might get problems later, e.g. when you want to create a valid requirements report, a dependency or coverage report.
Having said that and if you still want to go on with your approach, I think your solution is "Baseline Sets".
Project --> Properties --> Baseline Set Definitions
Create a new Baseline Set Definition (BSD) with a name that corresponds to why the modules belong together
In the new BSD there's an Edit Button where you add the modules that belong together (A and B in your example)
Now for the BSD, create a Baseline Set (BS). A BS consists of several baselines, 0 or 1 baselines for each module contained in the BSD. For the BS, define whether the contained Baselines shall have a new major or minor number and define a suffix. The BS will have a number and a suffix, the Baselines will also have the suffix and the next free major/minor number for their respective modules.
For the new BS, navigate to "Baselines", you will see all modules of the BSD and you will see for which module a Baseline has been created that corresponds to this specific BS
with "Add to Set" a new Baseline is created for the module(s) you choose
when Baselines have been created for all modules defined in the BSD (or when you choose not to include a module for a specific BS and press BS --> Close), you will see that the links in the baselines of the BS point to one another.

Related

How to determine which base to use when building a nuro_image?

As stated in the title, when I add a new push_image, how do I determine how to specify the base in BUILD file for the nuro_image target? I've seen several different ones in the code base such as
base = "//learning/utils:tf_base_image",
and
base = "#nuro_image//image",
what are the differences?
This depends on what dependencies does the binary/image need. If a binary needs Tensorflow as dependency then you want to use the tf_base_image.
The idea is similar to lowest common ancestor.
Imagine we are building binary A into an image. Say A has two dependencies B and C, and both B and C depends on Tensorflow.
If A uses tf_base_image, then when we build B and C, the dependent Tensorflow library is already included and can be reused. But if we A uses #nuro_image//image, then both B and C needs to fetch Tensorflow, thus we end up including the same library twice. As a result, the build becomes slower and we get a larger image.
For better understanding, the definition of tf_base_image is here:
https://gitent.corp.nuro.team/Nuro-ai/Nuro/blob/develop/learning/utils/BUILD#L84-L98

Transfer Learning completely different domain and task

I've been reading some papers and blog posts on Transfer Learning. What I realized is that some say "different" and others say "different but similar". Now, I'm confused.
Say that,
D is domain. T is task.
a is source, hence source domain is Da and source task is Ta.
a' is different but similar to a.
b is different from a.
Ms is the source model learned from Da and Ta.
Mt is the target model.
In which target domain-task combination, Ms can transfer its knowledge to Mt?
1. (Da, Tb)
2. (Db, Ta)
3. (Da', Tb)
4. (Db, Ta')
5. (Da', Ta)
6. (Da, Ta')
7. (Da', Ta')
8. (Db, Tb)
Honestly, I know 5, 6, 7 are possible since the paper said so. And I doubt 8 will work (won't it?).
But what about 1, 2, 3, 4 where either domain or task is b?
It depends how different the source and target domains are. If the source and target domains have no similarities then you can’t improve your model for a task in the target domain by pre-training on the task domain. However if there are similarities e.g. any image domain to almost any other image domain, and your source domain dataset is large, transferring your model from the source domain to the target domain is likely to help regularise your model and improve generalisation in the target domain. Especially if the target domain dataset is small.
In deep learning you want to reinitialise (retrain from random weights) more layers (from the top down) and do more fine tuning depending on how different your source and target domains and source and target tasks are.
What's a "domain"?
In the field of natural language processing (NLP) there's a lot of research for domain adaptation, and you can get some benefit in all the cases (#1-#8) you describe regarding for what NLP would call "different domains" - e.g. newswire text vs tweet text vs clinical radiology report text; yes, even in #8.
However, you can have more different "domains" (which wouldn't be really called domains IMHO) - for example, english text vs chinese text; or english text vs english audio recordings. It is possible do do some transfer learning even in those cases, but much more limited; so it really depends on where you draw the line between "that's a different domain" vs "that's a completely different type of input data".

How to encode dependency path as a feature for classification?

I am trying to implement relation extraction between verb pairs. I want to use dependency path from one verb to the other as a feature for my classifier (predicts if relation X exists or not). But I am not sure how to encode the dependency path as a feature. Following are some example dependency paths, as space separated relation annotations from StanfordCoreNLP Collapsed Dependencies:
nsubj acl nmod:from acl nmod:by conj:and
nsubj nmod:into
nsubj acl:relcl advmod nmod:of
It is important to keep in mind that these path are of variable length and a relation could reappear without any restriction.
Two compromising ways of encoding this feature that come to my mind are:
1) Ignore the sequence, and just have one feature for each relation with its value being the number of times it appears in the path
2) Have a sliding window of length n, and have one feature for each possible pair of relations with the value being the number of times those two relations appeared consecutively. I suppose this is how one encodes n-grams. However, the number of possible relations is 50, which means I cannot really go with this approach.
Any suggestions are welcomed.
We had a project that built a classifier based off of dependency paths. I asked the group member who developed the system, and he said:
indicator feature for the whole path
So if you have the training data point (verb1 -e1-> w1 -e2-> w2 -e3-> w3 -e4-> verb2, relation1) the feature would be (e1-e2-e3-e4)
And he also did ngram sequences, so for that same data point, you would also have (e1), (e2), (e3), (e4), (e1-e2), (e2-e3), (e3-e4), (e1-e2-e3), (e2-e3-e4)
He also recommended collapsing appositive edges to make the paths smaller.
Also, I should note that he developed a set of high precision rules for each relation, and used this to create a large set of training data.

How to tag text based on its category using OpenNLP?

I want to tag text based on the category it belongs to ...
For example ...
"Clutch and gear is monitored using microchip " -> clutch /mechanical , gear/mechanical , microchip / electronic
"software used here to monitor hydrogen levels" -> software/computer , hydrogen / chemistry ..
How to do this using openNLP or other NLP engines.
MY WORKS
I tried NER model , but It needs large number of training corpus which I don't have ?
My Need
Do any ready made training corpus available for NER or classification (it must contains scientific and engineering words).. ?
If you want to create a set of class labels for an entire sentence, then you will want to use the Doccat lib. With Doccat you would get a prob distribution for each chunk of text.
with doccat your sample would produce something like this:
"Clutch and gear is monitored using microchip " -> mechanical 0.85847568, electronic 0.374658
with doocat you will lose the keyword->classlabel mapping, so if you really need it doccat might not cut it.
as for NER, OpenNLP has an addon called Modelbuilder-addon that may help you. It is designed to expedite the creation of NER model building. You can create a file/list of as many of the terms for each category as you can think of, then create a file of a bunch of sentences, then use the addon to create an NER model using the seed terms and the file of sentences. see this post where I described it before with code example. You will have to pull down the addon from SVN.
OpenNLP: foreign names does not get recognized

F# - Organisation of algorithms in a file

I do not find a good way to organize various algorithms. Today the file is like this :
1/ Extraction of values from Excel
2/ First algorithm based on these values (extracted from Excel) starting with
"let matriceAlgo1 ="
3/ Second algorithm starting from the same values
"let matriceAlgo2 ="
4/ Synthesis algorithm, doing a weighted average (depending on several values) of the 2/ and 3/ and selecting the result to be shown.
"let matriceSynthesis ="
My question is the following : what should i put before the different parts of this file in order to just call them by there name ? I have seen answers explaining that Module could be an answer but I don't know how to apply it in my case (or anything else if it's not the good answer).At the end, I would like to be able to write something like this :
"launch Extraction
launch First Algorithm
launch Second Algorithm
Launch Synthesis"
The way I usually organize files is to have some clear visual separator between different sections of a file (see for example Crawler.fsx on GitHub) and then have one "main" section at the end that calls functions declared previously.
I don't really use modules unless I have a large number of functions with clashing names. It would be good idea to use modules if your algorithm consists of more functions (e.g. Alg1.initialize, Alg1.run, etc.). Then you could easily switch between using different algorithms using module alias:
module Alg = Alg1 // or Alg2
let a = Alg.initialize
Alg.run a
If the file is getting longer, then you could also move sections to separate files and use #load "File.fs" to load algorithms or functions from a file. In that case, you probably need to use modules, but you can always open the module after loading the file.

Resources