mirror of
https://github.com/Doctorado-ML/Odte.git
synced 2025-07-11 08:12:06 +00:00
Update requirements for tests
This commit is contained in:
parent
1eb786a76f
commit
8bef3efc03
File diff suppressed because one or more lines are too long
@ -2,7 +2,7 @@
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@ -21,7 +21,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 12,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@ -32,7 +32,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 13,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@ -47,17 +47,11 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 14,
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"tags": []
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "stream",
|
||||
"name": "stdout",
|
||||
"text": "****************************** Results for wine ******************************\nTraining stree...\nScore: 94.444 in 0.18 seconds\nTraining odte...\nScore: 100.000 in 1.33 seconds\nTraining adaboost...\nScore: 94.444 in 0.62 seconds\nTraining bagging...\nScore: 100.000 in 2.88 seconds\n"
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"print(\"*\"*30,\"Results for wine\", \"*\"*30)\n",
|
||||
"for clf_type, item in clf.items():\n",
|
||||
@ -69,7 +63,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@ -80,7 +74,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 6,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@ -94,17 +88,11 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"tags": []
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "stream",
|
||||
"name": "stdout",
|
||||
"text": "****************************** Results for iris ******************************\nTraining stree...\nScore: 100.000 in 0.02 seconds\nTraining odte...\nScore: 100.000 in 0.12 seconds\nTraining adaboost...\nScore: 83.333 in 0.01 seconds\nTraining bagging...\nScore: 100.000 in 0.13 seconds\n"
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"print(\"*\"*30,\"Results for iris\", \"*\"*30)\n",
|
||||
"for clf_type, item in clf.items():\n",
|
||||
@ -116,17 +104,11 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 8,
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"tags": []
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "stream",
|
||||
"name": "stdout",
|
||||
"text": "{'fit_time': array([0.22121811, 0.21985221, 0.19185114, 0.19187999, 0.20067477]), 'score_time': array([0.01268458, 0.01461887, 0.01160598, 0.01308703, 0.01070738]), 'test_score': array([1. , 1. , 1. , 0.93333333, 1. ]), 'train_score': array([0.98333333, 0.96666667, 0.99166667, 0.99166667, 0.975 ])}\n98.667 +- 0.027\n"
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"cross = cross_validate(estimator=clf[\"odte\"], X=X, y=y, n_jobs=-1, return_train_score=True)\n",
|
||||
"print(cross)\n",
|
||||
@ -135,17 +117,11 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 9,
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"tags": []
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "stream",
|
||||
"name": "stdout",
|
||||
"text": "{'fit_time': array([0.02130818, 0.02036786, 0.02829814, 0.02326989, 0.03807497]), 'score_time': array([0.00140715, 0.00173712, 0.00199389, 0.00132608, 0.00199199]), 'test_score': array([1. , 0.93333333, 0.93333333, 0.93333333, 0.96666667]), 'train_score': array([0.93333333, 0.96666667, 0.96666667, 0.96666667, 0.95 ])}\n95.333 +- 0.027\n"
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"cross = cross_validate(estimator=clf[\"adaboost\"], X=X, y=y, n_jobs=-1, return_train_score=True)\n",
|
||||
"print(cross)\n",
|
||||
@ -154,17 +130,11 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 10,
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"tags": []
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "stream",
|
||||
"name": "stdout",
|
||||
"text": "1 functools.partial(<function check_no_attributes_set_in_init at 0x12b593290>, 'Odte')\n2 functools.partial(<function check_estimators_dtypes at 0x12b58d3b0>, 'Odte')\n3 functools.partial(<function check_fit_score_takes_y at 0x12b58d290>, 'Odte')\n4 functools.partial(<function check_sample_weights_pandas_series at 0x12b586b90>, 'Odte')\n5 functools.partial(<function check_sample_weights_not_an_array at 0x12b586cb0>, 'Odte')\n6 functools.partial(<function check_sample_weights_list at 0x12b586dd0>, 'Odte')\n7 functools.partial(<function check_sample_weights_shape at 0x12b586ef0>, 'Odte')\n8 functools.partial(<function check_sample_weights_invariance at 0x12b58a050>, 'Odte')\n9 functools.partial(<function check_estimators_fit_returns_self at 0x12b5913b0>, 'Odte')\n10 functools.partial(<function check_estimators_fit_returns_self at 0x12b5913b0>, 'Odte', readonly_memmap=True)\n11 functools.partial(<function check_complex_data at 0x12b58a200>, 'Odte')\n12 functools.partial(<function check_dtype_object at 0x12b58a170>, 'Odte')\n13 functools.partial(<function check_estimators_empty_data_messages at 0x12b58d4d0>, 'Odte')\n14 functools.partial(<function check_pipeline_consistency at 0x12b58d170>, 'Odte')\n15 functools.partial(<function check_estimators_nan_inf at 0x12b58d5f0>, 'Odte')\n16 functools.partial(<function check_estimators_overwrite_params at 0x12b593170>, 'Odte')\n17 functools.partial(<function check_estimator_sparse_data at 0x12b586a70>, 'Odte')\n18 functools.partial(<function check_estimators_pickle at 0x12b58d830>, 'Odte')\n19 functools.partial(<function check_classifier_data_not_an_array at 0x12b5934d0>, 'Odte')\n20 functools.partial(<function check_classifiers_one_label at 0x12b58def0>, 'Odte')\n21 functools.partial(<function check_classifiers_classes at 0x12b591950>, 'Odte')\n22 functools.partial(<function check_estimators_partial_fit_n_features at 0x12b58d950>, 'Odte')\n23 functools.partial(<function check_classifiers_train at 0x12b591050>, 'Odte')\n24 functools.partial(<function check_classifiers_train at 0x12b591050>, 'Odte', readonly_memmap=True)\n25 functools.partial(<function check_classifiers_train at 0x12b591050>, 'Odte', readonly_memmap=True, X_dtype='float32')\n26 functools.partial(<function check_classifiers_regression_target at 0x12b593f80>, 'Odte')\n27 functools.partial(<function check_supervised_y_no_nan at 0x12b57eb90>, 'Odte')\n28 functools.partial(<function check_supervised_y_2d at 0x12b5915f0>, 'Odte')\n29 functools.partial(<function check_estimators_unfitted at 0x12b5914d0>, 'Odte')\n30 functools.partial(<function check_non_transformer_estimators_n_iter at 0x12b593b00>, 'Odte')\n31 functools.partial(<function check_decision_proba_consistency at 0x12b5970e0>, 'Odte')\n32 functools.partial(<function check_fit2d_predict1d at 0x12b58a710>, 'Odte')\n33 functools.partial(<function check_methods_subset_invariance at 0x12b58a8c0>, 'Odte')\n34 functools.partial(<function check_fit2d_1sample at 0x12b58a9e0>, 'Odte')\n35 functools.partial(<function check_fit2d_1feature at 0x12b58ab00>, 'Odte')\n36 functools.partial(<function check_fit1d at 0x12b58ac20>, 'Odte')\n37 functools.partial(<function check_get_params_invariance at 0x12b593d40>, 'Odte')\n38 functools.partial(<function check_set_params at 0x12b593e60>, 'Odte')\n39 functools.partial(<function check_dict_unchanged at 0x12b58a320>, 'Odte')\n40 functools.partial(<function check_dont_overwrite_parameters at 0x12b58a5f0>, 'Odte')\n41 functools.partial(<function check_fit_idempotent at 0x12b597290>, 'Odte')\n42 functools.partial(<function check_n_features_in at 0x12b597320>, 'Odte')\n"
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from sklearn.utils.estimator_checks import check_estimator\n",
|
||||
"# Make checks one by one\n",
|
||||
@ -178,6 +148,13 @@
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"interpreter": {
|
||||
"hash": "da86226729227d0e8962a5ec29ea906307507ca2c30ceaaf651c09a617630939"
|
||||
},
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3.9.2 64-bit ('general': venv)",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
@ -188,13 +165,9 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.7.6-final"
|
||||
"version": "3.9.7"
|
||||
},
|
||||
"orig_nbformat": 2,
|
||||
"kernelspec": {
|
||||
"name": "python37664bitgeneralvenvfbd0a23e74cf4e778460f5ffc6761f39",
|
||||
"display_name": "Python 3.7.6 64-bit ('general': venv)"
|
||||
}
|
||||
"orig_nbformat": 2
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
|
@ -1 +1 @@
|
||||
stree
|
||||
stree>1.2.2
|
Loading…
x
Reference in New Issue
Block a user