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
f52b201a
Commit
f52b201a
authored
Apr 24, 2015
by
panos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Example ammended based on the objects name changes
parent
c9e66a58
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
dream/KnowledgeExtraction/KEtool_examples/ConfidenceIntervals/ConfidenceIntervals_example.py
...amples/ConfidenceIntervals/ConfidenceIntervals_example.py
+6
-6
No files found.
dream/KnowledgeExtraction/KEtool_examples/ConfidenceIntervals/ConfidenceIntervals_example.py
View file @
f52b201a
...
...
@@ -22,9 +22,9 @@ Created on 13 Jun 2014
# along with DREAM. If not, see <http://www.gnu.org/licenses/>.
# ===========================================================================
from
dream.KnowledgeExtraction.ImportCSVdata
import
Import
_CSV
from
dream.KnowledgeExtraction.ConfidenceIntervals
import
Intervals
from
dream.KnowledgeExtraction.DataManipulation
import
DataMan
agement
from
dream.KnowledgeExtraction.ImportCSVdata
import
Import
CSVdata
from
dream.KnowledgeExtraction.ConfidenceIntervals
import
Confidence
Intervals
from
dream.KnowledgeExtraction.DataManipulation
import
DataMan
ipulation
def
main
(
test
=
0
,
CSVFileName
=
'DataSet.csv'
,
csvFile
=
None
):
...
...
@@ -32,15 +32,15 @@ def main(test=0, CSVFileName='DataSet.csv',
CSVFileName
=
csvFile
.
name
filename
=
CSVFileName
data
=
Import
_CSV
()
#call the Import_CSV module and using its method Input_data import the data set from the CSV file to the tool
data
=
Import
CSVdata
()
#call the Import_CSV module and using its method Input_data import the data set from the CSV file to the tool
Data
=
data
.
Input_data
(
filename
)
ProcTime
=
Data
.
get
(
'ProcessingTimes'
,[])
#get from the returned Python dictionary the three data sets
MTTF
=
Data
.
get
(
'MTTF'
,[])
MTTR
=
Data
.
get
(
'MTTR'
,[])
CI
=
Intervals
()
#create a Intervals object
DM
=
DataMan
agement
()
CI
=
Confidence
Intervals
()
#create a Intervals object
DM
=
DataMan
ipulation
()
if
test
:
return
DM
.
round
(
CI
.
ConfidIntervals
(
ProcTime
,
0.95
)),
CI
.
ConfidIntervals
(
MTTR
,
0.95
),
DM
.
ceiling
(
CI
.
ConfidIntervals
(
MTTF
,
0.90
))
#print the confidence intervals of the data sets applying either 90% or 95% probability
...
...
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