[mlpack-svn] r15475 - mlpack/conf/jenkins-conf/benchmark/methods/mlpack
fastlab-svn at coffeetalk-1.cc.gatech.edu
fastlab-svn at coffeetalk-1.cc.gatech.edu
Tue Jul 16 12:44:04 EDT 2013
Author: marcus
Date: Tue Jul 16 12:44:03 2013
New Revision: 15475
Log:
Adjust timer to compare with other libraries.
Modified:
mlpack/conf/jenkins-conf/benchmark/methods/mlpack/gmm.py
mlpack/conf/jenkins-conf/benchmark/methods/mlpack/linear_regression.py
Modified: mlpack/conf/jenkins-conf/benchmark/methods/mlpack/gmm.py
==============================================================================
--- mlpack/conf/jenkins-conf/benchmark/methods/mlpack/gmm.py (original)
+++ mlpack/conf/jenkins-conf/benchmark/methods/mlpack/gmm.py Tue Jul 16 12:44:03 2013
@@ -114,8 +114,7 @@
# Compile the regular expression pattern into a regular expression object to
# parse the timer data.
pattern = re.compile(r"""
- .*?loading_data: (?P<loading_data>.*?)s.*?
- .*?total_time: (?P<total_time>.*?)s.*?
+ .*?em: (?P<em>.*?)s.*?
""", re.VERBOSE|re.MULTILINE|re.DOTALL)
match = pattern.match(data)
@@ -124,10 +123,9 @@
return -1
else:
# Create a namedtuple and return the timer data.
- timer = collections.namedtuple("timer", ["loading_data", "total_time"])
+ timer = collections.namedtuple("timer", ["em"])
- return timer(float(match.group("loading_data")),
- float(match.group("total_time")))
+ return timer(float(match.group("em")))
'''
Return the elapsed time in seconds.
@@ -136,5 +134,5 @@
@return Elapsed time in seconds.
'''
def GetTime(self, timer):
- time = timer.total_time - timer.loading_data
+ time = timer.em
return time
Modified: mlpack/conf/jenkins-conf/benchmark/methods/mlpack/linear_regression.py
==============================================================================
--- mlpack/conf/jenkins-conf/benchmark/methods/mlpack/linear_regression.py (original)
+++ mlpack/conf/jenkins-conf/benchmark/methods/mlpack/linear_regression.py Tue Jul 16 12:44:03 2013
@@ -120,9 +120,7 @@
# Compile the regular expression pattern into a regular expression object to
# parse the timer data.
pattern = re.compile(r"""
- .*?loading_data: (?P<loading_data>.*?)s.*?
- .*?saving_data: (?P<saving_data>.*?)s.*?
- .*?total_time: (?P<total_time>.*?)s.*?
+ .*?regression: (?P<regression>.*?)s.*?
""", re.VERBOSE|re.MULTILINE|re.DOTALL)
match = pattern.match(data)
@@ -131,12 +129,9 @@
return -1
else:
# Create a namedtuple and return the timer data.
- timer = collections.namedtuple("timer", ["loading_data", "saving_data",
- "total_time"])
+ timer = collections.namedtuple("timer", ["regression"])
- return timer(float(match.group("loading_data")),
- float(match.group("saving_data")),
- float(match.group("total_time")))
+ return timer(float(match.group("regression")))
'''
Return the elapsed time in seconds.
@@ -145,6 +140,6 @@
@return Elapsed time in seconds.
'''
def GetTime(self, timer):
- time = timer.total_time - timer.loading_data - timer.saving_data
+ time = timer.regression
return time
\ No newline at end of file
More information about the mlpack-svn
mailing list