ca14cf72e3e4bd3a6136cafad8701ac41f48f09b,yellowbrick/cluster/elbow.py,KElbowVisualizer,__init__,#KElbowVisualizer#,206
Before Change
k = (2, k+1)
// Expand k in to the values we will use, capturing exceptions
try:
k = tuple(k)
self.k_values_ = list(range(*k))
except:
raise YellowbrickValueError((
"Specify a range or maximal K value, the value "{}" "
"is not a valid argument for K.".format(k)
))
// Holds the values of the silhoutte scores
self.k_scores_ = None
def fit(self, X, y=None, **kwargs):
After Change
self.k_values_ = list(range(*k))
elif isinstance(k, collections.Iterable) and \
all(isinstance(x, (int, np.integer)) for x in k):
self.k_values_ = list(k)
else:
raise YellowbrickValueError((
"Specify an iterable of integers, a range, or maximal K value,"
" the value "{}" is not a valid argument for K.".format(k)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: DistrictDataLabs/yellowbrick
Commit Name: ca14cf72e3e4bd3a6136cafad8701ac41f48f09b
Time: 2018-08-25
Author: davidwaterman@gmail.com
File Name: yellowbrick/cluster/elbow.py
Class Name: KElbowVisualizer
Method Name: __init__
Project Name: invesalius/invesalius3
Commit Name: 50f903c2731625fcb15222036f82c8e78918a90b
Time: 2019-10-22
Author: totonixsame@gmail.com
File Name: invesalius/reader/dicom.py
Class Name: Image
Method Name: SetParser
Project Name: nilmtk/nilmtk
Commit Name: 72f3f5bf50ed2d91cdcfbe2cf47120a2df8883cd
Time: 2014-11-26
Author: jack-list@xlk.org.uk
File Name: nilmtk/elecmeter.py
Class Name: ElecMeter
Method Name: _get_stat_from_cache_or_compute