You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running MeterGroup.proportion_of_energy_submetered...
/root/nilmtk/nilmtk/metergroup.py:901: UserWarning: As a quick implementation we only get Good Sections from the first meter in the meter group. We should really return the intersection of the good sections for all meters. This will be fixed...
warn("As a quick implementation we only get Good Sections from"
/root/nilmtk/nilmtk/stats/goodsectionsresults.py:145: FutureWarning: convert_objects is deprecated. Use the data-type specific converters pd.to_datetime, pd.to_timedelta and pd.to_numeric.
return df.convert_objects()
Calculating total_energy for ElecMeterID(instance=1, building=1, dataset='REDD') ... /root/nilmtk/nilmtk/stats/totalenergyresults.py:41: FutureWarning: convert_objects is deprecated. Use the data-type specific converters pd.to_datetime, pd.to_timedelta and pd.to_numeric.
return self._data.fillna(0).convert_objects()
Calculating total_energy for ElecMeterID(instance=2, building=1, dataset='REDD') ... /root/nilmtk/nilmtk/electric.py:307: UserWarning: No shared AC types. Using 'active' for submeter and 'apparent' for other.
" and '{:s}' for other.".format(ac_type, other_ac_type))
/root/anaconda2/envs/nilmtk-env/lib/python2.7/site-packages/pandas/tseries/base.py:100: DeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
val = getitem(key)
/root/nilmtk/nilmtk/metergroup.pyc in proportion_of_energy_submetered(self, *_loader_kwargs)
1050 if verbose:
1051 print("Calculating proportion for", m)
-> 1052 prop = m.proportion_of_energy(mains, *_loader_kwargs)
1053 if not np.isnan(prop):
1054 proportion += prop
/root/nilmtk/nilmtk/electric.pyc in proportion_of_energy(self, other, **loader_kwargs)
282 float [0,1] or NaN if other.total_energy == 0
283 """
--> 284 good_other_sections = other.good_sections(**loader_kwargs)
285 loader_kwargs.setdefault('sections', good_other_sections)
286
/root/nilmtk/nilmtk/metergroup.pyc in good_sections(self, **kwargs)
903 " return the intersection of the good sections for all"
904 " meters. This will be fixed...")
--> 905 return self.meters[0].good_sections(**kwargs)
906 else:
907 return []
/root/nilmtk/nilmtk/elecmeter.pyc in _get_stat_from_cache_or_compute(self, nodes, results_obj, loader_kwargs)
684 if loader_kwargs.get('preprocessing') is None:
685 cached_stat = self.get_cached_stat(key_for_cached_stat)
--> 686 results_obj.import_from_cache(cached_stat, sections)
687
688 def find_sections_to_compute():
/root/nilmtk/nilmtk/stats/goodsectionsresults.pyc in import_from_cache(self, cached_stat, sections)
116 timeframes = []
117 for _, row in sections_df.iterrows():
--> 118 section_start = tz_localize_naive(row['section_start'], tz)
119 section_end = tz_localize_naive(row['section_end'], tz)
120 timeframes.append(TimeFrame(section_start, section_end))
/root/anaconda2/envs/nilmtk-env/lib/python2.7/site-packages/pandas/core/series.pyc in getitem(self, key)
555 def getitem(self, key):
556 try:
--> 557 result = self.index.get_value(self, key)
558
559 if not np.isscalar(result):
/root/anaconda2/envs/nilmtk-env/lib/python2.7/site-packages/pandas/core/index.pyc in get_value(self, series, key)
1778 s = getattr(series,'_values',None)
1779 if isinstance(s, Index) and lib.isscalar(key):
-> 1780 return s[key]
1781
1782 s = _values_from_object(series)
/root/anaconda2/envs/nilmtk-env/lib/python2.7/site-packages/pandas/tseries/base.pyc in getitem(self, key)
98 getitem = self._data.getitem
99 if np.isscalar(key):
--> 100 val = getitem(key)
101 return self._box_func(val)
102 else:
IndexError: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices
/root/nilmtk/nilmtk/elecmeter.pyc in _get_stat_from_cache_or_compute(self, nodes, results_obj, loader_kwargs)
684 if loader_kwargs.get('preprocessing') is None:
685 cached_stat = self.get_cached_stat(key_for_cached_stat)
--> 686 results_obj.import_from_cache(cached_stat, sections)
687
688 def find_sections_to_compute():
/root/nilmtk/nilmtk/stats/goodsectionsresults.pyc in import_from_cache(self, cached_stat, sections)
116 timeframes = []
117 for _, row in sections_df.iterrows():
--> 118 section_start = tz_localize_naive(row['section_start'], tz)
119 section_end = tz_localize_naive(row['section_end'], tz)
120 timeframes.append(TimeFrame(section_start, section_end))
/root/anaconda2/envs/nilmtk-env/lib/python2.7/site-packages/pandas/core/series.pyc in getitem(self, key)
555 def getitem(self, key):
556 try:
--> 557 result = self.index.get_value(self, key)
558
559 if not np.isscalar(result):
/root/anaconda2/envs/nilmtk-env/lib/python2.7/site-packages/pandas/core/index.pyc in get_value(self, series, key)
1778 s = getattr(series,'_values',None)
1779 if isinstance(s, Index) and lib.isscalar(key):
-> 1780 return s[key]
1781
1782 s = _values_from_object(series)
/root/anaconda2/envs/nilmtk-env/lib/python2.7/site-packages/pandas/tseries/base.pyc in getitem(self, key)
98 getitem = self._data.getitem
99 if np.isscalar(key):
--> 100 val = getitem(key)
101 return self._box_func(val)
102 else:
IndexError: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indice
The text was updated successfully, but these errors were encountered:
In [13]: elec.proportion_of_energy_submetered()
Running MeterGroup.proportion_of_energy_submetered...
/root/nilmtk/nilmtk/metergroup.py:901: UserWarning: As a quick implementation we only get Good Sections from the first meter in the meter group. We should really return the intersection of the good sections for all meters. This will be fixed...
warn("As a quick implementation we only get Good Sections from"
/root/nilmtk/nilmtk/stats/goodsectionsresults.py:145: FutureWarning: convert_objects is deprecated. Use the data-type specific converters pd.to_datetime, pd.to_timedelta and pd.to_numeric.
return df.convert_objects()
Calculating total_energy for ElecMeterID(instance=1, building=1, dataset='REDD') ... /root/nilmtk/nilmtk/stats/totalenergyresults.py:41: FutureWarning: convert_objects is deprecated. Use the data-type specific converters pd.to_datetime, pd.to_timedelta and pd.to_numeric.
return self._data.fillna(0).convert_objects()
Calculating total_energy for ElecMeterID(instance=2, building=1, dataset='REDD') ... /root/nilmtk/nilmtk/electric.py:307: UserWarning: No shared AC types. Using 'active' for submeter and 'apparent' for other.
" and '{:s}' for other.".format(ac_type, other_ac_type))
/root/anaconda2/envs/nilmtk-env/lib/python2.7/site-packages/pandas/tseries/base.py:100: DeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
val = getitem(key)
IndexError Traceback (most recent call last)
in ()
----> 1 elec.proportion_of_energy_submetered()
/root/nilmtk/nilmtk/metergroup.pyc in proportion_of_energy_submetered(self, *_loader_kwargs)
1050 if verbose:
1051 print("Calculating proportion for", m)
-> 1052 prop = m.proportion_of_energy(mains, *_loader_kwargs)
1053 if not np.isnan(prop):
1054 proportion += prop
/root/nilmtk/nilmtk/electric.pyc in proportion_of_energy(self, other, **loader_kwargs)
282 float [0,1] or NaN if other.total_energy == 0
283 """
--> 284 good_other_sections = other.good_sections(**loader_kwargs)
285 loader_kwargs.setdefault('sections', good_other_sections)
286
/root/nilmtk/nilmtk/metergroup.pyc in good_sections(self, **kwargs)
903 " return the intersection of the good sections for all"
904 " meters. This will be fixed...")
--> 905 return self.meters[0].good_sections(**kwargs)
906 else:
907 return []
/root/nilmtk/nilmtk/elecmeter.pyc in good_sections(self, **loader_kwargs)
630 results_obj = GoodSections.results_class(self.device['max_sample_period'])
631 return self._get_stat_from_cache_or_compute(
--> 632 nodes, results_obj, loader_kwargs)
633
634 def _get_stat_from_cache_or_compute(self, nodes, results_obj, loader_kwargs):
/root/nilmtk/nilmtk/elecmeter.pyc in _get_stat_from_cache_or_compute(self, nodes, results_obj, loader_kwargs)
684 if loader_kwargs.get('preprocessing') is None:
685 cached_stat = self.get_cached_stat(key_for_cached_stat)
--> 686 results_obj.import_from_cache(cached_stat, sections)
687
688 def find_sections_to_compute():
/root/nilmtk/nilmtk/stats/goodsectionsresults.pyc in import_from_cache(self, cached_stat, sections)
116 timeframes = []
117 for _, row in sections_df.iterrows():
--> 118 section_start = tz_localize_naive(row['section_start'], tz)
119 section_end = tz_localize_naive(row['section_end'], tz)
120 timeframes.append(TimeFrame(section_start, section_end))
/root/anaconda2/envs/nilmtk-env/lib/python2.7/site-packages/pandas/core/series.pyc in getitem(self, key)
555 def getitem(self, key):
556 try:
--> 557 result = self.index.get_value(self, key)
558
559 if not np.isscalar(result):
/root/anaconda2/envs/nilmtk-env/lib/python2.7/site-packages/pandas/core/index.pyc in get_value(self, series, key)
1778 s = getattr(series,'_values',None)
1779 if isinstance(s, Index) and lib.isscalar(key):
-> 1780 return s[key]
1781
1782 s = _values_from_object(series)
/root/anaconda2/envs/nilmtk-env/lib/python2.7/site-packages/pandas/tseries/base.pyc in getitem(self, key)
98 getitem = self._data.getitem
99 if np.isscalar(key):
--> 100 val = getitem(key)
101 return self._box_func(val)
102 else:
IndexError: only integers, slices (
:
), ellipsis (...
), numpy.newaxis (None
) and integer or boolean arrays are valid indicesIn [36]: fridge_meter.dropout_rate()
IndexError Traceback (most recent call last)
in ()
----> 1 fridge_meter.dropout_rate()
/root/nilmtk/nilmtk/elecmeter.pyc in dropout_rate(self, ignore_gaps, **loader_kwargs)
609 nodes = [DropoutRate]
610 if ignore_gaps:
--> 611 loader_kwargs['sections'] = self.good_sections(**loader_kwargs)
612
613 return self._get_stat_from_cache_or_compute(
/root/nilmtk/nilmtk/elecmeter.pyc in good_sections(self, **loader_kwargs)
630 results_obj = GoodSections.results_class(self.device['max_sample_period'])
631 return self._get_stat_from_cache_or_compute(
--> 632 nodes, results_obj, loader_kwargs)
633
634 def _get_stat_from_cache_or_compute(self, nodes, results_obj, loader_kwargs):
/root/nilmtk/nilmtk/elecmeter.pyc in _get_stat_from_cache_or_compute(self, nodes, results_obj, loader_kwargs)
684 if loader_kwargs.get('preprocessing') is None:
685 cached_stat = self.get_cached_stat(key_for_cached_stat)
--> 686 results_obj.import_from_cache(cached_stat, sections)
687
688 def find_sections_to_compute():
/root/nilmtk/nilmtk/stats/goodsectionsresults.pyc in import_from_cache(self, cached_stat, sections)
116 timeframes = []
117 for _, row in sections_df.iterrows():
--> 118 section_start = tz_localize_naive(row['section_start'], tz)
119 section_end = tz_localize_naive(row['section_end'], tz)
120 timeframes.append(TimeFrame(section_start, section_end))
/root/anaconda2/envs/nilmtk-env/lib/python2.7/site-packages/pandas/core/series.pyc in getitem(self, key)
555 def getitem(self, key):
556 try:
--> 557 result = self.index.get_value(self, key)
558
559 if not np.isscalar(result):
/root/anaconda2/envs/nilmtk-env/lib/python2.7/site-packages/pandas/core/index.pyc in get_value(self, series, key)
1778 s = getattr(series,'_values',None)
1779 if isinstance(s, Index) and lib.isscalar(key):
-> 1780 return s[key]
1781
1782 s = _values_from_object(series)
/root/anaconda2/envs/nilmtk-env/lib/python2.7/site-packages/pandas/tseries/base.pyc in getitem(self, key)
98 getitem = self._data.getitem
99 if np.isscalar(key):
--> 100 val = getitem(key)
101 return self._box_func(val)
102 else:
IndexError: only integers, slices (
:
), ellipsis (...
), numpy.newaxis (None
) and integer or boolean arrays are valid indiceThe text was updated successfully, but these errors were encountered: