Skip to content

Commit

Permalink
Merge pull request #79 from Nyan11/Issue_0078
Browse files Browse the repository at this point in the history
Rotate the kiviat polygon and fix the bottom label position
  • Loading branch information
tinchodias authored Nov 22, 2024
2 parents 9c30f27 + 66a0ec5 commit 1cc1eee
Show file tree
Hide file tree
Showing 69 changed files with 9,028 additions and 9,011 deletions.
62 changes: 31 additions & 31 deletions src/Roassal-Chart/Collection.extension.st
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
Extension { #name : 'Collection' }

{ #category : '*Roassal-Chart' }
Collection >> interQuartileRange [
| quartiles q1 q3 |
quartiles := self quartiles.
q1 := quartiles first.
q3 := quartiles third.
^ q3 - q1
]

{ #category : '*Roassal-Chart' }
Collection >> quartiles [
| q1 q2 q3 quantile |
quantile := RSInvertedCDF data: self.
q1 := quantile compute: 0.25.
q2 := quantile compute: 0.50.
q3 := quantile compute: 0.75.
^ { q1. q2. q3 }
]

{ #category : '*Roassal-Chart' }
Collection >> standardDeviation [
"It follows the implementation of numpy using the size N (instead of N - 1)"
| standardDeviation sum mean |
sum := 0.
mean := self average.
self do: [ :observationX | sum := sum + ((observationX - mean) squared) ].
standardDeviation := (sum/self size) sqrt.
^ standardDeviation
]
Extension { #name : 'Collection' }

{ #category : '*Roassal-Chart' }
Collection >> interQuartileRange [
| quartiles q1 q3 |
quartiles := self quartiles.
q1 := quartiles first.
q3 := quartiles third.
^ q3 - q1
]

{ #category : '*Roassal-Chart' }
Collection >> quartiles [
| q1 q2 q3 quantile |
quantile := RSInvertedCDF data: self.
q1 := quantile compute: 0.25.
q2 := quantile compute: 0.50.
q3 := quantile compute: 0.75.
^ { q1. q2. q3 }
]

{ #category : '*Roassal-Chart' }
Collection >> standardDeviation [
"It follows the implementation of numpy using the size N (instead of N - 1)"
| standardDeviation sum mean |
sum := 0.
mean := self average.
self do: [ :observationX | sum := sum + ((observationX - mean) squared) ].
standardDeviation := (sum/self size) sqrt.
^ standardDeviation
]
Loading

0 comments on commit 1cc1eee

Please sign in to comment.