{ "cells": [ { "attachments": {}, "cell_type": "markdown", "id": "0b529eab", "metadata": {}, "source": [ "# Hetero-NN Quick Start: A Binary Classification Task" ] }, { "attachments": {}, "cell_type": "markdown", "id": "6f2a3025", "metadata": {}, "source": [ "In this tutorial, you will learn how to use Hetero-NN. It should be noted that Hetero-NN has also been upgraded to work similarly to Homo-NN, allowing for high customization of both models and datasets using the Pytorch backend. We will cover customization in a later chapter specifically for Hetero-NN.\n", "\n", "Additionally, Hetero-NN has also improved some interfaces, such as the Interactive-layer interface, which makes the logic of its usage clearer.\n", "\n", "In this chapter, we will provide an example of a basic binary classification task using Hetero-NN. The process of using this algorithm is consistent with other FATE algorithms: you will use the reader and transformer interfaces provided by FATE to input table data, and then input the data into the algorithm component. The component will then use the defined top/bottom model, optimizer, and loss function for training. The usage of this version is basically the same as the usage of the old version of FATE.\n", "\n", "If you want to understand the principle of the Hetero-NN algorithm, you can refer to doc/federated_component/hetero_nn.md." ] }, { "attachments": {}, "cell_type": "markdown", "id": "485228ca", "metadata": {}, "source": [ "## Uploading Tabular Data\n", "\n", "At the very beginning, we upload data to FATE. We can directly upload data using the pipeline. Here we upload two files: breast_hetero_guest.csv for the guest, and breast_hetero_host.csv for the host. Please notice that in this tutorial we are using a standalone version, if you are using a cluster version, you need to upload corresponding data on each machine. " ] }, { "cell_type": "code", "execution_count": 1, "id": "7cb9620a", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " UPLOADING:||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||100.00%\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\u001b[32m2022-12-19 11:28:35.529\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mpipeline.utils.invoker.job_submitter\u001b[0m:\u001b[36mmonitor_job_status\u001b[0m:\u001b[36m83\u001b[0m - \u001b[1mJob id is 202212191128349034250\n", "\u001b[0m\n", "\u001b[32m2022-12-19 11:28:35.542\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mpipeline.utils.invoker.job_submitter\u001b[0m:\u001b[36mmonitor_job_status\u001b[0m:\u001b[36m98\u001b[0m - \u001b[1m\u001b[80D\u001b[1A\u001b[KJob is still waiting, time elapse: 0:00:00\u001b[0m\n", "\u001b[32m2022-12-19 11:28:36.557\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mpipeline.utils.invoker.job_submitter\u001b[0m:\u001b[36mmonitor_job_status\u001b[0m:\u001b[36m98\u001b[0m - \u001b[1m\u001b[80D\u001b[1A\u001b[KJob is still waiting, time elapse: 0:00:01\u001b[0m\n", "\u001b[32m2022-12-19 11:28:37.573\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mpipeline.utils.invoker.job_submitter\u001b[0m:\u001b[36mmonitor_job_status\u001b[0m:\u001b[36m98\u001b[0m - \u001b[1m\u001b[80D\u001b[1A\u001b[KJob is still waiting, time elapse: 0:00:02\u001b[0m\n", "\u001b[0mm2022-12-19 11:28:38.594\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mpipeline.utils.invoker.job_submitter\u001b[0m:\u001b[36mmonitor_job_status\u001b[0m:\u001b[36m125\u001b[0m - \u001b[1m\n", "\u001b[32m2022-12-19 11:28:38.595\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mpipeline.utils.invoker.job_submitter\u001b[0m:\u001b[36mmonitor_job_status\u001b[0m:\u001b[36m127\u001b[0m - \u001b[1m\u001b[80D\u001b[1A\u001b[KRunning component upload_0, time elapse: 0:00:03\u001b[0m\n", "\u001b[32m2022-12-19 11:28:39.616\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mpipeline.utils.invoker.job_submitter\u001b[0m:\u001b[36mmonitor_job_status\u001b[0m:\u001b[36m127\u001b[0m - \u001b[1m\u001b[80D\u001b[1A\u001b[KRunning component upload_0, time elapse: 0:00:04\u001b[0m\n", "\u001b[32m2022-12-19 11:28:40.643\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mpipeline.utils.invoker.job_submitter\u001b[0m:\u001b[36mmonitor_job_status\u001b[0m:\u001b[36m127\u001b[0m - \u001b[1m\u001b[80D\u001b[1A\u001b[KRunning component upload_0, time elapse: 0:00:05\u001b[0m\n", "\u001b[32m2022-12-19 11:28:41.670\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mpipeline.utils.invoker.job_submitter\u001b[0m:\u001b[36mmonitor_job_status\u001b[0m:\u001b[36m127\u001b[0m - \u001b[1m\u001b[80D\u001b[1A\u001b[KRunning component upload_0, time elapse: 0:00:06\u001b[0m\n", "\u001b[32m2022-12-19 11:28:42.697\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mpipeline.utils.invoker.job_submitter\u001b[0m:\u001b[36mmonitor_job_status\u001b[0m:\u001b[36m127\u001b[0m - \u001b[1m\u001b[80D\u001b[1A\u001b[KRunning component upload_0, time elapse: 0:00:07\u001b[0m\n", "\u001b[32m2022-12-19 11:28:43.719\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mpipeline.utils.invoker.job_submitter\u001b[0m:\u001b[36mmonitor_job_status\u001b[0m:\u001b[36m127\u001b[0m - \u001b[1m\u001b[80D\u001b[1A\u001b[KRunning component upload_0, time elapse: 0:00:08\u001b[0m\n", "\u001b[32m2022-12-19 11:28:44.732\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mpipeline.utils.invoker.job_submitter\u001b[0m:\u001b[36mmonitor_job_status\u001b[0m:\u001b[36m89\u001b[0m - \u001b[1mJob is success!!! Job id is 202212191128349034250\u001b[0m\n", "\u001b[32m2022-12-19 11:28:44.745\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mpipeline.utils.invoker.job_submitter\u001b[0m:\u001b[36mmonitor_job_status\u001b[0m:\u001b[36m90\u001b[0m - \u001b[1mTotal time: 0:00:09\u001b[0m\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ " UPLOADING:||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||100.00%\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\u001b[32m2022-12-19 11:28:45.106\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mpipeline.utils.invoker.job_submitter\u001b[0m:\u001b[36mmonitor_job_status\u001b[0m:\u001b[36m83\u001b[0m - \u001b[1mJob id is 202212191128447632710\n", "\u001b[0m\n", "\u001b[32m2022-12-19 11:28:45.118\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mpipeline.utils.invoker.job_submitter\u001b[0m:\u001b[36mmonitor_job_status\u001b[0m:\u001b[36m98\u001b[0m - \u001b[1m\u001b[80D\u001b[1A\u001b[KJob is still waiting, time elapse: 0:00:00\u001b[0m\n", "\u001b[32m2022-12-19 11:28:46.133\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mpipeline.utils.invoker.job_submitter\u001b[0m:\u001b[36mmonitor_job_status\u001b[0m:\u001b[36m98\u001b[0m - \u001b[1m\u001b[80D\u001b[1A\u001b[KJob is still waiting, time elapse: 0:00:01\u001b[0m\n", "\u001b[0mm2022-12-19 11:28:47.159\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mpipeline.utils.invoker.job_submitter\u001b[0m:\u001b[36mmonitor_job_status\u001b[0m:\u001b[36m125\u001b[0m - \u001b[1m\n", "\u001b[32m2022-12-19 11:28:47.161\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mpipeline.utils.invoker.job_submitter\u001b[0m:\u001b[36mmonitor_job_status\u001b[0m:\u001b[36m127\u001b[0m - \u001b[1m\u001b[80D\u001b[1A\u001b[KRunning component upload_0, time elapse: 0:00:02\u001b[0m\n", "\u001b[32m2022-12-19 11:28:48.185\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mpipeline.utils.invoker.job_submitter\u001b[0m:\u001b[36mmonitor_job_status\u001b[0m:\u001b[36m127\u001b[0m - \u001b[1m\u001b[80D\u001b[1A\u001b[KRunning component upload_0, time elapse: 0:00:03\u001b[0m\n", "\u001b[32m2022-12-19 11:28:49.205\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mpipeline.utils.invoker.job_submitter\u001b[0m:\u001b[36mmonitor_job_status\u001b[0m:\u001b[36m127\u001b[0m - \u001b[1m\u001b[80D\u001b[1A\u001b[KRunning component upload_0, time elapse: 0:00:04\u001b[0m\n", "\u001b[32m2022-12-19 11:28:50.227\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mpipeline.utils.invoker.job_submitter\u001b[0m:\u001b[36mmonitor_job_status\u001b[0m:\u001b[36m127\u001b[0m - \u001b[1m\u001b[80D\u001b[1A\u001b[KRunning component upload_0, time elapse: 0:00:05\u001b[0m\n", "\u001b[32m2022-12-19 11:28:51.250\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mpipeline.utils.invoker.job_submitter\u001b[0m:\u001b[36mmonitor_job_status\u001b[0m:\u001b[36m127\u001b[0m - \u001b[1m\u001b[80D\u001b[1A\u001b[KRunning component upload_0, time elapse: 0:00:06\u001b[0m\n", "\u001b[32m2022-12-19 11:28:52.271\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mpipeline.utils.invoker.job_submitter\u001b[0m:\u001b[36mmonitor_job_status\u001b[0m:\u001b[36m127\u001b[0m - \u001b[1m\u001b[80D\u001b[1A\u001b[KRunning component upload_0, time elapse: 0:00:07\u001b[0m\n", "\u001b[32m2022-12-19 11:28:53.291\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mpipeline.utils.invoker.job_submitter\u001b[0m:\u001b[36mmonitor_job_status\u001b[0m:\u001b[36m89\u001b[0m - \u001b[1mJob is success!!! Job id is 202212191128447632710\u001b[0m\n", "\u001b[32m2022-12-19 11:28:53.294\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mpipeline.utils.invoker.job_submitter\u001b[0m:\u001b[36mmonitor_job_status\u001b[0m:\u001b[36m90\u001b[0m - \u001b[1mTotal time: 0:00:08\u001b[0m\n" ] } ], "source": [ "from pipeline.backend.pipeline import PipeLine # pipeline class\n", "\n", "# we have two party: guest, whose data with labels\n", "# host, without label\n", "# the dataset is vertically split\n", "\n", "dense_data_guest = {\"name\": \"breast_hetero_guest\", \"namespace\": f\"experiment\"}\n", "dense_data_host = {\"name\": \"breast_hetero_host\", \"namespace\": f\"experiment\"}\n", "\n", "guest= 9999\n", "host = 10000\n", "\n", "pipeline_upload = PipeLine().set_initiator(role='guest', party_id=guest).set_roles(guest=guest, host=host)\n", "\n", "partition = 4\n", "\n", "# 上传一份数据\n", "pipeline_upload.add_upload_data(file=\"./examples/data/breast_hetero_guest.csv\",\n", " table_name=dense_data_guest[\"name\"], # table name\n", " namespace=dense_data_guest[\"namespace\"], # namespace\n", " head=1, partition=partition) # data info\n", "\n", "pipeline_upload.add_upload_data(file=\"./examples/data/breast_hetero_host.csv\",\n", " table_name=dense_data_host[\"name\"],\n", " namespace=dense_data_host[\"namespace\"],\n", " head=1, partition=partition) # data info\n", "\n", "pipeline_upload.upload(drop=1)" ] }, { "attachments": {}, "cell_type": "markdown", "id": "ff9cbea4", "metadata": {}, "source": [ "The breast dataset is a binary dataset set with 30 features, and it is vertically split:\n", "guest holds 10 fetureas and label, while host holds 20 features" ] }, { "cell_type": "code", "execution_count": 2, "id": "f0ef786c", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | id | \n", "y | \n", "x0 | \n", "x1 | \n", "x2 | \n", "x3 | \n", "x4 | \n", "x5 | \n", "x6 | \n", "x7 | \n", "x8 | \n", "x9 | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "133 | \n", "1 | \n", "0.254879 | \n", "-1.046633 | \n", "0.209656 | \n", "0.074214 | \n", "-0.441366 | \n", "-0.377645 | \n", "-0.485934 | \n", "0.347072 | \n", "-0.287570 | \n", "-0.733474 | \n", "
1 | \n", "273 | \n", "1 | \n", "-1.142928 | \n", "-0.781198 | \n", "-1.166747 | \n", "-0.923578 | \n", "0.628230 | \n", "-1.021418 | \n", "-1.111867 | \n", "-0.959523 | \n", "-0.096672 | \n", "-0.121683 | \n", "
2 | \n", "175 | \n", "1 | \n", "-1.451067 | \n", "-1.406518 | \n", "-1.456564 | \n", "-1.092337 | \n", "-0.708765 | \n", "-1.168557 | \n", "-1.305831 | \n", "-1.745063 | \n", "-0.499499 | \n", "-0.302893 | \n", "
3 | \n", "551 | \n", "1 | \n", "-0.879933 | \n", "0.420589 | \n", "-0.877527 | \n", "-0.780484 | \n", "-1.037534 | \n", "-0.483880 | \n", "-0.555498 | \n", "-0.768581 | \n", "0.433960 | \n", "-0.200928 | \n", "
4 | \n", "199 | \n", "0 | \n", "0.426758 | \n", "0.723479 | \n", "0.316885 | \n", "0.287273 | \n", "1.000835 | \n", "0.962702 | \n", "1.077099 | \n", "1.053586 | \n", "2.996525 | \n", "0.961696 | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
564 | \n", "529 | \n", "1 | \n", "-0.583805 | \n", "-1.613330 | \n", "-0.605880 | \n", "-0.581312 | \n", "0.864944 | \n", "-0.579301 | \n", "-0.527672 | \n", "-0.619360 | \n", "-0.193738 | \n", "-0.189844 | \n", "
565 | \n", "40 | \n", "0 | \n", "-0.070240 | \n", "0.744648 | \n", "-0.141817 | \n", "-0.162929 | \n", "-1.006849 | \n", "-0.317847 | \n", "-0.305547 | \n", "-0.051865 | \n", "0.150849 | \n", "-0.691912 | \n", "
566 | \n", "115 | \n", "1 | \n", "-0.538247 | \n", "0.076989 | \n", "-0.587413 | \n", "-0.523125 | \n", "0.772888 | \n", "-0.091382 | \n", "-0.584763 | \n", "-0.641591 | \n", "-0.748637 | \n", "0.081139 | \n", "
567 | \n", "2 | \n", "0 | \n", "1.511870 | \n", "-0.023974 | \n", "1.347475 | \n", "1.456285 | \n", "0.527407 | \n", "1.082932 | \n", "0.854974 | \n", "1.955000 | \n", "1.152255 | \n", "0.201391 | \n", "
568 | \n", "39 | \n", "0 | \n", "-0.153073 | \n", "0.055819 | \n", "0.001155 | \n", "-0.246430 | \n", "1.255083 | \n", "1.070209 | \n", "1.107324 | \n", "1.693103 | \n", "-0.151676 | \n", "1.283108 | \n", "
569 rows × 12 columns
\n", "\n", " | id | \n", "x0 | \n", "x1 | \n", "x2 | \n", "x3 | \n", "x4 | \n", "x5 | \n", "x6 | \n", "x7 | \n", "x8 | \n", "... | \n", "x10 | \n", "x11 | \n", "x12 | \n", "x13 | \n", "x14 | \n", "x15 | \n", "x16 | \n", "x17 | \n", "x18 | \n", "x19 | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "133 | \n", "0.449512 | \n", "-1.247226 | \n", "0.413178 | \n", "0.303781 | \n", "-0.123848 | \n", "-0.184227 | \n", "-0.219076 | \n", "0.268537 | \n", "0.015996 | \n", "... | \n", "-0.337360 | \n", "-0.728193 | \n", "-0.442587 | \n", "-0.272757 | \n", "-0.608018 | \n", "-0.577235 | \n", "-0.501126 | \n", "0.143371 | \n", "-0.466431 | \n", "-0.554102 | \n", "
1 | \n", "273 | \n", "-1.245485 | \n", "-0.842317 | \n", "-1.255026 | \n", "-1.038066 | \n", "-0.426301 | \n", "-1.088781 | \n", "-0.976392 | \n", "-0.898898 | \n", "0.983496 | \n", "... | \n", "-0.493639 | \n", "0.348620 | \n", "-0.552483 | \n", "-0.526877 | \n", "2.253098 | \n", "-0.827620 | \n", "-0.780739 | \n", "-0.376997 | \n", "-0.310239 | \n", "0.176301 | \n", "
2 | \n", "175 | \n", "-1.549664 | \n", "-1.126219 | \n", "-1.546652 | \n", "-1.216392 | \n", "-0.354424 | \n", "-1.167051 | \n", "-1.114873 | \n", "-1.261820 | \n", "-0.327193 | \n", "... | \n", "-0.666881 | \n", "-0.779358 | \n", "-0.708418 | \n", "-0.637545 | \n", "0.710369 | \n", "-0.976454 | \n", "-1.057501 | \n", "-1.913447 | \n", "0.795207 | \n", "-0.149751 | \n", "
3 | \n", "551 | \n", "-0.851273 | \n", "0.733108 | \n", "-0.843535 | \n", "-0.786363 | \n", "-0.049836 | \n", "-0.424532 | \n", "-0.509221 | \n", "-0.679649 | \n", "0.797298 | \n", "... | \n", "-0.451772 | \n", "0.453852 | \n", "-0.431696 | \n", "-0.494754 | \n", "-1.182041 | \n", "0.281228 | \n", "0.084759 | \n", "-0.252420 | \n", "1.038575 | \n", "0.351054 | \n", "
4 | \n", "199 | \n", "0.091654 | \n", "0.216499 | \n", "0.103839 | \n", "-0.034667 | \n", "0.167930 | \n", "0.308132 | \n", "0.366614 | \n", "0.280661 | \n", "0.505223 | \n", "... | \n", "-0.707304 | \n", "-1.026834 | \n", "-0.702973 | \n", "-0.460212 | \n", "-0.999033 | \n", "-0.531406 | \n", "-0.394360 | \n", "-0.728830 | \n", "-0.644416 | \n", "-0.688003 | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
564 | \n", "529 | \n", "-0.584300 | \n", "-1.361252 | \n", "-0.582390 | \n", "-0.596377 | \n", "0.970677 | \n", "-0.270077 | \n", "-0.640169 | \n", "-0.540104 | \n", "-0.564504 | \n", "... | \n", "-0.555357 | \n", "-1.293361 | \n", "-0.570305 | \n", "-0.479573 | \n", "0.095344 | \n", "-0.779555 | \n", "-0.461337 | \n", "-0.618041 | \n", "-0.111671 | \n", "-0.590414 | \n", "
565 | \n", "40 | \n", "-0.195201 | \n", "0.532980 | \n", "-0.238451 | \n", "-0.261342 | \n", "-1.048999 | \n", "-0.834452 | \n", "-0.724413 | \n", "-0.737944 | \n", "-0.100834 | \n", "... | \n", "-0.601554 | \n", "-0.708235 | \n", "-0.640599 | \n", "-0.435790 | \n", "-1.253710 | \n", "-0.808059 | \n", "-0.596618 | \n", "-0.797283 | \n", "-0.816347 | \n", "-0.948996 | \n", "
566 | \n", "115 | \n", "-0.624062 | \n", "0.521345 | \n", "-0.635937 | \n", "-0.615148 | \n", "0.093918 | \n", "-0.489914 | \n", "-0.697043 | \n", "-0.743876 | \n", "-0.451325 | \n", "... | \n", "-0.336999 | \n", "-0.533695 | \n", "-0.428726 | \n", "-0.342062 | \n", "0.254017 | \n", "-0.022811 | \n", "-0.449069 | \n", "-0.662649 | \n", "-0.939848 | \n", "0.023110 | \n", "
567 | \n", "2 | \n", "1.579888 | \n", "0.456187 | \n", "1.566503 | \n", "1.558884 | \n", "0.942210 | \n", "1.052926 | \n", "1.363478 | \n", "2.037231 | \n", "0.939685 | \n", "... | \n", "1.228676 | \n", "-0.780083 | \n", "0.850928 | \n", "1.181336 | \n", "-0.297005 | \n", "0.814974 | \n", "0.213076 | \n", "1.424827 | \n", "0.237036 | \n", "0.293559 | \n", "
568 | \n", "39 | \n", "-0.183840 | \n", "0.356123 | \n", "-0.147009 | \n", "-0.272150 | \n", "0.372887 | \n", "0.400995 | \n", "0.219721 | \n", "0.141115 | \n", "-0.334494 | \n", "... | \n", "-0.693589 | \n", "-1.134788 | \n", "-0.653965 | \n", "-0.480013 | \n", "-0.558016 | \n", "-0.172595 | \n", "-0.046543 | \n", "0.133639 | \n", "-0.819980 | \n", "-0.229940 | \n", "
569 rows × 21 columns
\n", "\n", " | id | \n", "label | \n", "predict_result | \n", "predict_score | \n", "predict_detail | \n", "type | \n", "
---|---|---|---|---|---|---|
0 | \n", "0 | \n", "0.0 | \n", "0 | \n", "0.13979218900203705 | \n", "{'0': 0.860207810997963, '1': 0.13979218900203... | \n", "train | \n", "
1 | \n", "1 | \n", "0.0 | \n", "0 | \n", "0.19935783743858337 | \n", "{'0': 0.8006421625614166, '1': 0.1993578374385... | \n", "train | \n", "
2 | \n", "2 | \n", "0.0 | \n", "0 | \n", "0.2489972561597824 | \n", "{'0': 0.7510027438402176, '1': 0.2489972561597... | \n", "train | \n", "
3 | \n", "3 | \n", "0.0 | \n", "0 | \n", "0.25491416454315186 | \n", "{'0': 0.7450858354568481, '1': 0.2549141645431... | \n", "train | \n", "
4 | \n", "4 | \n", "1.0 | \n", "0 | \n", "0.2584167718887329 | \n", "{'0': 0.7415832281112671, '1': 0.2584167718887... | \n", "train | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
564 | \n", "564 | \n", "0.0 | \n", "0 | \n", "0.19034752249717712 | \n", "{'0': 0.8096524775028229, '1': 0.1903475224971... | \n", "train | \n", "
565 | \n", "565 | \n", "1.0 | \n", "0 | \n", "0.261306494474411 | \n", "{'0': 0.738693505525589, '1': 0.261306494474411} | \n", "train | \n", "
566 | \n", "566 | \n", "1.0 | \n", "0 | \n", "0.26077690720558167 | \n", "{'0': 0.7392230927944183, '1': 0.2607769072055... | \n", "train | \n", "
567 | \n", "567 | \n", "1.0 | \n", "0 | \n", "0.2625167667865753 | \n", "{'0': 0.7374832332134247, '1': 0.2625167667865... | \n", "train | \n", "
568 | \n", "568 | \n", "0.0 | \n", "0 | \n", "0.24826040863990784 | \n", "{'0': 0.7517395913600922, '1': 0.2482604086399... | \n", "train | \n", "
569 rows × 6 columns
\n", "