diff --git a/docs/docs/blog/01_cf.md b/docs/docs/blog/01_cf.md index 86faef5..ceae2ef 100644 --- a/docs/docs/blog/01_cf.md +++ b/docs/docs/blog/01_cf.md @@ -33,6 +33,13 @@ replaced by a computation graph of variables and operations, and rows are ```python +# for Google Colab +try: + import google.colab + !pip install git+https://github.com/amakelov/mandala +except: + pass + from mandala.imports import * @op(output_names=['y']) @@ -67,10 +74,10 @@ print(cf.df().to_markdown()) | | x | increment | y | add | w | |---:|----:|:--------------------------------------------|----:|:--------------------------------------|----:| | 0 | 1 | Call(increment, cid='948...', hid='6e2...') | 2 | | nan | - | 1 | 0 | Call(increment, cid='d47...', hid='230...') | 1 | Call(add, cid='89c...', hid='247...') | 1 | - | 2 | 2 | Call(increment, cid='bfb...', hid='5dd...') | 3 | Call(add, cid='a81...', hid='626...') | 5 | - | 3 | 4 | Call(increment, cid='928...', hid='adf...') | 5 | Call(add, cid='a54...', hid='deb...') | 9 | - | 4 | 3 | Call(increment, cid='9b4...', hid='df2...') | 4 | | nan | + | 1 | 4 | Call(increment, cid='928...', hid='adf...') | 5 | Call(add, cid='a54...', hid='deb...') | 9 | + | 2 | 3 | Call(increment, cid='9b4...', hid='df2...') | 4 | | nan | + | 3 | 0 | Call(increment, cid='d47...', hid='230...') | 1 | Call(add, cid='89c...', hid='247...') | 1 | + | 4 | 2 | Call(increment, cid='bfb...', hid='5dd...') | 3 | Call(add, cid='a81...', hid='626...') | 5 | This small example illustrates the main components of the CF workflow: @@ -249,10 +256,10 @@ print(cf.df()[['accuracy', 'scale_data', 'train_svc', 'train_random_forest']].so | | accuracy | scale_data | train_svc | train_random_forest | |---:|-----------:|:---------------------------------------------|:--------------------------------------------|:------------------------------------------------------| - | 1 | 0.915 | Call(scale_data, cid='09f...', hid='d6b...') | | Call(train_random_forest, cid='e26...', hid='c42...') | + | 2 | 0.915 | Call(scale_data, cid='09f...', hid='d6b...') | | Call(train_random_forest, cid='e26...', hid='c42...') | | 3 | 0.885 | | | Call(train_random_forest, cid='519...', hid='997...') | - | 0 | 0.82 | Call(scale_data, cid='09f...', hid='d6b...') | Call(train_svc, cid='6f4...', hid='7d9...') | | - | 2 | 0.82 | | Call(train_svc, cid='ddf...', hid='6a0...') | | + | 0 | 0.82 | | Call(train_svc, cid='ddf...', hid='6a0...') | | + | 1 | 0.82 | Call(scale_data, cid='09f...', hid='d6b...') | Call(train_svc, cid='6f4...', hid='7d9...') | | So is this the full story of this dataset? We might want to investigate further @@ -363,20 +370,20 @@ print(cf.df()[['n_estimators', 'kernel', 'accuracy', ]].sort_values('accuracy', | | n_estimators | kernel | accuracy | |---:|:-----------------------------|:-------------------------------------------|-----------:| - | 1 | | rbf | 0.915 | - | 5 | 5 | | 0.915 | - | 9 | | rbf | 0.91 | - | 2 | 20 | | 0.9 | - | 4 | 10 | | 0.9 | - | 6 | 10 | | 0.9 | - | 7 | 20 | | 0.9 | - | 0 | ValueCollection([20, 10, 5]) | ValueCollection(['linear', 'rbf', 'poly']) | 0.895 | - | 11 | ValueCollection([20, 10, 5]) | ValueCollection(['linear', 'rbf', 'poly']) | 0.895 | - | 13 | 5 | | 0.885 | - | 10 | | poly | 0.835 | - | 3 | | linear | 0.82 | - | 8 | | linear | 0.82 | - | 12 | | poly | 0.82 | + | 2 | 5 | | 0.915 | + | 11 | | rbf | 0.915 | + | 13 | | rbf | 0.91 | + | 0 | 10 | | 0.9 | + | 3 | 10 | | 0.9 | + | 6 | 20 | | 0.9 | + | 9 | 20 | | 0.9 | + | 8 | ValueCollection([20, 10, 5]) | ValueCollection(['linear', 'rbf', 'poly']) | 0.895 | + | 12 | ValueCollection([20, 10, 5]) | ValueCollection(['linear', 'rbf', 'poly']) | 0.895 | + | 4 | 5 | | 0.885 | + | 1 | | poly | 0.835 | + | 5 | | poly | 0.82 | + | 7 | | linear | 0.82 | + | 10 | | linear | 0.82 | Columns where `n_estimators` is `None` correspond to the SVC models, and columns diff --git a/docs/docs/blog/01_cf_files/01_cf_10_0.svg b/docs/docs/blog/01_cf_files/01_cf_10_0.svg index 66be8d7..bd7769b 100644 --- a/docs/docs/blog/01_cf_files/01_cf_10_0.svg +++ b/docs/docs/blog/01_cf_files/01_cf_10_0.svg @@ -9,11 +9,11 @@ G - + -y_test +X_train -y_test +X_train 2 values (2 sinks) @@ -23,24 +23,8 @@ X 2 values - - -scale_data - -scale_data -@op:scale_data -1 calls - - - -X->scale_data - - -X -(1 values) - - + get_train_test_split get_train_test_split @@ -55,15 +39,45 @@ X (2 values) - + + +scale_data + +scale_data +@op:scale_data +1 calls + + + +X->scale_data + + +X +(1 values) + + -X_test +y_train -X_test +y_train 2 values (2 sinks) - + +X_test + +X_test +2 values (2 sinks) + + + +y_test + +y_test +2 values (2 sinks) + + + y y @@ -77,30 +91,8 @@ y (1 values) - - -X_train - -X_train -2 values (2 sinks) - - - -y_train - -y_train -2 values (2 sinks) - - - -scale_data->X - - -X_scaled -(1 values) - - + get_data get_data @@ -123,37 +115,45 @@ y (1 values) - - -get_train_test_split->y_test - - -y_test -(2 values) - - - -get_train_test_split->X_test - - -X_test -(2 values) - get_train_test_split->X_train - - -X_train -(2 values) + + +X_train +(2 values) get_train_test_split->y_train - - -y_train -(2 values) + + +y_train +(2 values) + + + +get_train_test_split->X_test + + +X_test +(2 values) + + + +get_train_test_split->y_test + + +y_test +(2 values) + + + +scale_data->X + + +X_scaled +(1 values) diff --git a/docs/docs/blog/01_cf_files/01_cf_14_0.svg b/docs/docs/blog/01_cf_files/01_cf_14_0.svg index 8e0ae2e..a6dc734 100644 --- a/docs/docs/blog/01_cf_files/01_cf_14_0.svg +++ b/docs/docs/blog/01_cf_files/01_cf_14_0.svg @@ -4,334 +4,334 @@ - + G - - + + -y_test - -y_test -2 values +accuracy + +accuracy +4 values (4 sinks) + + + +n_estimators + +n_estimators +1 values (1 sources) + + + +train_random_forest + +train_random_forest +@op:train_random_forest +2 calls + + + +n_estimators->train_random_forest + + +n_estimators +(1 values) + + + +model + +model +4 values - + eval_model - -eval_model -@op:eval_model -4 calls + +eval_model +@op:eval_model +4 calls - - -y_test->eval_model - - -y_test -(2 values) + + +model->eval_model + + +model +(4 values) - + X - -X -2 values + +X +2 values - + +get_train_test_split + +get_train_test_split +@op:get_train_test_split +2 calls + + + +X->get_train_test_split + + +X +(2 values) + + + scale_data - -scale_data -@op:scale_data -1 calls + +scale_data +@op:scale_data +1 calls X->scale_data - - -X -(1 values) + + +X +(1 values) - - -get_train_test_split - -get_train_test_split -@op:get_train_test_split -2 calls + + +X_train + +X_train +2 values - - -X->get_train_test_split - - -X -(2 values) + + +train_svc + +train_svc +@op:train_svc +2 calls - - -accuracy - -accuracy -4 values (4 sinks) + + +X_train->train_svc + + +X_train +(2 values) - - -model - -model -4 values + + +X_train->train_random_forest + + +X_train +(2 values) - - -model->eval_model - - -model -(4 values) + + +kernel + +kernel +1 values (1 sources) - - -n_estimators - -n_estimators -1 values (1 sources) + + +kernel->train_svc + + +kernel +(1 values) - - -train_random_forest - -train_random_forest -@op:train_random_forest -2 calls + + +y_train + +y_train +2 values - - -n_estimators->train_random_forest - - -n_estimators -(1 values) + + +y_train->train_svc + + +y_train +(2 values) + + + +y_train->train_random_forest + + +y_train +(2 values) - + X_test - -X_test -2 values + +X_test +2 values X_test->eval_model - - -X_test -(2 values) + + +X_test +(2 values) - + max_depth - -max_depth -1 values (1 sources) + +max_depth +1 values (1 sources) max_depth->train_random_forest - - -max_depth -(1 values) - - - -C - -C -1 values (1 sources) + + +max_depth +(1 values) - - -train_svc - -train_svc -@op:train_svc -2 calls + + +y_test + +y_test +2 values - - -C->train_svc - - -C -(1 values) + + +y_test->eval_model + + +y_test +(2 values) - + y - -y -1 values + +y +1 values y->get_train_test_split - - -y -(1 values) + + +y +(1 values) - - -kernel - -kernel -1 values (1 sources) - - - -kernel->train_svc - - -kernel -(1 values) + + +C + +C +1 values (1 sources) - - -X_train - -X_train -2 values + + +C->train_svc + + +C +(1 values) - - -X_train->train_svc - - -X_train -(2 values) + + +eval_model->accuracy + + +accuracy +(4 values) - - -X_train->train_random_forest - - -X_train -(2 values) + + +get_train_test_split->X_train + + +X_train +(2 values) - - -y_train - -y_train -2 values + + +get_train_test_split->y_train + + +y_train +(2 values) - - -y_train->train_svc - - -y_train -(2 values) + + +get_train_test_split->X_test + + +X_test +(2 values) - - -y_train->train_random_forest - - -y_train -(2 values) + + +get_train_test_split->y_test + + +y_test +(2 values) - + get_data - -get_data -@op:get_data -1 calls + +get_data +@op:get_data +1 calls get_data->X - - -X -(1 values) + + +X +(1 values) get_data->y - - -y -(1 values) + + +y +(1 values) scale_data->X - - -X_scaled -(1 values) - - - -eval_model->accuracy - - -accuracy -(4 values) + + +X_scaled +(1 values) train_svc->model - - -svc_model -(2 values) + + +svc_model +(2 values) train_random_forest->model - - -rf_model -(2 values) - - - -get_train_test_split->y_test - - -y_test -(2 values) - - - -get_train_test_split->X_test - - -X_test -(2 values) - - - -get_train_test_split->X_train - - -X_train -(2 values) - - - -get_train_test_split->y_train - - -y_train -(2 values) + + +rf_model +(2 values) diff --git a/docs/docs/blog/01_cf_files/01_cf_21_0.svg b/docs/docs/blog/01_cf_files/01_cf_21_0.svg index d9a5fac..19ef46e 100644 --- a/docs/docs/blog/01_cf_files/01_cf_21_0.svg +++ b/docs/docs/blog/01_cf_files/01_cf_21_0.svg @@ -9,61 +9,30 @@ G - - -y_test - -y_test -2 values (2 sources) - - - -eval_model - -eval_model -@op:eval_model -12 calls - - - -y_test->eval_model - - -y_test -(2 values) - - - -eval_ensemble - -eval_ensemble -@op:eval_ensemble -2 calls - - - -y_test->eval_ensemble - - -y_test -(2 values) - - + accuracy accuracy 14 values (14 sinks) - + model model 12 values (12 sources) + + +eval_model + +eval_model +@op:eval_model +12 calls + - + model->eval_model @@ -71,27 +40,58 @@ (12 values) - + X_test X_test 2 values (2 sources) - + X_test->eval_model X_test (2 values) + + +eval_ensemble + +eval_ensemble +@op:eval_ensemble +2 calls + - + X_test->eval_ensemble -X_test -(2 values) +X_test +(2 values) + + + +y_test + +y_test +2 values (2 sources) + + + +y_test->eval_model + + +y_test +(2 values) + + + +y_test->eval_ensemble + + +y_test +(2 values) @@ -101,15 +101,15 @@ 2 values (2 sources) - + models->eval_ensemble - - -models -(2 values) + + +models +(2 values) - + eval_model->accuracy @@ -117,12 +117,12 @@ (12 values) - + eval_ensemble->accuracy -accuracy -(2 values) +accuracy +(2 values) diff --git a/docs/docs/blog/01_cf_files/01_cf_24_0.svg b/docs/docs/blog/01_cf_files/01_cf_24_0.svg index bebedb0..c50018f 100644 --- a/docs/docs/blog/01_cf_files/01_cf_24_0.svg +++ b/docs/docs/blog/01_cf_files/01_cf_24_0.svg @@ -4,405 +4,405 @@ - + G - - + + -y_test - -y_test -2 values +accuracy + +accuracy +14 values (14 sinks) - - -eval_ensemble - -eval_ensemble -@op:eval_ensemble -2 calls + + +n_estimators + +n_estimators +3 values (3 sources) - - -y_test->eval_ensemble - - -y_test -(2 values) + + +train_random_forest + +train_random_forest +@op:train_random_forest +6 calls + + + +n_estimators->train_random_forest + + +n_estimators +(3 values) + + + +model + +model +12 values - + eval_model - -eval_model -@op:eval_model -12 calls + +eval_model +@op:eval_model +12 calls - - -y_test->eval_model - - -y_test -(2 values) + + +model->eval_model + + +model +(12 values) + + + +__make_list__ + +__make_list__ +@op:__make_list__ +2 calls + + + +model->__make_list__ + + +*elts +(12 values) - + X - -X -2 values + +X +2 values - + +get_train_test_split + +get_train_test_split +@op:get_train_test_split +2 calls + + + +X->get_train_test_split + + +X +(2 values) + + + scale_data - -scale_data -@op:scale_data -1 calls + +scale_data +@op:scale_data +1 calls X->scale_data - - -X -(1 values) + + +X +(1 values) - - -get_train_test_split - -get_train_test_split -@op:get_train_test_split -2 calls - - - -X->get_train_test_split - - -X -(2 values) + + +X_train + +X_train +2 values - - -accuracy - -accuracy -14 values (14 sinks) + + +train_svc + +train_svc +@op:train_svc +6 calls - - -model - -model -12 values + + +X_train->train_svc + + +X_train +(2 values) - - -__make_list__ - -__make_list__ -@op:__make_list__ -2 calls + + +X_train->train_random_forest + + +X_train +(2 values) - - -model->__make_list__ - - -*elts -(12 values) + + +kernel + +kernel +3 values (3 sources) - - -model->eval_model - - -model -(12 values) + + +kernel->train_svc + + +kernel +(3 values) - - -n_estimators - -n_estimators -3 values (3 sources) + + +y_train + +y_train +2 values - - -train_random_forest - -train_random_forest -@op:train_random_forest -6 calls + + +y_train->train_svc + + +y_train +(2 values) - - -n_estimators->train_random_forest - - -n_estimators -(3 values) + + +y_train->train_random_forest + + +y_train +(2 values) - + X_test - -X_test -2 values - - - -X_test->eval_ensemble - - -X_test -(2 values) + +X_test +2 values - + X_test->eval_model - - -X_test -(2 values) + + +X_test +(2 values) - - -models - -models -2 values + + +eval_ensemble + +eval_ensemble +@op:eval_ensemble +2 calls - - -models->eval_ensemble - - -models -(2 values) + + +X_test->eval_ensemble + + +X_test +(2 values) - + max_depth - -max_depth -1 values (1 sources) + +max_depth +1 values (1 sources) max_depth->train_random_forest - - -max_depth -(1 values) + + +max_depth +(1 values) + + + +y_test + +y_test +2 values + + + +y_test->eval_model + + +y_test +(2 values) + + + +y_test->eval_ensemble + + +y_test +(2 values) - + y - -y -1 values + +y +1 values y->get_train_test_split - - -y -(1 values) + + +y +(1 values) + + + +models + +models +2 values + + + +models->eval_ensemble + + +models +(2 values) - + C - -C -1 values (1 sources) - - - -train_svc - -train_svc -@op:train_svc -6 calls + +C +1 values (1 sources) C->train_svc - - -C -(1 values) + + +C +(1 values) - - -kernel - -kernel -3 values (3 sources) + + +eval_model->accuracy + + +accuracy +(12 values) - - -kernel->train_svc - - -kernel -(3 values) + + +get_train_test_split->X_train + + +X_train +(2 values) - - -X_train - -X_train -2 values + + +get_train_test_split->y_train + + +y_train +(2 values) - - -X_train->train_svc - - -X_train -(2 values) + + +get_train_test_split->X_test + + +X_test +(2 values) - - -X_train->train_random_forest - - -X_train -(2 values) + + +get_train_test_split->y_test + + +y_test +(2 values) - - -y_train - -y_train -2 values + + +eval_ensemble->accuracy + + +accuracy +(2 values) - - -y_train->train_svc - - -y_train -(2 values) + + +__make_list__->models + + +list +(2 values) - - -y_train->train_random_forest - - -y_train -(2 values) + + +train_svc->model + + +svc_model +(6 values) - + get_data - -get_data -@op:get_data -1 calls + +get_data +@op:get_data +1 calls get_data->X - - -X -(1 values) + + +X +(1 values) get_data->y - - -y -(1 values) + + +y +(1 values) scale_data->X - - -X_scaled -(1 values) - - - -eval_ensemble->accuracy - - -accuracy -(2 values) - - - -__make_list__->models - - -list -(2 values) - - - -eval_model->accuracy - - -accuracy -(12 values) - - - -train_svc->model - - -svc_model -(6 values) + + +X_scaled +(1 values) train_random_forest->model - - -rf_model -(6 values) - - - -get_train_test_split->y_test - - -y_test -(2 values) - - - -get_train_test_split->X_test - - -X_test -(2 values) - - - -get_train_test_split->X_train - - -X_train -(2 values) - - - -get_train_test_split->y_train - - -y_train -(2 values) + + +rf_model +(6 values) diff --git a/docs/docs/blog/01_cf_files/01_cf_2_0.svg b/docs/docs/blog/01_cf_files/01_cf_2_0.svg index 49972bb..80c3633 100644 --- a/docs/docs/blog/01_cf_files/01_cf_2_0.svg +++ b/docs/docs/blog/01_cf_files/01_cf_2_0.svg @@ -9,12 +9,28 @@ G - + -w - -w -3 values (3 sinks) +y + +y +5 values (2 sinks) + + + +add + +add +@op:add +3 calls + + + +y->add + + +y +(3 values) @@ -39,14 +55,6 @@ x (5 values) - - -add - -add -@op:add -3 calls - x->add @@ -55,20 +63,12 @@ z (3 values) - + -y - -y -5 values (2 sinks) - - - -y->add - - -y -(3 values) +w + +w +3 values (3 sinks) diff --git a/docs_source/blog/01_cf.ipynb b/docs_source/blog/01_cf.ipynb index 8bd8678..33e73ec 100644 --- a/docs_source/blog/01_cf.ipynb +++ b/docs_source/blog/01_cf.ipynb @@ -47,10 +47,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-07-07T16:17:17.785661Z", - "iopub.status.busy": "2024-07-07T16:17:17.785133Z", - "iopub.status.idle": "2024-07-07T16:17:19.544210Z", - "shell.execute_reply": "2024-07-07T16:17:19.543445Z" + "iopub.execute_input": "2024-07-07T16:20:30.788124Z", + "iopub.status.busy": "2024-07-07T16:20:30.787914Z", + "iopub.status.idle": "2024-07-07T16:20:32.797913Z", + "shell.execute_reply": "2024-07-07T16:20:32.797316Z" } }, "outputs": [ @@ -68,12 +68,28 @@ "\n", "G\n", "\n", - "\n", + "\n", "\n", - "w\n", - "\n", - "w\n", - "3 values (3 sinks)\n", + "y\n", + "\n", + "y\n", + "5 values (2 sinks)\n", + "\n", + "\n", + "\n", + "add\n", + "\n", + "add\n", + "@op:add\n", + "3 calls\n", + "\n", + "\n", + "\n", + "y->add\n", + "\n", + "\n", + "y\n", + "(3 values)\n", "\n", "\n", "\n", @@ -98,14 +114,6 @@ "x\n", "(5 values)\n", "\n", - "\n", - "\n", - "add\n", - "\n", - "add\n", - "@op:add\n", - "3 calls\n", - "\n", "\n", "\n", "x->add\n", @@ -114,20 +122,12 @@ "z\n", "(3 values)\n", "\n", - "\n", + "\n", "\n", - "y\n", - "\n", - "y\n", - "5 values (2 sinks)\n", - "\n", - "\n", - "\n", - "y->add\n", - "\n", - "\n", - "y\n", - "(3 values)\n", + "w\n", + "\n", + "w\n", + "3 values (3 sinks)\n", "\n", "\n", "\n", @@ -149,7 +149,7 @@ "\n" ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -162,14 +162,21 @@ "| | x | increment | y | add | w |\n", "|---:|----:|:--------------------------------------------|----:|:--------------------------------------|----:|\n", "| 0 | 1 | Call(increment, cid='948...', hid='6e2...') | 2 | | nan |\n", - "| 1 | 0 | Call(increment, cid='d47...', hid='230...') | 1 | Call(add, cid='89c...', hid='247...') | 1 |\n", - "| 2 | 2 | Call(increment, cid='bfb...', hid='5dd...') | 3 | Call(add, cid='a81...', hid='626...') | 5 |\n", - "| 3 | 4 | Call(increment, cid='928...', hid='adf...') | 5 | Call(add, cid='a54...', hid='deb...') | 9 |\n", - "| 4 | 3 | Call(increment, cid='9b4...', hid='df2...') | 4 | | nan |\n" + "| 1 | 4 | Call(increment, cid='928...', hid='adf...') | 5 | Call(add, cid='a54...', hid='deb...') | 9 |\n", + "| 2 | 3 | Call(increment, cid='9b4...', hid='df2...') | 4 | | nan |\n", + "| 3 | 0 | Call(increment, cid='d47...', hid='230...') | 1 | Call(add, cid='89c...', hid='247...') | 1 |\n", + "| 4 | 2 | Call(increment, cid='bfb...', hid='5dd...') | 3 | Call(add, cid='a81...', hid='626...') | 5 |\n" ] } ], "source": [ + "# for Google Colab\n", + "try:\n", + " import google.colab\n", + " !pip install git+https://github.com/amakelov/mandala\n", + "except:\n", + " pass\n", + "\n", "from mandala.imports import *\n", "\n", "@op(output_names=['y'])\n", @@ -252,10 +259,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-07-07T16:17:19.566740Z", - "iopub.status.busy": "2024-07-07T16:17:19.566415Z", - "iopub.status.idle": "2024-07-07T16:17:19.833625Z", - "shell.execute_reply": "2024-07-07T16:17:19.833036Z" + "iopub.execute_input": "2024-07-07T16:20:32.816877Z", + "iopub.status.busy": "2024-07-07T16:20:32.816576Z", + "iopub.status.idle": "2024-07-07T16:20:33.153674Z", + "shell.execute_reply": "2024-07-07T16:20:33.153084Z" } }, "outputs": [], @@ -294,10 +301,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-07-07T16:17:19.836880Z", - "iopub.status.busy": "2024-07-07T16:17:19.836649Z", - "iopub.status.idle": "2024-07-07T16:17:19.908417Z", - "shell.execute_reply": "2024-07-07T16:17:19.907804Z" + "iopub.execute_input": "2024-07-07T16:20:33.156308Z", + "iopub.status.busy": "2024-07-07T16:20:33.156092Z", + "iopub.status.idle": "2024-07-07T16:20:33.226744Z", + "shell.execute_reply": "2024-07-07T16:20:33.226152Z" } }, "outputs": [], @@ -331,10 +338,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-07-07T16:17:19.911595Z", - "iopub.status.busy": "2024-07-07T16:17:19.911330Z", - "iopub.status.idle": "2024-07-07T16:17:20.054697Z", - "shell.execute_reply": "2024-07-07T16:17:20.054044Z" + "iopub.execute_input": "2024-07-07T16:20:33.230051Z", + "iopub.status.busy": "2024-07-07T16:20:33.229828Z", + "iopub.status.idle": "2024-07-07T16:20:33.386055Z", + "shell.execute_reply": "2024-07-07T16:20:33.385389Z" } }, "outputs": [ @@ -352,11 +359,11 @@ "\n", "G\n", "\n", - "\n", + "\n", "\n", - "y_test\n", + "X_train\n", "\n", - "y_test\n", + "X_train\n", "2 values (2 sinks)\n", "\n", "\n", @@ -366,24 +373,8 @@ "X\n", "2 values\n", "\n", - "\n", - "\n", - "scale_data\n", - "\n", - "scale_data\n", - "@op:scale_data\n", - "1 calls\n", - "\n", - "\n", - "\n", - "X->scale_data\n", - "\n", - "\n", - "X\n", - "(1 values)\n", - "\n", "\n", - "\n", + "\n", "get_train_test_split\n", "\n", "get_train_test_split\n", @@ -398,15 +389,45 @@ "X\n", "(2 values)\n", "\n", - "\n", + "\n", + "\n", + "scale_data\n", + "\n", + "scale_data\n", + "@op:scale_data\n", + "1 calls\n", + "\n", + "\n", + "\n", + "X->scale_data\n", + "\n", + "\n", + "X\n", + "(1 values)\n", + "\n", + "\n", "\n", - "X_test\n", + "y_train\n", "\n", - "X_test\n", + "y_train\n", "2 values (2 sinks)\n", "\n", - "\n", + "\n", "\n", + "X_test\n", + "\n", + "X_test\n", + "2 values (2 sinks)\n", + "\n", + "\n", + "\n", + "y_test\n", + "\n", + "y_test\n", + "2 values (2 sinks)\n", + "\n", + "\n", + "\n", "y\n", "\n", "y\n", @@ -420,30 +441,8 @@ "y\n", "(1 values)\n", "\n", - "\n", - "\n", - "X_train\n", - "\n", - "X_train\n", - "2 values (2 sinks)\n", - "\n", - "\n", - "\n", - "y_train\n", - "\n", - "y_train\n", - "2 values (2 sinks)\n", - "\n", - "\n", - "\n", - "scale_data->X\n", - "\n", - "\n", - "X_scaled\n", - "(1 values)\n", - "\n", "\n", - "\n", + "\n", "get_data\n", "\n", "get_data\n", @@ -466,43 +465,51 @@ "y\n", "(1 values)\n", "\n", - "\n", - "\n", - "get_train_test_split->y_test\n", - "\n", - "\n", - "y_test\n", - "(2 values)\n", - "\n", - "\n", - "\n", - "get_train_test_split->X_test\n", - "\n", - "\n", - "X_test\n", - "(2 values)\n", - "\n", "\n", "\n", "get_train_test_split->X_train\n", - "\n", - "\n", - "X_train\n", - "(2 values)\n", + "\n", + "\n", + "X_train\n", + "(2 values)\n", "\n", "\n", "\n", "get_train_test_split->y_train\n", - "\n", - "\n", - "y_train\n", - "(2 values)\n", + "\n", + "\n", + "y_train\n", + "(2 values)\n", + "\n", + "\n", + "\n", + "get_train_test_split->X_test\n", + "\n", + "\n", + "X_test\n", + "(2 values)\n", + "\n", + "\n", + "\n", + "get_train_test_split->y_test\n", + "\n", + "\n", + "y_test\n", + "(2 values)\n", + "\n", + "\n", + "\n", + "scale_data->X\n", + "\n", + "\n", + "X_scaled\n", + "(1 values)\n", "\n", "\n", "\n" ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -529,10 +536,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2024-07-07T16:17:20.057585Z", - "iopub.status.busy": "2024-07-07T16:17:20.057375Z", - "iopub.status.idle": "2024-07-07T16:17:20.099571Z", - "shell.execute_reply": "2024-07-07T16:17:20.098939Z" + "iopub.execute_input": "2024-07-07T16:20:33.389004Z", + "iopub.status.busy": "2024-07-07T16:20:33.388496Z", + "iopub.status.idle": "2024-07-07T16:20:33.438249Z", + "shell.execute_reply": "2024-07-07T16:20:33.437597Z" } }, "outputs": [ @@ -566,10 +573,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2024-07-07T16:17:20.102405Z", - "iopub.status.busy": "2024-07-07T16:17:20.102196Z", - "iopub.status.idle": "2024-07-07T16:17:20.417045Z", - "shell.execute_reply": "2024-07-07T16:17:20.416372Z" + "iopub.execute_input": "2024-07-07T16:20:33.440719Z", + "iopub.status.busy": "2024-07-07T16:20:33.440499Z", + "iopub.status.idle": "2024-07-07T16:20:33.818655Z", + "shell.execute_reply": "2024-07-07T16:20:33.817942Z" } }, "outputs": [ @@ -582,340 +589,340 @@ "\n", "\n", - "\n", + "\n", "\n", "G\n", - "\n", - "\n", + "\n", + "\n", "\n", - "y_test\n", - "\n", - "y_test\n", - "2 values\n", + "accuracy\n", + "\n", + "accuracy\n", + "4 values (4 sinks)\n", + "\n", + "\n", + "\n", + "n_estimators\n", + "\n", + "n_estimators\n", + "1 values (1 sources)\n", + "\n", + "\n", + "\n", + "train_random_forest\n", + "\n", + "train_random_forest\n", + "@op:train_random_forest\n", + "2 calls\n", + "\n", + "\n", + "\n", + "n_estimators->train_random_forest\n", + "\n", + "\n", + "n_estimators\n", + "(1 values)\n", + "\n", + "\n", + "\n", + "model\n", + "\n", + "model\n", + "4 values\n", "\n", "\n", - "\n", + "\n", "eval_model\n", - "\n", - "eval_model\n", - "@op:eval_model\n", - "4 calls\n", + "\n", + "eval_model\n", + "@op:eval_model\n", + "4 calls\n", "\n", - "\n", - "\n", - "y_test->eval_model\n", - "\n", - "\n", - "y_test\n", - "(2 values)\n", + "\n", + "\n", + "model->eval_model\n", + "\n", + "\n", + "model\n", + "(4 values)\n", "\n", "\n", - "\n", + "\n", "X\n", - "\n", - "X\n", - "2 values\n", + "\n", + "X\n", + "2 values\n", "\n", - "\n", + "\n", "\n", + "get_train_test_split\n", + "\n", + "get_train_test_split\n", + "@op:get_train_test_split\n", + "2 calls\n", + "\n", + "\n", + "\n", + "X->get_train_test_split\n", + "\n", + "\n", + "X\n", + "(2 values)\n", + "\n", + "\n", + "\n", "scale_data\n", - "\n", - "scale_data\n", - "@op:scale_data\n", - "1 calls\n", + "\n", + "scale_data\n", + "@op:scale_data\n", + "1 calls\n", "\n", "\n", "\n", "X->scale_data\n", - "\n", - "\n", - "X\n", - "(1 values)\n", + "\n", + "\n", + "X\n", + "(1 values)\n", "\n", - "\n", - "\n", - "get_train_test_split\n", - "\n", - "get_train_test_split\n", - "@op:get_train_test_split\n", - "2 calls\n", + "\n", + "\n", + "X_train\n", + "\n", + "X_train\n", + "2 values\n", "\n", - "\n", - "\n", - "X->get_train_test_split\n", - "\n", - "\n", - "X\n", - "(2 values)\n", + "\n", + "\n", + "train_svc\n", + "\n", + "train_svc\n", + "@op:train_svc\n", + "2 calls\n", "\n", - "\n", - "\n", - "accuracy\n", - "\n", - "accuracy\n", - "4 values (4 sinks)\n", + "\n", + "\n", + "X_train->train_svc\n", + "\n", + "\n", + "X_train\n", + "(2 values)\n", "\n", - "\n", - "\n", - "model\n", - "\n", - "model\n", - "4 values\n", + "\n", + "\n", + "X_train->train_random_forest\n", + "\n", + "\n", + "X_train\n", + "(2 values)\n", "\n", - "\n", - "\n", - "model->eval_model\n", - "\n", - "\n", - "model\n", - "(4 values)\n", + "\n", + "\n", + "kernel\n", + "\n", + "kernel\n", + "1 values (1 sources)\n", "\n", - "\n", - "\n", - "n_estimators\n", - "\n", - "n_estimators\n", - "1 values (1 sources)\n", + "\n", + "\n", + "kernel->train_svc\n", + "\n", + "\n", + "kernel\n", + "(1 values)\n", "\n", - "\n", - "\n", - "train_random_forest\n", - "\n", - "train_random_forest\n", - "@op:train_random_forest\n", - "2 calls\n", + "\n", + "\n", + "y_train\n", + "\n", + "y_train\n", + "2 values\n", "\n", - "\n", - "\n", - "n_estimators->train_random_forest\n", - "\n", - "\n", - "n_estimators\n", - "(1 values)\n", + "\n", + "\n", + "y_train->train_svc\n", + "\n", + "\n", + "y_train\n", + "(2 values)\n", + "\n", + "\n", + "\n", + "y_train->train_random_forest\n", + "\n", + "\n", + "y_train\n", + "(2 values)\n", "\n", "\n", - "\n", + "\n", "X_test\n", - "\n", - "X_test\n", - "2 values\n", + "\n", + "X_test\n", + "2 values\n", "\n", "\n", "\n", "X_test->eval_model\n", - "\n", - "\n", - "X_test\n", - "(2 values)\n", + "\n", + "\n", + "X_test\n", + "(2 values)\n", "\n", "\n", - "\n", + "\n", "max_depth\n", - "\n", - "max_depth\n", - "1 values (1 sources)\n", + "\n", + "max_depth\n", + "1 values (1 sources)\n", "\n", "\n", "\n", "max_depth->train_random_forest\n", - "\n", - "\n", - "max_depth\n", - "(1 values)\n", - "\n", - "\n", - "\n", - "C\n", - "\n", - "C\n", - "1 values (1 sources)\n", + "\n", + "\n", + "max_depth\n", + "(1 values)\n", "\n", - "\n", - "\n", - "train_svc\n", - "\n", - "train_svc\n", - "@op:train_svc\n", - "2 calls\n", + "\n", + "\n", + "y_test\n", + "\n", + "y_test\n", + "2 values\n", "\n", - "\n", - "\n", - "C->train_svc\n", - "\n", - "\n", - "C\n", - "(1 values)\n", + "\n", + "\n", + "y_test->eval_model\n", + "\n", + "\n", + "y_test\n", + "(2 values)\n", "\n", "\n", - "\n", + "\n", "y\n", - "\n", - "y\n", - "1 values\n", + "\n", + "y\n", + "1 values\n", "\n", "\n", "\n", "y->get_train_test_split\n", - "\n", - "\n", - "y\n", - "(1 values)\n", + "\n", + "\n", + "y\n", + "(1 values)\n", "\n", - "\n", - "\n", - "kernel\n", - "\n", - "kernel\n", - "1 values (1 sources)\n", - "\n", - "\n", - "\n", - "kernel->train_svc\n", - "\n", - "\n", - "kernel\n", - "(1 values)\n", + "\n", + "\n", + "C\n", + "\n", + "C\n", + "1 values (1 sources)\n", "\n", - "\n", - "\n", - "X_train\n", - "\n", - "X_train\n", - "2 values\n", + "\n", + "\n", + "C->train_svc\n", + "\n", + "\n", + "C\n", + "(1 values)\n", "\n", - "\n", - "\n", - "X_train->train_svc\n", - "\n", - "\n", - "X_train\n", - "(2 values)\n", + "\n", + "\n", + "eval_model->accuracy\n", + "\n", + "\n", + "accuracy\n", + "(4 values)\n", "\n", - "\n", - "\n", - "X_train->train_random_forest\n", - "\n", - "\n", - "X_train\n", - "(2 values)\n", + "\n", + "\n", + "get_train_test_split->X_train\n", + "\n", + "\n", + "X_train\n", + "(2 values)\n", "\n", - "\n", - "\n", - "y_train\n", - "\n", - "y_train\n", - "2 values\n", + "\n", + "\n", + "get_train_test_split->y_train\n", + "\n", + "\n", + "y_train\n", + "(2 values)\n", "\n", - "\n", - "\n", - "y_train->train_svc\n", - "\n", - "\n", - "y_train\n", - "(2 values)\n", + "\n", + "\n", + "get_train_test_split->X_test\n", + "\n", + "\n", + "X_test\n", + "(2 values)\n", "\n", - "\n", - "\n", - "y_train->train_random_forest\n", - "\n", - "\n", - "y_train\n", - "(2 values)\n", + "\n", + "\n", + "get_train_test_split->y_test\n", + "\n", + "\n", + "y_test\n", + "(2 values)\n", "\n", "\n", - "\n", + "\n", "get_data\n", - "\n", - "get_data\n", - "@op:get_data\n", - "1 calls\n", + "\n", + "get_data\n", + "@op:get_data\n", + "1 calls\n", "\n", "\n", "\n", "get_data->X\n", - "\n", - "\n", - "X\n", - "(1 values)\n", + "\n", + "\n", + "X\n", + "(1 values)\n", "\n", "\n", "\n", "get_data->y\n", - "\n", - "\n", - "y\n", - "(1 values)\n", + "\n", + "\n", + "y\n", + "(1 values)\n", "\n", "\n", "\n", "scale_data->X\n", - "\n", - "\n", - "X_scaled\n", - "(1 values)\n", - "\n", - "\n", - "\n", - "eval_model->accuracy\n", - "\n", - "\n", - "accuracy\n", - "(4 values)\n", + "\n", + "\n", + "X_scaled\n", + "(1 values)\n", "\n", "\n", "\n", "train_svc->model\n", - "\n", - "\n", - "svc_model\n", - "(2 values)\n", + "\n", + "\n", + "svc_model\n", + "(2 values)\n", "\n", "\n", "\n", "train_random_forest->model\n", - "\n", - "\n", - "rf_model\n", - "(2 values)\n", - "\n", - "\n", - "\n", - "get_train_test_split->y_test\n", - "\n", - "\n", - "y_test\n", - "(2 values)\n", - "\n", - "\n", - "\n", - "get_train_test_split->X_test\n", - "\n", - "\n", - "X_test\n", - "(2 values)\n", - "\n", - "\n", - "\n", - "get_train_test_split->X_train\n", - "\n", - "\n", - "X_train\n", - "(2 values)\n", - "\n", - "\n", - "\n", - "get_train_test_split->y_train\n", - "\n", - "\n", - "y_train\n", - "(2 values)\n", + "\n", + "\n", + "rf_model\n", + "(2 values)\n", "\n", "\n", "\n" ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -976,10 +983,10 @@ "execution_count": 7, "metadata": { "execution": { - "iopub.execute_input": "2024-07-07T16:17:20.419887Z", - "iopub.status.busy": "2024-07-07T16:17:20.419702Z", - "iopub.status.idle": "2024-07-07T16:17:20.468835Z", - "shell.execute_reply": "2024-07-07T16:17:20.468189Z" + "iopub.execute_input": "2024-07-07T16:20:33.822627Z", + "iopub.status.busy": "2024-07-07T16:20:33.822311Z", + "iopub.status.idle": "2024-07-07T16:20:33.892788Z", + "shell.execute_reply": "2024-07-07T16:20:33.892116Z" } }, "outputs": [ @@ -989,10 +996,10 @@ "text": [ "| | accuracy | scale_data | train_svc | train_random_forest |\n", "|---:|-----------:|:---------------------------------------------|:--------------------------------------------|:------------------------------------------------------|\n", - "| 1 | 0.915 | Call(scale_data, cid='09f...', hid='d6b...') | | Call(train_random_forest, cid='e26...', hid='c42...') |\n", + "| 2 | 0.915 | Call(scale_data, cid='09f...', hid='d6b...') | | Call(train_random_forest, cid='e26...', hid='c42...') |\n", "| 3 | 0.885 | | | Call(train_random_forest, cid='519...', hid='997...') |\n", - "| 0 | 0.82 | Call(scale_data, cid='09f...', hid='d6b...') | Call(train_svc, cid='6f4...', hid='7d9...') | |\n", - "| 2 | 0.82 | | Call(train_svc, cid='ddf...', hid='6a0...') | |\n" + "| 0 | 0.82 | | Call(train_svc, cid='ddf...', hid='6a0...') | |\n", + "| 1 | 0.82 | Call(scale_data, cid='09f...', hid='d6b...') | Call(train_svc, cid='6f4...', hid='7d9...') | |\n" ] } ], @@ -1021,10 +1028,10 @@ "execution_count": 8, "metadata": { "execution": { - "iopub.execute_input": "2024-07-07T16:17:20.471850Z", - "iopub.status.busy": "2024-07-07T16:17:20.471615Z", - "iopub.status.idle": "2024-07-07T16:17:20.923871Z", - "shell.execute_reply": "2024-07-07T16:17:20.923157Z" + "iopub.execute_input": "2024-07-07T16:20:33.895841Z", + "iopub.status.busy": "2024-07-07T16:20:33.895595Z", + "iopub.status.idle": "2024-07-07T16:20:34.471464Z", + "shell.execute_reply": "2024-07-07T16:20:34.470811Z" } }, "outputs": [], @@ -1086,10 +1093,10 @@ "execution_count": 9, "metadata": { "execution": { - "iopub.execute_input": "2024-07-07T16:17:20.927048Z", - "iopub.status.busy": "2024-07-07T16:17:20.926842Z", - "iopub.status.idle": "2024-07-07T16:17:21.040778Z", - "shell.execute_reply": "2024-07-07T16:17:21.040113Z" + "iopub.execute_input": "2024-07-07T16:20:34.474124Z", + "iopub.status.busy": "2024-07-07T16:20:34.473906Z", + "iopub.status.idle": "2024-07-07T16:20:34.615060Z", + "shell.execute_reply": "2024-07-07T16:20:34.614348Z" } }, "outputs": [ @@ -1107,61 +1114,30 @@ "\n", "G\n", "\n", - "\n", - "\n", - "y_test\n", - "\n", - "y_test\n", - "2 values (2 sources)\n", - "\n", - "\n", - "\n", - "eval_model\n", - "\n", - "eval_model\n", - "@op:eval_model\n", - "12 calls\n", - "\n", - "\n", - "\n", - "y_test->eval_model\n", - "\n", - "\n", - "y_test\n", - "(2 values)\n", - "\n", - "\n", - "\n", - "eval_ensemble\n", - "\n", - "eval_ensemble\n", - "@op:eval_ensemble\n", - "2 calls\n", - "\n", - "\n", - "\n", - "y_test->eval_ensemble\n", - "\n", - "\n", - "y_test\n", - "(2 values)\n", - "\n", "\n", - "\n", + "\n", "accuracy\n", "\n", "accuracy\n", "14 values (14 sinks)\n", "\n", "\n", - "\n", + "\n", "model\n", "\n", "model\n", "12 values (12 sources)\n", "\n", + "\n", + "\n", + "eval_model\n", + "\n", + "eval_model\n", + "@op:eval_model\n", + "12 calls\n", + "\n", "\n", - "\n", + "\n", "model->eval_model\n", "\n", "\n", @@ -1169,27 +1145,58 @@ "(12 values)\n", "\n", "\n", - "\n", + "\n", "X_test\n", "\n", "X_test\n", "2 values (2 sources)\n", "\n", "\n", - "\n", + "\n", "X_test->eval_model\n", "\n", "\n", "X_test\n", "(2 values)\n", "\n", + "\n", + "\n", + "eval_ensemble\n", + "\n", + "eval_ensemble\n", + "@op:eval_ensemble\n", + "2 calls\n", + "\n", "\n", - "\n", + "\n", "X_test->eval_ensemble\n", "\n", "\n", - "X_test\n", - "(2 values)\n", + "X_test\n", + "(2 values)\n", + "\n", + "\n", + "\n", + "y_test\n", + "\n", + "y_test\n", + "2 values (2 sources)\n", + "\n", + "\n", + "\n", + "y_test->eval_model\n", + "\n", + "\n", + "y_test\n", + "(2 values)\n", + "\n", + "\n", + "\n", + "y_test->eval_ensemble\n", + "\n", + "\n", + "y_test\n", + "(2 values)\n", "\n", "\n", "\n", @@ -1199,15 +1206,15 @@ "2 values (2 sources)\n", "\n", "\n", - "\n", + "\n", "models->eval_ensemble\n", - "\n", - "\n", - "models\n", - "(2 values)\n", + "\n", + "\n", + "models\n", + "(2 values)\n", "\n", "\n", - "\n", + "\n", "eval_model->accuracy\n", "\n", "\n", @@ -1215,18 +1222,18 @@ "(12 values)\n", "\n", "\n", - "\n", + "\n", "eval_ensemble->accuracy\n", "\n", "\n", - "accuracy\n", - "(2 values)\n", + "accuracy\n", + "(2 values)\n", "\n", "\n", "\n" ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -1258,10 +1265,10 @@ "execution_count": 10, "metadata": { "execution": { - "iopub.execute_input": "2024-07-07T16:17:21.043843Z", - "iopub.status.busy": "2024-07-07T16:17:21.043659Z", - "iopub.status.idle": "2024-07-07T16:17:21.200029Z", - "shell.execute_reply": "2024-07-07T16:17:21.199297Z" + "iopub.execute_input": "2024-07-07T16:20:34.618553Z", + "iopub.status.busy": "2024-07-07T16:20:34.618299Z", + "iopub.status.idle": "2024-07-07T16:20:34.805530Z", + "shell.execute_reply": "2024-07-07T16:20:34.804929Z" } }, "outputs": [ @@ -1274,411 +1281,411 @@ "\n", "\n", - "\n", + "\n", "\n", "G\n", - "\n", - "\n", + "\n", + "\n", "\n", - "y_test\n", - "\n", - "y_test\n", - "2 values\n", + "accuracy\n", + "\n", + "accuracy\n", + "14 values (14 sinks)\n", "\n", - "\n", - "\n", - "eval_ensemble\n", - "\n", - "eval_ensemble\n", - "@op:eval_ensemble\n", - "2 calls\n", + "\n", + "\n", + "n_estimators\n", + "\n", + "n_estimators\n", + "3 values (3 sources)\n", "\n", - "\n", - "\n", - "y_test->eval_ensemble\n", - "\n", - "\n", - "y_test\n", - "(2 values)\n", + "\n", + "\n", + "train_random_forest\n", + "\n", + "train_random_forest\n", + "@op:train_random_forest\n", + "6 calls\n", + "\n", + "\n", + "\n", + "n_estimators->train_random_forest\n", + "\n", + "\n", + "n_estimators\n", + "(3 values)\n", + "\n", + "\n", + "\n", + "model\n", + "\n", + "model\n", + "12 values\n", "\n", "\n", - "\n", + "\n", "eval_model\n", - "\n", - "eval_model\n", - "@op:eval_model\n", - "12 calls\n", + "\n", + "eval_model\n", + "@op:eval_model\n", + "12 calls\n", "\n", - "\n", - "\n", - "y_test->eval_model\n", - "\n", - "\n", - "y_test\n", - "(2 values)\n", + "\n", + "\n", + "model->eval_model\n", + "\n", + "\n", + "model\n", + "(12 values)\n", + "\n", + "\n", + "\n", + "__make_list__\n", + "\n", + "__make_list__\n", + "@op:__make_list__\n", + "2 calls\n", + "\n", + "\n", + "\n", + "model->__make_list__\n", + "\n", + "\n", + "*elts\n", + "(12 values)\n", "\n", "\n", - "\n", + "\n", "X\n", - "\n", - "X\n", - "2 values\n", + "\n", + "X\n", + "2 values\n", "\n", - "\n", + "\n", "\n", + "get_train_test_split\n", + "\n", + "get_train_test_split\n", + "@op:get_train_test_split\n", + "2 calls\n", + "\n", + "\n", + "\n", + "X->get_train_test_split\n", + "\n", + "\n", + "X\n", + "(2 values)\n", + "\n", + "\n", + "\n", "scale_data\n", - "\n", - "scale_data\n", - "@op:scale_data\n", - "1 calls\n", + "\n", + "scale_data\n", + "@op:scale_data\n", + "1 calls\n", "\n", "\n", "\n", "X->scale_data\n", - "\n", - "\n", - "X\n", - "(1 values)\n", + "\n", + "\n", + "X\n", + "(1 values)\n", "\n", - "\n", - "\n", - "get_train_test_split\n", - "\n", - "get_train_test_split\n", - "@op:get_train_test_split\n", - "2 calls\n", - "\n", - "\n", - "\n", - "X->get_train_test_split\n", - "\n", - "\n", - "X\n", - "(2 values)\n", + "\n", + "\n", + "X_train\n", + "\n", + "X_train\n", + "2 values\n", "\n", - "\n", - "\n", - "accuracy\n", - "\n", - "accuracy\n", - "14 values (14 sinks)\n", + "\n", + "\n", + "train_svc\n", + "\n", + "train_svc\n", + "@op:train_svc\n", + "6 calls\n", "\n", - "\n", - "\n", - "model\n", - "\n", - "model\n", - "12 values\n", + "\n", + "\n", + "X_train->train_svc\n", + "\n", + "\n", + "X_train\n", + "(2 values)\n", "\n", - "\n", - "\n", - "__make_list__\n", - "\n", - "__make_list__\n", - "@op:__make_list__\n", - "2 calls\n", + "\n", + "\n", + "X_train->train_random_forest\n", + "\n", + "\n", + "X_train\n", + "(2 values)\n", "\n", - "\n", - "\n", - "model->__make_list__\n", - "\n", - "\n", - "*elts\n", - "(12 values)\n", + "\n", + "\n", + "kernel\n", + "\n", + "kernel\n", + "3 values (3 sources)\n", "\n", - "\n", - "\n", - "model->eval_model\n", - "\n", - "\n", - "model\n", - "(12 values)\n", + "\n", + "\n", + "kernel->train_svc\n", + "\n", + "\n", + "kernel\n", + "(3 values)\n", "\n", - "\n", - "\n", - "n_estimators\n", - "\n", - "n_estimators\n", - "3 values (3 sources)\n", + "\n", + "\n", + "y_train\n", + "\n", + "y_train\n", + "2 values\n", "\n", - "\n", - "\n", - "train_random_forest\n", - "\n", - "train_random_forest\n", - "@op:train_random_forest\n", - "6 calls\n", + "\n", + "\n", + "y_train->train_svc\n", + "\n", + "\n", + "y_train\n", + "(2 values)\n", "\n", - "\n", - "\n", - "n_estimators->train_random_forest\n", - "\n", - "\n", - "n_estimators\n", - "(3 values)\n", + "\n", + "\n", + "y_train->train_random_forest\n", + "\n", + "\n", + "y_train\n", + "(2 values)\n", "\n", "\n", - "\n", + "\n", "X_test\n", - "\n", - "X_test\n", - "2 values\n", - "\n", - "\n", - "\n", - "X_test->eval_ensemble\n", - "\n", - "\n", - "X_test\n", - "(2 values)\n", + "\n", + "X_test\n", + "2 values\n", "\n", "\n", - "\n", + "\n", "X_test->eval_model\n", - "\n", - "\n", - "X_test\n", - "(2 values)\n", + "\n", + "\n", + "X_test\n", + "(2 values)\n", "\n", - "\n", - "\n", - "models\n", - "\n", - "models\n", - "2 values\n", + "\n", + "\n", + "eval_ensemble\n", + "\n", + "eval_ensemble\n", + "@op:eval_ensemble\n", + "2 calls\n", "\n", - "\n", - "\n", - "models->eval_ensemble\n", - "\n", - "\n", - "models\n", - "(2 values)\n", + "\n", + "\n", + "X_test->eval_ensemble\n", + "\n", + "\n", + "X_test\n", + "(2 values)\n", "\n", "\n", - "\n", + "\n", "max_depth\n", - "\n", - "max_depth\n", - "1 values (1 sources)\n", + "\n", + "max_depth\n", + "1 values (1 sources)\n", "\n", "\n", "\n", "max_depth->train_random_forest\n", - "\n", - "\n", - "max_depth\n", - "(1 values)\n", + "\n", + "\n", + "max_depth\n", + "(1 values)\n", + "\n", + "\n", + "\n", + "y_test\n", + "\n", + "y_test\n", + "2 values\n", + "\n", + "\n", + "\n", + "y_test->eval_model\n", + "\n", + "\n", + "y_test\n", + "(2 values)\n", + "\n", + "\n", + "\n", + "y_test->eval_ensemble\n", + "\n", + "\n", + "y_test\n", + "(2 values)\n", "\n", "\n", - "\n", + "\n", "y\n", - "\n", - "y\n", - "1 values\n", + "\n", + "y\n", + "1 values\n", "\n", "\n", "\n", "y->get_train_test_split\n", - "\n", - "\n", - "y\n", - "(1 values)\n", + "\n", + "\n", + "y\n", + "(1 values)\n", + "\n", + "\n", + "\n", + "models\n", + "\n", + "models\n", + "2 values\n", + "\n", + "\n", + "\n", + "models->eval_ensemble\n", + "\n", + "\n", + "models\n", + "(2 values)\n", "\n", "\n", - "\n", + "\n", "C\n", - "\n", - "C\n", - "1 values (1 sources)\n", - "\n", - "\n", - "\n", - "train_svc\n", - "\n", - "train_svc\n", - "@op:train_svc\n", - "6 calls\n", + "\n", + "C\n", + "1 values (1 sources)\n", "\n", "\n", "\n", "C->train_svc\n", - "\n", - "\n", - "C\n", - "(1 values)\n", + "\n", + "\n", + "C\n", + "(1 values)\n", "\n", - "\n", - "\n", - "kernel\n", - "\n", - "kernel\n", - "3 values (3 sources)\n", + "\n", + "\n", + "eval_model->accuracy\n", + "\n", + "\n", + "accuracy\n", + "(12 values)\n", "\n", - "\n", - "\n", - "kernel->train_svc\n", - "\n", - "\n", - "kernel\n", - "(3 values)\n", + "\n", + "\n", + "get_train_test_split->X_train\n", + "\n", + "\n", + "X_train\n", + "(2 values)\n", "\n", - "\n", - "\n", - "X_train\n", - "\n", - "X_train\n", - "2 values\n", + "\n", + "\n", + "get_train_test_split->y_train\n", + "\n", + "\n", + "y_train\n", + "(2 values)\n", "\n", - "\n", - "\n", - "X_train->train_svc\n", - "\n", - "\n", - "X_train\n", - "(2 values)\n", + "\n", + "\n", + "get_train_test_split->X_test\n", + "\n", + "\n", + "X_test\n", + "(2 values)\n", "\n", - "\n", - "\n", - "X_train->train_random_forest\n", - "\n", - "\n", - "X_train\n", - "(2 values)\n", + "\n", + "\n", + "get_train_test_split->y_test\n", + "\n", + "\n", + "y_test\n", + "(2 values)\n", "\n", - "\n", - "\n", - "y_train\n", - "\n", - "y_train\n", - "2 values\n", + "\n", + "\n", + "eval_ensemble->accuracy\n", + "\n", + "\n", + "accuracy\n", + "(2 values)\n", "\n", - "\n", - "\n", - "y_train->train_svc\n", - "\n", - "\n", - "y_train\n", - "(2 values)\n", + "\n", + "\n", + "__make_list__->models\n", + "\n", + "\n", + "list\n", + "(2 values)\n", "\n", - "\n", - "\n", - "y_train->train_random_forest\n", - "\n", - "\n", - "y_train\n", - "(2 values)\n", + "\n", + "\n", + "train_svc->model\n", + "\n", + "\n", + "svc_model\n", + "(6 values)\n", "\n", "\n", - "\n", + "\n", "get_data\n", - "\n", - "get_data\n", - "@op:get_data\n", - "1 calls\n", + "\n", + "get_data\n", + "@op:get_data\n", + "1 calls\n", "\n", "\n", "\n", "get_data->X\n", - "\n", - "\n", - "X\n", - "(1 values)\n", + "\n", + "\n", + "X\n", + "(1 values)\n", "\n", "\n", "\n", "get_data->y\n", - "\n", - "\n", - "y\n", - "(1 values)\n", + "\n", + "\n", + "y\n", + "(1 values)\n", "\n", "\n", "\n", "scale_data->X\n", - "\n", - "\n", - "X_scaled\n", - "(1 values)\n", - "\n", - "\n", - "\n", - "eval_ensemble->accuracy\n", - "\n", - "\n", - "accuracy\n", - "(2 values)\n", - "\n", - "\n", - "\n", - "__make_list__->models\n", - "\n", - "\n", - "list\n", - "(2 values)\n", - "\n", - "\n", - "\n", - "eval_model->accuracy\n", - "\n", - "\n", - "accuracy\n", - "(12 values)\n", - "\n", - "\n", - "\n", - "train_svc->model\n", - "\n", - "\n", - "svc_model\n", - "(6 values)\n", + "\n", + "\n", + "X_scaled\n", + "(1 values)\n", "\n", "\n", "\n", "train_random_forest->model\n", - "\n", - "\n", - "rf_model\n", - "(6 values)\n", - "\n", - "\n", - "\n", - "get_train_test_split->y_test\n", - "\n", - "\n", - "y_test\n", - "(2 values)\n", - "\n", - "\n", - "\n", - "get_train_test_split->X_test\n", - "\n", - "\n", - "X_test\n", - "(2 values)\n", - "\n", - "\n", - "\n", - "get_train_test_split->X_train\n", - "\n", - "\n", - "X_train\n", - "(2 values)\n", - "\n", - "\n", - "\n", - "get_train_test_split->y_train\n", - "\n", - "\n", - "y_train\n", - "(2 values)\n", + "\n", + "\n", + "rf_model\n", + "(6 values)\n", "\n", "\n", "\n" ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -1717,10 +1724,10 @@ "execution_count": 11, "metadata": { "execution": { - "iopub.execute_input": "2024-07-07T16:17:21.202984Z", - "iopub.status.busy": "2024-07-07T16:17:21.202807Z", - "iopub.status.idle": "2024-07-07T16:17:21.326262Z", - "shell.execute_reply": "2024-07-07T16:17:21.325595Z" + "iopub.execute_input": "2024-07-07T16:20:34.807913Z", + "iopub.status.busy": "2024-07-07T16:20:34.807675Z", + "iopub.status.idle": "2024-07-07T16:20:34.956885Z", + "shell.execute_reply": "2024-07-07T16:20:34.955811Z" } }, "outputs": [ @@ -1730,20 +1737,20 @@ "text": [ "| | n_estimators | kernel | accuracy |\n", "|---:|:-----------------------------|:-------------------------------------------|-----------:|\n", - "| 1 | | rbf | 0.915 |\n", - "| 5 | 5 | | 0.915 |\n", - "| 9 | | rbf | 0.91 |\n", - "| 2 | 20 | | 0.9 |\n", - "| 4 | 10 | | 0.9 |\n", - "| 6 | 10 | | 0.9 |\n", - "| 7 | 20 | | 0.9 |\n", - "| 0 | ValueCollection([20, 10, 5]) | ValueCollection(['linear', 'rbf', 'poly']) | 0.895 |\n", - "| 11 | ValueCollection([20, 10, 5]) | ValueCollection(['linear', 'rbf', 'poly']) | 0.895 |\n", - "| 13 | 5 | | 0.885 |\n", - "| 10 | | poly | 0.835 |\n", - "| 3 | | linear | 0.82 |\n", - "| 8 | | linear | 0.82 |\n", - "| 12 | | poly | 0.82 |\n" + "| 2 | 5 | | 0.915 |\n", + "| 11 | | rbf | 0.915 |\n", + "| 13 | | rbf | 0.91 |\n", + "| 0 | 10 | | 0.9 |\n", + "| 3 | 10 | | 0.9 |\n", + "| 6 | 20 | | 0.9 |\n", + "| 9 | 20 | | 0.9 |\n", + "| 8 | ValueCollection([20, 10, 5]) | ValueCollection(['linear', 'rbf', 'poly']) | 0.895 |\n", + "| 12 | ValueCollection([20, 10, 5]) | ValueCollection(['linear', 'rbf', 'poly']) | 0.895 |\n", + "| 4 | 5 | | 0.885 |\n", + "| 1 | | poly | 0.835 |\n", + "| 5 | | poly | 0.82 |\n", + "| 7 | | linear | 0.82 |\n", + "| 10 | | linear | 0.82 |\n" ] } ],