407a5112ab430db6f23fc4317a7400ada797d274,examples/bench.py,,,#,5
Before Change
import mord
import numpy as np
for n_samples in range(40, 200, 20):
X, y = datasets.make_classification(n_samples=n_samples, n_features=10000,
n_classes=5, n_informative=5)
clf1 = linear_model.LogisticRegressionCV(solver="lbfgs",
multi_class="multinomial")
clf2 = grid_search.GridSearchCV(mord.LogisticIT(), {"alpha": np.logspace(
-3, 3, 10)})
cv = cross_validation.StratifiedShuffleSplit(y, test_size=0.3)
print(cross_validation.cross_val_score(clf1, X, y, cv=cv).mean())
print(cross_validation.cross_val_score(clf2, X, y, cv=cv).mean())
print()
After Change
clf2 = mord.LogisticAT(alpha=1.)
clf2.fit(X, y)
print("Mean Absolute Error of LogisticAT %s" %
metrics.mean_absolute_error(clf2.predict(X), y))
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 4
Instances
Project Name: fabianp/mord
Commit Name: 407a5112ab430db6f23fc4317a7400ada797d274
Time: 2015-10-21
Author: f@bianp.net
File Name: examples/bench.py
Class Name:
Method Name:
Project Name: deepchem/deepchem
Commit Name: dc4eba996e003be0331cd78e7ba7c477f30f4e67
Time: 2018-05-23
Author: peastman@stanford.edu
File Name: deepchem/utils/test/test_generator_evaluator.py
Class Name: TestGeneratorEvaluator
Method Name: test_compute_model_performance_singletask_classifier
Project Name: automl/auto-sklearn
Commit Name: 8442321b9b7a7cef7e3806b525965c36cea1549e
Time: 2020-09-25
Author: feurerm@informatik.uni-freiburg.de
File Name: examples/60_search/example_parallel_manual_spawning.py
Class Name:
Method Name:
Project Name: deepchem/deepchem
Commit Name: dc4eba996e003be0331cd78e7ba7c477f30f4e67
Time: 2018-05-23
Author: peastman@stanford.edu
File Name: deepchem/utils/test/test_generator_evaluator.py
Class Name: TestGeneratorEvaluator
Method Name: test_compute_model_performance_multitask_classifier
Project Name: scikit-optimize/scikit-optimize
Commit Name: 45ffcc4d387da3e767ea675640f411dbea349ff0
Time: 2017-06-28
Author: iaroslav.email@gmail.com
File Name: skopt/wrappers/scikit_learn.py
Class Name:
Method Name: