Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
dream
Commits
96e118d3
Commit
96e118d3
authored
Feb 24, 2014
by
panos
Committed by
Jérome Perrin
Mar 04, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed in the output of range
parent
84475b00
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
dream/KnowledgeExtraction/StatisticalMeasures.py
dream/KnowledgeExtraction/StatisticalMeasures.py
+2
-2
No files found.
dream/KnowledgeExtraction/StatisticalMeasures.py
View file @
96e118d3
...
...
@@ -29,7 +29,7 @@ MASS= importr('MASS')
#The BasicStatisticalMeasures object
class
BasicStatisticalMeasures
:
# A variety of statistical measures are calculated in this object
# A variety of statistical measures are calculated in this object
def
length
(
self
,
data
):
#Calculate the length of data sample
data
=
robjects
.
FloatVector
(
data
)
##The given list changes into float vector in order to be handled by RPy2
rlength
=
robjects
.
r
[
'length'
]
#Call length function-R function
...
...
@@ -68,7 +68,7 @@ class BasicStatisticalMeasures:
def
range
(
self
,
data
):
#Calculate the range of a data sample
data
=
robjects
.
FloatVector
(
data
)
rrange
=
robjects
.
r
[
'range'
]
#Call range function - R function
return
rrange
(
data
)
[
0
]
return
rrange
(
data
)
def
IQR
(
self
,
data
):
#Calculate the Interquartile range (IQR) of a data sample
data
=
robjects
.
FloatVector
(
data
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment