Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rotate the kiviat polygon and fix the bottom label position #79

Merged
merged 2 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading