Menu

#666 Create a cutoff matop function

v1.1.x
closed
v1.1.4
New Functionality
2022-09-17
2022-02-14
Erik Hänel
No

Create a new matop function named cutoff(MAT,THRESH,MODE) , which will set all points above (MODE=0) or below (MODE=1) the THRESH to THRESH. This function may either accept percentage or absolute values as THRESH. However, using absolute values will also enable the usage of a percentile instead of a percentage.

Analysis:

We will use the following conventions:

  • MODE=1 will use a percentage value above
  • MODE=2 will use an absolute value above
  • MODE=-1 will use a percentage value below
  • MODE=-2 will use an absolute value below
  • MODE=0 will use the percentage value to extract the central x% of the values

Implementation:

  • Implementation: Implemented the new matop method as described above. Needed a new string parser and a corresponding datatype.
  • Revision: [r1209]
  • Implementation test: Manually tested various matrices with max 4x4 dimensions and multiple modes.

Documentation:

  • [x] ChangesLog updated
  • [x] Code changes commented
  • Documentation articles:
    • [x] corresponding documentation articles updated
    • [ ] new documentation articles created
    • [ ] not needed
  • Language files:
    • [x] corresponding language files updated
    • [ ] not needed

Tests:

Functionality was added to the automatic SW tests. Occured deviation (modes 1 and -1 were mixed up) was resolved in [r1216].

Related

Commit: [r1209]
Commit: [r1216]

Discussion

  • Raphael Zehner

    Raphael Zehner - 2022-06-27
    • assigned_to: Erik Hänel --> Raphael Zehner
     
  • Erik Hänel

    Erik Hänel - 2022-06-27
    • labels: --> matrix, function
    • status: open --> accepted
    • assigned_to: Raphael Zehner --> Erik Hänel
    • Version: Planned --> v1.1.4
     
  • Erik Hänel

    Erik Hänel - 2022-06-27
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1 +1,23 @@
     Create a new `matop` function named `cutoff(MAT,THRESH,MODE)` , which will set all points above (`MODE=0`) or below (`MODE=1`) the `THRESH` to `THRESH`. This function may either accept percentage or absolute values as `THRESH`. However, using absolute values will also enable the usage of a percentile instead of a percentage.
    +
    +###Analysis:
    +(*Describe, what's the issue and which changes have to be made*)
    +
    +###Implementation:
    +* Implementation: (*Describe, what you've changed*) 
    +* Revision: [rXXX]
    +* Implementation test: (*Describe the type of test, which you performed, and if it was successful*)
    +
    +###Documentation:
    +* [ ] ChangesLog updated
    +* [ ] Code changes commented
    +* **Documentation articles:**
    
    +    * [ ] corresponding documentation articles updated
    +    * [ ] new documentation articles created
    +    * [ ] not needed
    +* **Language files:**
    +    * [ ] corresponding language files updated
    +    * [ ] not needed
    +
    +###Tests:
    +(*Describe, which tests you performed and their outcome*)
    
    • status: accepted --> analyzing
    • assigned_to: Erik Hänel --> Raphael Zehner
     
  • Erik Hänel

    Erik Hänel - 2022-06-27
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,7 +1,13 @@
     Create a new `matop` function named `cutoff(MAT,THRESH,MODE)` , which will set all points above (`MODE=0`) or below (`MODE=1`) the `THRESH` to `THRESH`. This function may either accept percentage or absolute values as `THRESH`. However, using absolute values will also enable the usage of a percentile instead of a percentage.
    
     ###Analysis:
    -(*Describe, what's the issue and which changes have to be made*)
    +We will use the following conventions:
    +
    +* `MODE=1` will use a percentage value above
    +* `MODE=2` will use an absolute value above
    +* `MODE=-1` will use a percentage value below
    +* `MODE=-2` will use an absolute value below
    +* `MODE=0` will use the percentage value to extract the central x% of the values
    
     ###Implementation:
    
     * Implementation: (*Describe, what you've changed*) 
    
    • status: analyzing --> implementing
     
  • Raphael Zehner

    Raphael Zehner - 2022-09-11
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -10,19 +10,19 @@
    
     * `MODE=0` will use the percentage value to extract the central x% of the values
    
     ###Implementation:
    -* Implementation: (*Describe, what you've changed*) 
    -* Revision: [rXXX]
    -* Implementation test: (*Describe the type of test, which you performed, and if it was successful*)
    +* Implementation: Implemented the new matop method as described above. Needed a new string parser and a corresponding datatype.
    +* Revision: [r1209]
    +* Implementation test: Manually tested various matrices with max 4x4 dimensions and multiple modes.
    
     ###Documentation:
    -* [ ] ChangesLog updated
    -* [ ] Code changes commented
    +* [x] ChangesLog updated
    +* [x] Code changes commented
    
     * **Documentation articles:**
    -    * [ ] corresponding documentation articles updated
    +    * [x] corresponding documentation articles updated
         * [ ] new documentation articles created
         * [ ] not needed
     * **Language files:**
    -    * [ ] corresponding language files updated
    +    * [x] corresponding language files updated
         * [ ] not needed
    
     ###Tests:
    
     

    Related

    Commit: [r1209]

  • Raphael Zehner

    Raphael Zehner - 2022-09-11
    • status: implementing --> testing
     
  • Raphael Zehner

    Raphael Zehner - 2022-09-14
    • assigned_to: Raphael Zehner --> Erik Hänel
     
  • Erik Hänel

    Erik Hänel - 2022-09-17
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -26,4 +26,4 @@
    
         * [ ] not needed
    
     ###Tests:
    -(*Describe, which tests you performed and their outcome*)
    +Functionality was added to the automatic SW tests. Occured deviation (modes 1 and -1 were mixed up) was resolved in [r1216].
    
    • status: testing --> closed
     

    Related

    Commit: [r1216]

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB