9b292db701a05ec2748be18d51a8bc52b98c646c,mlxtend/evaluate/decision_regions.py,,plot_decision_regions,#,15
Before Change
if isinstance(y, list):
y_ary = np.array(y)
else:
y_ary = y
for a in (X, y_ary):
if not isinstance(a, np.ndarray):
raise ValueError("%s must be a NumPy array." % a.__name__)
if ax is None:
ax = plt.gca()
if not y_ary.dtype == int:
y_ary = y_ary.astype(int)
// check if test data is provided
After Change
// Check types
if not isinstance(X, np.ndarray):
raise ValueError("X must be a 2D NumPy array")
if not isinstance(y, np.ndarray):
raise ValueError("y must be a 1D NumPy array")
if not np.issubdtype(y.dtype, np.integer):
raise ValueError("y must have be an integer array. "
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: rasbt/mlxtend
Commit Name: 9b292db701a05ec2748be18d51a8bc52b98c646c
Time: 2016-07-14
Author: mail@sebastianraschka.com
File Name: mlxtend/evaluate/decision_regions.py
Class Name:
Method Name: plot_decision_regions
Project Name: scikit-learn-contrib/sklearn-pandas
Commit Name: 1c7a87e96c4b6180e423586193c26e5ccd2f6bfd
Time: 2015-08-02
Author: mahmoud@thehumangeo.com
File Name: sklearn_pandas/__init__.py
Class Name: DataFrameMapper
Method Name: transform
Project Name: cesium-ml/cesium
Commit Name: e547a82c24b37c157bc9b40d2724a7b1fd0a7b0f
Time: 2017-04-17
Author: brettnaul@gmail.com
File Name: cesium/featurize.py
Class Name:
Method Name: save_featureset