870022ab7abce46f9bff47c8a9c787808a630e59,tests/test_classifier/test_confusion_matrix.py,ConfusionMatrixTests,test_score_returns_score,#ConfusionMatrixTests#,337
Before Change
Test that ConfusionMatrix score() returns a score between 0 and 1
data = self.load_data("occupancy")
X = data[[
"temperature", "relative_humidity", "light", "C02", "humidity"
]]
y = data["occupancy"]
// Convert X to an ndarray
X = X.copy().view((float, len(X.dtype.names)))
X_train, X_test, y_train, y_test = tts(X, y, test_size=0.2, random_state=42)
// Create and fit the visualizer
visualizer = ConfusionMatrix(LogisticRegression())
After Change
Test that ConfusionMatrix score() returns a score between 0 and 1
// Load the occupancy dataset from fixtures
X, y = load_occupancy(return_dataset=True).to_numpy()
X_train, X_test, y_train, y_test = tts(X, y, test_size=0.2, random_state=42)
// Create and fit the visualizer
visualizer = ConfusionMatrix(LogisticRegression())
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 13
Instances Project Name: DistrictDataLabs/yellowbrick
Commit Name: 870022ab7abce46f9bff47c8a9c787808a630e59
Time: 2019-01-30
Author: benjamin@bengfort.com
File Name: tests/test_classifier/test_confusion_matrix.py
Class Name: ConfusionMatrixTests
Method Name: test_score_returns_score
Project Name: DistrictDataLabs/yellowbrick
Commit Name: 870022ab7abce46f9bff47c8a9c787808a630e59
Time: 2019-01-30
Author: benjamin@bengfort.com
File Name: tests/test_classifier/test_confusion_matrix.py
Class Name: ConfusionMatrixTests
Method Name: test_score_returns_score
Project Name: DistrictDataLabs/yellowbrick
Commit Name: 870022ab7abce46f9bff47c8a9c787808a630e59
Time: 2019-01-30
Author: benjamin@bengfort.com
File Name: tests/test_contrib/test_scatter.py
Class Name: ScatterVizTests
Method Name: test_scatter_quick_method
Project Name: DistrictDataLabs/yellowbrick
Commit Name: 870022ab7abce46f9bff47c8a9c787808a630e59
Time: 2019-01-30
Author: benjamin@bengfort.com
File Name: tests/test_contrib/test_scatter.py
Class Name: ScatterVizTests
Method Name: test_integrated_scatter