hexsha
stringlengths 40
40
| size
int64 6
14.9M
| ext
stringclasses 1
value | lang
stringclasses 1
value | max_stars_repo_path
stringlengths 6
260
| max_stars_repo_name
stringlengths 6
119
| max_stars_repo_head_hexsha
stringlengths 40
41
| max_stars_repo_licenses
list | max_stars_count
int64 1
191k
⌀ | max_stars_repo_stars_event_min_datetime
stringlengths 24
24
⌀ | max_stars_repo_stars_event_max_datetime
stringlengths 24
24
⌀ | max_issues_repo_path
stringlengths 6
260
| max_issues_repo_name
stringlengths 6
119
| max_issues_repo_head_hexsha
stringlengths 40
41
| max_issues_repo_licenses
list | max_issues_count
int64 1
67k
⌀ | max_issues_repo_issues_event_min_datetime
stringlengths 24
24
⌀ | max_issues_repo_issues_event_max_datetime
stringlengths 24
24
⌀ | max_forks_repo_path
stringlengths 6
260
| max_forks_repo_name
stringlengths 6
119
| max_forks_repo_head_hexsha
stringlengths 40
41
| max_forks_repo_licenses
list | max_forks_count
int64 1
105k
⌀ | max_forks_repo_forks_event_min_datetime
stringlengths 24
24
⌀ | max_forks_repo_forks_event_max_datetime
stringlengths 24
24
⌀ | avg_line_length
float64 2
1.04M
| max_line_length
int64 2
11.2M
| alphanum_fraction
float64 0
1
| cells
list | cell_types
list | cell_type_groups
list |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4ae7d659c64776e02623b51990609ff6effb083b
| 16,237 |
ipynb
|
Jupyter Notebook
|
PredictionII.ipynb
|
dougfy/teradataml_examples_1794
|
c85544cc79ca31935153b3fbe91d2fc21d15d632
|
[
"Apache-2.0"
] | null | null | null |
PredictionII.ipynb
|
dougfy/teradataml_examples_1794
|
c85544cc79ca31935153b3fbe91d2fc21d15d632
|
[
"Apache-2.0"
] | null | null | null |
PredictionII.ipynb
|
dougfy/teradataml_examples_1794
|
c85544cc79ca31935153b3fbe91d2fc21d15d632
|
[
"Apache-2.0"
] | null | null | null | 34.993534 | 180 | 0.544436 |
[
[
[
"# Predict when statistics need to be collected",
"_____no_output_____"
],
[
"## Connect to Vantage",
"_____no_output_____"
]
],
[
[
"#import the teradataml package for Vantage access\nfrom teradataml import *\nimport getpass\nfrom teradataml import display\n#display.print_sqlmr_query=True\nfrom sqlalchemy.sql.expression import select, case as case_when, func\nfrom sqlalchemy import TypeDecorator, Integer, String\nimport warnings\nwarnings.filterwarnings('ignore')",
"_____no_output_____"
],
[
"Vantage = 'tdap1627t2.labs.teradata.com'\nUser = 'alice'\nPass = 'alice'",
"_____no_output_____"
],
[
"print(Vantage,User)",
"tdap1627t2.labs.teradata.com alice\n"
],
[
"con = create_context(Vantage, User, Pass)",
"_____no_output_____"
]
],
[
[
"## Get the Sentiment from the explains",
"_____no_output_____"
]
],
[
[
"dbqlog = DataFrame.from_table(in_schema(\"dbc\", \"dbqlogtbl\")).drop(\"ZoneId\", axis = 1)\ndbqlexplain = DataFrame.from_table(in_schema(\"dbc\", \"dbqlexplaintbl\")).drop(\"ZoneID\", axis = 1)\ndbqldata = dbqlog.join(other = dbqlexplain, on = [\"QueryID\"], lsuffix = \"t1\", rsuffix = \"t2\") \\\n .select(['t1_QueryID','ExplainText','QueryBand','QueryText'])",
"_____no_output_____"
],
[
"dbqldata",
"_____no_output_____"
],
[
"# Workaround until ELE-2072.\ndbqldata.to_sql('prediction_sentiment', if_exists=\"replace\")\ndbqldata = DataFrame.from_table('prediction_sentiment')",
"_____no_output_____"
],
[
"df_select_query_column_projection = [\n dbqldata.t1_QueryID.expression.label(\"queryid\"),\n dbqldata.ExplainText.expression.label(\"explaintext\"),\n dbqldata.QueryBand.expression.label(\"queryband\"),\n func.REGEXP_SUBSTR(dbqldata.QueryBand.expression, \n '(collected_statistics|no_statistics)', 1, 1, 'i').label(\"training\"),\n func.REGEXP_SUBSTR(dbqldata.QueryText.expression, \n 'SELECT', 1, 1, 'i').label(\"select_info\"),\n func.REGEXP_SUBSTR(func.REGEXP_SUBSTR(dbqldata.ExplainText.expression, \n '(joined using a *[A-z \\-]+ join,)', 1, 1, 'i'), \n '[A-z]+', 15, 1, 'i').label(\"join_condition\")]",
"_____no_output_____"
],
[
"prediction_data = DataFrame.from_query(str(select(df_select_query_column_projection)\n #.where(Column('join_condition') != None)\n #.where(Column('training') != None)\n .compile(compile_kwargs={\"literal_binds\": True})))",
"_____no_output_____"
],
[
"data_set = (prediction_data.join_condition != None) & (prediction_data.training != None)\nprediction_set = prediction_data[data_set]",
"_____no_output_____"
],
[
"prediction_data.select(['queryid', 'join_condition', 'explaintext', 'training'])\n# Workaround until ELE-2072.\n#prediction_set.to_sql('prediction_sentiment')\n#prediction_set = DataFrame.from_table('prediction_sentiment')\nprediction_set",
"_____no_output_____"
],
[
"dictionary = DataFrame.from_table('dbql_sentiment')",
"_____no_output_____"
],
[
"td_sentiment_extractor_out = SentimentExtractor(\n dict_data = dictionary,\n newdata = prediction_set,\n level = \"document\",\n text_column = \"explaintext\",\n accumulate = ['queryid','join_condition','training']\n)",
"_____no_output_____"
],
[
"predict = td_sentiment_extractor_out.result #.to_sql('holdit4')",
"_____no_output_____"
],
[
"predict",
"_____no_output_____"
],
[
"try:\n con.execute(\"drop table target_collection\")\nexcept:\n pass",
"_____no_output_____"
],
[
"stats_model = DataFrame.from_table(in_schema(\"alice\", \"stats_model\"))",
"_____no_output_____"
]
],
[
[
"# Why does it need formula?",
"_____no_output_____"
]
],
[
[
"# Predict from queries columns needing collected statistics\ntarget_collection = NaiveBayesPredict(newdata=predict,\n modeldata = stats_model,\n formula=\"training ~ out_polarity + join_condition\", \n id_col = \"queryid\",\n responses = [\"collected_statistics\",\"no_statistics\"]\n ).result",
"_____no_output_____"
],
[
"target_collection.result.to_sql('acc1', if_exists=\"replace\")",
"_____no_output_____"
],
[
"target_collection.result",
"_____no_output_____"
],
[
"dbqlobj = DataFrame.from_table('dbc.dbqlobjtbl')",
"_____no_output_____"
],
[
"# Obtain query's join information\ntarget_names = target_collection.result.join(other = dbqlobj, on = [\"queryid\"], lsuffix = \"t1\", \n rsuffix = \"t2\").select('objectdatabasename', 'objecttablename', 'objectcolumnname')",
"_____no_output_____"
],
[
"# Collect statistics on each column\nfor index, row in target_collection.result.to_pandas().iterrows():\n con.execute('collect statistics column '+row['ObjectTableName']+\" on \"+ \\\n row['ObjectDatabaseName']+'.'+row['ObjectTableName'])",
"_____no_output_____"
],
[
"## how to test if table is still there, no help table.",
"_____no_output_____"
],
[
"statement",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code"
] |
[
[
"markdown",
"markdown"
],
[
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
]
] |
4ae7d9e997c39ce845c1f5a63aeecafdb4d6349d
| 298,313 |
ipynb
|
Jupyter Notebook
|
label-crops/2020-03-25-ProcessMKELabels.ipynb
|
w210-accessibility/classify-streetview
|
d60328484ea992b4cb2ffecb04bb548efaf06f1b
|
[
"MIT"
] | 2 |
2020-06-23T04:02:50.000Z
|
2022-02-08T00:59:24.000Z
|
label-crops/2020-03-25-ProcessMKELabels.ipynb
|
w210-accessibility/classify-streetview
|
d60328484ea992b4cb2ffecb04bb548efaf06f1b
|
[
"MIT"
] | null | null | null |
label-crops/2020-03-25-ProcessMKELabels.ipynb
|
w210-accessibility/classify-streetview
|
d60328484ea992b4cb2ffecb04bb548efaf06f1b
|
[
"MIT"
] | null | null | null | 97.647463 | 117,884 | 0.755653 |
[
[
[
"# Processing Milwaukee Label (~3K labels) \n\nBuilding on `2020-03-24-EDA-Size.ipynb`\n\nGoal is to prep a standard CSV that we can update and populate",
"_____no_output_____"
]
],
[
[
"import pandas as pd\nimport numpy as np\nimport os\nimport s3fs # for reading from S3FileSystem\nimport json # for working with JSON files \n\nimport matplotlib.pyplot as plt\n\n\npd.set_option('max_colwidth', -1)",
"_____no_output_____"
],
[
"# Import custom modules\nimport sys\nSWKE_PATH = r'/home/ec2-user/SageMaker/classify-streetview/swke'\nsys.path.append(SWKE_PATH)\n\nimport labelcrops\n",
"_____no_output_____"
],
[
"SAGEMAKER_PATH = r'/home/ec2-user/SageMaker'\nSPLIT_PATH = os.path.join(SAGEMAKER_PATH, 'classify-streetview', 'split-train-test')",
"_____no_output_____"
]
],
[
[
"# Alternative Template - row for ~3K labels x # crops appeared in\n\n* img_id\n* heading\n* crop_id\n* label\n* dist_x_left\n* dist_x_right\n* dist_y_top\n* dist_y_bottom",
"_____no_output_____"
]
],
[
[
"df_labels = pd.read_csv(os.path.join(SPLIT_PATH, 'restructure_single_labels.csv'))\nprint(df_labels.shape)\ndf_labels.head()",
"(2851, 18)\n"
],
[
"df_coor = pd.read_csv('crop_coor.csv')\ndf_coor",
"_____no_output_____"
],
[
"df_outer = pd.merge(left=df_labels, right=df_coor, how='outer')\ndf_outer.shape",
"_____no_output_____"
],
[
"df_outer = pd.concat([df_labels, df_coor], axis = 1)",
"_____no_output_____"
],
[
"df_outer.head(10)",
"_____no_output_____"
],
[
"# Let's just use a for loop and join back together\nlist_dfs = []\ncoor_cols = list(df_coor.columns)\nfor index, row in df_coor.iterrows():\n df_temp_labels = df_labels\n for col in coor_cols:\n df_temp_labels[col] = row[col]\n list_dfs.append(df_temp_labels)\n print(df_temp_labels.shape)",
"(2851, 26)\n(2851, 26)\n(2851, 26)\n(2851, 26)\n(2851, 26)\n(2851, 26)\n(2851, 26)\n"
],
[
"# Let's just use a for loop and join back together\nlist_dfs = []\ncoor_cols = list(df_coor.columns)\nfor index, row in df_coor.iterrows():\n df_temp_labels = df_labels.copy()\n for col in coor_cols:\n df_temp_labels[col] = row[col]\n list_dfs.append(df_temp_labels)\n print(df_temp_labels.shape)",
"(2851, 26)\n(2851, 26)\n(2851, 26)\n(2851, 26)\n(2851, 26)\n(2851, 26)\n(2851, 26)\n"
],
[
"df_concat = pd.concat(list_dfs)\ndf_concat.shape",
"_____no_output_____"
],
[
"df_concat['corner_x'].value_counts()",
"_____no_output_____"
],
[
"df_concat.head()",
"_____no_output_____"
],
[
"df_concat.to_csv('merged_crops_template.csv', index = False)",
"_____no_output_____"
],
[
"df_concat.columns",
"_____no_output_____"
]
],
[
[
"## Take the differences ",
"_____no_output_____"
]
],
[
[
"df_concat['xpt_minus_xleft'] = df_concat['sv_image_x'] - df_concat['x_crop_left']\ndf_concat['xright_minus_xpt'] = df_concat['x_crop_right'] - df_concat['sv_image_x']\ndf_concat['ypt_minus_ytop'] = df_concat['sv_image_y'] - df_concat['y_crop_top']\ndf_concat['ybottom_minus_ypt'] = df_concat['y_crop_bottom'] - df_concat['sv_image_y']",
"_____no_output_____"
],
[
"positive_mask = (df_concat['xpt_minus_xleft'] > 0) & (df_concat['xright_minus_xpt'] > 0) & (df_concat['ypt_minus_ytop'] > 0) & (df_concat['ybottom_minus_ypt'] > 0)\ndf_concat['label_in_crop'] = positive_mask\ndf_concat['label_in_crop'].value_counts()",
"_____no_output_____"
],
[
"df_incrop = df_concat.loc[df_concat['label_in_crop']]\ndf_incrop.shape",
"_____no_output_____"
],
[
"df_incrop['crop_number'].value_counts()",
"_____no_output_____"
],
[
"df_incrop.to_csv('Crops_with_Labels.csv', index = False)",
"_____no_output_____"
],
[
"7038 / 2851",
"_____no_output_____"
]
],
[
[
"## Observations\n* We have 12919 Null Crops\n* We have 7038 Crops with a feature in them\n* Three bottom crops (5, 6, 7) have the most points (these are the biggest)\n* The 3 middle crops have the most for their row (2, 3, 6)\n* Labels appear in an average of 2.47 image crops",
"_____no_output_____"
],
[
"# Visualize Label Locations\n\n* xpt_minus_xleft - x location in the crop relative to bottom left (0, 0)\n* ybottom_minus_ypt - y location in the crop relative to bottom left (0, 0)",
"_____no_output_____"
]
],
[
[
"fig = plt.figure(figsize = (12, 3))\n\ncolors_list = ['tab:red', 'orange', 'gold', 'forestgreen']\n\nfor crop_id in range(1, 5):\n ax = fig.add_subplot(1, 4, crop_id)\n x = df_incrop['xpt_minus_xleft'].loc[df_incrop['crop_number'] == crop_id]\n y = df_incrop['ybottom_minus_ypt'].loc[df_incrop['crop_number'] == crop_id]\n ax.plot(x, y, marker = '.', ls = 'none', alpha = 0.4, color = colors_list[int(crop_id -1)])\n #ax.plot(x, y, marker = '.', ls = 'none', alpha = 0.4)\n plt.ylim(0, 220)\n plt.xlim(0, 220)\n plt.title(f'Crop: {crop_id}')\n ax.set_yticklabels([])\n ax.set_xticklabels([])\n plt.tight_layout()\n\nfig2 = plt.figure(figsize = (12, 4))\n\n# colors_list = ['forestgreen', 'indigo', 'mediumblue', 'gold', 'tab:red']\ncolors_list = ['blue', 'indigo', 'fuchsia']\n\nfor crop_id in range(5, 8):\n plot_num = crop_id - 4\n ax2 = fig2.add_subplot(1, 3, plot_num)\n x = df_incrop['xpt_minus_xleft'].loc[df_incrop['crop_number'] == crop_id]\n y = df_incrop['ybottom_minus_ypt'].loc[df_incrop['crop_number'] == crop_id]\n ax2.plot(x, y, marker = '.', ls = 'none', alpha = 0.4, color = colors_list[int(plot_num - 1)])\n #ax.plot(x, y, marker = '.', ls = 'none', alpha = 0.4)\n plt.ylim(0, 300)\n plt.xlim(0, 300)\n plt.title(f'Crop: {crop_id}')\n ax2.set_yticklabels([])\n ax2.set_xticklabels([])\n plt.tight_layout()",
"_____no_output_____"
]
],
[
[
"# Deep Dive into df_incrop",
"_____no_output_____"
]
],
[
[
"df_incrop.head()",
"_____no_output_____"
],
[
"df_incrop.columns",
"_____no_output_____"
],
[
"incrop_keep_cols = ['filename', 'crop_number', 'region_id', 'label_name', 'region_count', 'img_id',\n 'sv_image_x', 'sv_image_y','sv_image_y_bottom_origin', 'xpt_minus_xleft', 'xright_minus_xpt',\n 'ypt_minus_ytop', 'ybottom_minus_ypt']\ndf_incrop_short = df_incrop[incrop_keep_cols].copy()\ndf_incrop_short.head()",
"_____no_output_____"
],
[
"# Make some new ids\ndf_incrop_short['heading'] = df_incrop_short['filename'].str.extract('(.*)_(.*).jpg', expand = True)[1]\ndf_incrop_short.dtypes",
"_____no_output_____"
],
[
"#df_incrop_short['crop_name_id'] = df_incrop_short[['img_id', 'heading', 'crop_number']].apply(lambda x: '_'.join(str(x)), axis=1)\n#df_incrop_short['label_id'] = df_incrop_short[['img_id', 'heading', 'region_id']].apply(lambda x: '_'.join(str(x)), axis=1)\n\ndf_incrop_short['crop_name_id'] = df_incrop_short['img_id'].astype(str) + '_' + df_incrop_short['heading'] + '_' + df_incrop_short['crop_number'].astype(str)\ndf_incrop_short['label_id'] = df_incrop_short['img_id'].astype(str) + '_' + df_incrop_short['heading'] + '_' + df_incrop_short['region_id'].astype(str)\n\ndf_incrop_short.head()",
"_____no_output_____"
],
[
"df_incrop_short['crop_name_id'].value_counts()",
"_____no_output_____"
],
[
"crop_label_counts = df_incrop_short['crop_name_id'].value_counts()\ncrop_label_counts.value_counts()",
"_____no_output_____"
],
[
"label_id_counts = df_incrop_short['label_id'].value_counts()\nlabel_id_counts.value_counts()",
"_____no_output_____"
],
[
"label_id_counts.head(20)",
"_____no_output_____"
],
[
"506 * 7 * 4",
"_____no_output_____"
],
[
"14168 - 5254",
"_____no_output_____"
],
[
"df_incrop_short.to_csv('incrop_labels.csv', index = False)",
"_____no_output_____"
]
],
[
[
"# Desired End Template CSV for 506 x 7 x 4 image crops\n\n* img_id\n* heading\n* crop_id\n* combined_id\n* primary_label - based on a hierarchy of importance\n* 0_missing_count\n* 1_null_count\n* 2_obstacle_count\n* 3_present_count\n* 4_surface_prob_count\n* 5_nosidewalk_count",
"_____no_output_____"
]
],
[
[
"unique_labels_list = list(df_incrop_short['label_name'].unique())",
"_____no_output_____"
],
[
"folders_list = ['3_present', '4_surface_prob', '2_obstacle', '0_missing', '6_occlusion', '5_nosidewalk']",
"_____no_output_____"
],
[
"for label, folder in zip(unique_labels_list, folders_list):\n label_mask = (df_incrop_short['label_name'].str.contains(label))\n df_incrop_short[folder] = np.where(label_mask, 1, 0)\n\ndf_incrop_short.head()",
"_____no_output_____"
],
[
"df_group = df_incrop_short.groupby(['img_id', 'heading', 'crop_number'])[folders_list].sum()\ndf_group.head()",
"_____no_output_____"
],
[
"df_group['count_all'] = df_group[folders_list].values.sum(axis = 1)\ndf_group.head()",
"_____no_output_____"
],
[
"df_group.shape",
"_____no_output_____"
],
[
"df_group = df_group.reset_index()\ndf_group.head()",
"_____no_output_____"
],
[
"df_group.to_csv('img_heading_crop_labelcounts.csv', index = False)",
"_____no_output_____"
],
[
"df_group[folders_list].sum()",
"_____no_output_____"
],
[
"(df_group[folders_list] > 0).sum()",
"_____no_output_____"
],
[
"df_group[folders_list].sum()",
"_____no_output_____"
]
],
[
[
"# Next Phase\n\n* Grab a couple thousand null crops\n* Find out which ones are null by creating a img_id x heading x all crop_numbers list and then doing a join with df_group\n* Then fill in the NAs with 0s and add a new column that if count_all == 0, then 1_null = 1\n* Then merge with the test/train names by img_id\n* Then move those crops into the test folder",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown"
] |
[
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
]
] |
4ae7df13622b5b17de42a03a8dbcadceb580a4bc
| 14,560 |
ipynb
|
Jupyter Notebook
|
src/PSETS/nb/lecture8_functions.ipynb
|
deez79/PYTH2
|
9d449c73ab304dd20d924c115374b9c46d97a15f
|
[
"MIT"
] | 7 |
2019-05-22T00:30:24.000Z
|
2020-03-26T04:28:07.000Z
|
src/PSETS/nb/lecture8_functions.ipynb
|
deez79/PYTH2
|
9d449c73ab304dd20d924c115374b9c46d97a15f
|
[
"MIT"
] | 3 |
2020-03-24T17:01:22.000Z
|
2021-02-02T22:01:31.000Z
|
src/PSETS/nb/lecture8_functions.ipynb
|
deez79/PYTH2
|
9d449c73ab304dd20d924c115374b9c46d97a15f
|
[
"MIT"
] | 6 |
2019-05-27T21:41:53.000Z
|
2020-03-12T18:35:17.000Z
| 26.18705 | 481 | 0.515247 |
[
[
[
"empty"
]
]
] |
[
"empty"
] |
[
[
"empty"
]
] |
4ae7eda3abd0b5403a9687a894c9d5503a5d6907
| 198,785 |
ipynb
|
Jupyter Notebook
|
guide/14-deep-learning/how-named-entity-recognition-works.ipynb
|
DelgadoJosh/arcgis-python-api
|
744b285cc034dd3b6e7d398569f4bc8f3b1bfb51
|
[
"Apache-2.0"
] | 1 |
2020-07-13T22:45:07.000Z
|
2020-07-13T22:45:07.000Z
|
guide/14-deep-learning/how-named-entity-recognition-works.ipynb
|
DelgadoJosh/arcgis-python-api
|
744b285cc034dd3b6e7d398569f4bc8f3b1bfb51
|
[
"Apache-2.0"
] | null | null | null |
guide/14-deep-learning/how-named-entity-recognition-works.ipynb
|
DelgadoJosh/arcgis-python-api
|
744b285cc034dd3b6e7d398569f4bc8f3b1bfb51
|
[
"Apache-2.0"
] | null | null | null | 179.408845 | 47,715 | 0.858143 |
[
[
[
"# Named Entity Extraction Workflow with `arcgis.learn`",
"_____no_output_____"
],
[
"<h1>Table of Contents<span class=\"tocSkip\"></span></h1>\n<div class=\"toc\">\n<ul class=\"toc-item\">\n<li><span><a href=\"#Introduction\" data-toc-modified-id=\"Introduction-1\">Introduction</a></span></li>\n<ul class=\"toc-item\">\n<li><span><a href=\"#What-is-unstructured-text?\" data-toc-modified-id=\"What-is-unstructured-text?-1.2\">What is unstructured text?</a></span></li>\n<li><span><a href=\"#What-is-Named-Entity-Recognition?\" data-toc-modified-id=\"What-is-Named-Entity-Recognition?-1.3\">What is Named Entity Recognition?</a></span>\n</ul>\n<li><span><a href=\"#Prerequisites\" data-toc-modified-id=\"Prerequisites-2\">Prerequisites</a></span></li>\n <li><span><a href=\"#Supported-formats-for-labeled-training-data\" data-toc-modified-id=\"Supported-formats-for-labeled-training-data-3\">Supported formats for labeled training data</a></span></li>\n \n<li><span><a href=\"#Imports\" data-toc-modified-id=\"Imports-2\">Imports</a></span></li>\n<li><span><a href=\"#Data-preparation\" data-toc-modified-id=\"Data-preparation-3\">Data preparation</a></span></li>\n<li><span><a href=\"#EntityRecognizer-model\" data-toc-modified-id=\"EntityRecognizer-model-4\">EntityRecognizer model</a></span></li>\n<ul class=\"toc-item\">\n<li><span><a href=\"#Model-training\" data-toc-modified-id=\"Model-training-4.1\">Model training</a></span>\n<li><span><a href=\"#Validate-results\" data-toc-modified-id=\"Validate-results-4.2\">Validate results</a></span></li>\n<li><span><a href=\"#Save-and-load-trained-models\" data-toc-modified-id=\"Save-and-load-trained-models-4.3\">Save and load trained models</a></span></li>\n</ul>\n<li><span><a href=\"#Model-inference\" data-toc-modified-id=\"Model-inference-5\">Model inference</a></span></li>\n<li><span><a href=\"#Visualize-entities\" data-toc-modified-id=\"Visualize-entities\">Visualize entities</a></span></li>\n<li><span><a href=\"#Convert-to-feature-layer-and-visualize-on-map\" data-toc-modified-id=\"Convert-to-feature-layer-and-visualize-on-map-7\">Convert to feature layer and visualize on map</a></span></li>\n<li><span><a href=\"#References\" data-toc-modified-id=\"References-8\">References</a></span></li>\n</ul>\n</div>",
"_____no_output_____"
],
[
"# Introduction\n\nGeospatial data is not only available in the form of maps and feature/imagery layers, but also in form of unstructured text.\n",
"_____no_output_____"
],
[
"## What is unstructured text?\n\nUnstructured text is written content that lacks structure and cannot readily be indexed or mapped onto standard database fields. It is often user-generated information such as emails, instant messages, news articles, documents or social media postings.\nThese unstructured documents can contain location information which makes them geospatial information. Mapping information from such documents could be of a great value. In this guide, we will explore how to achieve this objective with `arcgis.learn`.",
"_____no_output_____"
],
[
"## What is Named Entity Recognition?\n\nNamed Entity Recognition is a branch of information extraction. This is used to identify entities such as \"Organizations\", \"Person\", \"Date\", \"Country\", etc. that are present in the text.\n\n<img src=\"data:image/PNG; base64, iVBORw0KGgoAAAANSUhEUgAAA4IAAAC/CAIAAAFTYMVOAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAIs7SURBVHhe7b19dBTHlfDdf3DYdfwF2BiNPyawYDsKWMbzWI6MHGOBY2Q51sYc0IKCgjZaG1us4jWS4x3YRUDQbI4sKxFGMVi8YORIu0g4QSLssPjx7Bsixi+HWQctOVYiH5RYkRatwvOMzkPOcPaJN3rvrVtdXd3zoZHQJ7q/U4j+qK6uvnXr9u3qmttGhBltWKajz9Aybex+4NqTLGu8aOr+r5XBz4ZMMrfgwfebEyeZLwlsMnWv3A9/g7Ri4nttxgunnTKyp4WOLQawK1i1PtVISQ3uMmCLLMtO9Rm5MOqAvGYaz935D5eV+O7Y2UMLDa/mQO12n+qCZZlb8OD7lfOPNC/Mm6WEOCiga5EyPVMl8g6BU0+LXekg0+qcTHX84WPzarofmPXiggPHXI1dX5RS89yx+RkUlkgLd8Lf03fj9lKUL9VGAVuoKKB2XTr+14lVBJmGanJhwZeDGz3FzW4XnLS/qStSsPdctUvkjET66D+o28F2tbHoSE9o7xpYaOkY8HcNiAORbvEX5PXIt57OCn6WclvKyuPHl/8MZXqr8TRsl3UaHDRl2gOnA0iOM+c8Bn/vecRQMiVgte45lAlUxm3WIR7c9yUk0wRJ5ksCvkfZCBf+JMkkD4jF8GTq74s0FQ2h+QnpgX9gW2rBtgxFp/zfCfR6uZQc3g2roM9CB88t8slNkUhI/m/DITVIv7GvSkMggFV5WBT2e5SrJBI5Bws+YTK6j8Iq4q6Ejec6QwEQh5Tp2T2+02KfPEpsFxvdRc2wDHYNEpi/LS60mHCgB7NJmYpC8ETBYw20paU4HYQIx+ZWnmspsTVbWGRQgEwhgzCgPbA921UIW6BAdxqKzJ2jbiPn3BVtctG8N4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33PnfenGO+FIPGNKhXVF9iQKtBzN2nv+h2E867V5jUcr7nrW86c49nnHjauK7tPmD6QdLEtZdZ+o3l235JWlmmOuDu85bc/6G41Zs7fGq8PE/kSp378ty52zJxSW6wzDMAzDTCuui58ocRpp4oBNDMMwDMNMFOyGchq/JFWBYRiGYRhmPN1Q/pjnNE/8MU+GYRiGYXTGzw0F/rb9Q4drwmmaJGh6qQQMwzAMwzCCcXVDGYZhGIZhGIZgN5RhGIZhGIaZANgNZRiGYRiGYSYAdkMZhmEYhmGYCYDdUIZhGIZhGGYCYDeUYRiGYRiGGXcikf8fUoAutluhA0kAAAAASUVORK5CYII=\">\n\n<center>Example of named entities such as PERSON, ORG & DATE in unstructured text.\n Source: <a href=https://explosion.ai/blog/displacy-ent-named-entity-visualizer>Explosion AI blog</a></center>",
"_____no_output_____"
],
[
"# Prerequisites\n\n- Data preparation and model training workflows using arcgis.learn have a dependency on spaCy. Refer to the section \"Install deep learning dependencies of arcgis.learn module\" [on this page](https://developers.arcgis.com/python/guide/install-and-set-up/#Install-deep-learning-dependencies-for-arcgis.learn-module) for detailed documentation on installation of the dependencies.\n- Labeled data: For Entity Recognizer to learn, it needs to see examples that have been labeled for all the custom categories that the model is expected to extract. Head to the next section to see the supported formats for training data.\n\n- If you wish to try this workflow, you can find a sample notebook along with the necessary labeled training and test datasets over [here](https://developers.arcgis.com/python/sample-notebooks/information-extraction-from-madison-city-crime-incident-reports-using-deep-learning#Publishing-the-results-as-feature-layer).",
"_____no_output_____"
],
[
"# Supported formats for labeled training data\n\n- Entity Recognizer can consume labeled training data in three different formats ([IOB](https://spacy.io/api/annotation#iob), [BILUO](https://spacy.io/api/annotation#biluo), [ner_json](https://spacy.io/api/annotation#json-input)).\n- Example structure for JSON:\n - Text : \"Sir Chandrashekhara Venkata Raman was born in India\"\n - ner-json formatted training data: {\"text\": \"Sir Chandrashekhara Venkata Raman was born in India.\",\"labels\": [[0, 33, \"Person\"], [46, 51, \"Country\"]]}\n\n- Example structure for IOB:\n - Text: \"Sir Chandrashekhara Venkata Raman was born in India.\"\n - IOB formatted training data: \n - text.csv: 'Sir', 'Chandrashekhara', 'Venkata', 'Raman', 'was', 'born', 'in', 'Germany.'\n - labels.csv: 'B-Person', 'I-Person', 'I-Person', 'I-Person', 'O', 'O', 'O', 'B-Country'\n- Example structure for BILUO:\n - Text: \"Sir Chandrashekhara Venkata Raman was born in India.\"\n - LBIOU formatted training data: \n - text.csv: 'Sir', 'Chandrashekhara', 'Venkata', 'Raman' ,'was', 'born', 'in', 'Germany.'\n - labels.csv: 'B-Person', 'I-Person', 'I-Person', 'L-Person', 'O', 'O', 'O', 'U-Country'\n \n- There are labeling tools available to get raw documents in the required format. Below are the references to few labeling tools:\n - Docanno [[2]](#References) - To learn how to setup Doccano and label your own data please refer to [doccano setup guide](https://developers.arcgis.com/python/sample-notebooks/doccano-setup-guide)\n - TagEditor [[3]](#References) ",
"_____no_output_____"
],
[
"# Imports",
"_____no_output_____"
]
],
[
[
"from arcgis.learn import prepare_data\nfrom arcgis.learn import EntityRecognizer\nimport random \nimport spacy\nimport os",
"_____no_output_____"
]
],
[
[
"# Data preparation\n\nData preparation involves splitting the data into training and validation sets, creating the necessary data structures for loading data into the model and so on. The `prepare_data()` method can directly read the training samples in one of the above specified formats and automate the entire process. Entities that are addresses or geographical locations should be specified using the `class_mapping` dict, as shown below:",
"_____no_output_____"
]
],
[
[
"json_path = os.path.join('data', 'EntityRecognizer',\n 'labelled_crime_reports.json')",
"_____no_output_____"
],
[
"data = prepare_data(path=json_path, \n class_mapping={'address_tag':'Address'}, \n dataset_type='ner_json')",
"_____no_output_____"
]
],
[
[
"The `show_batch()` method can be used to visualize the training samples, along with labels.",
"_____no_output_____"
]
],
[
[
"data.show_batch()",
"_____no_output_____"
]
],
[
[
"# EntityRecognizer model\n\n`EntityRecognizer` model in `arcgis.learn` is built on top of [Spacy's](https://spacy.io/) [EntityRecognizer](https://spacy.io/api/entityrecognizer). The model training and inferencing workflow is similar to computer vision models in `arcgis.learn`.\n\n\nThis Model works on the [**Embed > Encode > Attend > Predict**](https://explosion.ai/blog/deep-learning-formula-nlp) deeplearning framework [4].\n\n\n- **Embed**: This is the process of turning text or sparse vectors into dense word embeddings. These embeddings are much easier to work with than other representations and do an excellent job of capturing semantic information. This is achieved by extracting word features using feature hashing[[1]](#References) followed by a [Multilayer Perceptron](https://en.wikipedia.org/wiki/Multilayer_perceptron). A video description of this workflow can be found [here](https://youtu.be/sqDHBH9IjRU?t=1612).\n\n<img src=\"data:image/PNG; base64, iVBORw0KGgoAAAANSUhEUgAAA1wAAACzCAIAAAASfYpZAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAHZESURBVHhe7d0FuFVV2gdwFMXCblHsmlHHGHNEHbt7DFRULFQUFbu7C8WxC7t1DOzuTrDG1tGxC2OM7+d5N/s73OJe4t4DvP+H57D32muv9a43/2ufuGP9/vvv7arwv//975dffilOEolEIpFIJBKjESaYYILiqB7GLv6v4Oeff05GmEgkEolEIjEG4v9J4f/+979ff/21OEkkEolEIpFIjEn44+3jH374oThLJBKJRCKRSIyRGOLt40QikUgkEonEmIkkhYlEIpFIJBKJJIWJRCKRSCQSCaTwt99+Kw4TiUQikUgkEmMqkhQmEolEIpFIJJIUJhKJRCKRSCSQwjp/0SSRSCQSiUQiMQYiv2iSSCQSiUQikUhSmEgkEolEIpFACscaa6ziMJFIJBKJRCIxpmJsKA4TiUQikUgkEmMqkhQmEolEIpFIJJIUJhKJRCKRSCTGhC+a/Prrr19++eV3331XnFfhq6+++vrrr4uTKuj/zTffFCcjAr/99tsDDzwwySSTnHbaaUXTSMAvv/xy//33L7XUUtNNN92OO+5YtI76+P3337/99tsGLVhT+N///nf77bdT/lNPPVU0tRY4+cCBAzfYYINppplmscUWo64ePXrMP//87733XtGjEXz//feHH374bLPNVpyPUDDcp59+uuuuu84yyyzzzjsvCTWKrL59+5JtjjnmuPTSS++9994555zz5JNPjluawAcffDD99NOfe+65xXnzYLpDDjmEAM8880zR1LqgBEpmkZH6418//vjjtddeO+OMM1544YVF0wiCZLj//vvPPffczz33XNE04vDJJ590795dymLcoqkRvP/++yussMLCCy9cnI9kMNZPP/1k7QqE4Cpa60HIR584jbuceo2WaqgCvFH/QFSfH374YaQ6RomQjQB1lkOqQYMGkSREclynQ7moxjoMFW+88cZyyy3XpUuXOH355ZcXXHDB7bffPk4TtYbRnxS+++67SoIaWZwPhjSqUM0333x1XFyUyq0bbrhhcT6KQOjKm5ttttnkk09+9tlnL7PMMsWF4QAVlfmuDSEZbbrpprvvvntxnqgHybpXr15vvvnmiSeeuNNOO4011lgTTTTRpJNO2rbvA+Dx2N7111+/yy67nHTSSe3bt1dd7rjjjkMPPXTFFVc85ZRTBNq444472WSTjT/++MU9ox147wEHHNCtW7f//ve/RdMYAFQDFYbivBHwz3BUvlE01QZQHyS7U6dOSy655NNPP120DgnpsX///vqstNJK0eKua665ZqGFFrrqqquipRoq0brrrjvTTDPZBcE888yz2mqrHXPMMR9++OHI5oW//PIL97vooovM+MorrxStFTO98847dk1LL7003o9z77PPPo8//rj+0YFgn3322XnnnYeR67DIIovst99+WF1LeWE12JrF2b04r2EEIbajG571jnIY/UnhzDPPzNfvv/9+u7qiqWLs559/3rYJ6XnppZeK1kr7Y489JlWts846RdMoAl4rQ2G0hx9+OOGxqOLCsIK6kMvll1++OG8jyLznn3++vInuFE2JISGDv/jiiy+88MKuu+6KfGy11VYdO3ZEwh5++GGsq+jUFsAJLr/88tVXX713795e55prLlVTvZx66qkxwrXWWiueHzz11FOIbHHPaAeUd4cddvj8888vvPBCNbhoHd2BgtjFHXbYYcV5I+AJp59+usQ1/fTTF001BobDpRo03KeffnrZZZe19Oc7pptuuiMqQL9mnXVWObZr166GKi6PaJDctuTee++VHPbcc88677e89957wQK32267f/7zn927d3/kkUcE47PPPhsd1Md+/fodeeSRf/7zn4nao0cPxurZs+drr70WHYYB88477wMPPCADFOc1DAxBvqKceJdjDM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GllBisskmW2eddehQ+q1WIxDbXCrF8LyXYqO70korcYySdljyaaed9vDDD1d7YINAJQ844IBXX3216VXQcMeOHfkP5rf00ksXrYMx7bTTbrvtttNNN12ctm/f3opmmGGG559/PloYi6t36tRpkkkmcYpEYpbzzDMPOaNDfRA77grz1XfvCOrSrHHKavyWVt3FHxjXOGVLZLwGFWKB5tKt+ion1N84BnfqUulUoL+Ro2dABzOGzKUAbgk/N4UDMpQyG197yGZAB9XilSFgEJNW3zhKYIwghZyYr997772spYXxbNlfeeWVZZddVkg/9NBD7BqdP/nkEwG54oorxqmahzvusMMOSy655MILL/y3v/3NDu/RRx8NLzfOY489Nvvss59yyik2Uihm+Vla7mUXqGXBBRc0y4EHHvif//wnLgVIhetcddVVm2666Y033sirGktkespNhx566NZbb23PKnhiFSWcPvHEE4sttpgZeSE5HV966aUu8dTbbrutR48ef/nLXxZaaCHU6u677y6LmdXJFK4usMAC5LTq8847T7SIgccff9ySDauPARdffPHLLrvMjZY533zzxe0BGXOOOeaITw27EaWea665KKRPnz6WD9opSlBdeOGF2DkxYJdddnnxxRdjIV6ltj322EPhdImSe/Xq9cfQFRalasrLjT0mJN5mm21GJPvgI488kv4txCy33norYaKPA8q3wdVOD5bzj3/8w0JoMjpYQteuXQ2i7lrIcsstZ+MujDXOP//8r7322r777mtYx7LwBx98QNq9995bC71ttdVWzfxaiRTDA//0pz+dddZZ9913384770wS67VHp+ewvkRDdSS57rrr7O8lcZ4T96phxxxzjBKyyCKLkPD444+Ph7hSD+vsvvvultOtWzfHCp5MxK8WXXRRHSxku+2244T2907Zwi0mXWONNT7++GMtTUBnEXH00Uevt956FbstxP9jXu3kDDcLcLaTTjrJol544QUCKDarrLIK3dK8xmWWWeaMM87gD8Ln9ttv18LfnnvuuTvuuINijWON1GJ19BO20yL66Ll8btEEzH7nnXealNIMvvbaa1d/5cJCpGZGJ5IB+YlZBEtc5Wbu5XV83hqJaiGlclhcAqExHrvXXnu5Vx++YRVlaeHD+p999tnmNT7N85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Rf8lh0tQcjQfNxeH6SynFLPTUDGMGbTq6iGbQlRBRFbSMVaWBYZQtqYuxB0MD755BNeJGlQrFkYyHadOcTRoosuutdee0WNqA892V1cmIvpjS/z415SH7XH97VpgweyslJS/xToU3YSTeWulb8ZkLab2MdKArq9++67ZiFz0VpxKp4vgRDexlW+ktP4iYomvehgIjalE3mVzCgs/fM6d7G4uIssJwFyTiFD83X6Cy4kGGLGkJbHKkAiKBpHIYwl/VlDcZZI1BI4p1KHQiE3eLwqXlyoSeAfqtRWW22F3EidRetguIpSWIhttE1C0drWsM856aSTLrroIlm7aKpVKNK0asPQzB+PGFFQZhZeeGHbEtSwaGohUIQzzzzzhhtusCWIOpRIJBK1iTHlM4WJURE2fzZt22+//QUXXDDMn3lPJNoQNgMvvfTSLbfcsuOOOyYjTCQSNY4khYmaRocOHbp169alS5crrriiaEokRh18//33995771//+tcWfSY4kUgk2gRJChO1jgknnPCMM8445JBDivNEYtTBZJNNxnX79OnT4IdiE4lEoqaQpDCRGDEYq/KllnnmmWeChn7Ivrw6+eSTF001gLErf/NtrsF/dq+WMe6447aJ9jp06GDe+t8cSiQSidEP+UWTRCKRSCQSiUQ+KUwkEolEIpFIJClMJBKJRCKRSECSwkQikUgkEolEksJEIpFIJBKJRJLCRCKRSCQSiQQkKUwkEolEIpFIJClMJBKJRCKRSIx+pPDzzz9/8803n3322ScreO2117744oviWpvi999/f+aZZ2aaaaYjjzyyaBpx+O23355++unOnTuPjMFHOEj70UcfvfDCC7/88kvRVJP4+uuv559//jXWWKM4H3Gw8Iceemj22Wc//vjji6YRgf/+97/TTjvt2WefXZy3Fr777rvDDjtsjjnmKM6HxA8//HDOOefMOOOM999/f9E03Pjpp59uuummWWaZRUwVTYPBuz755BMZQCoomioQgAyq/7vvvls0VaD/l19+qf/HH39cNCVGO/z666/s+8orr4zUH+X9/vvvL7nkktlmm81r0TSCYOR+/frJGJdeemnRNBwwmuL4/PPPf/bZZ0VTPQwaNEiHl156yUG0uKt++AT+97//aY+aC0899ZT0/t577/34449FjxqAhQwcOJBUxXmiEYw+pJBfMrmKuPfee2+zzTbdKujdu7eCJBfUAv+YaKKJFllkkeH/0whR3gYMGPDtt99Gy1hjjWXwhRdeWOmNlpoF4b/66qtjjz12//33L9NNbWLsscf+y1/+Ms888xTnw4qwF+dEnqKFvSaZZJKFFlpohhlmiJbRGNSIqvL8SSedtGgamcAX7777blT+hhtuKJoq+Pnnn++7776VV165zsZJ/1tvvXXNNde87bbbiqbEaAdckFf07NnzscceK5rGYLz++uvLLbfcOuusg7yiy0VrFZRL2yQd1NA333wzGl977bXVV1+9T58+cVqNL7744rTTTltppZU22WSTqLxK8CGHHCLiUMmiU5vC3u/ll1/efvvtL7/88qKpNoC3fPDBB6WSawGjCSlUd5977rkddtiBl3fs2HGXXXY59NBDOeVMM8105ZVXbrHFFrYvRdc2Ah6AXtx4441bb7110TSs4N8PPfTQVltthexGi8HnnXdeg2uMlpqFHHTPPff079//xBNPrPG/BjvxxBPbl5900knF+bBC2FuyfIQXRkv79u3RzWuvvXbzzTePltEY4403nupy0003IcFF08iE6RBQTPThhx8umir48ccfH3/8cdXumWeeqd6NIItaJphggr/97W9FU2K0g6KAsiywwAK4i01p0ToGQ8mwU7VxavABOZJ38803t/RNtqmmmmrHHXdUeW3411prrVdffXWfffZ55JFHisttim+//fbpp59WfdZee+2iqTbwySefnHzyyQceeGBxXgMYTUgh/+aL//3vfw877LB+/fp1797dlmXTTTf95z//iXyoymhinbeTRl0ghehgK+wt4hHXRx99NNTnrHpy7qEmkXhMyCgiE4stWkd30N6AAQNqai84GgMdVJwWXHBB1Yj3RiPH++abb+64446ZZ56Zl7788svRDsjiE088Me20084999xFU2J0xJRTTrnRRht98MEH9idFUyWXchK5a6gpTgfdRhtCOe6441KI5dx3331F02BgTu+++65gaen7GDb5q6yyisq7xRZb7Lvvvioy6qkcx1XDmk6NHqqqf/rpJ0VnBD5iFP4GtDO3XfzTn/5UtNYG5CVstabISXuWG6qRRggws//85z9vvPHGW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r+5d4YWfKMkdkoRta/euQSXJfdTaHqFU1VEPhXXnklhmTJ4sIWvTpjyyo33ngj111hhRVE7nrrrRclyXSXXXaZmML8omcJSpblyFx2ltlYh6NSeLw5Zl36qNS0Z94yFdQH8c4//3wOaeENrq4E37BMniAkOYnQ0GL8OreIRFNff/31u+yyy+yzz04SyuRmTEk8WuKlIsJdUR3qgJMwpeVzqmojsh0ruMVaKFwdIQlH1U4hpU0D+ltXGJ2olOyqSZUGZnV13nnnZW5+FTKIMsqn0nASLq2xFM/4sQT9Y+3ljSMA4YUjGyKqf//+O+yww2KLLcarrL9bt26Ye3F50CBWOeKIIxZeeOE55pjjz3/+86abborGSYUrrbSSq1Rw4YUXsgdnjf7VEFTcF/mLIlcfDID2Lb744o4NpZYYqmfPngcccMCKK66oiGqX4G677bY11liDbARYdtllddhxxx3pOuQMM/AqYTnPPPPMOeec88033xlnnMEVXGUzlFQk8Ob999/fmPqAJbOoDoQ0vg7HHntsTEcPJdCFoJ5IbYxmZJnLFHY2/Fj7U0895RI30lmoUw4ZFlxwwZ133tngt9xyC1GPO+44faIbita9e/eQFpZeeukePXqI0uhA7OWXX57j2hEagV2MRpKTTjopVgSGVefo1tVjjjlGmhCBcakOCMw0zLfaaqudc845ZqHz4loVjBwiFecVrXL6008/feWVV7au0Maqq66qfsdckaFohub3228/wriqnWzkUePdZXWM6/jwww+3ohNPPDFG5lSMstZaa1maPjS5zz772JC4ShJmUmbOO+88jcstt1x0MEt0gIi09ddf37GMELIF2EWNEYTbbLONq0Y77bTT9Ax7ISLyINW5ZDSNEiU+SgyJePfddxcOOLTbTz755D9mGjRIOuNmltClSxeScEJaIoyUHR0IwCdlsVtvvZUdw14U3qdPn9JeqojqiHDHaR3QmISFAImpULVNxZprrnnJJZfIvzpISfb3RuBFXIJ7HHTQQdoZgrTUTio3MoHQsECMjY/FjXSInP0xTT3EVfn0oYcecsouprvrrrsslk/GYi1tt912Q0riFpmaHtACJUQE2ctZLKbbt29fjq2D1yuuuAId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/zyy4wzzlg+Ek40H2NL8cVh20FFv+eeewYOHPjmYPTv3/+8885bZJFFlqj6hduRBwKY9Nlnn43Z4cUXX/znP//55ZdfbrXVVkWnxIjA2GOPPf/88++9996vvfbaMJNC9vr000/jg+SBV1555aqrrtKy6qqrNv0WT6JFkFvfeOON5557LvTs+JlnnhGbP/74Y/N/iSORaFsghTaif/rTn+p8nDcxWqJ9+/Z/+ctf+vbtW/0mb6KZGGtQ834DaaQCr19ttdXiA3ZOxx13XJxsookmOuSQQ5Yajk/1Nh8EuPjii++7776OHTuGDD/99BOSuvzyyx944IFNf8ci0fqwk3niiSeOPfbYWWaZJT78oAUv/POf/3zYYYeNsaRwZLx9LD9ccskljz766IQTToggouMU/vbbbyPf8aec9Mm3jxOJxKiCfPu4abRv7DctWxkdOnSIj97jZOOMMw421rNnz9Z8zj/++OPHhze///57Msw666ybb775FltskYywBhFfIAAO89VXXyErU0899dprr73TTjtVfwJ9TAM9vPXWW126dInvb40QULXQQA0/+eQTr7ZPc801l9DYaKONghGCxs8rfy6l+qsVIxW4qThFRiWKBr9amEgkEg3ClvKzzz6bZZZZ4ktUiTqoiSeFiUQikUgkEom2RY1+0SSRSCQSiUQi0ZpIUphIJBKJRCKRSFKYSCQSiUQikUhSmEgkEolEIpGAJIWJRCKRSCQSiSSFiUQikUgkEokkhYlEIpFIJBIJSFKYSCQSiUQikUhSmEgkEolEIpFIUphIJBKJRCKRgCSFiUQikUgkEon828eJRCIxZuCXX3794P2P/vvfz4vzRCLRFphiislm6jzDeON1KM5rCUkKE4lEYnTGww89ddst97zw/IB33/kALyxaE4lEm2KOOWdZ4C/zrr7mCkt3WbRoqgEkKUwkEonREzf/6+6rLv/X00+9UJwnEonaw18X/cv6G67mX3HepkhSmEgkEqMhzjzjkj4nn1ecDMa0000988ydipNEItEW+OyzL97693vFyWCsvuYKJ/c5uDhpOyQpTCQSidENyy294cf/+TSOZ55lxo02XnP2OWb503xzTTPNlNGYSCTaEN98892AV14f8Mobl1x07X/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RYuoEjpbO5yAJM2n17XmKsVRM8BbasdhWqTztkWSwkQikRizUDvPfgLNJIXFUW2gRYSj1oRvvjw15Sq/VVCcDA215uS1Jk9jSFKYSCQSYxaaX1lbB80hWLXz1CfQInlGXeFrzVWaL8+o6OS1gCSFiUQiMWZhVKz0oy47gVFX+FFX8lojYbWmycaQpDCRSCRaGxdfeM08sy/brWuv+OtNiUQiUQtIUphIJBKtjbvv+uOvYj75xPNbbpa8MJFI1ApGQ1L49ddfPzQYRVO7dg8++GDRNCSKy4kxGFdde9a7Hz3ZxL/dem8XPR2UjRNMMPTf1r/6+rOjsymKpsane/r5/jfdeuFOu2zZoUOHoutg1OlZ/98SSy7SRM9X//3gbXde0vfMo/bdf+dppp0qeibaFltuvWEcDBzwZvLCRCJRIxgNSeELL7ywymAUTe3arbrqqkXTkJhwwgk33nhjlLHol0g0D3vus2Nx1Aj+vvxSi7fkT/JMPc2UCy7053322/mGm8/v0GHconVEAH/983xzr7XOSjv23PKW/hevsFKX4kKi7bDiSl2OOX7fOE5emEgkagT59nG7m2++GWXcYYcd2vxPaiZGIWy7/aadZpyuOGkIvfcexj8EPN/8c++938j6s87TTjf1BRefVD77TLQh1ttgteSFiUSipjDGkcLNN9/8gMHo0qVL586do/2SSy7Ze++94zgxZuLxR5/deIMd6/3r8fijzxQ9hsSee/cojuph9TVXmH+BeYuTxlHOssO2+1x79S1Fa7t2a661YnE0JE456dzylup/xeUqWMvMMywW//4899+36Lqre4tr7drt3ns71LM4SbQdkhcmEomawhhNCu+4444nnnhi552LpzJ44c033xzHiTETjz/2TL1/z/pXXB4S62+4+vwLzFOcDIk99ty+OGoS5Sy333Zf790O/+D9/0T79DNMM9tsxXalDspb6vwrLjeE7779/sH7Hz/1pHPXX3vb/3z032g85fTDJp104jhOtCGSFyYSidrBmP728aSTTnrCCSd06VJ8yuqoo46Kg0SiOejd0MPCDTdaY865Zi1OWoIXnh9QHLVr9+tI+FGrZ55+8bxzLo/jueaabaeeW8Zxom2RvDCR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YfpTQUP0uP22UDpBEIjHKYSz71x9++KE4qw2otX1Pu8hBv8v7LDb4nZTm48EHH1x11VXjeNCgQXEw4YRFtb799turv1YCGGH5s9Vnn332FltsEcfNx3AKnBgGPPvMy103GjF/9uOqa89aYqmFHfzx49UbNvp71LBb7+3KjwzOPMNiXk857dD1N1w9Wn777bexx/5jl1WO8+5HT1auDDFyOR3EICWmmXaqp567rTipulqOg2s29uQy0OCM1fjn2cessdYKcTzU0VqE7Xp07b3XMP4RlwTUZ4SIZlxqJrp17RVvNw81Ef3nP///LLMW0LFjx4knHsqvZn777bfffff/j2PbHB06dJhyyimLk6Hh888///nnn4uTGkDzha81VyF2/b8O3yBGXYeZZ/ZlvQphgRwtrYkx7knhSy+99FAFl1566VFHHbXEEkuUjHD++ecfBkaYGJNx6knnFUdiqcIIYZg/TbjyKn/kgsCzz7xUHI0gdO7cqe+ZR5WM8Ibr+o9ARpgYTgw/I0wkEonhxxhHCvfaa69VKth+++2RwhdffDHaMcI777wzjhNjLHbrvV2D/4rL9fDuux9c2u+64qSCZn6aMFA9xT/PPqbnrv//DmNjpLD6lvJfg79KU1498OBeV1171u13X7bWOisV19q1O2Df44qjRFsjGWEikagR5GcK200yySQHHHDAE088UTs/TJNoEyyx1MK7V94grvOvuNwITjzurOKoghY9JqyeZY21Vih/p/Dpp144+YRz4rga1f2r/xWXq1C9lu16bOZ0oo7FJyh++eXX9dfe5vvvi09WJNoWyQgTiUTtYDQkhTPPPHP8aWMomtq1K86rcPzxx99+++2PP/74xx9/7LTol0i0EF9++fU/+14cxy16TNgYbriu/957HDmSSNu99zwy7xzLPPP0CH5vOjFsSEaYSCRqCqPhF01aH/lFk9bHiP2iSXHUCB577Jn4+N1uvbdbcvAbtdVf42jfvv0uu3V3UIcUVo9c/UWTOKiDb7759qmnXhg44I2HHniiaBqMoUp4yknnxrwN9vzhxx///ea77737wQfv/+eeux8uWkc08osmLcUIZ4T5RZPWRH7RpE2QXzQZ2UhSOAKQpLD1MQJJYWKE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uutHT37Tade57ZJppohP38ciKRGE789NPPA155/bRTLnjs0WeiRYQ+8+IfP37chkhSmEgkEqMhDtr/hGuuuqU4qfyy7uxzzDzXXLPNMuuMRVMikWgLfPbZFwMHvPnqwDfxwqKp8psq/S7vU5y0HZIUJhKJxOiJPiefd+7ZV9TmnydIJBKBcccdZ/NuG+yzf/Etk7ZFksJEIpEYbfH+ex9dd81t/n366edFUyKRqA1MP/00W2+78cqrLDPd9NMUTW2NJIWJRCIx+uO77wZ9/dU3X3/9jYOiKZFItAXGH3+8ySef1L+OE09UNNUMkhQmEolEIpFIJGr7bx8nEolEIpFIJFoHSQoTiUQikUgkEkkKE4lEIpFIJBJJChOJRCKRSCQSkKQwkUgkEolEIpGkMJFIJBKJRCKRpDCRSCQSiUQiAUkKE4lEIpFIJBJJChOJRCKRSCQSSQoTiUQikUgkEpCkMJFIJBKJRCKRpDCRSCQSiUQikaQwkUgkEolEIgFJChOJRCKRSCQSSQoTiUQikUgkEkkKE4lEIpFIJBKQpDCRSCQSiUQikaQwkUgkEolEIpGkMJFIJBKJRCIBSQoTiUQikUgkEkkKE4lEIpFIJBJJChOJRCKRSCQSkKQwkUgkEolEIpGkMJFIJBKJRCKRpDCRSCQSiUQiAWP9/vvvxeHQ8MMPPxRHiUQikUgkEolREBNMMEFxVA/5pDCRSCQSiURijEe7dv8HRvzfPLOucIUAAAAASUVORK5CYII=\">\n\n\n- **Encode :** This is the process of encoding context into a word vector. This is done using [Residual Trigram CNNs](https://youtu.be/sqDHBH9IjRU?t=2148).\n\n<img src=\"data:image/PNG; base64, iVBORw0KGgoAAAANSUhEUgAABDQAAAFDCAIAAABKk8nzAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAHfESURBVHhe7d0HfE3n/wdwQYIMxEiMWLFCYqtVq7UpiqpRs7Q6rNL6mS1qtBSlOowaNVpK7VXUXrUzSIKkJEQiEbIQifw/8jzu/8o8d58bn/fL63qe5557znOec3Lv93vPuDYJCQm5iLJzaXGL3gsafXfi27dKyBYiRe5dWPfDmh3HL1y6mStX8SIt2vYePKJXo+LySSIiIiJtTE6IiIiIiEgVcsv/iYiIiIiILIrJCRERERERqQKTEyIiIiIiUgUmJ0REREREpApMToiIiIiISBWYnBARERERkSowOSEiIiIiIlVgckJERERERKrA5ISIiIiIiFSByQkREREREakCkxMiIiIiIlIFJidERERERKQKTE6IiIiIiEgVmJwQEREREZEqGCE5efToUWhoaGBg4OVUvr6+N2/efPDggXw65+rSpYu9vf3Jkydl/ZWH0QBZsRDzbBTlS0kdkv8fE7ykVKlSeLmsExEREZEWg5KTpKSk27dvb9++fdy4cQMGDGiXqnPnzsOHD1+yZImcyASePHkSFBQUHh4u60Zl0pnTK87R0bF27dqVK1eWdSIiIiLSon9ygszk7Nmz06ZNGz16dEBAgLu7e/9Ubdu2vXfv3s8//yynM4H//vtv5MiR69atk3WjMunM6RVXs2bN3bt3z5s3T9aJiIiISIv+yYm/v/8nn3xy4MCBgQMHrl69ev369XNTLVmyZMuWLZ999pmczgSioqL++ecfWTE2k86ciIiIiIgyY5OQkCCLunj8+PGnn366devWqVOnjhgxQrZm6d69exEREffv30c5b968zs7OJUuWLFSokHgWHj586O3tXaRIkSpVqoSHh9+9e/fRo0eYskyZMm5ubtrT+Pn5jRkzZsiQIe+++y4aK1SooJng6dOn2q/FUsqXL58/f37xLF6IDnh4eBQvXly0wH///RcSElK5cuUCBQpkPfM0unTpgtwMmjRpIptSRyY0NBQrm5SUhBkWK1asdOnStra28umXe4iqk5MTFqEZh6yf1YYFnT17FhPUrl1bNqU6deoUFt2sWTNZT53n6dOnscpYcU0LlhIZGRkbG4sq+lm4cGGspmagQHtz3Lx5MywsDOPZuHFj8SzmIK4sEuOMmZcrV070M9s9Snsd028jEJupZs2az549w1LQSUyGvUWMJDoWHBwseo7lotuOjo7ihaDZKHi52BBoxAqWKFEi/XbMticC5qMZK7HEvn37iqVob3olY6IZVU9PT9GiWVmUMciiw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2oYvy1ewKjR49GT+bNmyeqIrPCBNqJk9HHx/yYnBBZAbwhTpkyBe9W7du3r1mzJh7xDjVt2rRPPvlEnFBLREQZEt/Ta0tzOMIQCOWPHj2KkBoBoggiZ8yYIW45pYFptm/fjnaUMc3kyZPv378/btw4kQMIaab57rvv6tWrd+LEiTS3EoYaNWqgHVFsUFAQZoWA/v3331dyoYJyCHkxSkg2MHMs4vz58+gqInL59AsIgkWahGnE5ezoWLbHPd58801R0L5SAq9yT73frpKbCCOIx+hhDMVIylYDYOm+vr6YJ8qpm3EOOiPuNyNg1fz8/DRjrplAewvqJLNVwAwxW8xcjCp2VLEtxLPihC7kSNpDh87g8cMPPxRVMPr4mB8viCciIiKibNjb2yMyNm4iRJQej5wQERERUVbEJSh1eW96Mj0mJ0REREQkdenSJc19w06ePDkq9RL8gQMHihYi0+FpXUREREQkiUsZ69atKy6y11yls3r16p458ffISW2YnBARERGRdPLkyV9++QU5yYPUX093d3dv1arV6NGjK1SoICYgMikmJ0REREREpAq85oSIiIiIiFSByQkREREREakCkxMiIiIiIlIFJidERERERKQKTE6IiIiIiEgVmJwQEREREZEqMDkhIiIiIiJVYHJCRERERESqwOSEiIiIiIhUgckJERERERGpApMTIiIiIiJSBSYnRERERESkCkxOiIiIiIhIFWwSEhJk0QRiY+P8fAPj40y4CCJSqERJF0+vKrJCREREpD7GT07u3Anfv/eor28A0pKgGzdlKxGpgK1tXk+vqkhR8Nj9nQ6ylYiIiEgdjJyc/Llh5+wZixMSHsk6EalV7TrVJ0waUatOdVknIiIisjSjJScR4ZGzZy7es+uQrKdyK1PS06tKiZIusk5ElnMtINjPN+Dhw1hZTzXysyGfDB8gK0REREQWZZzk5MSxs2NGTdMEPW+0atKnb1dPr6pFizmLFiJSieDgkCu+gQu+WxYaGiZa6r9Wc8Vv8+3sbEWViIiIyFKMkJwkJyd37jAo6MYtlHPnzj1h8vD+A3uIp4hInRISHn0zc/HGP3aKap/33v5q+meiTERERGQpRriV8OwZi0VmUq165R17V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IiIhIVwb9QjwREREREZGxMDkhIiIiIiJVYHJCRERERESqwOSEiIiIiIhUgckJERERERGpApMTIiIiIiJSBSYnRERERESkCkxOiIiIiIhIFZicEBERERGRKjA5ISIiIiIiVWByQkREREREqsDkhIiIiIiIVIHJCRERERERqQKTEyIiIiIiUgUmJ0REREREpAK5cv0f/qLrUi1+wbIAAAAASUVORK5CYII=\">\n\n- **Attend :** In this model attention refers to [manually extracting features](https://youtu.be/sqDHBH9IjRU?t=2541) from the encoded tokens. This step has a similar effect as the [attention mechanism](https://blog.floydhub.com/attention-mechanism/).\n\n<img src=\"data:image/PNG; base64, iVBORw0KGgoAAAANSUhEUgAABCYAAAC/CAIAAACt70rwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAClqSURBVHhe7d0JeBRV9vDhOJqwJIGEJVFMWBJigkJEdpgBVMARXFGQkUVkFMEFEFGUcWFQEf8qIgLjgg4uwAwK4oKAIiqgbAIiARIEwpLAEIjsCQL6fN8hdQhN0t3p5VZ3B3/v008853an6lbdIt7T1dV1XmFhYRgAAAAA2ONP+l8AAAAAsAElBwAAAAAbUXIAAAAAsBElBwAAAAAbUXIAAAAAsBElBwAAAAAbUXIAAAAAsBElBwAAAAAbUXIAAAAAsBElBwAAAAAbUXIAAAAAsBElBwAAAAAbUXIAAAAAsBElBwAAAAAbUXIAAAAAsBElBwAAAAAbUXIAAAAAsBElBwAAAAAbUXIAAAAAsBElBwAAAAAbUXIAAAAAsBElBwAAAAAbUXIAAAAAsBElBwAAAAAbUXIAAAAAsBElBwAAAAAbUXIAAAAAsBElBwAAAAAbUXIAAAAAsBElBwAAAAAbUXIAAAAAsBElBwAAAAAbUXIAAAAAsBElBwAAAAAbUXIAAAAAsBElBwAAAAAbUXIAAAAAsBElBwAAAAAbUXIAAAAAsBElBwAAAAAbUXIAAAAAsBElBwAAAAAbUXIAAAAAsBElBwAAAAAbUXIAAAAAsBElBwAAAAAbUX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FFa5IMM06qlxVuxmZAEAAILIl8vHxZ19hi5fusaKr7q6Td16iZGRlawUIeXX4yd2bMtZ8OUSK42/sOai72dasVOMbHnh7cgCAAAEi48lh/hrh147tudqgnLik7lTUlOTNHGBkS2PPBlZAACAoPD9G6u+WDhtxBMPaIKQd8217X/auMCTWSkjW754PrIAAABB4ftZDkt+/v5NWVvlUVhwTJsQSiKjKqemJddLqn3RRXHa5BlGNsT5PLIAAAAB5m/JAQAAAABucCtAAAAAADai5AAAAABgI0oOAAAAADai5AAAAABgI0oOAAAAADai5AAAAABgI0oOAAAAADai5AAAAABgI0oOAAAAADai5AAAAABgI0oOAAAAADai5AAAAABgI0oOAAAAADai5AAAAABgI0oOAAAAADai5AAAAABgI0oOAAAAADai5AAAAABgI0oOAAAAADai5AAAAABgI0oOAAAAALYJC/v/2hddVPNu/iAAAAAASUVORK5CYII=\">\n\n- **Predict :** The final step in the model is making a prediction given the input text. Here the vector from the attention layer is passed to a Multilayer Perceptron to output the entity label ID.\n\n<img src=\"data:image/PNG; base64, iVBORw0KGgoAAAANSUhEUgAAA0gAAADDCAIAAAA3GqYKAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAB2fSURBVHhe7d0LXFR1/v9x9v/P3VIBU6lWMS1BAUstEwhDt5TAyi3vZWpqXrpo3v2lVoaW9NO8JV1WMrzVhvf+3i9dxLygm5qbUMlWKl6xUlTatt1H/w98v46TwDDIzJkz3309H/Ooz/c7h5kz3zly3pzr7woLCwMAAADg//6P/j8AAAD8HMEOAADAEAQ7AAAAQxDsAAAADEGwAwAAMATBDgAAwBAEOwAAAEMQ7AAAAAxBsAMAADAEwQ4AAMAQBDsAAABDEOwAAAAMQbADAAAwBMEOAADAEAQ7AAAAQxDsAAAADEGwAwAAMATBDgAAwBAEOwAAAEMQ7AAAAAxBsAMAADAEwQ4AAMAQBDsAAABDEOwAAAAMQbADAAAwBMEOAADAEAQ7AAAAQxDsA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iVBMA/ILkuZSXUlXdLiF+8pRnbRKeCgrOv/7aPEfcfKhT0itTx6raJrwb7MSPP54dOyblk4926DYAqzRrHjVj9ot16lhxv1oA8KxnR6esXL5e1ZLqxj0/xOdngO3K2ieRxnHkX0Rk2MrVc1VtH14PduI///nPO29nrF39UU62W/eiAFBJkVHh9z1wT59+XatUqaK7AMDfpM5KT31tnm4Ui4wKi4gMt/gUVElyR/OOS6rT7WI23FanWBHsHDas3yLj8u03h7/9x+Hjx0/pXgCeIL/pwsIa1G8Q2qJl08SkNroXAPzZ5k1bJ0+afezoSd22gcDAauOeH2KrEyacWRrsAAAAKmrFsnXLl613XA3YVyIiwzp2TpJIZ6uzJS5DsAMAAH6goOD8lzlF1wTetdPSaxdHRIUFBQXWrXuDX9xomGAHAABgCG9dxw4AAAAWI9gBAAAYgmAHAABgCIIdAACAIQh2AAAAhiDYAQAAGIJgBwAAYAiCHQAAgCEIdgAAAIYg2AEAABiCYAcAAGAIgh0AAIAhCHYAAACGINgBAAAYgmAHAABgCIIdAACAIQh2AAAAhiDYAQAAGIJgBwAAYAiCHQAAgCEIdgAAAIYg2AEAABiCYAcAAGAIgh0AAIAhCHYAAACGINgBAAAYgmAHAABgCIIdAACAIQh2AAAAhiDYAQAAGIJgBwAAYAiCHQAAgCEIdgAAAIYg2AEAABiCYAcAAGAIgh0AAIAhCHYAAACGINgBAAAYgmAHAABgCIIdAACAIQh2AAAAhiDYAQAAGIJgBwAAYAiCHQAAgCEIdgAAAIYg2AEAABiCYAcAAGAIgh0AAIAhCHYAAACGINgBAAAYgmAHAABgCIIdAACAIQh2AAAAhiDYAQAAGIJgBwAAYAiCHQAAgCEIdgAAAIYg2AEAABiCYAcAAGAIgh0AAIAhCHYAAACGINgBAAAYgmAHAABghICA/w//6dOggSu9SgAAAABJRU5ErkJggg==\">\n\n<center>[Source : <a href=https://explosion.ai/blog/deep-learning-formula-nlp>Explosion AI blog on deep learning formula for NLP models</a>]</center>",
"_____no_output_____"
],
[
"## Model training\n\n- First we will create the model using `arcgis.learn.EntityRecognizer()` constructor and passing it the data object.\n- Training the model is an iterative process. We can train the model using its `fit()` method till the validation loss (or error rate) continues to go down with each training pass also known as epoch. This is indicative of the model learning the task.",
"_____no_output_____"
]
],
[
[
"ner = EntityRecognizer(data)",
"_____no_output_____"
],
[
"ner.fit(10)",
"_____no_output_____"
]
],
[
[
"## Validate results\n\nOnce we have the trained model, we can visualize the results to see how it performs.",
"_____no_output_____"
]
],
[
[
"ner.show_results()",
"_____no_output_____"
]
],
[
[
"## Save and load trained models\n\nOnce you are satisfied with the model, you can save it using the `save()` method. This creates an Esri Model Definition (EMD file) that can be used for inferencing on unseen data. \nSaved models can also be loaded back using the `load()` method. The `load()` method takes the path to the emd file as a required argument.",
"_____no_output_____"
]
],
[
[
"ner.save('crime_10.emd')",
"Model has been saved to data\\EntityRecognizer\\models\\crime_10.emd\n"
],
[
"model_path = os.path.join('data', 'EntityRecognizer', 'models', 'crime_10', 'crime_10.emd')\nmodel_path",
"_____no_output_____"
],
[
"ner.load(model_path)",
"<spacy.lang.en.English object at 0x000001CF20811160>\n"
]
],
[
[
"# Model inference\n\nThe trained model can be used to extract entities from new text documents using the `extract_entities()` function. This method accepts the path of the folder where new text documents are located, or a list of text documents from which the entities are to be extracted.",
"_____no_output_____"
]
],
[
[
"reports_path = os.path.join(\"data\", \"EntityRecognizer\", \"reports\")\nreports_path",
"_____no_output_____"
],
[
"results = ner.extract_entities(reports_path)",
"_____no_output_____"
],
[
"results.head()",
"_____no_output_____"
]
],
[
[
"# Visualize entities\n\nWe can utilize SpaCy's named entity visualizer to check the model's prediction on new text one at a time.",
"_____no_output_____"
]
],
[
[
"def color_gen(): #this function generates and returns a random color.\n random_number = random.randint(0,16777215) #16777215 ~= 255x255x255(R,G,B)\n hex_number = format(random_number, 'x')\n hex_number = '#' + hex_number\n return hex_number",
"_____no_output_____"
],
[
"colors = {ent.upper():color_gen() for ent in ner.entities}\noptions = {\"ents\":[ent.upper() for ent in ner.entities], \"colors\":colors}",
"_____no_output_____"
],
[
"txt = 'Multiple officers were called to an apartment building on N. Wickham Court Saturday night following reports of a large disturbance taking place inside. Officers learned there were ongoing tensions between residents of two apartments, and that some of this was the result of a gunshot the night prior. The weapons offense had not been reported to police, but officers now learned a round was fired in a common stairwell and the bullet entered an apartment, going through a bathroom before entering a bedroom wall. No one was hurt and investigators are attempting to sort out whether someone intentionally fired a gun, or if damage was the result of an accident or careless handling of a firearm. Released 12/26/2017 at 10:50 AM by PIO Joel Despain '",
"_____no_output_____"
],
[
"model_folder = os.path.join('data', 'EntityRecognizer', 'models', 'crime_10')",
"_____no_output_____"
],
[
"nlp = spacy.load(model_folder) #path to the model folder",
"_____no_output_____"
],
[
"doc = nlp(txt)",
"_____no_output_____"
],
[
"spacy.displacy.render(doc,jupyter=True, style='ent',options=options)",
"_____no_output_____"
]
],
[
[
"# References",
"_____no_output_____"
],
[
"[1]: [Feature hashing](https://arxiv.org/abs/1805.08539)\n\n\n\n[2]: [Docanno ](https://github.com/chakki-works/doccano)\n\n[3]: [TagEditor ](https://github.com/d5555/TagEditor)\n\n[4]: [Embed, encode, attend, predict: The new deep learning formula for state-of-the-art NLP models](https://explosion.ai/blog/deep-learning-formula-nlp)",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown"
] |
[
[
"markdown",
"markdown",
"markdown",
"markdown",
"markdown",
"markdown",
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown",
"markdown"
]
] |
4ae7f062c583d022c7c0207ef4bf1d755f6eec26
| 33,300 |
ipynb
|
Jupyter Notebook
|
Diabetes-example/Anchors_diabetes.ipynb
|
Mpitsiali/eXplainable-AI-ADE
|
27ef0a6145a789731ae55c81931fbefba2295e20
|
[
"Apache-2.0"
] | null | null | null |
Diabetes-example/Anchors_diabetes.ipynb
|
Mpitsiali/eXplainable-AI-ADE
|
27ef0a6145a789731ae55c81931fbefba2295e20
|
[
"Apache-2.0"
] | null | null | null |
Diabetes-example/Anchors_diabetes.ipynb
|
Mpitsiali/eXplainable-AI-ADE
|
27ef0a6145a789731ae55c81931fbefba2295e20
|
[
"Apache-2.0"
] | null | null | null | 45.491803 | 9,778 | 0.56048 |
[
[
[
"import pandas as pd\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport xgboost",
"_____no_output_____"
]
],
[
[
"Data preprocessing\n",
"_____no_output_____"
]
],
[
[
"#load dataset\ndata = pd.read_csv(\"pima-diabetes.csv\")",
"_____no_output_____"
],
[
"data.head(10)",
"_____no_output_____"
],
[
"# mapping True diabetes prediction to 1\n# mapping False diabetes prediction to 0\ndiabetes_map= {True:1, False:0}\ndata['diabetes']=data['diabetes'].map(diabetes_map)\nprint(data['diabetes'])\n",
"0 1\n1 0\n2 1\n3 0\n4 1\n ..\n763 0\n764 0\n765 0\n766 1\n767 0\nName: diabetes, Length: 768, dtype: int64\n"
],
[
"data.isnull().values.any() #no null values",
"_____no_output_____"
],
[
"\ndiabetes_true_count=len(data.loc[data['diabetes']==True])\ndiabetes_false_count=len(data.loc[data['diabetes']==False])\n(diabetes_true_count,diabetes_false_count)",
"_____no_output_____"
],
[
"from sklearn.model_selection import train_test_split,cross_val_score\n\nfeature_columns=['num_preg',\t'glucose_conc',\t'diastolic_bp',\t'thickness',\t'insulin',\t'bmi',\t'diab_pred',\t'age',\t'skin' ]\npredicted_class=['diabetes']",
"_____no_output_____"
],
[
"X = data[feature_columns].values\ny= data[predicted_class].values\n\n\nX_train,X_test,y_train,y_test= train_test_split(X,y,test_size=0.30, random_state=10)",
"_____no_output_____"
],
[
"\nprint(\"total number of rows : {0}\".format(len(data)))\nprint(\"number of rows missing glucose_conc: {0}\".format(len(data.loc[data['glucose_conc'] == 0])))\nprint(\"number of rows missing glucose_conc: {0}\".format(len(data.loc[data['glucose_conc'] == 0])))\nprint(\"number of rows missing diastolic_bp: {0}\".format(len(data.loc[data['diastolic_bp'] == 0])))\nprint(\"number of rows missing insulin: {0}\".format(len(data.loc[data['insulin'] == 0])))\nprint(\"number of rows missing bmi: {0}\".format(len(data.loc[data['bmi'] == 0])))\nprint(\"number of rows missing diab_pred: {0}\".format(len(data.loc[data['diab_pred'] == 0])))\nprint(\"number of rows missing age: {0}\".format(len(data.loc[data['age'] == 0])))\nprint(\"number of rows missing skin: {0}\".format(len(data.loc[data['skin'] == 0])))",
"total number of rows : 768\nnumber of rows missing glucose_conc: 5\nnumber of rows missing glucose_conc: 5\nnumber of rows missing diastolic_bp: 35\nnumber of rows missing insulin: 374\nnumber of rows missing bmi: 11\nnumber of rows missing diab_pred: 0\nnumber of rows missing age: 0\nnumber of rows missing skin: 227\n"
],
[
"#this is to deal with the zero values\nfrom sklearn.impute import SimpleImputer\nfill_values= SimpleImputer(missing_values=0,strategy=\"mean\")\n\nX_train= fill_values.fit_transform(X_train)\nX_test= fill_values.fit_transform(X_test)",
"_____no_output_____"
],
[
"classifier=xgboost.XGBClassifier()",
"_____no_output_____"
],
[
"classifier=xgboost.XGBClassifier(base_score=0.5, booster='gbtree', colsample_bylevel=1,\n colsample_bynode=1, colsample_bytree=0.3, gamma=0.4,\n learning_rate=0.2, max_delta_step=0, max_depth=15,\n min_child_weight=5, missing=None, n_estimators=100, n_jobs=1,\n nthread=None, objective='binary:logistic', random_state=0,\n reg_alpha=0, reg_lambda=1, scale_pos_weight=1, seed=None,\n silent=None, subsample=1, verbosity=1)",
"_____no_output_____"
],
[
"classifier.fit(X_train,y_train.ravel())",
"_____no_output_____"
],
[
"y_pred=classifier.predict(X_test)",
"_____no_output_____"
],
[
"from sklearn.metrics import accuracy_score, confusion_matrix, classification_report,plot_confusion_matrix\ncm= confusion_matrix(y_test,y_pred)\nscore=accuracy_score(y_test,y_pred)\nprint(cm)\nplot_confusion_matrix(classifier, X_test, y_test,cmap='Greens') \nplt.show()",
"[[111 33]\n [ 35 52]]\n"
],
[
"print(classification_report(y_test, y_pred))",
" precision recall f1-score support\n\n 0 0.76 0.77 0.77 144\n 1 0.61 0.60 0.60 87\n\n accuracy 0.71 231\n macro avg 0.69 0.68 0.69 231\nweighted avg 0.70 0.71 0.70 231\n\n"
],
[
"score_cross_val=cross_val_score(classifier,X_train,y_train.ravel())\nprint('Cross validation average score {:.2f}%'.format(score_cross_val.mean()*100))",
"Cross validation average score 75.04%\n"
],
[
"try:\n import alibi\nexcept:\n\n !pip install alibi \n import alibi\n",
"_____no_output_____"
]
],
[
[
"Alibi is an open source Python library aimed at machine learning model inspection and interpretation. The focus of the library is to provide high-quality implementations of black-box, white-box, local and global explanation methods for classification and regression models.\nAlibi contains many explainers such as Anchors",
"_____no_output_____"
]
],
[
[
"from alibi.explainers import AnchorTabular\n\n\n#lambda function to predict the instance we want using xgboost classifier\npredict_fn = lambda x: classifier.predict_proba(x)\n\n#Create an explainer, give as arguements the prediction function and name of the features\nexplainer = AnchorTabular(predict_fn, feature_columns)\n#train the explainer\nexplainer.fit(X_train)\n\n\nclass_names= ['Not Diabetic','Diabetic']\n\nidx = 50\n#use the explaine.predictor to predict the result \npredicted=explainer.predictor(X_test[idx].reshape(1, -1))[0]\n\n\nprint('Prediction: ',class_names[predicted] )\nprint('True class: ', class_names[y_test[idx,0]])\n\n#now we use the explainer to explain an test instance. And the threshold of the precision is 95%\nexplanation = explainer.explain(X_test[idx], threshold=0.95)\n\nprint('Anchor: %s' % (' AND '.join(explanation.anchor)))\nprint('Precision: %.2f' % explanation.precision)\nprint('Coverage: %.2f' % explanation.coverage)",
"Prediction: Not Diabetic\nTrue class: Not Diabetic\nAnchor: glucose_conc <= 117.00 AND bmi <= 27.70\nPrecision: 0.99\nCoverage: 0.16\n"
],
[
"idx = 14\n\n#use the explaine.predictor to predict the result \npredicted=explainer.predictor(X_test[idx].reshape(1, -1))[0]\n\n\nprint('Prediction: ',class_names[predicted] )\nprint('True class: ', class_names[y_test[idx,0]])\n#now we use the explainer to explain an test instance. And the threshold of the precision is 95%\nexplanation = explainer.explain(X_test[idx], threshold=0.95)\n\nprint('Anchor: %s' % (' AND '.join(explanation.anchor)))\nprint('Precision: %.2f' % explanation.precision)\nprint('Coverage: %.2f' % explanation.coverage)",
"Prediction: Not Diabetic\nTrue class: Diabetic\nAnchor: glucose_conc <= 99.00 AND diab_pred <= 0.24 AND insulin <= 159.97\nPrecision: 1.00\nCoverage: 0.06\n"
]
]
] |
[
"code",
"markdown",
"code",
"markdown",
"code"
] |
[
[
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code"
]
] |
4ae804eaaabdcc843f84ae66d2a4b600d69a54fa
| 37,882 |
ipynb
|
Jupyter Notebook
|
main_notebook.ipynb
|
nhsx-mirror/SystemHierarchies
|
0a96ef635c1607736580777f25d903d877ca74f2
|
[
"MIT"
] | null | null | null |
main_notebook.ipynb
|
nhsx-mirror/SystemHierarchies
|
0a96ef635c1607736580777f25d903d877ca74f2
|
[
"MIT"
] | null | null | null |
main_notebook.ipynb
|
nhsx-mirror/SystemHierarchies
|
0a96ef635c1607736580777f25d903d877ca74f2
|
[
"MIT"
] | 1 |
2022-03-07T15:01:41.000Z
|
2022-03-07T15:01:41.000Z
| 40.257173 | 181 | 0.405918 |
[
[
[
"import plotly.express as px\nfrom plotly import graph_objects as go\nimport pandas as pd\n#import chart_studio.tools as tls",
"_____no_output_____"
],
[
"df_gp = pd.read_csv('/Users/muhammad-faaiz.shanawas/Documents/GitHub/SystemHierarchies/data/gp-reg-pat-prac-map.csv')\nlist_of_ccgs = df_gp['CCG_CODE'].unique()\nnum_of_ccgs = len(list_of_ccgs)\n",
"_____no_output_____"
],
[
"list_of_pcns = df_gp['PCN_NAME'].unique()\nnum_of_pcns = len(list_of_pcns)\n\n",
"_____no_output_____"
],
[
"list_of_stps = df_gp['STP_NAME'].unique()\nnum_of_stps = len(list_of_stps)",
"_____no_output_____"
],
[
"df_gp_cut = df_gp[['PRACTICE_NAME', 'PCN_NAME', 'CCG_NAME', 'STP_NAME', 'COMM_REGION_NAME']]\ndf_gp",
"_____no_output_____"
],
[
"#load in data and retrieve the number of trusts\ndf_trusts = pd.read_csv('/Users/muhammad-faaiz.shanawas/Documents/GitHub/SystemHierarchies/data/data_DSPTmetric_20220208.csv')\ndf_trusts = df_trusts.loc[df_trusts[\"Sector\"] == \"Trust\"].reset_index(drop = True)\ndf_trusts_cut = df_trusts[[\"Code\", \"Name\", \"CCG20CD\"]]\n\n#df_trusts_cut = df_trusts_cut.rename(columns = {\"CCG20CD\" : \"\"})\ndf_trusts\n",
"_____no_output_____"
],
[
"#create dict and display funnel chart\n\ndata_funnel = dict(number = [7, num_of_stps, num_of_ccgs, num_of_trusts, num_of_pcns, 6528], stage = [\"Regions\", \"ICS\", \"CCG\", \"Trusts\", \"PCN\", \"GP Practices\"])\n\nfig = px.funnel(data_funnel, x= 'number', y = 'stage')\n#fig.show()",
"_____no_output_____"
],
[
"\n#create a sunburst chart mapping regions-stps-ccgs-pcn-practices\nprint(df_gp_cut)\nfig2 = px.sunburst(df_gp_cut, path = ['COMM_REGION_NAME', 'STP_NAME', 'CCG_NAME', 'PCN_NAME', 'PRACTICE_NAME'], values = None)\n#fig2.show()",
"_____no_output_____"
],
[
"#create a medium sunburst chart mapping regions-stps-ccgs-trusts\nfig3 = px.sunburst(df_gp_cut, path = ['COMM_REGION_NAME', 'STP_NAME', 'CCG_NAME', 'TRUST_NAME'], values = None)\nfig3.show()",
"_____no_output_____"
],
[
"#create a smaller sunburst chart mapping regions-stps-ccgs\nfig4 = px.sunburst(df_gp_cut, path = ['COMM_REGION_NAME', 'STP_NAME', 'CCG_NAME'], values = None)\n#fig4.show()",
"_____no_output_____"
],
[
"#create a treemap mapping regions-stps-ccgs-pcns-practices\nfig5= px.treemap(df_gp_cut, path = ['COMM_REGION_NAME', 'STP_NAME', 'CCG_NAME', 'PCN_NAME', 'PRACTICE_NAME'], values = None)\n#fig5.show()",
"_____no_output_____"
],
[
"#create a smaller treemap mapping regions-stps-ccgs\nfig6 = px.treemap(df_gp_cut, path = ['COMM_REGION_NAME', 'STP_NAME', 'CCG_NAME'], values = None)\n#fig6.show()",
"_____no_output_____"
],
[
"#saving all plotly figures\n'''\nfig.write_html(\"/Users/muhammad-faaiz.shanawas/Documents/GitHub/SystemHierarchies/map outputs/funnel_chart.html\")\nfig2.write_html(\"/Users/muhammad-faaiz.shanawas/Documents/GitHub/SystemHierarchies/map outputs/sunburst_large.html\")\nfig3.write_html(\"/Users/muhammad-faaiz.shanawas/Documents/GitHub/SystemHierarchies/map outputs/sunburst_small.html\")\nfig4.write_html(\"/Users/muhammad-faaiz.shanawas/Documents/GitHub/SystemHierarchies/map outputs/treemap_large.html\")\nfig5.write_html(\"/Users/muhammad-faaiz.shanawas/Documents/GitHub/SystemHierarchies/map outputs/treemap_small.html\")\n'''",
"_____no_output_____"
]
]
] |
[
"code"
] |
[
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
]
] |
4ae8069cb0de6597125f12cc97e5c410280b9857
| 4,207 |
ipynb
|
Jupyter Notebook
|
ipynb/Germany-Bayern-LK-Landsberg-a.Lech.ipynb
|
RobertRosca/oscovida.github.io
|
d609949076e3f881e38ec674ecbf0887e9a2ec25
|
[
"CC-BY-4.0"
] | null | null | null |
ipynb/Germany-Bayern-LK-Landsberg-a.Lech.ipynb
|
RobertRosca/oscovida.github.io
|
d609949076e3f881e38ec674ecbf0887e9a2ec25
|
[
"CC-BY-4.0"
] | null | null | null |
ipynb/Germany-Bayern-LK-Landsberg-a.Lech.ipynb
|
RobertRosca/oscovida.github.io
|
d609949076e3f881e38ec674ecbf0887e9a2ec25
|
[
"CC-BY-4.0"
] | null | null | null | 29.41958 | 188 | 0.517946 |
[
[
[
"# Germany: LK Landsberg a.Lech (Bayern)\n\n* Homepage of project: https://oscovida.github.io\n* [Execute this Jupyter Notebook using myBinder](https://mybinder.org/v2/gh/oscovida/binder/master?filepath=ipynb/Germany-Bayern-LK-Landsberg-a.Lech.ipynb)",
"_____no_output_____"
]
],
[
[
"import datetime\nimport time\n\nstart = datetime.datetime.now()\nprint(f\"Notebook executed on: {start.strftime('%d/%m/%Y %H:%M:%S%Z')} {time.tzname[time.daylight]}\")",
"_____no_output_____"
],
[
"%config InlineBackend.figure_formats = ['svg']\nfrom oscovida import *",
"_____no_output_____"
],
[
"overview(country=\"Germany\", subregion=\"LK Landsberg a.Lech\");",
"_____no_output_____"
],
[
"# load the data\ncases, deaths, region_label = germany_get_region(landkreis=\"LK Landsberg a.Lech\")\n\n# compose into one table\ntable = compose_dataframe_summary(cases, deaths)\n\n# show tables with up to 500 rows\npd.set_option(\"max_rows\", 500)\n\n# display the table\ntable",
"_____no_output_____"
]
],
[
[
"# Explore the data in your web browser\n\n- If you want to execute this notebook, [click here to use myBinder](https://mybinder.org/v2/gh/oscovida/binder/master?filepath=ipynb/Germany-Bayern-LK-Landsberg-a.Lech.ipynb)\n- and wait (~1 to 2 minutes)\n- Then press SHIFT+RETURN to advance code cell to code cell\n- See http://jupyter.org for more details on how to use Jupyter Notebook",
"_____no_output_____"
],
[
"# Acknowledgements:\n\n- Johns Hopkins University provides data for countries\n- Robert Koch Institute provides data for within Germany\n- Open source and scientific computing community for the data tools\n- Github for hosting repository and html files\n- Project Jupyter for the Notebook and binder service\n- The H2020 project Photon and Neutron Open Science Cloud ([PaNOSC](https://www.panosc.eu/))\n\n--------------------",
"_____no_output_____"
]
],
[
[
"print(f\"Download of data from Johns Hopkins university: cases at {fetch_cases_last_execution()} and \"\n f\"deaths at {fetch_deaths_last_execution()}.\")",
"_____no_output_____"
],
[
"# to force a fresh download of data, run \"clear_cache()\"",
"_____no_output_____"
],
[
"print(f\"Notebook execution took: {datetime.datetime.now()-start}\")\n",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code"
] |
[
[
"markdown"
],
[
"code",
"code",
"code",
"code"
],
[
"markdown",
"markdown"
],
[
"code",
"code",
"code"
]
] |
4ae806d91d658eebed9d1e6fd24e4d5bd395726d
| 6,242 |
ipynb
|
Jupyter Notebook
|
wandb/run-20210518_200256-wy4g67sn/tmp/code/_session_history.ipynb
|
Programmer-RD-AI/Weather-Clf-V2
|
1c2acf4f5ddb6c7f35c1d814f40a8eb8b13ab62f
|
[
"Apache-2.0"
] | 1 |
2021-05-19T17:24:40.000Z
|
2021-05-19T17:24:40.000Z
|
wandb/run-20210518_200256-wy4g67sn/tmp/code/_session_history.ipynb
|
Programmer-RD-AI/Weather-Clf
|
1c2acf4f5ddb6c7f35c1d814f40a8eb8b13ab62f
|
[
"Apache-2.0"
] | null | null | null |
wandb/run-20210518_200256-wy4g67sn/tmp/code/_session_history.ipynb
|
Programmer-RD-AI/Weather-Clf
|
1c2acf4f5ddb6c7f35c1d814f40a8eb8b13ab62f
|
[
"Apache-2.0"
] | null | null | null | 22.698182 | 263 | 0.495835 |
[
[
[
"test_index = 0",
"_____no_output_____"
],
[
"from load_data import *",
"_____no_output_____"
],
[
"# load_data()",
"_____no_output_____"
],
[
"from load_data import *",
"_____no_output_____"
],
[
"X_train,X_test,y_train,y_test = load_data()",
"_____no_output_____"
],
[
"len(X_train),len(y_train)",
"(843, 843)"
],
[
"len(X_test),len(y_test)",
"(280, 280)"
],
[
"import torch\nimport torch.nn as nn\nimport torch.optim as optim\nimport torch.nn.functional as F",
"_____no_output_____"
],
[
"class Test_Model(nn.Module):\n def __init__(self) -> None:\n super().__init__()\n self.c1 = nn.Conv2d(1,32,5)\n self.c2 = nn.Conv2d(32,64,5)\n self.c3 = nn.Conv2d(64,128,5)\n self.fc4 = nn.Linear(128*10*10,256)\n self.fc5 = nn.Linear(256,4)\n \n def forward(self,X):\n preds = F.max_pool2d(F.relu(self.c1(X)),(2,2))\n preds = F.max_pool2d(F.relu(self.c2(preds)),(2,2))\n preds = F.max_pool2d(F.relu(self.c3(preds)),(2,2))\n print(preds.shape)\n preds = preds.view(-1,128*10*10)\n preds = F.relu(self.fc4(preds))\n preds = self.fc5(preds)\n return preds",
"_____no_output_____"
],
[
"device = torch.device('cuda')",
"_____no_output_____"
],
[
"BATCH_SIZE = 32",
"_____no_output_____"
],
[
"IMG_SIZE = 112",
"_____no_output_____"
],
[
"model = Test_Model().to(device)",
"_____no_output_____"
],
[
"optimizer = optim.SGD(model.parameters(),lr=0.1)",
"_____no_output_____"
],
[
"criterion = nn.CrossEntropyLoss()",
"_____no_output_____"
],
[
"EPOCHS = 12",
"_____no_output_____"
],
[
"from tqdm import tqdm",
"_____no_output_____"
],
[
"PROJECT_NAME = 'Weather-Clf'",
"_____no_output_____"
],
[
"import wandb",
"_____no_output_____"
],
[
"test_index += 1\nwandb.init(project=PROJECT_NAME,name=f'test-{test_index}')\nfor _ in tqdm(range(EPOCHS)):\n for i in range(0,len(X_train),BATCH_SIZE):\n X_batch = X_train[i:i+BATCH_SIZE].view(-1,1,112,112).to(device)\n y_batch = y_train[i:i+BATCH_SIZE].to(device)\n model.to(device)\n preds = model(X_batch.float())\n preds.to(device)\n loss = criterion(preds,torch.tensor(y_batch,dtype=torch.long))\n optimizer.zero_grad()\n loss.backward()\n optimizer.step()\n wandb.log({'loss':loss.item()})\nwandb.finish()",
"_____no_output_____"
]
]
] |
[
"code"
] |
[
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
]
] |
4ae808ca3d0898d9079c6590b89e128ee5103f4e
| 726,014 |
ipynb
|
Jupyter Notebook
|
Tugas_Exoplanet_Install_Lightcurve_Adoni.ipynb
|
nulp002/TESSy
|
fbd1b2d048e35fd54900c272414430cb6f166712
|
[
"MIT"
] | null | null | null |
Tugas_Exoplanet_Install_Lightcurve_Adoni.ipynb
|
nulp002/TESSy
|
fbd1b2d048e35fd54900c272414430cb6f166712
|
[
"MIT"
] | null | null | null |
Tugas_Exoplanet_Install_Lightcurve_Adoni.ipynb
|
nulp002/TESSy
|
fbd1b2d048e35fd54900c272414430cb6f166712
|
[
"MIT"
] | 5 |
2021-08-16T10:45:21.000Z
|
2021-09-22T12:29:38.000Z
| 558.472308 | 222,026 | 0.917544 |
[
[
[
"!pip install lightkurve",
"Collecting lightkurve\n Downloading lightkurve-2.0.10-py3-none-any.whl (245 kB)\n\u001b[?25l\r\u001b[K |█▍ | 10 kB 29.2 MB/s eta 0:00:01\r\u001b[K |██▊ | 20 kB 35.8 MB/s eta 0:00:01\r\u001b[K |████ | 30 kB 41.4 MB/s eta 0:00:01\r\u001b[K |█████▍ | 40 kB 36.1 MB/s eta 0:00:01\r\u001b[K |██████▊ | 51 kB 18.4 MB/s eta 0:00:01\r\u001b[K |████████ | 61 kB 14.6 MB/s eta 0:00:01\r\u001b[K |█████████▍ | 71 kB 13.8 MB/s eta 0:00:01\r\u001b[K |██████████▊ | 81 kB 15.2 MB/s eta 0:00:01\r\u001b[K |████████████ | 92 kB 15.0 MB/s eta 0:00:01\r\u001b[K |█████████████▍ | 102 kB 12.2 MB/s eta 0:00:01\r\u001b[K |██████████████▊ | 112 kB 12.2 MB/s eta 0:00:01\r\u001b[K |████████████████ | 122 kB 12.2 MB/s eta 0:00:01\r\u001b[K |█████████████████▍ | 133 kB 12.2 MB/s eta 0:00:01\r\u001b[K |██████████████████▊ | 143 kB 12.2 MB/s eta 0:00:01\r\u001b[K |████████████████████ | 153 kB 12.2 MB/s eta 0:00:01\r\u001b[K |█████████████████████▍ | 163 kB 12.2 MB/s eta 0:00:01\r\u001b[K |██████████████████████▊ | 174 kB 12.2 MB/s eta 0:00:01\r\u001b[K |████████████████████████ | 184 kB 12.2 MB/s eta 0:00:01\r\u001b[K |█████████████████████████▍ | 194 kB 12.2 MB/s eta 0:00:01\r\u001b[K |██████████████████████████▊ | 204 kB 12.2 MB/s eta 0:00:01\r\u001b[K |████████████████████████████ | 215 kB 12.2 MB/s eta 0:00:01\r\u001b[K |█████████████████████████████▍ | 225 kB 12.2 MB/s eta 0:00:01\r\u001b[K |██████████████████████████████▊ | 235 kB 12.2 MB/s eta 0:00:01\r\u001b[K |████████████████████████████████| 245 kB 12.2 MB/s \n\u001b[?25hRequirement already satisfied: bokeh>=1.0 in /usr/local/lib/python3.7/dist-packages (from lightkurve) (2.3.3)\nCollecting fbpca>=1.0\n Downloading fbpca-1.0.tar.gz (11 kB)\nCollecting oktopus>=0.1.2\n Downloading oktopus-0.1.2.tar.gz (10 kB)\nCollecting uncertainties>=3.1.4\n Downloading uncertainties-3.1.6-py2.py3-none-any.whl (98 kB)\n\u001b[K |████████████████████████████████| 98 kB 6.9 MB/s \n\u001b[?25hRequirement already satisfied: scipy>=0.19.0 in /usr/local/lib/python3.7/dist-packages (from lightkurve) (1.4.1)\nRequirement already satisfied: tqdm>=4.25.0 in /usr/local/lib/python3.7/dist-packages (from lightkurve) (4.62.0)\nCollecting scikit-learn>=0.24.0\n Downloading scikit_learn-0.24.2-cp37-cp37m-manylinux2010_x86_64.whl (22.3 MB)\n\u001b[K |████████████████████████████████| 22.3 MB 1.5 MB/s \n\u001b[?25hCollecting memoization>=0.3.1\n Downloading memoization-0.4.0.tar.gz (41 kB)\n\u001b[K |████████████████████████████████| 41 kB 159 kB/s \n\u001b[?25hRequirement already satisfied: astropy>=4.1 in /usr/local/lib/python3.7/dist-packages (from lightkurve) (4.3.1)\nRequirement already satisfied: pandas>=1.1.4 in /usr/local/lib/python3.7/dist-packages (from lightkurve) (1.1.5)\nRequirement already satisfied: matplotlib>=1.5.3 in /usr/local/lib/python3.7/dist-packages (from lightkurve) (3.2.2)\nCollecting astroquery>=0.3.10\n Downloading astroquery-0.4.3-py3-none-any.whl (4.4 MB)\n\u001b[K |████████████████████████████████| 4.4 MB 64.4 MB/s \n\u001b[?25hRequirement already satisfied: beautifulsoup4>=4.6.0 in /usr/local/lib/python3.7/dist-packages (from lightkurve) (4.6.3)\nRequirement already satisfied: numpy>=1.11 in /usr/local/lib/python3.7/dist-packages (from lightkurve) (1.19.5)\nRequirement already satisfied: patsy>=0.5.0 in /usr/local/lib/python3.7/dist-packages (from lightkurve) (0.5.1)\nRequirement already satisfied: requests>=2.22.0 in /usr/local/lib/python3.7/dist-packages (from lightkurve) (2.23.0)\nRequirement already satisfied: pyerfa>=1.7.3 in /usr/local/lib/python3.7/dist-packages (from astropy>=4.1->lightkurve) (2.0.0)\nRequirement already satisfied: importlib-metadata in /usr/local/lib/python3.7/dist-packages (from astropy>=4.1->lightkurve) (4.6.4)\nCollecting keyring>=4.0\n Downloading keyring-23.1.0-py3-none-any.whl (32 kB)\nRequirement already satisfied: six in /usr/local/lib/python3.7/dist-packages (from astroquery>=0.3.10->lightkurve) (1.15.0)\nRequirement already satisfied: html5lib>=0.999 in /usr/local/lib/python3.7/dist-packages (from astroquery>=0.3.10->lightkurve) (1.0.1)\nCollecting pyvo>=1.1\n Downloading pyvo-1.1-py3-none-any.whl (802 kB)\n\u001b[K |████████████████████████████████| 802 kB 47.4 MB/s \n\u001b[?25hRequirement already satisfied: PyYAML>=3.10 in /usr/local/lib/python3.7/dist-packages (from bokeh>=1.0->lightkurve) (3.13)\nRequirement already satisfied: python-dateutil>=2.1 in /usr/local/lib/python3.7/dist-packages (from bokeh>=1.0->lightkurve) (2.8.2)\nRequirement already satisfied: packaging>=16.8 in /usr/local/lib/python3.7/dist-packages (from bokeh>=1.0->lightkurve) (21.0)\nRequirement already satisfied: tornado>=5.1 in /usr/local/lib/python3.7/dist-packages (from bokeh>=1.0->lightkurve) (5.1.1)\nRequirement already satisfied: Jinja2>=2.9 in /usr/local/lib/python3.7/dist-packages (from bokeh>=1.0->lightkurve) (2.11.3)\nRequirement already satisfied: pillow>=7.1.0 in /usr/local/lib/python3.7/dist-packages (from bokeh>=1.0->lightkurve) (7.1.2)\nRequirement already satisfied: typing-extensions>=3.7.4 in /usr/local/lib/python3.7/dist-packages (from bokeh>=1.0->lightkurve) (3.7.4.3)\nRequirement already satisfied: webencodings in /usr/local/lib/python3.7/dist-packages (from html5lib>=0.999->astroquery>=0.3.10->lightkurve) (0.5.1)\nRequirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python3.7/dist-packages (from Jinja2>=2.9->bokeh>=1.0->lightkurve) (2.0.1)\nCollecting jeepney>=0.4.2\n Downloading jeepney-0.7.1-py3-none-any.whl (54 kB)\n\u001b[K |████████████████████████████████| 54 kB 2.1 MB/s \n\u001b[?25hCollecting SecretStorage>=3.2\n Downloading SecretStorage-3.3.1-py3-none-any.whl (15 kB)\nRequirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/dist-packages (from importlib-metadata->astropy>=4.1->lightkurve) (3.5.0)\nRequirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib>=1.5.3->lightkurve) (1.3.1)\nRequirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.7/dist-packages (from matplotlib>=1.5.3->lightkurve) (0.10.0)\nRequirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib>=1.5.3->lightkurve) (2.4.7)\nRequirement already satisfied: autograd in /usr/local/lib/python3.7/dist-packages (from oktopus>=0.1.2->lightkurve) (1.3)\nRequirement already satisfied: pytz>=2017.2 in /usr/local/lib/python3.7/dist-packages (from pandas>=1.1.4->lightkurve) (2018.9)\nCollecting mimeparse\n Downloading mimeparse-0.1.3.tar.gz (4.4 kB)\nRequirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests>=2.22.0->lightkurve) (1.24.3)\nRequirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests>=2.22.0->lightkurve) (2021.5.30)\nRequirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests>=2.22.0->lightkurve) (3.0.4)\nRequirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests>=2.22.0->lightkurve) (2.10)\nRequirement already satisfied: joblib>=0.11 in /usr/local/lib/python3.7/dist-packages (from scikit-learn>=0.24.0->lightkurve) (1.0.1)\nCollecting threadpoolctl>=2.0.0\n Downloading threadpoolctl-2.2.0-py3-none-any.whl (12 kB)\nCollecting cryptography>=2.0\n Downloading cryptography-3.4.7-cp36-abi3-manylinux2014_x86_64.whl (3.2 MB)\n\u001b[K |████████████████████████████████| 3.2 MB 38.7 MB/s \n\u001b[?25hRequirement already satisfied: cffi>=1.12 in /usr/local/lib/python3.7/dist-packages (from cryptography>=2.0->SecretStorage>=3.2->keyring>=4.0->astroquery>=0.3.10->lightkurve) (1.14.6)\nRequirement already satisfied: pycparser in /usr/local/lib/python3.7/dist-packages (from cffi>=1.12->cryptography>=2.0->SecretStorage>=3.2->keyring>=4.0->astroquery>=0.3.10->lightkurve) (2.20)\nRequirement already satisfied: future in /usr/local/lib/python3.7/dist-packages (from uncertainties>=3.1.4->lightkurve) (0.16.0)\nBuilding wheels for collected packages: fbpca, memoization, oktopus, mimeparse\n Building wheel for fbpca (setup.py) ... \u001b[?25l\u001b[?25hdone\n Created wheel for fbpca: filename=fbpca-1.0-py3-none-any.whl size=11376 sha256=29e164944fc223d4c41e2e252530bdbc1bd9d1c69491fd2e91f846b7a370675d\n Stored in directory: /root/.cache/pip/wheels/93/08/0c/1b9866c35c8d3f136d100dfe88036a32e0795437daca089f70\n Building wheel for memoization (setup.py) ... \u001b[?25l\u001b[?25hdone\n Created wheel for memoization: filename=memoization-0.4.0-py3-none-any.whl size=50466 sha256=48e8b30004fb988e1bccf7034078c371369533aa2510492d6c5afef4cecdfb33\n Stored in directory: /root/.cache/pip/wheels/38/f7/65/161985e7311dd484a23b3a5c9149995dbf11db6cede602e7ef\n Building wheel for oktopus (setup.py) ... \u001b[?25l\u001b[?25hdone\n Created wheel for oktopus: filename=oktopus-0.1.2-py3-none-any.whl size=12778 sha256=46090a74e1870dc3269cc32fe811abb4c8db50ba8f7e5f1881bc70a74114c723\n Stored in directory: /root/.cache/pip/wheels/19/22/e3/6d224a32d6f94f28113d6d26c8bef81d7e05978d0efed29517\n Building wheel for mimeparse (setup.py) ... \u001b[?25l\u001b[?25hdone\n Created wheel for mimeparse: filename=mimeparse-0.1.3-py3-none-any.whl size=3864 sha256=bf37cfc2e6a6801a34b993f474f108ede07e4f39875c0e518757a5f9856eb0c5\n Stored in directory: /root/.cache/pip/wheels/49/b4/2d/0081759ae1833bd694024801f7aacddcda8a687e8d5fbaeebd\nSuccessfully built fbpca memoization oktopus mimeparse\nInstalling collected packages: jeepney, cryptography, SecretStorage, mimeparse, threadpoolctl, pyvo, keyring, uncertainties, scikit-learn, oktopus, memoization, fbpca, astroquery, lightkurve\n Attempting uninstall: scikit-learn\n Found existing installation: scikit-learn 0.22.2.post1\n Uninstalling scikit-learn-0.22.2.post1:\n Successfully uninstalled scikit-learn-0.22.2.post1\nSuccessfully installed SecretStorage-3.3.1 astroquery-0.4.3 cryptography-3.4.7 fbpca-1.0 jeepney-0.7.1 keyring-23.1.0 lightkurve-2.0.10 memoization-0.4.0 mimeparse-0.1.3 oktopus-0.1.2 pyvo-1.1 scikit-learn-0.24.2 threadpoolctl-2.2.0 uncertainties-3.1.6\n"
]
],
[
[
"**Searching for Light Curves**",
"_____no_output_____"
],
[
"",
"_____no_output_____"
]
],
[
[
"import lightkurve as lk\nimport matplotlib.pyplot as plt",
"_____no_output_____"
],
[
"search_result = lk.search_lightcurve('KIC 3733346', author='Kepler')\nsearch_result",
"_____no_output_____"
],
[
"search_result[0]",
"_____no_output_____"
],
[
"for column in search_result.table.columns:\n print(column)",
"dataproduct_type\ncalib_level\nobs_collection\nobs_id\ntarget_name\ns_ra\ns_dec\nt_min\nt_max\nt_exptime\nwavelength_region\nfilters\nem_min\nem_max\ntarget_classification\nobs_title\nt_obs_release\ninstrument_name\nproposal_pi\nproposal_id\nproposal_type\nproject\nsequence_number\nprovenance_name\ns_region\njpegURL\ndataURL\ndataRights\nmtFlag\nsrcDen\nintentType\nobsid\nobjID\nexptime\ndistance\nobsID\nobs_collection_products\ndataproduct_type_products\ndescription\ntype\ndataURI\nproductType\nproductGroupDescription\nproductSubGroupDescription\nproductDocumentationURL\nproject_products\nprvversion\nproposal_id_products\nproductFilename\nsize\nparent_obsid\ndataRights_products\ncalib_level_products\nauthor\nmission\n#\nyear\nsort_order\n"
],
[
"import numpy as np\nquarter2_index = np.where(search_result.table['mission'] == 'Kepler Quarter 02')[0]\nsearch_result[quarter2_index]",
"_____no_output_____"
],
[
"search_result_q2 = lk.search_lightcurve('KIC 3733346', author='Kepler', quarter=2)\nsearch_result_q2",
"_____no_output_____"
],
[
"lc = search_result_q2.download()\nlc",
"WARNING: dropping mask in Quantity column 'flux': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'flux_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'centroid_col': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'centroid_row': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'sap_flux': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'sap_flux_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'sap_bkg': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'sap_bkg_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'pdcsap_flux': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'pdcsap_flux_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'psf_centr1': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'psf_centr1_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'psf_centr2': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'psf_centr2_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'mom_centr1': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'mom_centr1_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'mom_centr2': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'mom_centr2_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'pos_corr1': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'pos_corr2': masked Quantity not supported [astropy.table.table]\n"
]
],
[
[
"**Downloading a collection of light curves**",
"_____no_output_____"
]
],
[
[
"lc_collection = search_result[:5].download_all()\nlc_collection",
"WARNING: dropping mask in Quantity column 'flux': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'flux_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'centroid_col': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'centroid_row': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'sap_flux': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'sap_flux_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'sap_bkg': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'sap_bkg_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'pdcsap_flux': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'pdcsap_flux_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'psf_centr1': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'psf_centr1_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'psf_centr2': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'psf_centr2_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'mom_centr1': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'mom_centr1_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'mom_centr2': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'mom_centr2_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'pos_corr1': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'pos_corr2': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'flux': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'flux_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'centroid_col': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'centroid_row': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'sap_flux': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'sap_flux_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'sap_bkg': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'sap_bkg_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'pdcsap_flux': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'pdcsap_flux_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'psf_centr1': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'psf_centr1_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'psf_centr2': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'psf_centr2_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'mom_centr1': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'mom_centr1_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'mom_centr2': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'mom_centr2_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'pos_corr1': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'pos_corr2': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'flux': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'flux_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'centroid_col': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'centroid_row': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'sap_flux': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'sap_flux_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'sap_bkg': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'sap_bkg_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'pdcsap_flux': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'pdcsap_flux_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'psf_centr1': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'psf_centr1_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'psf_centr2': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'psf_centr2_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'mom_centr1': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'mom_centr1_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'mom_centr2': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'mom_centr2_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'pos_corr1': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'pos_corr2': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'flux': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'flux_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'centroid_col': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'centroid_row': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'sap_flux': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'sap_flux_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'sap_bkg': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'sap_bkg_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'pdcsap_flux': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'pdcsap_flux_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'psf_centr1': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'psf_centr1_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'psf_centr2': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'psf_centr2_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'mom_centr1': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'mom_centr1_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'mom_centr2': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'mom_centr2_err': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'pos_corr1': masked Quantity not supported [astropy.table.table]\nWARNING: dropping mask in Quantity column 'pos_corr2': masked Quantity not supported [astropy.table.table]\n"
],
[
"fig, ax = plt.subplots(figsize=(20,5))\nlc_collection.plot(ax=ax);",
"_____no_output_____"
],
[
"fig, ax = plt.subplots(figsize=(20,5))\nfor lc in lc_collection:\n lc.normalize().plot(ax=ax, label=f'Quarter {lc.quarter}');",
"_____no_output_____"
]
],
[
[
"**Searching for Target Pixel Files**",
"_____no_output_____"
]
],
[
[
"search_result = lk.search_targetpixelfile('K2-199', exptime=1800)\nsearch_result",
"_____no_output_____"
],
[
"tpf = search_result.download()",
"/usr/local/lib/python3.7/dist-packages/lightkurve/search.py:352: LightkurveWarning: Warning: 2 files available to download. Only the first file has been downloaded. Please use `download_all()` or specify additional criteria (e.g. quarter, campaign, or sector) to limit your search.\n LightkurveWarning,\n"
],
[
"tpf.plot();",
"_____no_output_____"
],
[
"lc = tpf.to_lightcurve()\nlc.plot();",
"_____no_output_____"
]
],
[
[
"**Downloading a collection of target pixel files**",
"_____no_output_____"
]
],
[
[
"tpf_collection = search_result.download_all()\ntpf_collection",
"_____no_output_____"
],
[
"tpf_collection.plot();",
"_____no_output_____"
]
],
[
[
"**Searching for TESS Full Frame Image (FFI) Cutouts**",
"_____no_output_____"
]
],
[
[
"search_result = lk.search_tesscut('Pi Men')\nsearch_result",
"_____no_output_____"
],
[
"tpf_cutout = search_result[0].download(cutout_size=10)\ntpf_cutout.plot();",
"_____no_output_____"
]
],
[
[
"**Performing a Cone Search**",
"_____no_output_____"
]
],
[
[
"search_result = lk.search_targetpixelfile('Trappist-1', radius=180., campaign=12, exptime=1800)\nprint(search_result)\n",
"SearchResult containing 3 data products.\n\n # mission year author exptime target_name distance\n s arcsec \n--- -------------- ---- ------ ------- ------------- --------\n 0 K2 Campaign 12 2016 K2 1800 ktwo246199087 0.0\n 1 K2 Campaign 12 2016 K2 1800 ktwo200164267 12.1\n 2 K2 Campaign 12 2016 K2 1800 ktwo246199173 95.5\n"
]
],
[
[
"**Citing Lightkurve and Astropy**",
"_____no_output_____"
]
],
[
[
"lk.show_citation_instructions()",
"_____no_output_____"
]
]
] |
[
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code"
] |
[
[
"code"
],
[
"markdown",
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
]
] |
4ae813a76ec02b2f4ba907604f63a8212535705d
| 889,231 |
ipynb
|
Jupyter Notebook
|
HISTOPATHOLOGY/BCD_Tissue_InceptionResNetV2.ipynb
|
dhruvilshah1999/BREAST-CANCER-DETECTION
|
cb10a1e82993c4b87f7510be30dada313901f1f9
|
[
"BSD-3-Clause"
] | 1 |
2022-01-12T09:13:00.000Z
|
2022-01-12T09:13:00.000Z
|
HISTOPATHOLOGY/BCD_Tissue_InceptionResNetV2.ipynb
|
dhruvilshah1999/BREAST-CANCER-DETECTION
|
cb10a1e82993c4b87f7510be30dada313901f1f9
|
[
"BSD-3-Clause"
] | null | null | null |
HISTOPATHOLOGY/BCD_Tissue_InceptionResNetV2.ipynb
|
dhruvilshah1999/BREAST-CANCER-DETECTION
|
cb10a1e82993c4b87f7510be30dada313901f1f9
|
[
"BSD-3-Clause"
] | null | null | null | 117.888241 | 125,966 | 0.76557 |
[
[
[
"!nvidia-smi ",
"Mon Apr 5 02:17:54 2021 \n+-----------------------------------------------------------------------------+\n| NVIDIA-SMI 460.67 Driver Version: 460.32.03 CUDA Version: 11.2 |\n|-------------------------------+----------------------+----------------------+\n| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |\n| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |\n| | | MIG M. |\n|===============================+======================+======================|\n| 0 Tesla P100-PCIE... Off | 00000000:00:04.0 Off | 0 |\n| N/A 36C P0 28W / 250W | 0MiB / 16280MiB | 0% Default |\n| | | N/A |\n+-------------------------------+----------------------+----------------------+\n \n+-----------------------------------------------------------------------------+\n| Processes: |\n| GPU GI CI PID Type Process name GPU Memory |\n| ID ID Usage |\n|=============================================================================|\n| No running processes found |\n+-----------------------------------------------------------------------------+\n"
],
[
"# unrar x \"/content/drive/MyDrive/IDC_regular_ps50_idx5.rar\" \"/content/drive/MyDrive/\"\n# !unzip \"/content/drive/MyDrive/base_dir/train_dir/b_idc.zip\" -d \"/content/drive/MyDrive/base_dir/train_dir\"\nimport os",
"_____no_output_____"
],
[
"! pip install -q kaggle",
"_____no_output_____"
],
[
"from google.colab import files",
"_____no_output_____"
],
[
"files.upload()",
"_____no_output_____"
],
[
" ! mkdir ~/.kaggle",
"_____no_output_____"
],
[
"! cp kaggle.json ~/.kaggle/",
"_____no_output_____"
],
[
" ! chmod 600 ~/.kaggle/kaggle.json",
"_____no_output_____"
],
[
" ! kaggle datasets list",
"Warning: Looks like you're using an outdated API Version, please consider updating (server 1.5.12 / client 1.5.4)\nref title size lastUpdated downloadCount \n---------------------------------------------------------- ------------------------------------------------ ----- ------------------- ------------- \ngpreda/reddit-vaccine-myths Reddit Vaccine Myths 222KB 2021-04-04 08:31:20 1751 \ncrowww/a-large-scale-fish-dataset A Large Scale Fish Dataset 3GB 2021-02-17 16:10:44 1143 \ndhruvildave/wikibooks-dataset Wikibooks Dataset 1GB 2021-02-18 10:08:27 887 \nimsparsh/musicnet-dataset MusicNet Dataset 22GB 2021-02-18 14:12:19 403 \npromptcloud/careerbuilder-job-listing-2020 Careerbuilder Job Listing 2020 42MB 2021-03-05 06:59:52 152 \nalsgroup/end-als End ALS Kaggle Challenge 12GB 2021-03-16 22:31:35 318 \nmathurinache/twitter-edge-nodes Twitter Edge Nodes 342MB 2021-03-08 06:43:04 89 \nsimiotic/github-code-snippets GitHub Code Snippets 7GB 2021-03-03 11:34:39 39 \nfatiimaezzahra/famous-iconic-women Famous Iconic Women 838MB 2021-02-28 14:56:00 303 \nmathurinache/the-lj-speech-dataset The LJ Speech Dataset 3GB 2021-02-15 09:19:54 70 \nnickuzmenkov/nih-chest-xrays-tfrecords NIH Chest X-rays TFRecords 11GB 2021-03-09 04:49:23 188 \nnickuzmenkov/ranzcr-clip-kfold-tfrecords RANZCR CLiP KFold TFRecords 2GB 2021-02-21 13:29:51 45 \ncoloradokb/dandelionimages DandelionImages 4GB 2021-02-19 20:03:47 127 \nstuartjames/lights LightS: Light Specularity Dataset 18GB 2021-02-18 14:32:26 26 \nlandrykezebou/lvzhdr-tone-mapping-benchmark-dataset-tmonet LVZ-HDR Tone Mapping Benchmark Dataset (TMO-Net) 24GB 2021-03-01 05:03:40 38 \nimsparsh/accentdb-core-extended AccentDB - Core & Extended 6GB 2021-02-17 14:22:54 30 \nshivamb/netflix-shows Netflix Movies and TV Shows 1MB 2021-01-18 16:20:26 127706 \njsphyg/weather-dataset-rattle-package Rain in Australia 4MB 2020-12-11 10:26:12 43176 \narashnic/hr-analytics-job-change-of-data-scientists HR Analytics: Job Change of Data Scientists 295KB 2020-12-07 00:25:10 18548 \ndatasnaek/youtube-new Trending YouTube Video Statistics 201MB 2019-06-03 00:56:47 133492 \n"
],
[
"!kaggle datasets download -d paultimothymooney/breast-histopathology-images",
"Downloading breast-histopathology-images.zip to /content\n100% 3.10G/3.10G [00:56<00:00, 11.0MB/s]\n100% 3.10G/3.10G [00:56<00:00, 59.0MB/s]\n"
],
[
"! mkdir breast-histopathology-images",
"_____no_output_____"
],
[
"! unzip breast-histopathology-images.zip -d breast-histopathology-images",
"\u001b[1;30;43mStreaming output truncated to the last 5000 lines.\u001b[0m\n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2351_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2351_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2351_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2351_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2351_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2351_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2351_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2351_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2351_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2351_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2351_y2251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2351_y2301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2351_y2351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2351_y2401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2401_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2401_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2401_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2401_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2401_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2401_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2401_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2401_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2401_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2401_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2401_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2401_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2401_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2401_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2401_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2401_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2401_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2401_y2301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2451_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2451_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2451_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2451_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2451_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2451_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2451_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2451_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2451_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2451_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2501_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2501_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2501_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2501_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2501_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2501_y2251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2501_y2301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2501_y2351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x251_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x251_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x251_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x251_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x251_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x251_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x251_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x251_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x251_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x251_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x251_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x251_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2551_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2551_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2551_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2551_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2601_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2601_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2601_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2601_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x2601_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x301_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x301_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x301_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x301_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x301_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x301_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x301_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x301_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x301_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x301_y1_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x301_y51_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x301_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x351_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x351_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x351_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x351_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x351_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x351_y151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x351_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x351_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x351_y1_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x351_y51_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x401_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x401_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x401_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x401_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x401_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x401_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x401_y151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x401_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x401_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x401_y1_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x401_y201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x401_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x401_y51_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x401_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x451_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x451_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x451_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x451_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x451_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x451_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x451_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x451_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x451_y151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x451_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x451_y201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x451_y251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x451_y301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x451_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x451_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x451_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x451_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x451_y51_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x451_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x501_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x501_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x501_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x501_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x501_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x501_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x501_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x501_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x501_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x501_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x501_y151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x501_y201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x501_y301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x501_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x501_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x501_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x501_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x501_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x501_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x501_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x501_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x501_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x501_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x501_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x501_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x501_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x51_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x51_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x51_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x551_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x551_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x551_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x551_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x551_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x551_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x551_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x551_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x551_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x551_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x551_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x551_y201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x551_y251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x551_y301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x551_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x551_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x551_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x551_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x551_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x551_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x551_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x551_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x551_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x551_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x601_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x601_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x601_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x601_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x601_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x601_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x601_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x601_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x601_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x601_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x601_y201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x601_y251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x601_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x601_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x601_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x601_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x601_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x601_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x601_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x601_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x651_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x651_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x651_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x651_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x651_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x651_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x651_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x651_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x651_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x651_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x651_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x651_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x651_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x651_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x651_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x651_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x651_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x651_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x651_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x701_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x701_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x701_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x701_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x701_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x701_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x701_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x701_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x701_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x701_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x701_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x701_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x701_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x701_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x701_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x701_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x751_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x751_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x751_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x751_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x751_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x751_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x751_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x751_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x751_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x751_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x751_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x751_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x751_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x751_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x751_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x751_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x751_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x751_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x751_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x801_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x801_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x801_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x801_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x801_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x801_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x801_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x801_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x801_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x801_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x801_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x801_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x801_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x801_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x801_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x801_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x801_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x801_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x851_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x851_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x851_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x851_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x851_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x851_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x851_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x851_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x851_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x851_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x851_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x851_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x851_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x851_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x851_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x851_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x851_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x901_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x901_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x901_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x901_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x901_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x901_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x901_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x901_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x901_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x901_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x901_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x901_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x901_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x901_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x901_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x901_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x951_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x951_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x951_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x951_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x951_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x951_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x951_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x951_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x951_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x951_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x951_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x951_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x951_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x951_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x951_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x951_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/0/9346_idx5_x951_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1001_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1001_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1001_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1001_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1001_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1001_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1001_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1001_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1001_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1001_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1001_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1001_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1001_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1001_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1001_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1001_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1001_y2051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1001_y2101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1001_y2151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1001_y2201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1051_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1051_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1051_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1051_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1051_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1051_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1051_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1051_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1051_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1051_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1051_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1051_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1051_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1051_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1051_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1051_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1051_y2051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1051_y2101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1051_y2151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1051_y2201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1101_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1101_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1101_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1101_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1101_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1101_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1101_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1101_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1101_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1101_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1101_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1101_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1101_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1101_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1101_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1101_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1101_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1101_y2051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1101_y2101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1101_y2151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1101_y2201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1101_y2251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1151_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1151_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1151_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1151_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1151_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1151_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1151_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1151_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1151_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1151_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1151_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1151_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1151_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1151_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1151_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1151_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1151_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1151_y2051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1151_y2101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1151_y2151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1151_y2201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1151_y2251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1201_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1201_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1201_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1201_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1201_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1201_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1201_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1201_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1201_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1201_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1201_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1201_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1201_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1201_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1201_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1201_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1201_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1201_y2051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1201_y2101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1201_y2151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1201_y2201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1201_y2251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1251_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1251_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1251_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1251_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1251_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1251_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1251_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1251_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1251_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1251_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1251_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1251_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1251_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1251_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1251_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1251_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1251_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1251_y2051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1251_y2101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1251_y2151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1251_y2201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1251_y2251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1301_y1151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1301_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1301_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1301_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1301_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1301_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1301_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1301_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1301_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1301_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1301_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1301_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1301_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1301_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1301_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1301_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1301_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1301_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1301_y2051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1301_y2101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1301_y2151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1301_y2201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1301_y2251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1351_y1151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1351_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1351_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1351_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1351_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1351_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1351_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1351_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1351_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1351_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1351_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1351_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1351_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1351_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1351_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1351_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1351_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1351_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1351_y2051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1351_y2101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1351_y2151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1351_y2201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1351_y2251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1351_y2301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1401_y1151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1401_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1401_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1401_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1401_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1401_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1401_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1401_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1401_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1401_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1401_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1401_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1401_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1401_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1401_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1401_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1401_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1401_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1401_y2051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1401_y2101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1401_y2151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1401_y2201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1401_y2251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1401_y2301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1451_y1151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1451_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1451_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1451_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1451_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1451_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1451_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1451_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1451_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1451_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1451_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1451_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1451_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1451_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1451_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1451_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1451_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1451_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1451_y2051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1451_y2101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1451_y2151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1451_y2201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1451_y2251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1451_y2301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1501_y1151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1501_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1501_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1501_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1501_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1501_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1501_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1501_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1501_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1501_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1501_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1501_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1501_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1501_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1501_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1501_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1501_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1501_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1501_y2051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1501_y2101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1501_y2151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1501_y2201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1501_y2251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1501_y2301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1551_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1551_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1551_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1551_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1551_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1551_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1551_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1551_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1551_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1551_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1551_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1551_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1551_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1551_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1551_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1551_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1551_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1551_y2051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1551_y2101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1551_y2151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1551_y2201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1551_y2251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1551_y2301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1601_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1601_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1601_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1601_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1601_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1601_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1601_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1601_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1601_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1601_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1601_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1601_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1601_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1601_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1601_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1601_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1601_y2051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1601_y2101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1601_y2151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1601_y2201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1601_y2251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1601_y2301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1651_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1651_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1651_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1651_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1651_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1651_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1651_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1651_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1651_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1651_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1651_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1651_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1651_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1651_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1651_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1651_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1651_y2051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1651_y2101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1651_y2151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1651_y2201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1651_y2251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1651_y2301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1651_y2351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1701_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1701_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1701_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1701_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1701_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1701_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1701_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1701_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1701_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1701_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1701_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1701_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1701_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1701_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1701_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1701_y2051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1701_y2101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1701_y2151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1701_y2201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1701_y2251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1701_y2301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1701_y2351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1751_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1751_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1751_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1751_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1751_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1751_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1751_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1751_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1751_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1751_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1751_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1751_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1751_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1751_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1751_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1751_y2051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1751_y2101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1751_y2151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1751_y2201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1751_y2251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1751_y2301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1751_y2351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1801_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1801_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1801_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1801_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1801_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1801_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1801_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1801_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1801_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1801_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1801_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1801_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1801_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1801_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1801_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1801_y2051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1801_y2101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1801_y2151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1801_y2201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1801_y2251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1801_y2301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1801_y2351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1851_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1851_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1851_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1851_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1851_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1851_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1851_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1851_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1851_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1851_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1851_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1851_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1851_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1851_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1851_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1851_y2051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1851_y2101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1851_y2151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1851_y2201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1851_y2251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1851_y2301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1851_y2351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1901_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1901_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1901_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1901_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1901_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1901_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1901_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1901_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1901_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1901_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1901_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1901_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1901_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1901_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1901_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1901_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1901_y2051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1901_y2101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1901_y2151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1901_y2201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1901_y2251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1901_y2301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1901_y2351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1901_y2401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1951_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1951_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1951_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1951_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1951_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1951_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1951_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1951_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1951_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1951_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1951_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1951_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1951_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1951_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1951_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1951_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1951_y2051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1951_y2101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1951_y2151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1951_y2201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1951_y2251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1951_y2301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1951_y2351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x1951_y2401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2001_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2001_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2001_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2001_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2001_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2001_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2001_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2001_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2001_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2001_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2001_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2001_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2001_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2001_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2001_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2001_y2051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2001_y2101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2001_y2151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2001_y2201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2001_y2251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2001_y2301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2001_y2351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2001_y2401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2051_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2051_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2051_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2051_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2051_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2051_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2051_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2051_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2051_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2051_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2051_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2051_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2051_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2051_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2051_y2051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2051_y2101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2051_y2151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2051_y2201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2051_y2251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2051_y2301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2051_y2351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2101_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2101_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2101_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2101_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2101_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2101_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2101_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2101_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2101_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2101_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2101_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2101_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2101_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2101_y2051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2101_y2101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2101_y2151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2101_y2201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2101_y2251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2101_y2301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2151_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2151_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2151_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2151_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2151_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2151_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2151_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2151_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2151_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2151_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2151_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2151_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2151_y2051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2151_y2101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2151_y2151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2151_y2201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2151_y2251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2151_y2301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2201_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2201_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2201_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2201_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2201_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2201_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2201_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2201_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2201_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2201_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2201_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2201_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2201_y2051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2201_y2101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2201_y2151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2201_y2201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2251_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2251_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2251_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2251_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2251_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2251_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2251_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2251_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2251_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2251_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2251_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2251_y2051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2251_y2101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2251_y2151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2301_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2301_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2301_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2301_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2301_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2301_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2301_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2301_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2301_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x2301_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x351_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x351_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x401_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x401_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x401_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x401_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x451_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x451_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x451_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x451_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x451_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x451_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x451_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x501_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x501_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x501_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x501_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x501_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x501_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x501_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x501_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x501_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x501_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x551_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x551_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x551_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x551_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x551_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x551_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x551_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x551_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x551_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x551_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x551_y2051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x601_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x601_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x601_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x601_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x601_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x601_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x601_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x601_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x601_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x601_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x601_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x601_y2051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x601_y2101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x651_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x651_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x651_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x651_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x651_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x651_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x651_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x651_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x651_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x651_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x651_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x651_y2051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x651_y2101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x701_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x701_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x701_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x701_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x701_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x701_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x701_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x701_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x701_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x701_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x701_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x701_y2051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x701_y2101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x751_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x751_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x751_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x751_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x751_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x751_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x751_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x751_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x751_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x751_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x751_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x751_y2051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x751_y2101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x751_y2151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x801_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x801_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x801_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x801_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x801_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x801_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x801_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x801_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x801_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x801_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x801_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x801_y2051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x801_y2101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x801_y2151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x851_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x851_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x851_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x851_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x851_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x851_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x851_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x851_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x851_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x851_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x851_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x851_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x851_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x851_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x851_y2051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x851_y2101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x851_y2151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x901_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x901_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x901_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x901_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x901_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x901_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x901_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x901_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x901_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x901_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x901_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x901_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x901_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x901_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x901_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x901_y2051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x901_y2101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x901_y2151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x901_y2201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x951_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x951_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x951_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x951_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x951_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x951_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x951_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x951_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x951_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x951_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x951_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x951_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x951_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x951_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x951_y2051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x951_y2101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x951_y2151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9346/1/9346_idx5_x951_y2201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1001_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1001_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1001_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1001_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1001_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1001_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1001_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1001_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1001_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1001_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1001_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1001_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x101_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x101_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x101_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x101_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x101_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x101_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x101_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x101_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x101_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x101_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x101_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x101_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x101_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x101_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x101_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1151_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1151_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1151_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1151_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1201_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1201_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1201_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1201_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1201_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1201_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1201_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1201_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1201_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1201_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1251_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1251_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1251_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1251_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1251_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1251_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1251_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1251_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1251_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1251_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1301_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1301_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1301_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1301_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1301_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1301_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x151_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x151_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x151_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x151_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x151_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x151_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x151_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x151_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x151_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x151_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1701_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1701_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1701_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1701_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1701_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1701_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1701_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1701_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1751_y251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1751_y301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1751_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1751_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1751_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1751_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1751_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1751_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1751_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1751_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1751_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1751_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1751_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1751_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1801_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1801_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1801_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1801_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1801_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1801_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1801_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1801_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1801_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1801_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1851_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1851_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1851_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1851_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1851_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1851_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1851_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1851_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1901_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1901_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1901_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1901_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1901_y151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1901_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1901_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1901_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1901_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1901_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1951_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1951_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1951_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1951_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1951_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1951_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1951_y151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1951_y201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1951_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1951_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1951_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1951_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x1951_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2001_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2001_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2001_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2001_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2001_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2001_y151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2001_y201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2001_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2001_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2001_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2001_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2001_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2001_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2001_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x201_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x201_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x201_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x201_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x201_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x201_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x201_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x201_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2051_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2051_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2051_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2051_y151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2051_y301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2051_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2051_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2051_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2051_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2051_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2051_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2051_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2051_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2051_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2051_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2101_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2101_y301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2101_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2101_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2101_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2101_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2101_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x2101_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x251_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x251_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x251_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x251_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x251_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x251_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x251_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x301_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x301_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x301_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x301_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x301_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x301_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x301_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x351_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x351_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x351_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x351_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x351_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x351_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x351_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x351_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x351_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x351_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x351_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x351_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x351_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x351_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x401_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x401_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x401_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x401_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x401_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x401_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x401_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x401_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x401_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x401_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x401_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x401_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x401_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x401_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x451_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x451_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x451_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x451_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x451_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x451_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x451_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x501_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x501_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x501_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x501_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x51_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x51_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x51_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x51_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x51_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x51_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x51_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x51_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x51_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x51_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x51_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x551_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x551_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x551_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x551_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x551_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x551_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x601_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x601_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x601_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x601_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x601_y1_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x601_y51_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x601_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x601_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x601_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x651_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x651_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x651_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x651_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x651_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x651_y151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x651_y1_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x651_y201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x651_y251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x651_y301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x651_y51_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x651_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x701_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x701_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x701_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x701_y151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x701_y1_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x701_y201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x701_y251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x701_y301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x701_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x701_y51_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x751_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x751_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x751_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x751_y151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x751_y1_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x751_y201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x751_y251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x751_y301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x751_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x751_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x751_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x751_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x751_y51_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x751_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x751_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x801_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x801_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x801_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x801_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x801_y151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x801_y201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x801_y251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x801_y301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x801_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x801_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x801_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x801_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x801_y51_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x801_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x801_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x801_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x851_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x851_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x851_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x851_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x851_y151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x851_y201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x851_y251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x851_y301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x851_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x851_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x851_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x851_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x851_y51_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x851_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x851_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x851_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x851_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x851_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x901_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x901_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x901_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x901_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x901_y151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x901_y201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x901_y251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x901_y301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x901_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x901_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x901_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x901_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x901_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x901_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x901_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x901_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x901_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x901_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x901_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x951_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x951_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x951_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x951_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x951_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x951_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x951_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x951_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x951_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x951_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x951_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x951_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x951_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x951_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/0/9347_idx5_x951_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x1001_y851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x1001_y901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x1001_y951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x601_y751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x601_y801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x601_y851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x651_y651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x651_y701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x651_y751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x651_y801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x651_y851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x651_y901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x701_y1001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x701_y1051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x701_y651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x701_y701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x701_y751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x701_y801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x701_y851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x701_y901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x701_y951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x751_y1001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x751_y1051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x751_y651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x751_y701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x751_y751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x751_y801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x751_y851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x751_y901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x751_y951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x801_y1001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x801_y1051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x801_y651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x801_y701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x801_y751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x801_y801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x801_y851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x801_y951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x851_y1001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x851_y1051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x851_y651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x851_y701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x851_y751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x851_y951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x901_y1001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x901_y1051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x901_y901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x901_y951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x951_y851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x951_y901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9347/1/9347_idx5_x951_y951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1001_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1001_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1001_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1001_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1001_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1001_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1001_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1001_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1001_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1001_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1001_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1001_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1001_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1001_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1001_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1001_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x101_y201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x101_y251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x101_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x101_y301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x101_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x101_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x101_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x101_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x101_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x101_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1051_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1051_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1051_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1051_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1051_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1051_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1051_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1051_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1051_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1051_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1051_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1051_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1051_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1051_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1051_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1051_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1051_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1051_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1101_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1101_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1101_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1101_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1101_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1101_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1101_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1101_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1101_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1101_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1101_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1101_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1101_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1101_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1101_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1101_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1101_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1101_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1101_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1101_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1101_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1151_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1151_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1151_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1151_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1151_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1151_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1151_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1151_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1151_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1151_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1151_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1151_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1151_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1151_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1151_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1151_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1151_y2251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1151_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1151_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1151_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1151_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1201_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1201_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1201_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1201_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1201_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1201_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1201_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1201_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1201_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1201_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1201_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1201_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1201_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1201_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1201_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1201_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1201_y2251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1201_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1201_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1201_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1251_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1251_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1251_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1251_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1251_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1251_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1251_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1251_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1251_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1251_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1251_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1251_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1251_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1251_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1251_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1251_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1251_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1251_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1251_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1251_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1251_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1251_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1301_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1301_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1301_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1301_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1301_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1301_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1301_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1301_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1301_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1301_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1301_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1301_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1301_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1301_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1301_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1301_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1301_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1301_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1301_y51_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1301_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1351_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1351_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1351_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1351_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1351_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1351_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1351_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1351_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1351_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1351_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1351_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1351_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1351_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1351_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1351_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1351_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1351_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1351_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1351_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1351_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1351_y51_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1351_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1401_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1401_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1401_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1401_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1401_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1401_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1401_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1401_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1401_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1401_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1401_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1401_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1401_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1401_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1401_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1401_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1401_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1401_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1401_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1401_y51_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1451_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1451_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1451_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1451_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1451_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1451_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1451_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1451_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1451_y151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1451_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1451_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1451_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1451_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1451_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1451_y51_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1501_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1501_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1501_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1501_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1501_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1501_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1501_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1501_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1501_y151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1501_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1501_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1501_y201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1501_y251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1501_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1501_y51_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x151_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x151_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x151_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x151_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x151_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x151_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x151_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1551_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1551_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1551_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1551_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1551_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1551_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1551_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1551_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1551_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1551_y151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1551_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1551_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1551_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1551_y201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1551_y251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1551_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1551_y51_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1601_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1601_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1601_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1601_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1601_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1601_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1601_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1601_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1601_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1601_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1601_y151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1601_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1601_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1601_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1601_y201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1601_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1601_y2451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1601_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1601_y301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1601_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1601_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1601_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1601_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1651_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1651_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1651_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1651_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1651_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1651_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1651_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1651_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1651_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1651_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1651_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1651_y151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1651_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1651_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1651_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1651_y2451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1651_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1651_y301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1651_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1651_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1651_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1701_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1701_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1701_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1701_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1701_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1701_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1701_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1701_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1701_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1701_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1701_y151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1701_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1701_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1701_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1701_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1701_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1701_y301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1751_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1751_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1751_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1751_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1751_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1751_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1751_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1751_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1751_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1751_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1751_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1751_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1751_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1751_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1751_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1751_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1751_y2251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1751_y2301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1751_y2351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1751_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1801_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1801_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1801_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1801_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1801_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1801_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1801_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1801_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1801_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1801_y151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1801_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1801_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1801_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1801_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1801_y201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1801_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1801_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1801_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1801_y2251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1801_y2301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1801_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1851_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1851_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1851_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1851_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1851_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1851_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1851_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1851_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1851_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1851_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1851_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1851_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1851_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1851_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1851_y2251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1851_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1901_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1901_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1901_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1901_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1901_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1901_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1901_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1901_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1901_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1901_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1901_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1901_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1901_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1901_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1901_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1901_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1901_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1901_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1951_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1951_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1951_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1951_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1951_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1951_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1951_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1951_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1951_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1951_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1951_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1951_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1951_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1951_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1951_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x1_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2001_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2001_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2001_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2001_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2001_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2001_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2001_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2001_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2001_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2001_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2001_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2001_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2001_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2001_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2001_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x201_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x201_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x201_y51_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x201_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x201_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x201_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2051_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2051_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2051_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2051_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2051_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2051_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2051_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2051_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2051_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2051_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2051_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2051_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2051_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2051_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2051_y251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2051_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2101_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2101_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2101_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2101_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2101_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2101_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2101_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2101_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2101_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2101_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2101_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2101_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2101_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2101_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2101_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2101_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2101_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2101_y251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2101_y2551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2101_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2101_y301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2101_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2101_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2101_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2151_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2151_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2151_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2151_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2151_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2151_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2151_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2151_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2151_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2151_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2151_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2151_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2151_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2151_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2151_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2151_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2151_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2151_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2151_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2151_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2151_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2151_y251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2151_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2151_y301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2151_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2151_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2151_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2151_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2151_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2151_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2151_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2201_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2201_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2201_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2201_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2201_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2201_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2201_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2201_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2201_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2201_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2201_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2201_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2201_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2201_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2201_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2201_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2201_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2201_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2201_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2201_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2201_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2201_y2551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2201_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2201_y301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2201_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2201_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2201_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2201_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2201_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2201_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2201_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2201_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2251_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2251_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2251_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2251_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2251_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2251_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2251_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2251_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2251_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2251_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2251_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2251_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2251_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2251_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2251_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2251_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2251_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2251_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2251_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2251_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2251_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2251_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2251_y2501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2251_y251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2251_y2551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2251_y2601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2251_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2251_y301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2251_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2251_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2251_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2251_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2251_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2251_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2251_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y2501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y2551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y2601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2301_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2351_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2351_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2351_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2351_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2351_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2351_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2351_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2351_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2351_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2351_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2351_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2351_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2351_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2351_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2351_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2351_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2351_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2351_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2351_y201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2351_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2351_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2351_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2351_y2501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2351_y251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2351_y2551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2351_y2601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2351_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2351_y301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2351_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2351_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2351_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2351_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2401_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2401_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2401_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2401_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2401_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2401_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2401_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2401_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2401_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2401_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2401_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2401_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2401_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2401_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2401_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2401_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2401_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2401_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2401_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2401_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2401_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2401_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2401_y2551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2401_y2601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2401_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2401_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2401_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2451_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2451_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2451_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2451_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2451_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2451_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2451_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2451_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2451_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2451_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2451_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2451_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2451_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2451_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2451_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2451_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2451_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2451_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2451_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2451_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2451_y2251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2451_y2551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2451_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2451_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2451_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2451_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2451_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2451_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2501_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2501_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2501_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2501_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2501_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2501_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2501_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2501_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2501_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2501_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2501_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2501_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2501_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2501_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2501_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2501_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2501_y2251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2501_y2301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2501_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2501_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2501_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2501_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x251_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x251_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x251_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x251_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x251_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2551_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2551_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2551_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2551_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2551_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2551_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2551_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2551_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2551_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2551_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2551_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2551_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2551_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2551_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2551_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2551_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2601_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2601_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2601_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2601_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2601_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2601_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2601_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2601_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2601_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2601_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2601_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2601_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2601_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2601_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2601_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2601_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2601_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2601_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2651_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2651_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2651_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2651_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2651_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2651_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2651_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2651_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2651_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2651_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2651_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2651_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2651_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2651_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2651_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2651_y2251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2651_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2651_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2701_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2701_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2701_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2701_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2701_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2701_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2701_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2701_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2701_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2701_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2701_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2701_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2701_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2701_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2701_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2701_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2701_y2251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2701_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2751_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2751_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2751_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2751_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2751_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2751_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2751_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2751_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2751_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2751_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2751_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2751_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2751_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2751_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2751_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2751_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2751_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2751_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2751_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2751_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2751_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2751_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2751_y2251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2751_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2751_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2801_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2801_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2801_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2801_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2801_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2801_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2801_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2801_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2801_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2801_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2801_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2801_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2801_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2801_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2801_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2801_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2801_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2801_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2801_y201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2801_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2801_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2851_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2851_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2851_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2851_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2851_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2851_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2851_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2851_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2851_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2851_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2851_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2851_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2851_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2851_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2851_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2851_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2851_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2851_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2851_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2851_y201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2851_y251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2851_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2901_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2901_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2901_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2901_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2901_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2901_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2901_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2901_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2901_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2901_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2901_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2901_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2901_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2901_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2901_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2901_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2901_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2901_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2901_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2901_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2951_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2951_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2951_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2951_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2951_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2951_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2951_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2951_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2951_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2951_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2951_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2951_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2951_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2951_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2951_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2951_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2951_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2951_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2951_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2951_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2951_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x2951_y301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3001_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3001_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3001_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3001_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3001_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3001_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3001_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3001_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3001_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3001_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3001_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3001_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3001_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3001_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3001_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3001_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x301_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x301_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x301_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x301_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3051_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3051_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3051_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3051_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3051_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3051_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3051_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3051_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3051_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3051_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3051_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3051_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3101_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3101_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3101_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3101_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3101_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3101_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3101_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3101_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3101_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3101_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3101_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3101_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3101_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3101_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3151_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3151_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3151_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3151_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3151_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3151_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3151_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3151_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3151_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3151_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3151_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3151_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3151_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3201_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3201_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3201_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3201_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3201_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3201_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3201_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3201_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3201_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3201_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3201_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3251_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3251_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3251_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3301_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3301_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3301_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3301_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3351_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3351_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3401_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3401_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3401_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3451_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3451_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3501_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3501_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x351_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x351_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x351_y1_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x351_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x351_y51_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x351_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x351_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x351_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x351_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3551_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3551_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3601_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3651_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3701_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x3751_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x401_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x401_y151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x401_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x401_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x401_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x401_y1_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x401_y201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x401_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x401_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x401_y51_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x401_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x401_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x401_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x401_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x401_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x451_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x451_y151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x451_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x451_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x451_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x451_y1_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x451_y201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x451_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x451_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x451_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x451_y51_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x451_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x451_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x451_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x451_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x501_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x501_y151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x501_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x501_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x501_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x501_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x501_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x501_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x501_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x501_y51_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x501_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x501_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x501_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x501_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x51_y151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x51_y201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x51_y251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x51_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x51_y301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x51_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x51_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x51_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x51_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x51_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x551_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x551_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x551_y151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x551_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x551_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x551_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x551_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x551_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x551_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x551_y201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x551_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x551_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x551_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x551_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x551_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x601_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x601_y151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x601_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x601_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x601_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x601_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x601_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x601_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x601_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x601_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x601_y201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x601_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x601_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x601_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x601_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x651_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x651_y151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x651_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x651_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x651_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x651_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x651_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x651_y201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x651_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x651_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x651_y251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x651_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x651_y301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x651_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x651_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x701_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x701_y151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x701_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x701_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x701_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x701_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x701_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x701_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x701_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x701_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x701_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x701_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x701_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x701_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x701_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x701_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x751_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x751_y151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x751_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x751_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x751_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x751_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x751_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x751_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x751_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x751_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x751_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x751_y201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x751_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x751_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x751_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x751_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x751_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x751_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x801_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x801_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x801_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x801_y151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x801_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x801_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x801_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x801_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x801_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x801_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x801_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x801_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x801_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x801_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x801_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x801_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x851_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x851_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x851_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x851_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x851_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x851_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x851_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x851_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x851_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x851_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x851_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x851_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x851_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x851_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x851_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x851_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x851_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x851_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x851_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x901_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x901_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x901_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x901_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x901_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x901_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x901_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x901_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x901_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x901_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x901_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x901_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x901_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x901_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x901_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x901_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x901_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x901_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x901_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x901_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x901_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x901_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x951_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x951_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x951_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x951_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x951_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x951_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x951_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x951_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x951_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x951_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x951_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x951_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x951_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x951_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x951_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x951_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x951_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x951_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x951_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x951_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x951_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/0/9381_idx5_x951_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x101_y1101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x151_y1001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x151_y1051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x151_y1101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x151_y1151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x151_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x201_y1001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x201_y1051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x201_y1101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x201_y1151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x201_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x201_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x201_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x201_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x251_y1001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x251_y1051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x251_y1101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x251_y1151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x251_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x251_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x251_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x251_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x251_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x251_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x251_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x301_y1001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x301_y1051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x301_y1101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x301_y1151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x301_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x301_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x301_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x301_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x301_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x301_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x301_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x301_y951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x351_y1001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x351_y1051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x351_y1101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x351_y1151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x351_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x351_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x351_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x351_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x351_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x351_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x351_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x351_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x351_y951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x401_y1001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x401_y1051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x401_y1101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x401_y1151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x401_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x401_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x401_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x401_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x401_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x401_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x401_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x401_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x401_y951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x451_y1001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x451_y1051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x451_y1101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x451_y1151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x451_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x451_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x451_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x451_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x451_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x451_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x451_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x451_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x501_y1051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x501_y1101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x501_y1151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x501_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x501_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x501_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x501_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x501_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x501_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x501_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x501_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x551_y1101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x551_y1151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x551_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x551_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x551_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x551_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x551_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x551_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x551_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x551_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x601_y1151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x601_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x601_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x601_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x601_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x601_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x601_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x601_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x601_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x651_y1151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x651_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x651_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x651_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x651_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x651_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x651_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x651_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x651_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x701_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x701_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x701_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x701_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x701_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x701_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x701_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x751_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x751_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x751_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x751_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x751_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x801_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9381/1/9381_idx5_x801_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1001_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1001_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1001_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1001_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1001_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1001_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1001_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1001_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1001_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1001_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1001_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1001_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1001_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1001_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1001_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1001_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1001_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1001_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x101_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x101_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x101_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x101_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x101_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x101_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x101_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x101_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x101_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x101_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x101_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x101_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x101_y2701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x101_y2751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x101_y2801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1051_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1051_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1051_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1051_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1051_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1051_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1051_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1051_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1051_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1051_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1051_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1051_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1051_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1051_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1051_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1051_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1051_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1101_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1101_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1101_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1101_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1101_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1101_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1101_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1101_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1101_y2251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1101_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1101_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1101_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1101_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1101_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1101_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1101_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1101_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1151_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1151_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1151_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1151_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1151_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1151_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1151_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1151_y2301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1151_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1151_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1151_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1151_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1151_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1151_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1151_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1151_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1201_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1201_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1201_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1201_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1201_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1201_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1201_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1201_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1201_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1201_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1251_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1251_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1251_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1251_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1251_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1251_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1251_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1251_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1251_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1251_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1251_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1251_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1251_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1301_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1301_y2601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1301_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1301_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1301_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1301_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1301_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1301_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1301_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1301_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1351_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1351_y2551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1351_y2601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1351_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1351_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1351_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1351_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1351_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1351_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1351_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1401_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1401_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1401_y2501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1401_y2551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1401_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1401_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1401_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1401_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1401_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1401_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1451_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1451_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1451_y2401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1451_y2451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1451_y2501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1451_y2551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1451_y2601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1451_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1451_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1451_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1451_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1451_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1501_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1501_y2301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1501_y2351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1501_y2401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1501_y2451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1501_y2501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1501_y2551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1501_y2601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1501_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1501_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1501_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1501_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1501_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x151_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x151_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x151_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x151_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x151_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x151_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x151_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x151_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x151_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x151_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x151_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x151_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x151_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x151_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x151_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x151_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x151_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x151_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x151_y2701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x151_y2751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x151_y2801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x151_y2851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x151_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x151_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1551_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1551_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1551_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1551_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1551_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1551_y2251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1551_y2301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1551_y2351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1551_y2451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1551_y2501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1551_y2551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1551_y2601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1551_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1551_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1551_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1551_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1551_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1601_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1601_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1601_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1601_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1601_y2251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1601_y2301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1601_y2701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1601_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1601_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1601_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1601_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1601_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1651_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1651_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1651_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1651_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1651_y2251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1651_y2301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1651_y2351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1651_y2401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1651_y2451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1651_y2501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1651_y2701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1651_y2751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1651_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1651_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1651_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1651_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1651_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1651_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1701_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1701_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1701_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1701_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1701_y2251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1701_y2451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1701_y2501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1701_y2701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1701_y2801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1701_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1701_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1701_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1701_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1701_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1701_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1701_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1701_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1701_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1751_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1751_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1751_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1751_y2501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1751_y2551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1751_y2701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1751_y2751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1751_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1751_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1751_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1751_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1751_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1751_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1751_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1751_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1751_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1751_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1751_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1801_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1801_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1801_y2751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1801_y2801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1801_y2851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1801_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1801_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1801_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1801_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1801_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1801_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1801_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1801_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1801_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1801_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1801_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1851_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1851_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1851_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1851_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1851_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1851_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1851_y2751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1851_y2801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1851_y2851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1851_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1851_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1851_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1851_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1851_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1851_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1851_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1851_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1851_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1851_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1901_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1901_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1901_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1901_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1901_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1901_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1901_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1901_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1901_y2501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1901_y2751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1901_y2801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1901_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1901_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1901_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1901_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1901_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1901_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1901_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1901_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1901_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1901_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1901_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1951_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1951_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1951_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1951_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1951_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1951_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1951_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1951_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1951_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1951_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1951_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1951_y2551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1951_y2701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1951_y2751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1951_y2801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1951_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1951_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1951_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1951_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1951_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1951_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1951_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1951_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1951_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x1_y2851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y2401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y2451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y2501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y2551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y2601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y2701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y2751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y2801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2001_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y2701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y2801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y2851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x201_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y2251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y2301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y2351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y2401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y2451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y2501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y2551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y2601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y2701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y2751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y2801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2051_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y2251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y2301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y2351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y2401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y2451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y2501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y2551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y2601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y2701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y2751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y2801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2101_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y2251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y2301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y2351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y2401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y2451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y2501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y2551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y2601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y2701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y2751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y2801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2151_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2201_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2201_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2201_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2201_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2201_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2201_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2201_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2201_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2201_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2201_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2201_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2201_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2201_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2201_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2201_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2201_y2251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2201_y2301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2201_y2351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2201_y2401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2201_y2451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2201_y2501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2201_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2201_y2701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2201_y2751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2201_y2801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2201_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2201_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2201_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2201_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2201_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2201_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2201_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2201_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2201_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2251_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2251_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2251_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2251_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2251_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2251_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2251_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2251_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2251_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2251_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2251_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2251_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2251_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2251_y2251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2251_y2301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2251_y2351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2251_y2451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2251_y2601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2251_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2251_y2701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2251_y2751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2251_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2251_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2251_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2251_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2251_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2251_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2251_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2251_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2301_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2301_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2301_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2301_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2301_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2301_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2301_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2301_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2301_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2301_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2301_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2301_y2251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2301_y2301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2301_y2401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2301_y2551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2301_y2601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2301_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2301_y2701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2301_y2751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2301_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2301_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2301_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2301_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2301_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2301_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2301_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2351_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2351_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2351_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2351_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2351_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2351_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2351_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2351_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2351_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2351_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2351_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2351_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2351_y2251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2351_y2401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2351_y2501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2351_y2551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2351_y2601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2351_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2351_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2351_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2351_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2351_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2401_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2401_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2401_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2401_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2401_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2401_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2401_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2401_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2401_y2451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2401_y2501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2401_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2401_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2401_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2451_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2451_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2451_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2451_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2451_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2451_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2451_y2401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2451_y2451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2451_y2501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2451_y2551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2451_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2451_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2451_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2501_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2501_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2501_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2501_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2501_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2501_y2351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2501_y2401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2501_y2451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2501_y2501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2501_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2501_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2501_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y2551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y2601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y2801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y2851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x251_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2551_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2551_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2551_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2551_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2551_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2551_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2551_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2551_y2301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2551_y2351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2551_y2401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2551_y2451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2551_y2501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2551_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2601_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2601_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2601_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2601_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2601_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2601_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2601_y2251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2601_y2301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2601_y2351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2601_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2651_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2651_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2651_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2651_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2651_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2651_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2651_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2651_y2251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2651_y2301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2651_y2351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2651_y2401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2651_y2451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2651_y2551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2651_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2701_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2701_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2701_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2701_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2701_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2701_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2701_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2701_y2251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2701_y2301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2701_y2401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2701_y2451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2701_y2551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2701_y2701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2701_y2751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2701_y2801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2751_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2751_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2751_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2751_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2751_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2751_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2751_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2751_y2251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2751_y2601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2751_y2751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2801_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2801_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2801_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2801_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2801_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2801_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2801_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2801_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2801_y2301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2801_y2351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2801_y2601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2801_y2701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2801_y2751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2851_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2851_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2851_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2851_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2851_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2851_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2851_y2351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2851_y2401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2851_y2451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2851_y2601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2851_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2851_y2701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2901_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2901_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2901_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2901_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2901_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2901_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2901_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2901_y2301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2901_y2351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2901_y2451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2901_y2501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2901_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2901_y2701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2901_y2751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2951_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2951_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2951_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2951_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2951_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2951_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2951_y2251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2951_y2301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2951_y2351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2951_y2401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2951_y2451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2951_y2501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2951_y2551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2951_y2601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2951_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2951_y2701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x2951_y2751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3001_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3001_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3001_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3001_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3001_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3001_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3001_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3001_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3001_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3001_y2251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3001_y2301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3001_y2351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3001_y2401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3001_y2451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3001_y2501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3001_y2551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3001_y2601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3001_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3001_y2701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3001_y2751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y2601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y2751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y2801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y2851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x301_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3051_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3051_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3051_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3051_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3051_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3051_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3051_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3051_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3051_y2251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3051_y2301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3051_y2351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3051_y2401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3051_y2451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3051_y2501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3051_y2551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3051_y2601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3051_y2651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3051_y2701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3101_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3101_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3101_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3101_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3101_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3101_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3101_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3101_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3101_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3101_y2251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3101_y2301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3101_y2351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3101_y2401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3101_y2451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3101_y2501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3101_y2551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3101_y2601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3151_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3151_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3151_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3151_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3151_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3151_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3151_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3151_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3151_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3151_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3151_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3151_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3151_y2251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3151_y2301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3151_y2351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3151_y2401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3201_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3201_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3201_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3201_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3201_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3201_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3201_y2051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3201_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3201_y2151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3201_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3251_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3251_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3251_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3251_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3251_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3251_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3251_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3251_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3251_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3251_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3251_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3301_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3301_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3301_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3301_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3301_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3301_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3301_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3301_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3301_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3301_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3301_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3351_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3351_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3351_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3351_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3351_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3351_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x3401_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x351_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x351_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x351_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x351_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x351_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x351_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x351_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x351_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x351_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x351_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x351_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x351_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x351_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x351_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x351_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x351_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x351_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x351_y2801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x351_y2851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x351_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x351_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x351_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x351_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x351_y51_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x351_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x351_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x351_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x351_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x351_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x351_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x351_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x351_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x351_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x401_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x401_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x401_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x401_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x401_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x401_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x401_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x401_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x401_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x401_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x401_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x401_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x401_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x401_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x401_y1_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x401_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x401_y2101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x401_y2801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x401_y2851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x401_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x401_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x401_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x401_y51_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x401_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x401_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x401_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x401_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x401_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x401_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x401_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x401_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x401_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x451_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x451_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x451_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x451_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x451_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x451_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x451_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x451_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x451_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x451_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x451_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x451_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x451_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x451_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x451_y1_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x451_y2801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x451_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x451_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x451_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x451_y51_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x451_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x451_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x451_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x451_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x451_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x451_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x451_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x451_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x451_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x501_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x501_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x501_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x501_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x501_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x501_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x501_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x501_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x501_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x501_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x501_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x501_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x501_y1_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x501_y2251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x501_y2801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x501_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x501_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x501_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x501_y51_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x501_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x501_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x501_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x501_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x501_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x501_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x501_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x501_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x501_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x51_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x51_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x51_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x51_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x51_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x51_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x51_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x51_y2801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x51_y2851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x551_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x551_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x551_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x551_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x551_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x551_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x551_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x551_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x551_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x551_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x551_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x551_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x551_y1_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x551_y2801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x551_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x551_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x551_y51_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x551_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x551_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x551_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x551_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x551_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x551_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x551_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x551_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x551_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x601_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x601_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x601_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x601_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x601_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x601_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x601_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x601_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x601_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x601_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x601_y1_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x601_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x601_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x601_y51_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x601_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x601_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x601_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x601_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x601_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x601_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x601_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x601_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x601_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x651_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x651_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x651_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x651_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x651_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x651_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x651_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x651_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x651_y1_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x651_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x651_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x651_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x651_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x651_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x651_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x651_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x651_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x651_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x651_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x651_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x701_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x701_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x701_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x701_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x701_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x701_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x701_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x701_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x701_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x701_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x701_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x701_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x701_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x701_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x701_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x701_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x751_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x751_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x751_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x751_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x751_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x751_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x751_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x751_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x751_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x751_y2301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x751_y2401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x751_y2451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x751_y51_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x751_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x751_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x751_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x751_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x751_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x751_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x751_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x801_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x801_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x801_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x801_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x801_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x801_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x801_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x801_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x801_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x801_y2351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x801_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x801_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x801_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x801_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x801_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x801_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x851_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x851_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x851_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x851_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x851_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x851_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x851_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x851_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x851_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x851_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x851_y2301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x851_y2351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x851_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x851_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x851_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x851_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x851_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x851_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x851_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x851_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x901_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x901_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x901_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x901_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x901_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x901_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x901_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x901_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x901_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x901_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x901_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x901_y51_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x901_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x901_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x901_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x901_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x901_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x901_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x901_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x901_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x901_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x951_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x951_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x951_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x951_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x951_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x951_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x951_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x951_y2201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x951_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x951_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x951_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x951_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x951_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x951_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x951_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x951_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x951_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/0/9382_idx5_x951_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1001_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1001_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1001_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1001_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1001_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1001_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1001_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1051_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1051_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1051_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1051_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1051_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1051_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1051_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1101_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1101_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1101_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1101_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1101_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1101_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1101_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1101_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1151_y1151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1151_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1151_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1151_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1151_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1151_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1151_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1151_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1151_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1151_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1201_y1001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1201_y1051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1201_y1101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1201_y1151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1201_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1201_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1201_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1201_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1201_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1201_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1201_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1201_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1201_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1201_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1251_y1001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1251_y1051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1251_y1101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1251_y1151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1251_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1251_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1251_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1251_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1251_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1251_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1251_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1251_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1251_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1251_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1301_y1001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1301_y1051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1301_y1101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1301_y1151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1301_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1301_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1301_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1301_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1301_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1301_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1301_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1301_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1301_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1301_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1301_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1301_y951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1351_y1001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1351_y1051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1351_y1101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1351_y1151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1351_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1351_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1351_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1351_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1351_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1351_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1351_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1351_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1351_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1351_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1351_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1351_y951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1401_y1001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1401_y1051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1401_y1101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1401_y1151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1401_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1401_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1401_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1401_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1401_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1401_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1401_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1401_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1401_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1401_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1401_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1401_y951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1451_y1001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1451_y1051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1451_y1101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1451_y1151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1451_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1451_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1451_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1451_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1451_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1451_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1451_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1451_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1451_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1451_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1451_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1451_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1451_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1451_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1451_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1451_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1451_y901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1451_y951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1501_y1001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1501_y1051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1501_y1101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1501_y1151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1501_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1501_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1501_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1501_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1501_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1501_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1501_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1501_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1501_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1501_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1501_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1501_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1501_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1501_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1501_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1501_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1501_y901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1501_y951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1551_y1001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1551_y1051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1551_y1101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1551_y1151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1551_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1551_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1551_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1551_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1551_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1551_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1551_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1551_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1551_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1551_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1551_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1551_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1551_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1551_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1551_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1551_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1551_y901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1551_y951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1601_y1001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1601_y1051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1601_y1101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1601_y1151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1601_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1601_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1601_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1601_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1601_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1601_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1601_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1601_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1601_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1601_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1601_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1601_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1601_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1601_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1601_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1601_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1601_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1601_y951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1651_y1001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1651_y1051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1651_y1101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1651_y1151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1651_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1651_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1651_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1651_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1651_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1651_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1651_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1651_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1651_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1651_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1651_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1651_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1651_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1651_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1651_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1651_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1651_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1651_y951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1701_y1001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1701_y1051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1701_y1101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1701_y1151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1701_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1701_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1701_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1701_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1701_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1701_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1701_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1701_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1701_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1701_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1701_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1701_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1701_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1701_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1701_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1701_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1701_y2001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1751_y1001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1751_y1051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1751_y1101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1751_y1151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1751_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1751_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1751_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1751_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1751_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1751_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1751_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1751_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1751_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1751_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1751_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1751_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1751_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1751_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1751_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1751_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1801_y1051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1801_y1101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1801_y1151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1801_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1801_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1801_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1801_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1801_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1801_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1801_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1801_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1801_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1801_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1801_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1801_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1801_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1801_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1801_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1801_y1951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1851_y1051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1851_y1101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1851_y1151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1851_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1851_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1851_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1851_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1851_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1851_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1851_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1851_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1851_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1851_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1851_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1851_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1901_y1101_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1901_y1151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1901_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1901_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1901_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1901_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1901_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1901_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1901_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1901_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1901_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1901_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1901_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1951_y1151_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1951_y1201_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1951_y1251_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1951_y1301_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1951_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1951_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1951_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1951_y1651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1951_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1951_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1951_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1951_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x1951_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x2001_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x2001_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x2001_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x2001_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x2001_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x2051_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x2051_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x2051_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x2051_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x2051_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x2101_y1701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x2101_y1751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x2101_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x2101_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x2101_y1901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x2151_y1801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x2151_y1851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x901_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x901_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x901_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x901_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x951_y1351_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x951_y1401_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x951_y1451_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x951_y1501_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x951_y1551_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9382/1/9382_idx5_x951_y1601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1001_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1001_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1001_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1001_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1001_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1001_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1001_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1001_y51_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1001_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x101_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1051_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1051_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1051_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1051_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1051_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1051_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1051_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1051_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1101_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1101_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1101_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1101_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1101_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1101_y301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1151_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1151_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1151_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1151_y201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1151_y251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1151_y301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1151_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1151_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1201_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1201_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1201_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1201_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1251_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1251_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1301_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1301_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1301_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1301_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1351_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1351_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1351_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1351_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1351_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1351_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1351_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1351_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1351_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1351_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1351_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1401_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1401_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1401_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1401_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1401_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1401_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1401_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1401_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1401_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1401_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1451_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1451_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1451_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1451_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1451_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1451_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1451_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1451_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1451_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1451_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1501_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1501_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1501_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1501_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1501_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1501_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1501_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1501_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1501_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1501_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1501_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1501_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1501_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1501_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1501_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x151_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x151_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1551_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1551_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1551_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1551_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1551_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1551_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1551_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1551_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1551_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1551_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1551_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1551_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1551_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1551_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1601_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1601_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1601_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1601_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1601_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1601_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1601_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1601_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1601_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1601_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1601_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1601_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1601_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1601_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1601_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1601_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1601_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1601_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1601_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1601_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1651_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1651_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1651_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1651_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1651_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1651_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1651_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1651_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1651_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1651_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1651_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1651_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1651_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1651_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1651_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1651_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1651_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1651_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1651_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1701_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1701_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1701_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1701_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1701_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1701_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1701_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1701_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1701_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1701_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1701_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1701_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1701_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1701_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1751_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1751_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1751_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1751_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1751_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1751_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1751_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1751_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1751_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1751_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1751_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1801_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1801_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1801_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1801_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1801_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1801_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1801_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1801_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1801_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1801_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1801_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1851_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1851_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1851_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1851_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1851_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1851_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1851_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1851_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1851_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1851_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1851_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1851_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1851_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1901_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1901_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1901_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1901_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1901_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1901_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1901_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1901_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1901_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1901_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1901_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1901_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1901_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1901_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1901_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1951_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1951_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1951_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1951_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1951_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1951_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1951_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1951_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1951_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1951_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1951_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1951_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1951_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1951_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x1951_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2001_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2001_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2001_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2001_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2001_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2001_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2001_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2001_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2001_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2001_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2001_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2001_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2001_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x201_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x201_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x201_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2051_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2051_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2051_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2051_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2051_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2051_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2051_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2051_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2051_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2051_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2051_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2101_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2101_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2101_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2101_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2101_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2101_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2101_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2151_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2151_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2151_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2151_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2151_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2151_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2151_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2201_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2201_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2201_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2201_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2201_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2201_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2201_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2201_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2201_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2201_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2251_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2251_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2251_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2251_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2251_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2251_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2251_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2251_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2251_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2251_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2251_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2301_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2301_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2301_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2301_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2301_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2301_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2351_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2351_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2351_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2351_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2351_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2401_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2401_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2401_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2401_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2401_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2401_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2451_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2451_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2451_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2451_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2451_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2451_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2451_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2451_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2501_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2501_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2501_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2501_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2501_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2501_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2501_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2501_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2501_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x251_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x251_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2551_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2551_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2551_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2551_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2551_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2551_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2601_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2601_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2601_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2601_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2601_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2651_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2651_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2651_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2651_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2651_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2701_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2701_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2701_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2701_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2701_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2751_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2751_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2751_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2751_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2751_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2801_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x2801_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x301_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x301_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x301_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x301_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x351_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x351_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x351_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x351_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x351_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x401_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x401_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x401_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x401_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x401_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x401_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x451_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x451_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x451_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x451_y851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x501_y251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x501_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x51_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x551_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x551_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x551_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x551_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x551_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x601_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x601_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x601_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x601_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x601_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x601_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x601_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x601_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x651_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x651_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x651_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x651_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x651_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x651_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x651_y201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x651_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x651_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x651_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x651_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x651_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x701_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x701_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x701_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x701_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x701_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x701_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x701_y151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x701_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x701_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x701_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x701_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x701_y201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x701_y251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x701_y301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x701_y351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x701_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x701_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x701_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x701_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x751_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x751_y1151_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x751_y1201_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x751_y1251_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x751_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x751_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x751_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x751_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x751_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x751_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x751_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x751_y2001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x751_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x751_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x751_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x751_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x751_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x801_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x801_y1051_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x801_y1101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x801_y1301_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x801_y1351_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x801_y1401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x801_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x801_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x801_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x801_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x801_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x801_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x801_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x801_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x801_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x851_y1001_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x851_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x851_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x851_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x851_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x851_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x851_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x851_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x851_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x851_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x851_y501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x851_y551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x851_y601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x851_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x851_y701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x851_y751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x851_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x851_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x851_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x901_y101_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x901_y1451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x901_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x901_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x901_y1601_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x901_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x901_y1701_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x901_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x901_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x901_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x901_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x901_y451_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x901_y51_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x901_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x901_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x901_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x951_y1501_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x951_y1551_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x951_y1651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x951_y1751_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x951_y1801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x951_y1851_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x951_y1901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x951_y1951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x951_y401_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x951_y651_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x951_y801_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x951_y901_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/0/9383_idx5_x951_y951_class0.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1701_y751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1701_y801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1701_y851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1701_y901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1701_y951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1751_y1001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1751_y651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1751_y701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1751_y751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1751_y801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1751_y851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1751_y901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1751_y951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1801_y1001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1801_y1051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1801_y601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1801_y651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1801_y701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1801_y751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1801_y801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1801_y851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1801_y901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1801_y951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1851_y1001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1851_y1051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1851_y601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1851_y651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1851_y701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1851_y751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1851_y801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1851_y851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1851_y901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1851_y951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1901_y1001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1901_y1051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1901_y601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1901_y651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1901_y701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1901_y751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1901_y801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1901_y851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1901_y901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1901_y951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1951_y1001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1951_y1051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1951_y601_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1951_y651_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1951_y701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1951_y751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1951_y801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1951_y851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1951_y901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x1951_y951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x2001_y1001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x2001_y1051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x2001_y701_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x2001_y751_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x2001_y801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x2001_y851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x2001_y901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x2001_y951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x2051_y1001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x2051_y1051_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x2051_y801_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x2051_y851_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x2051_y901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x2051_y951_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x2101_y1001_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x2101_y901_class1.png \n inflating: breast-histopathology-images/IDC_regular_ps50_idx5/9383/1/9383_idx5_x2101_y951_class1.png \n"
],
[
"!pip install tensorflow-gpu",
"Collecting tensorflow-gpu\n\u001b[?25l Downloading https://files.pythonhosted.org/packages/85/cc/a27e73cf8b23f2ce4bdd2b7089a42a7819ce6dd7366dceba406ddc5daa9c/tensorflow_gpu-2.4.1-cp37-cp37m-manylinux2010_x86_64.whl (394.3MB)\n\u001b[K |████████████████████████████████| 394.3MB 42kB/s \n\u001b[?25hRequirement already satisfied: h5py~=2.10.0 in /usr/local/lib/python3.7/dist-packages (from tensorflow-gpu) (2.10.0)\nRequirement already satisfied: opt-einsum~=3.3.0 in /usr/local/lib/python3.7/dist-packages (from tensorflow-gpu) (3.3.0)\nRequirement already satisfied: six~=1.15.0 in /usr/local/lib/python3.7/dist-packages (from tensorflow-gpu) (1.15.0)\nRequirement already satisfied: typing-extensions~=3.7.4 in /usr/local/lib/python3.7/dist-packages (from tensorflow-gpu) (3.7.4.3)\nRequirement already satisfied: wrapt~=1.12.1 in /usr/local/lib/python3.7/dist-packages (from tensorflow-gpu) (1.12.1)\nRequirement already satisfied: gast==0.3.3 in /usr/local/lib/python3.7/dist-packages (from tensorflow-gpu) (0.3.3)\nRequirement already satisfied: termcolor~=1.1.0 in /usr/local/lib/python3.7/dist-packages (from tensorflow-gpu) (1.1.0)\nRequirement already satisfied: google-pasta~=0.2 in /usr/local/lib/python3.7/dist-packages (from tensorflow-gpu) (0.2.0)\nRequirement already satisfied: keras-preprocessing~=1.1.2 in /usr/local/lib/python3.7/dist-packages (from tensorflow-gpu) (1.1.2)\nRequirement already satisfied: wheel~=0.35 in /usr/local/lib/python3.7/dist-packages (from tensorflow-gpu) (0.36.2)\nRequirement already satisfied: flatbuffers~=1.12.0 in /usr/local/lib/python3.7/dist-packages (from tensorflow-gpu) (1.12)\nRequirement already satisfied: tensorboard~=2.4 in /usr/local/lib/python3.7/dist-packages (from tensorflow-gpu) (2.4.1)\nRequirement already satisfied: tensorflow-estimator<2.5.0,>=2.4.0 in /usr/local/lib/python3.7/dist-packages (from tensorflow-gpu) (2.4.0)\nRequirement already satisfied: grpcio~=1.32.0 in /usr/local/lib/python3.7/dist-packages (from tensorflow-gpu) (1.32.0)\nRequirement already satisfied: astunparse~=1.6.3 in /usr/local/lib/python3.7/dist-packages (from tensorflow-gpu) (1.6.3)\nRequirement already satisfied: protobuf>=3.9.2 in /usr/local/lib/python3.7/dist-packages (from tensorflow-gpu) (3.12.4)\nRequirement already satisfied: numpy~=1.19.2 in /usr/local/lib/python3.7/dist-packages (from tensorflow-gpu) (1.19.5)\nRequirement already satisfied: absl-py~=0.10 in /usr/local/lib/python3.7/dist-packages (from tensorflow-gpu) (0.12.0)\nRequirement already satisfied: google-auth<2,>=1.6.3 in /usr/local/lib/python3.7/dist-packages (from tensorboard~=2.4->tensorflow-gpu) (1.28.0)\nRequirement already satisfied: setuptools>=41.0.0 in /usr/local/lib/python3.7/dist-packages (from tensorboard~=2.4->tensorflow-gpu) (54.2.0)\nRequirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in /usr/local/lib/python3.7/dist-packages (from tensorboard~=2.4->tensorflow-gpu) (0.4.3)\nRequirement already satisfied: werkzeug>=0.11.15 in /usr/local/lib/python3.7/dist-packages (from tensorboard~=2.4->tensorflow-gpu) (1.0.1)\nRequirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python3.7/dist-packages (from tensorboard~=2.4->tensorflow-gpu) (3.3.4)\nRequirement already satisfied: requests<3,>=2.21.0 in /usr/local/lib/python3.7/dist-packages (from tensorboard~=2.4->tensorflow-gpu) (2.23.0)\nRequirement already satisfied: tensorboard-plugin-wit>=1.6.0 in /usr/local/lib/python3.7/dist-packages (from tensorboard~=2.4->tensorflow-gpu) (1.8.0)\nRequirement already satisfied: cachetools<5.0,>=2.0.0 in /usr/local/lib/python3.7/dist-packages (from google-auth<2,>=1.6.3->tensorboard~=2.4->tensorflow-gpu) (4.2.1)\nRequirement already satisfied: pyasn1-modules>=0.2.1 in /usr/local/lib/python3.7/dist-packages (from google-auth<2,>=1.6.3->tensorboard~=2.4->tensorflow-gpu) (0.2.8)\nRequirement already satisfied: rsa<5,>=3.1.4; python_version >= \"3.6\" in /usr/local/lib/python3.7/dist-packages (from google-auth<2,>=1.6.3->tensorboard~=2.4->tensorflow-gpu) (4.7.2)\nRequirement already satisfied: requests-oauthlib>=0.7.0 in /usr/local/lib/python3.7/dist-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard~=2.4->tensorflow-gpu) (1.3.0)\nRequirement already satisfied: importlib-metadata; python_version < \"3.8\" in /usr/local/lib/python3.7/dist-packages (from markdown>=2.6.8->tensorboard~=2.4->tensorflow-gpu) (3.8.1)\nRequirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests<3,>=2.21.0->tensorboard~=2.4->tensorflow-gpu) (3.0.4)\nRequirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests<3,>=2.21.0->tensorboard~=2.4->tensorflow-gpu) (2.10)\nRequirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests<3,>=2.21.0->tensorboard~=2.4->tensorflow-gpu) (2020.12.5)\nRequirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests<3,>=2.21.0->tensorboard~=2.4->tensorflow-gpu) (1.24.3)\nRequirement already satisfied: pyasn1<0.5.0,>=0.4.6 in /usr/local/lib/python3.7/dist-packages (from pyasn1-modules>=0.2.1->google-auth<2,>=1.6.3->tensorboard~=2.4->tensorflow-gpu) (0.4.8)\nRequirement already satisfied: oauthlib>=3.0.0 in /usr/local/lib/python3.7/dist-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard~=2.4->tensorflow-gpu) (3.1.0)\nRequirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/dist-packages (from importlib-metadata; python_version < \"3.8\"->markdown>=2.6.8->tensorboard~=2.4->tensorflow-gpu) (3.4.1)\nInstalling collected packages: tensorflow-gpu\nSuccessfully installed tensorflow-gpu-2.4.1\n"
],
[
"import pandas as pd\nimport numpy as np\n\nfrom tensorflow.keras.models import Sequential\nfrom tensorflow.keras.layers import Dense, Dropout, Conv2D, MaxPooling2D, Flatten\nfrom tensorflow.keras.optimizers import Adam\nfrom tensorflow.keras.metrics import categorical_crossentropy\nfrom tensorflow.keras.preprocessing.image import ImageDataGenerator\nfrom tensorflow.keras.models import Model\nfrom tensorflow.keras.callbacks import EarlyStopping, ReduceLROnPlateau, ModelCheckpoint\n\nimport os\nimport cv2\n\nimport imageio\nimport skimage\nimport skimage.io\nimport skimage.transform\n\nfrom sklearn.utils import shuffle\nfrom sklearn.metrics import confusion_matrix\nfrom sklearn.model_selection import train_test_split\nimport itertools\nimport shutil\nimport matplotlib.pyplot as plt\n%matplotlib inline",
"_____no_output_____"
],
[
"from google.colab import drive\ndrive.mount('/content/drive')",
"Mounted at /content/drive\n"
],
[
"SAMPLE_SIZE = 78786\n\nIMAGE_SIZE = 224",
"_____no_output_____"
],
[
"os.listdir('/content/breast-histopathology-images')",
"_____no_output_____"
],
[
"patient = os.listdir('/content/breast-histopathology-images/IDC_regular_ps50_idx5')\nlen(patient)",
"_____no_output_____"
],
[
"#Copy all images into one directory\n#This will make it easier to work with this data.\n# Create a new directory to store all available images\nall_images = 'all_images'\nos.mkdir(all_images)",
"_____no_output_____"
],
[
"patient_list = os.listdir('/content/breast-histopathology-images/IDC_regular_ps50_idx5')",
"_____no_output_____"
],
[
"print(patient_list)",
"['12820', '15513', '9320', '14305', '8955', '14304', '12886', '12868', '12824', '15839', '9077', '13689', '15902', '9123', '12883', '14209', '10258', '9226', '10293', '12818', '9261', '13693', '13688', '13691', '16896', '10305', '12905', '10272', '12929', '9291', '8867', '8916', '15471', '12895', '10302', '16534', '10295', '12880', '9346', '12900', '14210', '9081', '14154', '12826', '12752', '9323', '12931', '9135', '15512', '12884', '12748', '9124', '9173', '13402', '15840', '12947', '10285', '9262', '12869', '12821', '8959', '9023', '9177', '16085', '9267', '9083', '9041', '15514', '13018', '13461', '8975', '9125', '10262', '9043', '15633', '9347', '12817', '9257', '12935', '12894', '9178', '13692', '9044', '10290', '10303', '9225', '14188', '12819', '12951', '9022', '10256', '16553', '10276', '9382', '12901', '15632', '10257', '12878', '13694', '10273', '10279', '16895', '16555', '8865', '12934', '10268', '13022', '9175', '10299', '13106', '10253', '9228', '10286', '10307', '9250', '12810', '9126', '10306', '12948', '13019', '12907', '15634', '13021', '12911', '13403', '9176', '13458', '16532', '15903', '10308', '14211', '12823', '12891', '9325', '12955', '16569', '14081', '12751', '15472', '8974', '12882', '12949', '10269', '12870', '9078', '9035', '9260', '14082', '8914', '15515', '9259', '12867', '14213', '9324', '12932', '13462', '14190', '8913', '10259', '12749', '12626', '9255', '16551', '12954', '8950', '15510', '14078', '12930', '16552', '14079', '8917', '9076', '16167', '13613', '9319', '13024', '15473', '10291', '10255', '14212', '13020', '8951', '9321', '9383', '16550', '14191', '12811', '10282', '12933', '12879', '12909', '13916', '16166', '8864', '9266', '12242', '13616', '10288', '12241', '12906', '9265', '13687', '8918', '12908', '16533', '9290', '10254', '12890', '9029', '13404', '8863', '14155', '10278', '10264', '10260', '10275', '9254', '9256', '12875', '14306', '8984', '16554', '13591', '9381', '14192', '8957', '10277', '13460', '13400', '14157', '9322', '15516', '12897', '10292', '9227', '16570', '12893', '12881', '16014', '12898', '12896', '10304', '13666', '16568', '12750', '14156', '12871', '10301', '16531', '12910', '10300', '9075', '10274', '13025', '10261', '9258', '13401', '9344', '13459', '12892', '14189', '12876', '13617', '9037', '9181', '8956', '12873', '14153', '9174', '12877', '9073', '9036', '13023', '12822', '16165', '12872', '8980', '14321', '9345']\n"
],
[
"for patient in patient_list:\n # /content/IDC_regular_ps50_idx5/10253/0/10253_idx5_x1001_y1001_class0.png\n path_0 = \"/content/breast-histopathology-images/IDC_regular_ps50_idx5/\"+str(patient)+\"/0\"\n path_1 = \"/content/breast-histopathology-images/IDC_regular_ps50_idx5/\"+str(patient)+\"/1\"\n \n #list for 0\n file_list_0 = os.listdir(path_0)\n #list for 1\n file_list_1 = os.listdir(path_1)\n \n #move all 0 related img of a patient to all_image directory\n for fname in file_list_0:\n #src path of image\n src = os.path.join(path_0, fname)\n #dst path for image\n dst = os.path.join(all_images, fname)\n #move the image to directory\n shutil.copyfile(src, dst)\n \n #move all 1 related img of a patient to all_image directory\n for fname in file_list_1:\n #src path of image\n src = os.path.join(path_1, fname)\n #dst path for image\n dst = os.path.join(all_images, fname)\n #move the image to directory\n shutil.copyfile(src, dst)",
"_____no_output_____"
],
[
"len(os.listdir('all_images'))",
"_____no_output_____"
],
[
"image_list = os.listdir('all_images')\n\ndf_data = pd.DataFrame(image_list, columns=['image_id'])\n\ndf_data.head()",
"_____no_output_____"
],
[
"# Define Helper Functions\n\n# Each file name has this format:\n# '14211_idx5_x2401_y1301_class1.png'\n\ndef extract_patient_id(x):\n # split into a list\n a = x.split('_')\n # the id is the first index in the list\n patient_id = a[0]\n \n return patient_id\n\ndef extract_target(x):\n # split into a list\n a = x.split('_')\n # the target is part of the string in index 4\n b = a[4]\n # the ytarget i.e. 1 or 2 is the 5th index of the string --> class1\n target = b[5]\n \n return target\n\n# extract the patient id\n\n# create a new column called 'patient_id'\ndf_data['patient_id'] = df_data['image_id'].apply(extract_patient_id)\n# create a new column called 'target'\ndf_data['target'] = df_data['image_id'].apply(extract_target)\n\ndf_data.head(10)",
"_____no_output_____"
],
[
"df_data.shape",
"_____no_output_____"
],
[
"\ndef draw_category_images(col_name,figure_cols, df, IMAGE_PATH):\n \n \"\"\"\n Give a column in a dataframe,\n this function takes a sample of each class and displays that\n sample on one row. The sample size is the same as figure_cols which\n is the number of columns in the figure.\n Because this function takes a random sample, each time the function is run it\n displays different images.\n \"\"\"\n \n\n categories = (df.groupby([col_name])[col_name].nunique()).index\n f, ax = plt.subplots(nrows=len(categories),ncols=figure_cols, \n figsize=(4*figure_cols,4*len(categories))) # adjust size here\n # draw a number of images for each location\n for i, cat in enumerate(categories):\n sample = df[df[col_name]==cat].sample(figure_cols) # figure_cols is also the sample size\n for j in range(0,figure_cols):\n file=IMAGE_PATH + sample.iloc[j]['image_id']\n im=cv2.imread(file)\n ax[i, j].imshow(im, resample=True, cmap='gray')\n ax[i, j].set_title(cat, fontsize=16) \n plt.tight_layout()\n plt.show()",
"_____no_output_____"
],
[
"IMAGE_PATH = 'all_images/'\n\ndraw_category_images('target',4, df_data, IMAGE_PATH)",
"_____no_output_____"
],
[
"# What is the class distribution?\n\ndf_data['target'].value_counts()",
"_____no_output_____"
],
[
"# take a sample of the majority class 0 (total = 198738)\ndf_0 = df_data[df_data['target'] == '0'].sample(SAMPLE_SIZE, random_state=101)\n# take a sample of class 1 (total = 78786)\ndf_1 = df_data[df_data['target'] == '1'].sample(SAMPLE_SIZE, random_state=101)\n\n# concat the two dataframes\ndf_data = pd.concat([df_0, df_1], axis=0).reset_index(drop=True)\n\n# Check the new class distribution\ndf_data['target'].value_counts()",
"_____no_output_____"
],
[
"# train_test_split\n\n# stratify=y creates a balanced validation set.\ny = df_data['target']\n\ndf_train, df_val = train_test_split(df_data, test_size=0.10, random_state=101, stratify=y)\n\nprint(df_train.shape)\nprint(df_val.shape)",
"(141814, 3)\n(15758, 3)\n"
],
[
"df_train['target'].value_counts()",
"_____no_output_____"
],
[
"df_val['target'].value_counts()",
"_____no_output_____"
],
[
"# Create a new directory\nbase_dir = 'base_dir'\nos.mkdir(base_dir)\n\n\n#[CREATE FOLDERS INSIDE THE BASE DIRECTORY]\n\n# now we create 2 folders inside 'base_dir':\n\n# train_dir\n # a_no_idc\n # b_has_idc\n\n# val_dir\n # a_no_idc\n # b_has_idc\n\n\n\n# create a path to 'base_dir' to which we will join the names of the new folders\n# train_dir\ntrain_dir = os.path.join(base_dir, 'train_dir')\nos.mkdir(train_dir)\n\n# val_dir\nval_dir = os.path.join(base_dir, 'val_dir')\nos.mkdir(val_dir)\n\n\n# [CREATE FOLDERS INSIDE THE TRAIN AND VALIDATION FOLDERS]\n# Inside each folder we create seperate folders for each class\n\n# create new folders inside train_dir\na_no_idc = os.path.join(train_dir, 'a_no_idc')\nos.mkdir(a_no_idc)\nb_has_idc = os.path.join(train_dir, 'b_has_idc')\nos.mkdir(b_has_idc)\n\n\n# create new folders inside val_dir\na_no_idc = os.path.join(val_dir, 'a_no_idc')\nos.mkdir(a_no_idc)\nb_has_idc = os.path.join(val_dir, 'b_has_idc')\nos.mkdir(b_has_idc)\n",
"_____no_output_____"
],
[
"# check that the folders have been created\nos.listdir('base_dir/train_dir')",
"_____no_output_____"
],
[
"# Set the id as the index in df_data\ndf_data.set_index('image_id', inplace=True)",
"_____no_output_____"
],
[
"# Get a list of train and val images\ntrain_list = list(df_train['image_id'])\nval_list = list(df_val['image_id'])\n\n\n\n# Transfer the train images\n\nfor image in train_list:\n \n # the id in the csv file does not have the .tif extension therefore we add it here\n fname = image\n # get the label for a certain image\n target = df_data.loc[image,'target']\n \n # these must match the folder names\n if target == '0':\n label = 'a_no_idc'\n if target == '1':\n label = 'b_has_idc'\n \n # source path to image\n src = os.path.join(all_images, fname)\n # destination path to image\n dst = os.path.join(train_dir, label, fname)\n # move the image from the source to the destination\n shutil.move(src, dst)\n \n\n# Transfer the val images\n\nfor image in val_list:\n \n # the id in the csv file does not have the .tif extension therefore we add it here\n fname = image\n # get the label for a certain image\n target = df_data.loc[image,'target']\n \n # these must match the folder names\n if target == '0':\n label = 'a_no_idc'\n if target == '1':\n label = 'b_has_idc'\n \n\n # source path to image\n src = os.path.join(all_images, fname)\n # destination path to image\n dst = os.path.join(val_dir, label, fname)\n # move the image from the source to the destination\n shutil.move(src, dst) ",
"_____no_output_____"
],
[
"# check how many train images we have in each folder\n\nprint(len(os.listdir('base_dir/train_dir/a_no_idc')))\nprint(len(os.listdir('base_dir/train_dir/b_has_idc')))",
"70907\n70907\n"
],
[
"# check how many val images we have in each folder\n\nprint(len(os.listdir('base_dir/val_dir/a_no_idc')))\nprint(len(os.listdir('base_dir/val_dir/b_has_idc')))\n",
"7879\n7879\n"
],
[
"train_path = 'base_dir/train_dir'\nvalid_path = 'base_dir/val_dir'\n\n\nnum_train_samples = len(df_train)\nnum_val_samples = len(df_val)\ntrain_batch_size = 10\nval_batch_size = 10\n\n\ntrain_steps = np.ceil(num_train_samples / train_batch_size)\nval_steps = np.ceil(num_val_samples / val_batch_size)",
"_____no_output_____"
],
[
"datagen = ImageDataGenerator(rescale=1.0/255)\n\ntrain_gen = datagen.flow_from_directory(train_path,\n target_size=(IMAGE_SIZE,IMAGE_SIZE),\n batch_size=train_batch_size,\n class_mode='categorical')\n\nval_gen = datagen.flow_from_directory(valid_path,\n target_size=(IMAGE_SIZE,IMAGE_SIZE),\n batch_size=val_batch_size,\n class_mode='categorical')\n\n# Note: shuffle=False causes the test dataset to not be shuffled\ntest_gen = datagen.flow_from_directory(valid_path,\n target_size=(IMAGE_SIZE,IMAGE_SIZE),\n batch_size=1,\n class_mode='categorical',\n shuffle=False)",
"Found 141814 images belonging to 2 classes.\nFound 15758 images belonging to 2 classes.\nFound 15758 images belonging to 2 classes.\n"
],
[
"from tensorflow.keras.models import *\nfrom sklearn.model_selection import *\nfrom tensorflow.keras.applications import *\nfrom tensorflow.keras.layers import *\n\n\n\nbase_Neural_Net= InceptionResNetV2(input_shape=(224,224,3), weights='imagenet', include_top=False)\nmodel=Sequential()\nmodel.add(base_Neural_Net)\nmodel.add(Flatten())\nmodel.add(BatchNormalization())\nmodel.add(Dense(256,kernel_initializer='he_uniform'))\nmodel.add(BatchNormalization())\nmodel.add(Activation('relu'))\nmodel.add(Dropout(0.5))\nmodel.add(Dense(2,activation='softmax'))\n\nmodel.summary()",
"Downloading data from https://storage.googleapis.com/tensorflow/keras-applications/inception_resnet_v2/inception_resnet_v2_weights_tf_dim_ordering_tf_kernels_notop.h5\n219062272/219055592 [==============================] - 2s 0us/step\nModel: \"sequential\"\n_________________________________________________________________\nLayer (type) Output Shape Param # \n=================================================================\ninception_resnet_v2 (Functio (None, 5, 5, 1536) 54336736 \n_________________________________________________________________\nflatten (Flatten) (None, 38400) 0 \n_________________________________________________________________\nbatch_normalization_203 (Bat (None, 38400) 153600 \n_________________________________________________________________\ndense (Dense) (None, 256) 9830656 \n_________________________________________________________________\nbatch_normalization_204 (Bat (None, 256) 1024 \n_________________________________________________________________\nactivation_203 (Activation) (None, 256) 0 \n_________________________________________________________________\ndropout (Dropout) (None, 256) 0 \n_________________________________________________________________\ndense_1 (Dense) (None, 2) 514 \n=================================================================\nTotal params: 64,322,530\nTrainable params: 64,184,674\nNon-trainable params: 137,856\n_________________________________________________________________\n"
],
[
"model.compile('adam', loss='binary_crossentropy', \n metrics=['accuracy'])",
"_____no_output_____"
],
[
"filepath = \"model.h5\"\ncheckpoint = ModelCheckpoint(filepath, monitor='val_acc', verbose=1, \n save_best_only=True, mode='max')\n\nreduce_lr = ReduceLROnPlateau(monitor='val_acc', factor=0.5, patience=3, \n verbose=1, mode='max')\n \n \ncallbacks_list = [checkpoint, reduce_lr]\n\nhistory = model.fit_generator(train_gen, steps_per_epoch=train_steps, \n validation_data=val_gen,\n validation_steps=val_steps,\n epochs=10, verbose=1,\n callbacks=callbacks_list)",
"/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/training.py:1844: UserWarning: `Model.fit_generator` is deprecated and will be removed in a future version. Please use `Model.fit`, which supports generators.\n warnings.warn('`Model.fit_generator` is deprecated and '\n"
],
[
"# get the metric names so we can use evaulate_generator\nmodel.metrics_names",
"_____no_output_____"
],
[
"val_loss, val_acc = \\\nmodel.evaluate(test_gen, \n steps=len(df_val))\n\nprint('val_loss:', val_loss)\nprint('val_acc:', val_acc)",
"15758/15758 [==============================] - 508s 32ms/step - loss: 0.2786 - accuracy: 0.8902\nval_loss: 0.2786010503768921\nval_acc: 0.8901510238647461\n"
],
[
"import matplotlib.pyplot as plt\n\naccuracy = history.history['accuracy']\nval_acc = history.history['val_accuracy']\nloss = history.history['loss']\nval_loss = history.history['val_loss']\n\nepochs = range(1, len(accuracy) + 1)\n\nplt.plot(epochs, loss, 'bo', label='Training loss')\nplt.plot(epochs, val_loss, 'b', label='Validation loss')\nplt.title('Training and validation loss')\nplt.legend()\nplt.figure()\n\nplt.plot(epochs, accuracy, 'bo', label='Training acc')\nplt.plot(epochs, val_acc , 'b', label='Validation acc')\nplt.title('Training and validation accuracy')\nplt.legend()\nplt.figure()",
"_____no_output_____"
],
[
"predictions = model.predict_generator(test_gen, steps=len(df_val), verbose=1)",
"/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/training.py:1905: UserWarning: `Model.predict_generator` is deprecated and will be removed in a future version. Please use `Model.predict`, which supports generators.\n warnings.warn('`Model.predict_generator` is deprecated and '\n"
],
[
"predictions.shape",
"_____no_output_____"
],
[
"test_gen.class_indices",
"_____no_output_____"
],
[
"df_preds = pd.DataFrame(predictions, columns=['no_idc', 'has_idc'])\n\n#df_preds.head()\ndf_preds",
"_____no_output_____"
],
[
"y_true = test_gen.classes\n\n# Get the predicted labels as probabilities\ny_pred = df_preds['has_idc']",
"_____no_output_____"
],
[
"from sklearn.metrics import roc_auc_score\n\nroc_auc_score(y_true, y_pred)",
"_____no_output_____"
],
[
"def plot_confusion_matrix(cm, classes,\n normalize=False,\n title='Confusion matrix',\n cmap=plt.cm.Blues):\n \"\"\"\n This function prints and plots the confusion matrix.\n Normalization can be applied by setting `normalize=True`.\n \"\"\"\n if normalize:\n cm = cm.astype('float') / cm.sum(axis=1)[:, np.newaxis]\n print(\"Normalized confusion matrix\")\n else:\n print('Confusion matrix, without normalization')\n\n print(cm)\n\n plt.imshow(cm, interpolation='nearest', cmap=cmap)\n plt.title(title)\n plt.colorbar()\n tick_marks = np.arange(len(classes))\n plt.xticks(tick_marks, classes, rotation=45)\n plt.yticks(tick_marks, classes)\n\n fmt = '.2f' if normalize else 'd'\n thresh = cm.max() / 2.\n for i, j in itertools.product(range(cm.shape[0]), range(cm.shape[1])):\n plt.text(j, i, format(cm[i, j], fmt),\n horizontalalignment=\"center\",\n color=\"white\" if cm[i, j] > thresh else \"black\")\n\n plt.ylabel('True label')\n plt.xlabel('Predicted label')\n plt.tight_layout()",
"_____no_output_____"
],
[
"test_labels = test_gen.classes",
"_____no_output_____"
],
[
"test_labels.shape",
"_____no_output_____"
],
[
"cm = confusion_matrix(test_labels, predictions.argmax(axis=1))\n",
"_____no_output_____"
],
[
"test_gen.class_indices\n",
"_____no_output_____"
],
[
"cm_plot_labels = ['no_idc', 'has_idc']\n\nplot_confusion_matrix(cm, cm_plot_labels, title='Confusion Matrix')",
"Confusion matrix, without normalization\n[[6838 1041]\n [ 690 7189]]\n"
],
[
"from sklearn.metrics import classification_report\n\n# Generate a classification report\n\n# For this to work we need y_pred as binary labels not as probabilities\ny_pred_binary = predictions.argmax(axis=1)\n\nreport = classification_report(y_true, y_pred_binary, target_names=cm_plot_labels)\n\nprint(report)",
" precision recall f1-score support\n\n no_idc 0.91 0.87 0.89 7879\n has_idc 0.87 0.91 0.89 7879\n\n accuracy 0.89 15758\n macro avg 0.89 0.89 0.89 15758\nweighted avg 0.89 0.89 0.89 15758\n\n"
],
[
"from tensorflow.keras.models import load_model\nfrom tensorflow.keras.preprocessing import image",
"_____no_output_____"
],
[
"model.save(\"/content/drive/MyDrive/InceptionResNetV2.h5\")",
"_____no_output_____"
],
[
"yy = model.predict(test_gen)",
"_____no_output_____"
],
[
"len(yy)\nyy",
"_____no_output_____"
],
[
"yy = np.argmax(yy, axis=1)\nyy",
"_____no_output_____"
],
[
"",
"_____no_output_____"
]
]
] |
[
"code"
] |
[
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
]
] |
4ae83cc3d16ccd5ce0cf6e52b61e6061f9fd8e3e
| 647,878 |
ipynb
|
Jupyter Notebook
|
docs_src/notebooks/usage.ipynb
|
toshiakiasakura/py_simple_report
|
106b37a1b987f0ec939cde3d9873b0aeb00703e6
|
[
"MIT"
] | null | null | null |
docs_src/notebooks/usage.ipynb
|
toshiakiasakura/py_simple_report
|
106b37a1b987f0ec939cde3d9873b0aeb00703e6
|
[
"MIT"
] | null | null | null |
docs_src/notebooks/usage.ipynb
|
toshiakiasakura/py_simple_report
|
106b37a1b987f0ec939cde3d9873b0aeb00703e6
|
[
"MIT"
] | null | null | null | 332.928058 | 61,828 | 0.915566 |
[
[
[
"# Usage of py_simple_report\n\nThis library is intended to be developed for creating elements of a report. \nWhy element? We want to have titles, legends, labels. However, if you try to obtain all of them, simultaneously, it's a increadible task, and requires a higher graphical knowledge. Then, I take an alternative strategy. Generate elements of a figure. \nThese compositions can be merged manually in some graphical tools (Ex. powerpoint).",
"_____no_output_____"
],
[
"## Currently py_simple_report supports\n- Crosstabulation with stratification\n - Barplot\n - Stacked barplot\n- Crosstabulation for multiple binaries with stratification\n - Barplot\n - Heatmap",
"_____no_output_____"
],
[
"## Dataset \npy_simple_report assumes that you have two kind of dataset, original data and variable table. \nVariable table should include at least 3 columns, a variable name, a description of a variable, and a corresponding numbers and strings for each item. ",
"_____no_output_____"
],
[
"Here, we use Rdataset, \"plantTraits\" in the statsmodels. Docs of this dataset can be accessed from [here](https://vincentarelbundock.github.io/Rdatasets/doc/cluster/plantTraits.html).",
"_____no_output_____"
]
],
[
[
"import tqdm\nimport numpy as np\nimport pandas as pd\nimport statsmodels.api as sm\nimport py_simple_report as sim_repo",
"_____no_output_____"
],
[
"sim_repo.__version__",
"_____no_output_____"
],
[
"df = sm.datasets.get_rdataset(\"plantTraits\", \"cluster\").data.reset_index()\nn = df.shape[0]\nprint(df.shape)\n# Add missing \nnp.random.seed(1234)\nrnd1 = np.random.randint(n, size=6)\ncols = [\"mycor\", \"vegsout\"]\ndf.loc[rnd1, cols] = np.nan",
"(136, 32)\n"
]
],
[
[
"Since we do not have variable table for this dataset, just create. See, items are comma separated and connected via \"=\" (equal).",
"_____no_output_____"
]
],
[
[
"df_var = pd.DataFrame({\n \"var_name\": [\"mycor\", \"height\", \"vegsout\", \"autopoll\", \"piq\", \"ros\", \"semiros\"],\n \"description\" : [\"Mycorrhizas\", \n \"Plan height\", \n \"underground vegetative propagation\",\n \"selfing pollination\",\n \"thorny\",\n \"rosette\",\n \"semiros\"\n ],\n \"items\" : [\"0=never,1=sometimes,2=always\", \n np.nan,\n \"0=never,1=present but limited,2=important\",\n \"0=never,1=rare,2=often,3=rule\",\n \"0=non-thorny,1=thorny\",\n \"0=non-rosette,1=rosette\",\n \"0=non-semiros,1=semiros\",\n ],\n})",
"_____no_output_____"
],
[
"df_var.head()",
"_____no_output_____"
]
],
[
[
"## QuestionDataContainer\nQuestion data container is a caontainer easy to be accessed by other functions. \nYou can create from scratch, or create from a varaible table.",
"_____no_output_____"
]
],
[
[
"# Manually\nqdc = sim_repo.QuestionDataContainer(\n var_name=\"mycor\", \n desc=\"Mycorrhizas\",\n title=\"Mycor\",\n missing=\"missing\", # name of missing\n order = [\"never\", \"sometimes\", \"always\"] # used for ordering indexes or columns\n) ",
"_____no_output_____"
],
[
"qdc.show() # can access information of QuestionDataContainer",
"var_name : mycor\ndesc : Mycorrhizas\ntitle : Mycor\nmissing : missing\ndic : None\norder : ['never', 'sometimes', 'always']\n"
],
[
"# From a variable table. \ncol_var_name = \"var_name\"\ncol_item = \"items\"\ncol_desc = \"description\"\nqdcs_dic = sim_repo.question_data_containers_from_dataframe(\n df_var, col_var_name, col_item, col_desc, missing=\"missing\")",
"_____no_output_____"
],
[
"print(qdcs_dic.keys())",
"dict_keys(['mycor', 'vegsout', 'autopoll', 'piq', 'ros', 'semiros'])\n"
],
[
"qdc = qdcs_dic[\"mycor\"]\nqdc.show()",
"var_name : mycor\ndesc : Mycorrhizas\ntitle : mycor_Mycorrhizas\nmissing : missing\ndic : OrderedDict([(0.0, 'never'), (1.0, 'sometimes'), (2.0, 'always'), (nan, 'missing')])\norder : odict_values(['never', 'sometimes', 'always', 'missing'])\n"
]
],
[
[
"## Visualization\nGiving two question data container to function producese a graph.\nFrom now on, data is always stratified by \"autopoll\", the variable name of qdc for \"autopoll\" is set to be \"qdc_strf\"",
"_____no_output_____"
]
],
[
[
"qdc1 = qdcs_dic[\"vegsout\"]\nqdc_strf = qdcs_dic[\"autopoll\"]\nqdc_strf.order = ['never', 'rare', 'often', 'rule'] # not to show \"missing\"",
"_____no_output_____"
],
[
"qdc_strf.show()",
"var_name : autopoll\ndesc : selfing pollination\ntitle : autopoll_selfing pollination\nmissing : missing\ndic : OrderedDict([(0.0, 'never'), (1.0, 'rare'), (2.0, 'often'), (3.0, 'rule'), (nan, 'missing')])\norder : ['never', 'rare', 'often', 'rule']\n"
],
[
"sim_repo.output_crosstab_cate_barplot(\n df,\n qdc1, \n qdc_strf)",
"_____no_output_____"
]
],
[
[
"#### Got it!!\nYou now see, two tables of cross tabulated data, and three elements of figures. \n- a simple figure with legend (this can be ugly when label names are too long)\n- a figure witout legend\n- only a legend",
"_____no_output_____"
],
[
"## With parameters available. \nSave functions are available. It saves number vertically, and figures with \"\\_only\\_label\" and \"\\_no\\_label\". \nAlso, several parameters to control outputs exist.",
"_____no_output_____"
]
],
[
[
"!mkdir test",
"mkdir: cannot create directory ‘test’: File exists\n"
],
[
"dir2save = \"./test\"",
"_____no_output_____"
],
[
"sim_repo.output_crosstab_cate_barplot(\n df,\n qdc1, \n qdc_strf,\n skip_miss=True, \n save_fig_path = dir2save + \"/vegsout_undergr.png\",\n save_num_path = dir2save + \"/number.csv\",\n decimal = 4\n)",
"_____no_output_____"
]
],
[
[
"Just using for loops enables to output multiple results.",
"_____no_output_____"
]
],
[
[
"lis = ['mycor', 'vegsout', 'piq', 'ros', 'semiros']\nfor var_name in tqdm.tqdm(lis):\n sim_repo.output_crosstab_cate_barplot(\n df,\n qdcs_dic[var_name], \n qdc_strf,\n skip_miss=False, \n save_fig_path = dir2save + f\"/{var_name}.png\",\n save_num_path = dir2save + \"number.csv\", # save the number to the same file.\n show=False,\n )",
"100%|██████████| 5/5 [00:03<00:00, 1.58it/s]\n"
]
],
[
[
"## Barplot\nSimple barplot version",
"_____no_output_____"
]
],
[
[
"sim_repo.output_crosstab_cate_barplot(\n df,qdc_strf, qdc1, percentage=False, skip_miss=False, stacked=False, transpose=True\n)",
"_____no_output_____"
]
],
[
[
"### Multiple binaries with stratification\nMultiple binaries can be summarized in a single figure. ",
"_____no_output_____"
]
],
[
[
"lis = [\"piq\", \"ros\", \"semiros\"] # variable names\nvis_var = sim_repo.VisVariables(ylim=[0,50], cmap_name=\"tab20\", cmap_type=\"matplotlib\")\nsim_repo.output_multi_binaries_with_strat(df, lis, qdcs_dic, qdc_strf, vis_var)",
"_____no_output_____"
]
],
[
[
"## Heatmap \nHeatmap of crosstabulation.",
"_____no_output_____"
]
],
[
[
"sim_repo.heatmap_crosstab_from_df(df, qdc_strf, qdc1, xlabel=qdc_strf.var_name, ylabel=qdc1.var_name ,\n save_fig_path=dir2save + f\"/{qdc_strf.var_name}_{qdc1.var_name}_cnt.png\" )\nsim_repo.heatmap_crosstab_from_df(df, qdc_strf, qdc1, xlabel=qdc_strf.var_name, ylabel=qdc1.var_name, \n normalize=\"index\")",
"_____no_output_____"
]
],
[
[
"## VisVariables\nImportant classes in py_simple_report is a VisVariables. It controls a figure setting via it values. ",
"_____no_output_____"
]
],
[
[
"vis_var = sim_repo.VisVariables(\n figsize=(5,2),\n dpi=200,\n xlabel=\"\",\n ylabel=\"Kind\",\n ylabelsize=5,\n yticksize=7,\n xticksize=7,\n)\nsim_repo.output_crosstab_cate_barplot(\n df,\n qdc1, \n qdc_strf,\n vis_var = vis_var,\n save_fig_path = dir2save + \"/vegsout_undergr_vis_var.png\",\n save_num_path = dir2save + \"number.csv\",\n)",
"_____no_output_____"
]
],
[
[
"## Engineered columns\nOf course, engineered columns can be used.",
"_____no_output_____"
]
],
[
[
"height_cate = \"height_cate\"\nser = df[\"height\"]\ndf[height_cate] = (ser\n .mask( ser <= 9, \">5\")\n .mask( ser <= 5, \"3~5\")\n .mask( ser < 3 , \"<3\")\n )\nprint(df[height_cate].value_counts())\nqdc = sim_repo.QuestionDataContainer(\n var_name=height_cate, order=[\"<3\",\"3~5\",\">5\"], missing=\"missing\", title=height_cate\n)\n\nvis_var = sim_repo.VisVariables()\nsim_repo.output_crosstab_cate_barplot(\n df, \n qdc=qdc, \n qdc_strf=qdc_strf, \n show=True, \n vis_var=vis_var,\n)",
"3~5 69\n<3 37\n>5 30\nName: height_cate, dtype: int64\n"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code"
] |
[
[
"markdown",
"markdown",
"markdown",
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown",
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
]
] |
4ae85381b58cf2938f7484d1f735d977d6b5aa48
| 42,078 |
ipynb
|
Jupyter Notebook
|
Merging_unsolved.ipynb
|
KathiaF/Module-4
|
8d1759b4eb04be262f772bf2b683b39da5ad55cf
|
[
"MIT"
] | null | null | null |
Merging_unsolved.ipynb
|
KathiaF/Module-4
|
8d1759b4eb04be262f772bf2b683b39da5ad55cf
|
[
"MIT"
] | null | null | null |
Merging_unsolved.ipynb
|
KathiaF/Module-4
|
8d1759b4eb04be262f772bf2b683b39da5ad55cf
|
[
"MIT"
] | null | null | null | 32.022831 | 128 | 0.36632 |
[
[
[
"# Dependencies\nimport pandas as pd\nimport os",
"_____no_output_____"
],
[
"# Read in the following data into a DataFrame.\nraw_data_info = {\n \"customer_id\": [112, 403, 999, 543, 123],\n \"name\": [\"John\", \"Kelly\", \"Sam\", \"April\", \"Bobbo\"],\n \"email\": [\"jman@gmail\", \"[email protected]\", \"[email protected]\", \"[email protected]\", \"[email protected]\"]}\ninfo_df = pd.DataFrame(raw_data_info)\ninfo_df.head()",
"_____no_output_____"
],
[
"# Read in the following data into a DataFrame.\nraw_data_items = {\n \"customer_id\": [403, 112, 543, 999, 654],\n \"item\": [\"soda\", \"chips\", \"TV\", \"Laptop\", \"Cooler\"],\n \"cost\": [3.00, 4.50, 600, 900, 150]}\nitems_df = pd.DataFrame(raw_data_info)\nitems_df.head()",
"_____no_output_____"
],
[
"# Merge the two dataframes using an inner join (default)\ninner_df = pd.merge(info_df, items_df, on=\"customer_id\", how=\"inner\")\ninner_df",
"_____no_output_____"
],
[
"# Merge two dataframes using an outer join\nouter_df = pd.merge(info_df, items_df, on=\"customer_id\", how=\"outer\")\nouter_df",
"_____no_output_____"
],
[
"# Merge two dataframes using a left join\nleft_df = pd.merge(info_df, items_df, on=\"customer_id\", how=\"left\")\nleft_df",
"_____no_output_____"
],
[
"# Merge two dataframes using a right join\nright_df = pd.merge(info_df, items_df, on=\"customer_id\", how=\"right\")\nright_df",
"_____no_output_____"
],
[
"# Import the csv files and create DataFrames.\n#bitcoin_csv = \"Resources/bitcoin_cash_price.csv\"\n#dash_csv = \"Resources/dash_price.csv\"\nbitcoin_csv = os.path.join(\"Resources\", \"bitcoin_cash_price.csv\")\ndash_csv = os.path.join(\"Resources\", \"dash_price.csv\")",
"_____no_output_____"
],
[
"# Merge the two DataFrames together based on the Dates they share\n",
"_____no_output_____"
],
[
"# Rename columns so that they are differentiated\n",
"_____no_output_____"
],
[
"# Alternatively you can set your suffixes using suffixes=(\"_Bitcoin\", \"_Dash\") \n# in the merge funciton when the merge occurs.\n",
"_____no_output_____"
]
]
] |
[
"code"
] |
[
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
]
] |
4ae85e948073e77ceb275ec467899e1ec8b0d506
| 3,154 |
ipynb
|
Jupyter Notebook
|
src/chat_statistics/test.ipynb
|
ShayanDarabi/Telegram_statistics
|
68f15eb8fa62a53f65dac89c7c339d911a526eb9
|
[
"MIT"
] | null | null | null |
src/chat_statistics/test.ipynb
|
ShayanDarabi/Telegram_statistics
|
68f15eb8fa62a53f65dac89c7c339d911a526eb9
|
[
"MIT"
] | null | null | null |
src/chat_statistics/test.ipynb
|
ShayanDarabi/Telegram_statistics
|
68f15eb8fa62a53f65dac89c7c339d911a526eb9
|
[
"MIT"
] | null | null | null | 26.957265 | 105 | 0.572606 |
[
[
[
"#Importing required libraries\nimport json\nfrom collections import Counter\nfrom hazm import *\nimport arabic_reshaper\nfrom bidi.algorithm import get_display\nfrom wordcloud import WordCloud",
"_____no_output_____"
],
[
"#Loading the json file\nwith open(\"../data/Pyfun/result.json\") as f:\n data = json.load(f)\n\n#Loading the persian stop words file\nstopwords = open(\"PersianStopWords.txt\").readlines()\nstopwords = list(map(str.strip,stopwords))\n\n#Noarmalizing the stop wrods\nnormalize = Normalizer()\nstopwords = list(map(normalize.normalize,stopwords))",
"_____no_output_____"
],
[
"#Extracting the messages\nmsg = data[\"messages\"]\ntext = \"\"\nfor i in range(len(msg)):\n if type(msg[i][\"text\"]) is str:\n text += msg[i][\"text\"] + \" \"\n\n#Normalizing the messages\nnormalizing = Normalizer()\nnormalized_text = normalizing.normalize(text)\n\n#Tokenizing\ntokens = word_tokenize(normalized_text)\n\n#Removing stop wrods from tokens list\npur_token = list(filter(lambda item: item not in stopwords,tokens))\n\n# Merging the pur tokens\ntokenized_text = \"\"\nfor token, freq in Counter(pur_token).most_common()[:100]:\n tokenized_text += f\"{token} \" * freq\n\n# Make text readable for a non-Arabic library like wordcloud\ntry:\n arabic_text = arabic_reshaper.reshape(tokenized_text)\n arabic_text = get_display(text)\nexcept AssertionError:\n pass ",
"_____no_output_____"
],
[
"#Make a word cloud\nwordcloud = WordCloud(font_path='fonts/Noto_Naskh_Arabic/NotoNaskhArabic-VariableFont_wght.ttf',\nbackground_color=\"white\",\nwidth=1200,\nheight=1200\n).generate(arabic_text)\n\n# Export to an image\nwordcloud.to_file(\"arabic_example.png\")",
"_____no_output_____"
]
]
] |
[
"code"
] |
[
[
"code",
"code",
"code",
"code"
]
] |
4ae874f12ee75ee8c794c4cba3bd7a991c5fe1c7
| 21,671 |
ipynb
|
Jupyter Notebook
|
Evaluation_of_score_based.ipynb
|
OmarOsman/Arabic_Text_Summarization
|
b9b4b34146b814ffe7156fc11af5bb4342d832cd
|
[
"MIT"
] | null | null | null |
Evaluation_of_score_based.ipynb
|
OmarOsman/Arabic_Text_Summarization
|
b9b4b34146b814ffe7156fc11af5bb4342d832cd
|
[
"MIT"
] | null | null | null |
Evaluation_of_score_based.ipynb
|
OmarOsman/Arabic_Text_Summarization
|
b9b4b34146b814ffe7156fc11af5bb4342d832cd
|
[
"MIT"
] | null | null | null | 37.235395 | 326 | 0.563195 |
[
[
[
"!python -m pip install --upgrade pip\n!pip install Rouge\n",
"Collecting pip\n Using cached https://files.pythonhosted.org/packages/30/db/9e38760b32e3e7f40cce46dd5fb107b8c73840df38f0046d8e6514e675a1/pip-19.2.3-py2.py3-none-any.whl\nInstalling collected packages: pip\n Found existing installation: pip 19.2.1\n Uninstalling pip-19.2.1:\n Successfully uninstalled pip-19.2.1\n Rolling back uninstall of pip\n Moving to c:\\users\\fujitsu\\appdata\\roaming\\python\\python36\\scripts\\pip.exe\n from C:\\Users\\Fujitsu\\AppData\\Local\\Temp\\pip-uninstall-8d34wkut\\pip.exe\n Moving to c:\\users\\fujitsu\\appdata\\roaming\\python\\python36\\scripts\\pip3.6.exe\n from C:\\Users\\Fujitsu\\AppData\\Local\\Temp\\pip-uninstall-8d34wkut\\pip3.6.exe\n Moving to c:\\users\\fujitsu\\appdata\\roaming\\python\\python36\\scripts\\pip3.exe\n from C:\\Users\\Fujitsu\\AppData\\Local\\Temp\\pip-uninstall-8d34wkut\\pip3.exe\n Moving to c:\\users\\fujitsu\\appdata\\roaming\\python\\python36\\site-packages\\pip-19.2.1.dist-info\\\n from c:\\users\\fujitsu\\appdata\\roaming\\python\\python36\\site-packages\\~ip-19.2.1.dist-info\n Moving to c:\\users\\fujitsu\\appdata\\roaming\\python\\python36\\site-packages\\pip\\\n from c:\\users\\fujitsu\\appdata\\roaming\\python\\python36\\site-packages\\~ip\n"
],
[
"!pip install git+https://github.com/LIAAD/yake ",
"Collecting git+https://github.com/LIAAD/yake\n Cloning https://github.com/LIAAD/yake to c:\\users\\fujitsu\\appdata\\local\\temp\\pip-req-build-jkf177rd\nCollecting tabulate (from yake==0.4.2)\n Downloading https://files.pythonhosted.org/packages/c2/fd/202954b3f0eb896c53b7b6f07390851b1fd2ca84aa95880d7ae4f434c4ac/tabulate-0.8.3.tar.gz (46kB)\nRequirement already satisfied: click>=6.0 in c:\\programdata\\anaconda3\\lib\\site-packages (from yake==0.4.2) (6.7)\nRequirement already satisfied: numpy in c:\\users\\fujitsu\\appdata\\roaming\\python\\python36\\site-packages (from yake==0.4.2) (1.17.0)\nCollecting segtok (from yake==0.4.2)\n Downloading https://files.pythonhosted.org/packages/1d/59/6ed78856ab99d2da04084b59e7da797972baa0efecb71546b16d48e49d9b/segtok-1.5.7.tar.gz\nRequirement already satisfied: networkx in c:\\programdata\\anaconda3\\lib\\site-packages (from yake==0.4.2) (2.1)\nCollecting jellyfish (from yake==0.4.2)\n Downloading https://files.pythonhosted.org/packages/3f/80/bcacc7affb47be7279d7d35225e1a932416ed051b315a7f9df20acf04cbe/jellyfish-0.7.2.tar.gz (133kB)\nCollecting regex (from segtok->yake==0.4.2)\n Downloading https://files.pythonhosted.org/packages/68/89/c8791c667486889cbd77a108b9d44bdc2082eb05cd292a51147dd47dbb34/regex-2019.08.19-cp36-none-win_amd64.whl (325kB)\nRequirement already satisfied: decorator>=4.1.0 in c:\\programdata\\anaconda3\\lib\\site-packages (from networkx->yake==0.4.2) (4.3.0)\nBuilding wheels for collected packages: yake, tabulate, segtok, jellyfish\n Building wheel for yake (setup.py): started\n Building wheel for yake (setup.py): finished with status 'done'\n Created wheel for yake: filename=yake-0.4.2-py2.py3-none-any.whl size=52016 sha256=a533f0a95c6fbb8e73abce670dfc7354d31e875485922829e594ce983670ec99\n Stored in directory: C:\\Users\\Fujitsu\\AppData\\Local\\Temp\\pip-ephem-wheel-cache-we1gtb84\\wheels\\be\\35\\27\\e4ebd54b78c1806ed8b0271ce247fcd91e2bedde35889fbc9b\n Building wheel for tabulate (setup.py): started\n Building wheel for tabulate (setup.py): finished with status 'done'\n Created wheel for tabulate: filename=tabulate-0.8.3-cp36-none-any.whl size=22566 sha256=caf6fb31372eee5ce208d69680a3730dfb915e5e57437112425002a66012b059\n Stored in directory: C:\\Users\\Fujitsu\\AppData\\Local\\pip\\Cache\\wheels\\2b\\67\\89\\414471314a2d15de625d184d8be6d38a03ae1e983dbda91e84\n Building wheel for segtok (setup.py): started\n Building wheel for segtok (setup.py): finished with status 'done'\n Created wheel for segtok: filename=segtok-1.5.7-cp36-none-any.whl size=23267 sha256=d9bea429d79059a137a9cbf1bb656fc910df2158697fd54964309b1b57cc55f9\n Stored in directory: C:\\Users\\Fujitsu\\AppData\\Local\\pip\\Cache\\wheels\\15\\ee\\a8\\6112173f1386d33eebedb3f73429cfa41a4c3084556bcee254\n Building wheel for jellyfish (setup.py): started\n Building wheel for jellyfish (setup.py): finished with status 'done'\n Created wheel for jellyfish: filename=jellyfish-0.7.2-cp36-none-any.whl size=9150 sha256=15c50f44d03c0d6f5602c18e7d164266be8f95264b3b9a1882029e7f3fe6a0ee\n Stored in directory: C:\\Users\\Fujitsu\\AppData\\Local\\pip\\Cache\\wheels\\e8\\fe\\99\\d8fa8f2ef7b82a625b0b77a84d319b0b50693659823c4effb4\nSuccessfully built yake tabulate segtok jellyfish\nInstalling collected packages: tabulate, regex, segtok, jellyfish, yake\nSuccessfully installed jellyfish-0.7.2 regex-2019.8.19 segtok-1.5.7 tabulate-0.8.3 yake-0.4.2\n"
],
[
"import numpy as np\nimport pandas as pd\nimport pdb\nimport string\nimport os\nimport re\n\nimport document\nimport preprocess\nimport evaluate\nimport build_dataset\n\nfrom nltk.tokenize import word_tokenize\nfrom nltk.stem.isri import ISRIStemmer",
"_____no_output_____"
],
[
"pr = preprocess.Preprocess()",
"_____no_output_____"
],
[
"dataset = build_dataset.Dataset()",
"_____no_output_____"
],
[
"dataset.data_dir",
"_____no_output_____"
],
[
"dataset.train_dir_name",
"_____no_output_____"
],
[
"ds = dataset.read_dataset()",
"_____no_output_____"
],
[
"ds.head()",
"_____no_output_____"
],
[
"pr.build_golden_summary(ds)",
"_____no_output_____"
],
[
"ds.head()",
"_____no_output_____"
],
[
"def get_summary(input_text):\n pr = preprocess.Preprocess()\n original_text = input_text\n preprocessed_text = pr.get_clean_article(input_text)\n sentences = pr.get_article_sentences(preprocessed_text)\n original_sentences = pr.get_article_sentences(input_text)\n paragraphs = pr.get_cleaned_article_paragraphes(preprocessed_text)\n para_sent_list = pr.get_para_sentences(paragraphs)\n tokenized_word_sentences = pr.get_tokenized_word_sentences(sentences)\n\n doc = document.Doc(\n original_text = original_text , original_sentences = original_sentences ,\n preprocessed_text = preprocessed_text.replace('ppp',\"\"),\n sentences = sentences,\n paragraphs = paragraphs ,para_sent_list = para_sent_list ,tokenized_word_sentences = tokenized_word_sentences)\n\n summary = doc.summarize(5)\n return summary\n\n ",
"_____no_output_____"
],
[
"ds['score_base_summary'] = ds['Orignal'].apply(lambda x : get_summary(x))",
"_____no_output_____"
],
[
"ds['score_base_summary'].head()",
"_____no_output_____"
],
[
"from rouge import Rouge \nrouge = Rouge()\nscores = rouge.get_scores(ds['Orignal'][0],ds['score_base_summary'][0])[0]['rouge-1']['f']\nscores",
"_____no_output_____"
],
[
"def f(x1,x2) :\n rouge = Rouge()\n return rouge.get_scores(x1,x2)[0]['rouge-1']['f']",
"_____no_output_____"
],
[
"#df['Rouge_1'] = df[Orignal].apply(lambda x : rouge.get_scores(self.original,self.summary)['rouge-1']['f'])\nds['Rouge_1'] = ds[['Orignal','score_base_summary']].apply(lambda x: f(*x), axis=1)",
"_____no_output_____"
],
[
"ds['Rouge_1'].head()",
"_____no_output_____"
],
[
"np.mean(ds['Rouge_1'])",
"_____no_output_____"
]
]
] |
[
"code"
] |
[
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
]
] |
4ae8787b273f2b7975eaefe6a750fd73777fcea7
| 18,817 |
ipynb
|
Jupyter Notebook
|
3 mu sigma using news to predict news/eda-security-master-analysis.ipynb
|
MLVPRASAD/KaggleProjects
|
379e062cf58d83ff57a456552bb956df68381fdd
|
[
"MIT"
] | 2 |
2020-01-25T08:31:14.000Z
|
2022-03-23T18:24:03.000Z
|
3 mu sigma using news to predict news/eda-security-master-analysis.ipynb
|
MLVPRASAD/KaggleProjects
|
379e062cf58d83ff57a456552bb956df68381fdd
|
[
"MIT"
] | null | null | null |
3 mu sigma using news to predict news/eda-security-master-analysis.ipynb
|
MLVPRASAD/KaggleProjects
|
379e062cf58d83ff57a456552bb956df68381fdd
|
[
"MIT"
] | null | null | null | 18,817 | 18,817 | 0.751076 |
[
[
[
"# Security Master Analysis\nby @marketneutral",
"_____no_output_____"
]
],
[
[
"import matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\n\nimport plotly.plotly as py\nfrom plotly.offline import init_notebook_mode, iplot\nimport plotly.graph_objs as go\nimport cufflinks as cf\ninit_notebook_mode(connected=False)\ncf.set_config_file(offline=True, world_readable=True, theme='polar')\n",
"_____no_output_____"
],
[
"plt.style.use('seaborn')\nplt.rcParams['figure.figsize'] = 12, 7",
"_____no_output_____"
]
],
[
[
"# Why Sec Master Analysis?\n\nBefore you do anything exciting in financial data science, you **need to understand the nature of the universe of assets you are working with** and **how the data is presented**; otherwise, garbage in, garbage out. A \"security master\" refers to reference data about the lifetime of a particular asset, tracking ticker changes, name changes, etc over time. In finance, raw information is typically uninteresting and uninformative and you need to do substantial feature engineering and create either or both of time series and cross-sectional features. However **to do that without error requires that you deeply understand the nature of the asset universe.** This is not exciting fancy data science, but absolutely essential. Kaggle competitions are usually won in the third or fourth decimal place of the score so every detail matters.\n\n### What are some questions we want to answer?\n\n**Is `assetCode` a unique and permanent identifier?**\n\nIf you group by `assetCode` and make time-series features are you assured to be referencing the same instrument? In the real world, the ticker symbol is not guaranteed to refer to the same company over time. Data providers usually provide a \"permanent ID\" so that you can keep track of this over time. This is not provided here (although in fact both Intrinio and Reuters provide this in the for sale version of the data used in this competition).\n\nThe rules state:\n\n> Each asset is identified by an assetCode (note that a single company may have multiple assetCodes). Depending on what you wish to do, you may use the assetCode, assetName, or time as a way to join the market data to news data.\n\n>assetCode(object) - a unique id of an asset\n\nSo is it unique or not and can we join time series features **always** over time on `assetCode`?\n\n**What about `assetName`? Is that unique or do names change over time?**\n\n>assetName(category) - the name that corresponds to a group of assetCodes. These may be \"Unknown\" if the corresponding assetCode does not have any rows in the news data.\n\n**What is the nature of missing data? What does it mean when data is missing?**\n\n\nLet's explore and see.\n\n\n\n",
"_____no_output_____"
]
],
[
[
"# Make environment and get data\nfrom kaggle.competitions import twosigmanews\nenv = twosigmanews.make_env()\n(market_train_df, news_train_df) = env.get_training_data()",
"_____no_output_____"
]
],
[
[
"[](http://)Let's define a valid \"has_data\" day for each asset if there is reported trading `volume` for the day.",
"_____no_output_____"
]
],
[
[
"df = market_train_df\ndf['has_data'] = df.volume.notnull().astype('int')",
"_____no_output_____"
]
],
[
[
"And let's see how long an asset is \"alive\" by the\n- the distance betwen the first reported data point and last\n- and the number of days in that distance that actually has data",
"_____no_output_____"
]
],
[
[
"lifetimes_df = df.groupby(\n by='assetCode'\n ).agg(\n {'time': [np.min, np.max],\n 'has_data': 'sum'\n }\n)\nlifetimes_df.columns = lifetimes_df.columns.droplevel()\nlifetimes_df.rename(columns={'sum': 'has_data_sum'}, inplace=True)\nlifetimes_df['days_alive'] = np.busday_count(\n lifetimes_df.amin.values.astype('datetime64[D]'),\n lifetimes_df.amax.values.astype('datetime64[D]')\n)",
"_____no_output_____"
],
[
"#plt.hist(lifetimes_df.days_alive.astype('int'), bins=25);\n#plt.title('Histogram of Asset Lifetimes (business days)');\ndata = [go.Histogram(x=lifetimes_df.days_alive.astype('int'))]\nlayout = dict(title='Histogram of Asset Lifetimes (business days)',\n xaxis=dict(title='Business Days'),\n yaxis=dict(title='Asset Count')\n )\nfig = dict(data = data, layout = layout)\niplot(fig)",
"_____no_output_____"
]
],
[
[
"This was shocking to me. There are very many assets that only exist for, say, 50 days or less. When we look at the amount of data in these spans, it is even more surprising. Let's compare the asset lifetimes with the amout of data in those lifetime. Here I calculate the difference between the number of business days in each span and the count of valid days; sorted by most \"missing data\".",
"_____no_output_____"
]
],
[
[
"lifetimes_df['alive_no_data'] = np.maximum(lifetimes_df['days_alive'] - lifetimes_df['has_data_sum'],0)\nlifetimes_df.sort_values('alive_no_data', ascending=False ).head(10)",
"_____no_output_____"
]
],
[
[
"For example, ticker VNDA.O has its first data point on 2007-02-23, and its last on 2016-12-22 for a span of 2556 business days. However in that 2556 days, there are only 115 days that actually have data!",
"_____no_output_____"
]
],
[
[
"df.set_index('time').query('assetCode==\"VNDA.O\"').returnsOpenNextMktres10.iplot(kind='scatter',mode='markers', title='VNDA.O');",
"_____no_output_____"
]
],
[
[
"**It's not the case that VNDA.O didn't exist during those times; we just don't have data.**\nLooking across the entire dataset, however, things look a little better.",
"_____no_output_____"
]
],
[
[
"#plt.hist(lifetimes_df['alive_no_data'], bins=25);\n#plt.ylabel('Count of Assets');\n#plt.xlabel('Count of missing days');\n#plt.title('Missing Days in Asset Lifetime Spans');\n\ndata = [go.Histogram(x=lifetimes_df['alive_no_data'])]\nlayout = dict(title='Missing Days in Asset Lifetime Spans',\n xaxis=dict(title='Count of missing days'),\n yaxis=dict(title='Asset Count')\n )\nfig = dict(data = data, layout = layout)\niplot(fig)",
"_____no_output_____"
]
],
[
[
"Now let's look at whether tickers change over time. **Is either `assetCode` or `assetName` unique?**",
"_____no_output_____"
]
],
[
[
"df.groupby('assetName')['assetCode'].nunique().sort_values(ascending=False).head(20)",
"_____no_output_____"
]
],
[
[
"**So there are a number of companies that have more than 1 `assetCode` over their lifetime. ** For example, 'T-Mobile US Inc':",
"_____no_output_____"
]
],
[
[
"df[df.assetName=='T-Mobile US Inc'].assetCode.unique()",
"_____no_output_____"
]
],
[
[
"And we can trace the lifetime of this company over multiple `assetCodes`. ",
"_____no_output_____"
]
],
[
[
"lifetimes_df.loc[['PCS.N', 'TMUS.N', 'TMUS.O']]",
"_____no_output_____"
]
],
[
[
"The company started its life as PCS.N, was merged with TMUS.N (NYSE-listed) and then became Nasdaq-listed.\n\nIn this case, if you want to make long-horizon time-based features, you need to join on `assetName`.\n",
"_____no_output_____"
]
],
[
[
"(1+df[df.assetName=='T-Mobile US Inc'].set_index('time').returnsClosePrevRaw1).cumprod().plot(title='Time joined cumulative return');",
"_____no_output_____"
]
],
[
[
"**One gotcha I see is that don't think that `assetName` is correct \"point-in-time\" .** This is hard to verify without proper commercial security master data, but:\n\n- I don't think that the actual name of this company in 2007 was **T-Mobile** it was something like **Metro PCS**. T-Mobile acquired MetroPCS on May 1, 2013 (google search \"when did t-mobile acquire MetroPCS\"). You can see this data matches with the lifetimes dataframe subset above.\n- Therefore, the `assetName` must **not be point-in-time**, rather it looks like `assetName` is the name of the company when this dataset was created for Kaggle recently, and then backfilled.\n- However, it would be very odd for the Reuters News Data to **not be point-in-time.** Let's see if we can find any news on this company back in 2007.\n",
"_____no_output_____"
]
],
[
[
"news_train_df[news_train_df.assetName=='T-Mobile US Inc'].T",
"_____no_output_____"
]
],
[
[
"What's fascinating here is that you can see in the article headlines, that the company is named correctly, point-in-time, as \"MetroPCS Communications Inc\", however the `assetName` is listed as \"T-Mobile US Inc.\". So the organizers have also backfilled today's `assetName` into the news history.\n\nThis implies that **you cannot use NLP on the `headline` field in any way to join or infer asset clustering.** However, `assetName` continues to look like a consistent choice over time for a perm ID.\n\nWhat about the other way around? Is `assetName` a unique identifier? In the real world, companies change their names all the time (a hilarious example of this is [here](https://www.businessinsider.com/long-blockchain-company-iced-tea-sec-stock-2018-8)). What about in this dataset?",
"_____no_output_____"
]
],
[
[
"df.groupby('assetCode')['assetName'].nunique().sort_values(ascending=False).head(20)",
"_____no_output_____"
]
],
[
[
"**YES!** We can conclude that since no `assetCode` has ever been linked to more than `assetName`, that `assetName` could be a good choice for a permanent identifier. It is possible that a company changed its ticker *and* it's name on the same day and therefore we would not be able to catch this, but let's assume this doesn't happen.\n\nHowever, here is **a major gotcha**: dual class stock. Though not very common, some companies issue more than one class of stock at the same time. Likely the most well know is Google (called Alphabet Inc for its full life in this dataset); another is Comcast Corp.",
"_____no_output_____"
]
],
[
[
"df[df.assetName=='Alphabet Inc'].assetCode.unique()\n",
"_____no_output_____"
],
[
"lifetimes_df.loc[['GOOG.O', 'GOOGL.O']]",
"_____no_output_____"
]
],
[
[
"Because of this overlapping data, there is no way to be sure about how to link assets over time. You are stuck with one of two bad choices: link on `assetCode` and miss ticker changes and corporate actions, or link on `assetName` but get bad output in the case of dual-class shares.",
"_____no_output_____"
],
[
"## Making time-series features when rows dates are missing\nLet's say you want to make rolling window time-series feature, like a moving average on volume. As we saw above, it is not possible to do this 100% without error because we don't know the permanent identifier; we must make a tradeoff between the error of using `assetCode` or `assetName`. Given that `assetCode` will never overlap on time (and therefore allows using time as an index), I choose that here. \n\nTo make a rolling feature, it was my initial inclination to try something like:",
"_____no_output_____"
]
],
[
[
"df = market_train_df.reset_index().sort_values(['assetCode', 'time']).set_index(['assetCode','time'])\ngrp = df.groupby('assetCode')\ndf['volume_avg20'] = (\n grp.apply(lambda x: x.volume.rolling(20).mean())\n .reset_index(0, drop=True)\n)",
"_____no_output_____"
]
],
[
[
"Let's see what we got:",
"_____no_output_____"
]
],
[
[
"(df.reset_index().set_index('time')\n .query('assetCode==\"VNDA.O\"').loc['2007-03-15':'2009-06', ['volume', 'volume_avg20']]\n)",
"_____no_output_____"
]
],
[
[
"Look at the time index...the result makes no sense... the rolling average of 20 days spans **the missing period of >2007-03-20 and <2009-06-26 which is not right in the context of financial time series.** Instead we need to account for business days rolling. This will not be 100% accurate becuase we don't know exchange holidays, but it should be very close. **To do this correctly, you need to roll on business days**. However, pandas doesn't like to roll on business days (freq tag 'B') and will throw: `ValueError: <20 * BusinessDays> is a non-fixed frequency`. The next best thing is to roll on calendar days (freq tag 'D').\n\nIt took me awhile to get this to work as pandas complains a lot on multi-idexes (this [issue](https://github.com/pandas-dev/pandas/issues/15584) helped a lot).",
"_____no_output_____"
]
],
[
[
"df = df.reset_index().sort_values(['assetCode', 'time']).reset_index(drop=True)\ndf['volume_avg20d'] = (df\n .groupby('assetCode')\n .rolling('20D', on='time') # Note the 'D' and on='time'\n .volume\n .mean()\n .reset_index(drop=True)\n)",
"_____no_output_____"
],
[
"df.reset_index().set_index('time').query('assetCode==\"VNDA.O\"').loc['2007-03-15':'2009-06', ['volume', 'volume_avg20', 'volume_avg20d']]",
"_____no_output_____"
]
],
[
[
"This is much better! Note that the default `min_periods` is 1 when you use a freq tag (i.e., '20D') to roll on. So even though we asked for a 20-day window, as long as there is at least 1 data point, we will get a windowed average. The result makes sense: if you look at 2009-06-26, you will see that the rolling average does **not** include any information from the year 2007, rather it is time-aware and since there are 19+ missing rows before, give the 1-day windowed average.\n\n# Takeaways\n- Security master issues are critical.\n- You have to be very careful with time-based features because of missing data. Long-horizon features like, say, 12m momentum, may not produce sufficient asset coverage to be useful becuase so much data is missing.\n- The fact that an asset is missing data *is not informative in itself*; it is an artifact of the data collection and delivery process. For example, you cannot calcuate a true asset \"age\" (e.g., hypothesizing that days since IPO is a valid feature) and use that as a factor. This is unfortunate becuase you may hypothesize that news impact is a bigger driver of return variance during the early part of an asset's life due to lack of analyst coverage, lack of participation by quants, etc.\n- `assetCode` is not consistent across time; the same economic entity can, and in many cases does, have a different `assetCode`; `assetCode` is not a permanent identifier.\n- `assetName` while consistent across time, can refer to more than once stock *at the same time* and therefore cannot be used to make time series features; `assetName` is not a unique permanent identifier.\n- Missing time series data does not show up as `NaN` on the trading calendar; rather the rows are just missing. As such, to make time series features, you have to be careful with pandas rolling calculations and roll on calendar days, not naively on the count of rows.\n\n",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown"
] |
[
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
]
] |
4ae878a0481ef8db07d78e04bfe064ffa4ded2bb
| 249,588 |
ipynb
|
Jupyter Notebook
|
ETLv2/ETL_project/california_etl.ipynb
|
kevinmholbrook/ETL_Project
|
a3fd3e9fc4eb6b74243f8930581fff4210fc9562
|
[
"Info-ZIP"
] | null | null | null |
ETLv2/ETL_project/california_etl.ipynb
|
kevinmholbrook/ETL_Project
|
a3fd3e9fc4eb6b74243f8930581fff4210fc9562
|
[
"Info-ZIP"
] | null | null | null |
ETLv2/ETL_project/california_etl.ipynb
|
kevinmholbrook/ETL_Project
|
a3fd3e9fc4eb6b74243f8930581fff4210fc9562
|
[
"Info-ZIP"
] | null | null | null | 39.398264 | 203 | 0.402972 |
[
[
[
"#Import Dependencies\nimport re\nimport numpy as np\nimport pandas as pd\nfrom sqlalchemy import create_engine",
"_____no_output_____"
]
],
[
[
"################################################################################################################################################\n### SECTION 1\n# READ in the california.csv file\n################################################################################################################################################",
"_____no_output_____"
]
],
[
[
"##Source = https://aca5.accela.com/bcc/customization/bcc/cap/licenseSearch.aspx",
"_____no_output_____"
],
[
"#California_Cannabis_Distributer_Data\ncalifornia_data = \"../ETL_project/california_data.csv\"\ncalifornia_data_df = pd.read_csv(california_data, encoding=\"utf-8\")\ncalifornia_data_df.head()",
"_____no_output_____"
],
[
"#Individual column names in california_data_df\nlist(california_data_df)",
"_____no_output_____"
]
],
[
[
"################################################################################################################################################\n### SECTION 2\n# Clean the data in the california.csv file\n################################################################################################################################################",
"_____no_output_____"
],
[
"################################################################################################################################################\n## SECTION 2.1\n#Clean the \"Business Contact Information\" column \n##Objective: Clean the data in california_data_df[\"Business Contact Information\"]\n################################################################################################################################################",
"_____no_output_____"
]
],
[
[
"#Note that there are multiple delimiters: a colon (\":\"), a dash (\"-\"), a comma (\",\"), and a blank space (\" \")\ncalifornia_data_df[\"Business Contact Information\"].head()",
"_____no_output_____"
],
[
"##Extract and separate \"Business Name\" from the california_data_df[\"Business Contact Information\"] column\n\n# dropping null value columns to avoid errors \ncalifornia_data_df.dropna(inplace = True) \n \n# new dataframe with split value columns \nnew = california_data_df[\"Business Contact Information\"].str.split(\":\", n = 1, expand = True) \n \n# making separate \"Business Name\" column from new data frame \ncalifornia_data_df[\"Business Name\"]= new[0] \n \n# making separate \"Contact Information\" column from new data frame \ncalifornia_data_df[\"Contact Information\"]= new[1] \n\n# Dropping old \"Business Contact Information\" column\ncalifornia_data_df.drop(columns =[\"Business Contact Information\"], inplace = True) \n\n#california_data_df display with the new columns\n## Note: california_data_df[\"Business Name\"] and california_data_df[\"Contact Information\"] BOTH need cleaning \ncalifornia_data_df.head()",
"_____no_output_____"
],
[
"##Extract the occasional extraneous \"Business Name\" info from the california_data_df[\"Contact Information\"] column \n\n# dropping null value columns to avoid errors \ncalifornia_data_df.dropna(inplace = True) \n \n# new data frame with split value columns \nnew = california_data_df[\"Contact Information\"].str.split(\"Email-\", n = 1, expand = True) \n \n# making separate \"Extra Business Name Information\" column from new data frame that contains the occasional extraneous \"Business Name\" info.\ncalifornia_data_df[\"Extra Business Name Information\"]= new[0] \n \n# making separate \"Contact Information2\"column from new data frame \ncalifornia_data_df[\"Contact Information2\"]= new[1] \n\n# Dropping old \"Contact Information\" column\ncalifornia_data_df.drop(columns =[\"Contact Information\"], inplace = True) \n\n#california_data_df display with the new columns\n## Note: we must now combine california_data_df[\"Business Name\"] with california_data_df[\"Extra Business Name Information\"]\n## Note: california_data_df[\"Contact Information2\"] still needs cleaning\ncalifornia_data_df.head()",
"_____no_output_____"
],
[
"#Combine california_data_df[\"Business Name\"] with california_data_df[\"Extra Business Name Information\"] and clean\ncalifornia_data_df['Company Name'] = california_data_df['Business Name'].str.cat(california_data_df['Extra Business Name Information'],sep=\" \")\ncalifornia_data_df[\"Company Name\"] = california_data_df[\"Company Name\"].str.replace(':,?' , '')\n\n# Dropping california_data_df[\"Business Name]\" and california_data_df[\"Extra Business Name Information\"] columns\ncalifornia_data_df.drop(columns =[\"Business Name\"], inplace = True)\ncalifornia_data_df.drop(columns =[\"Extra Business Name Information\"], inplace = True)\n\n#california_data_df display with the new column (california_data_df[\"Company Name\"])\n##Note: california_data_df[\"Contact Information2\"] still needs cleaning\ncalifornia_data_df.head()\n",
"_____no_output_____"
],
[
"##Extract and separate \"Email\" from the california_data_df[\"Contact Information2\"] column\n\n# dropping null value columns to avoid errors \ncalifornia_data_df.dropna(inplace = True) \n \n# new data frame with split value columns \nnew = california_data_df[\"Contact Information2\"].str.split(\":\", n = 1, expand = True) \n \n# making separate \"Business Name\" column from new data frame \ncalifornia_data_df[\"Email\"]= new[0] \n \n# making separate \"Contact Information\" column from new data frame \ncalifornia_data_df[\"Contact Information3\"]= new[1] \n\n# Dropping california_data_df[\"Contact Information2\"] column\ncalifornia_data_df.drop(columns =[\"Contact Information2\"], inplace = True) \n\n#california_data_df display with the new columns\n##Note: california_data_df[\"Contact Information3\"] still needs cleaning\ncalifornia_data_df.head()",
"_____no_output_____"
],
[
"##Extract and separate \"Phone Number\" from the california_data_df[\"Contact Information3\"] column.\n\n# dropping null value columns to avoid errors \ncalifornia_data_df.dropna(inplace = True) \n \n# new data frame with split value columns \nnew = california_data_df[\"Contact Information3\"].str.split(\":\", n = 1, expand = True) \n \n# making separate \"Business Name\" column from new data frame \ncalifornia_data_df[\"Phone Number\"]= new[0] \n \n# making separate \"Contact Information\" column from new data frame \ncalifornia_data_df[\"Contact Information4\"]= new[1] \n\n# Dropping california_data_df[\"Contact Information\"] column\ncalifornia_data_df.drop(columns =[\"Contact Information3\"], inplace = True) \n\n#california_data_df display with the new columns\n##Note: california_data_df[\"Phone Number\"] needs to contain only the digits of the phone number\n##Note: california_data_df[\"Contact Information4\"] still needs cleaning\ncalifornia_data_df.head()",
"_____no_output_____"
],
[
"#Clean up california_data_df[\"Phone Number\"] so that it shows only the digits of phone number\n#(ie. Remove the string (\"Phone-\") from the column\n\n# dropping null value columns to avoid errors \ncalifornia_data_df.dropna(inplace = True) \n \n# new data frame with split value columns \nnew = california_data_df[\"Phone Number\"].str.split(\"-\", n = 1, expand = True) \n \n# making separate \"Phone str\" column from new data frame to extract the unwanted string\ncalifornia_data_df[\"Phone str\"]= new[0] \n \n# making separate \"Telephone Number\" column from new data frame \ncalifornia_data_df[\"Telephone Number\"]= new[1] \n\n# Dropping california_data_df[\"Phone str\"] and california_data_df[\"Phone Number\"] columns\ncalifornia_data_df.drop(columns =[\"Phone Number\"], inplace = True)\ncalifornia_data_df.drop(columns =[\"Phone str\"], inplace = True) \n\n#california_data_df display with the new columns\n##Note: california_data_df[\"Contact Information4\"] still needs cleaning\ncalifornia_data_df.head()",
"_____no_output_____"
],
[
"#Clean up the california_data_df[\"Contact Information4\"] column so that it shows only the actual website address\n#(ie. Remove the string (\"Website-\") from the column\n\n# dropping null value columns to avoid errors \ncalifornia_data_df.dropna(inplace = True) \n \n# new data frame with split value columns \nnew = california_data_df[\"Contact Information4\"].str.split(\"-\", n = 1, expand = True) \n \n# making separate \"Website str\" column from new data frame to extract the unwanted string\ncalifornia_data_df[\"Website str\"]= new[0] \n \n# making separate \"Website Address\" column from new data frame \ncalifornia_data_df[\"Website Address\"]= new[1] \n\n# Dropping california_data_df[\"Website str\"] and california_data_df[\"Contact Information4\"] columns\ncalifornia_data_df.drop(columns =[\"Contact Information4\"], inplace = True)\ncalifornia_data_df.drop(columns =[\"Website str\"], inplace = True) \n\n#california_data_df display with the new columns\ncalifornia_data_df.head()\n\n##SECTION 2.1 Completed\n##################################################################################################################",
"_____no_output_____"
]
],
[
[
"################################################################################################################################################\n## SECTION 2.2\n#Clean the \"Premise Address\" column \n##Objective: Clean the data in california_data_df[\"Premise Address\"]\n################################################################################################################################################",
"_____no_output_____"
]
],
[
[
"#Business Contact Information column cleanup:\ncalifornia_data_df[\"Premise Address\"].head()\n#Note that there are multiple delimiters: a colon (\":\"), a comma (\",\"), and a blank space (\" \")\n#Note that the zip codes have either 5 or 9 digits",
"_____no_output_____"
],
[
"##Extract and separate \"County\" from the california_data_df[\"Premise Address\"] column\n\n# dropping null value columns to avoid errors \ncalifornia_data_df.dropna(inplace = True) \n \n# new data frame with split value columns \nnew = california_data_df[\"Premise Address\"].str.split(\":\", n = 1, expand = True) \n \n# making separate \"Business Name\" column from new data frame \ncalifornia_data_df[\"Premise Address2\"]= new[0] \n \n# making separate \"Contact Information\" column from new data frame \ncalifornia_data_df[\"County\"]= new[1] \n\n# Dropping california_data_df[\"Premise Address\"] column\ncalifornia_data_df.drop(columns =[\"Premise Address\"], inplace = True) \n\n#california_data_df display with the new columns\n##Note: california_data_df[\"County\"] still needs cleaning\n##Note: california_data_df[\"Premise Address2\"] still needs cleaning\ncalifornia_data_df.head()",
"_____no_output_____"
],
[
"#Clean up california_data_df[\"County\"] -- Problem: all letters in the column are capitalized, and we need to fix this\n\n#Adjust the case structure so that only the first letter in \"County\" is capitalized while all others are lower case\ncalifornia_data_df[\"County\"] = california_data_df[\"County\"].str.title()\n\n#california_data_df display with the new columns\n##Note: california_data_df[\"Premise Address3\"] still needs cleaning\ncalifornia_data_df.head()",
"_____no_output_____"
],
[
"#Clean up california_data_df[\"Premise Address2\"] so that the superfluous string \"County\" can be excised\n#(ie. Remove the string (\"County\") now that the actual county has been extracted into its own column\n\n#Drop the 'County' string from the \"Premise Address2\" columnn\ncalifornia_data_df[\"Premise Address3\"] = california_data_df[\"Premise Address2\"].str.replace('County,?' , '')\n\n# Dropping old \"Premise Address2\" column\ncalifornia_data_df.drop(columns =[\"Premise Address2\"], inplace = True)\n\n#california_data_df display with the new columns\n##Note: california_data_df[\"Premise Address3\"] still needs cleaning\ncalifornia_data_df.head()",
"_____no_output_____"
],
[
"##Extract and separate \"Address\" from the \"Premise Address3\" column.\n\n# dropping null value columns to avoid errors \ncalifornia_data_df.dropna(inplace = True) \n \n# new data frame with split value columns \nnew = california_data_df[\"Premise Address3\"].str.split(\",\", n = 1, expand = True) \n \n# making separate \"Address\" column from new data frame \ncalifornia_data_df[\"Address_misc\"]= new[0] \n \n# making separate \"State/Zip Code\" column from new data frame \ncalifornia_data_df[\"State/Zip Code\"]= new[1] \n\n# Dropping old \"Premise Address3\" column\ncalifornia_data_df.drop(columns =[\"Premise Address3\"], inplace = True) \n\n#california_data_df display with the new columns\n## Note: california_data_df[\"Address misc\"] and california_data_df[\"StateSip Code\"] BOTH still need cleaning \ncalifornia_data_df.head()",
"_____no_output_____"
],
[
"#Drop the 'CA' string from the State/Zip Code column, since the State information is superfluous\ncalifornia_data_df[\"Zip Code\"] = california_data_df[\"State/Zip Code\"].str.replace('CA,?' ,'')\n\n# Dropping old \"State/Zip Code\" column\ncalifornia_data_df.drop(columns =[\"State/Zip Code\"], inplace = True)\n\n#california_data_df display with the new columns\n## Note: california_data_df[\"Address_misc\"] and california_data_df[\"Zip Code\"] BOTH still need cleaning \ncalifornia_data_df.head()",
"_____no_output_____"
],
[
"#Note: Some of the data in the \"Zip Code\" column has 9 digits, wihle others have 5 digits\ncalifornia_data_df[\"Zip Code\"].head()\n#Need to clean up the \"Zip Code\" data so that the zip code is the standard 5-digit code",
"_____no_output_____"
],
[
"#Clean up \"Zip Code\" column so that the zip code is the standard 5-digit code, and not the 9-digit code that appers sporadically above\ncalifornia_data_df['Zip Code'] = california_data_df['Zip Code'].str[:7]\ncalifornia_data_df.head()\n",
"_____no_output_____"
],
[
"#Choose the most important columns for the next part of the ETL Project\ncalifornia_data_df = california_data_df[[\"Company Name\",\"Website Address\",\"County\",\"Zip Code\"]]\n#Rename column names so that they are SQL feiendly\ncalifornia_data_df.columns=[\"Company_Name\",\"Website_Address\",\"County\",\"Zip_Code\"]\ncalifornia_data_df.head()\ncalifornia_data_df.reset_index(drop = True)",
"_____no_output_____"
],
[
"#lets load the Latitude and Longitude coordinates from the csv we created from the API\nlat_lng= pd.read_csv(\"../ETL_project/lat_lng.csv\")\nlat_lng.columns=[\"A\",\"Latitude\", \"Longitude\"]\nlat_lng.reset_index(drop=True)\nlat_lng = lat_lng.reset_index(drop=True)\n\nlat_lng.head()",
"_____no_output_____"
],
[
"#Merge the Latitude/Longitude data in with california_data_df\ncalifornia_data_df = pd.merge(california_data_df, lat_lng, left_index=True, right_index=True)\n#california_data_df.drop([\"A\"], axis=1, inplace=True)\ncalifornia_data_df.head()",
"_____no_output_____"
]
],
[
[
"##SECTION 2.2 Completed\n##################################################################################################################",
"_____no_output_____"
],
[
"################################################################################################################################################\n### SECTION 3\n# READ in the california.census.csv file\n################################################################################################################################################",
"_____no_output_____"
]
],
[
[
"## Source = https://www.irs.gov/statistics/soi-tax-stats-individual-income-tax-statistics-2016-zip-code-data-soi",
"_____no_output_____"
],
[
"#California_Census_Data\ncensus_data = \"../ETL_project/california_2016_census_data.csv\"\ncensus_data_df = pd.read_csv(census_data, encoding=\"utf-8\")\ncensus_data_df.head(12)\n",
"/Users/holbrook/anaconda3/lib/python3.7/site-packages/IPython/core/interactiveshell.py:3049: DtypeWarning: Columns (0) have mixed types. Specify dtype option on import or set low_memory=False.\n interactivity=interactivity, compiler=compiler, result=result)\n"
],
[
"#Find the pertinent data and their columns and rename the columns\ncensus_data_df.rename(columns={\"CALIFORNIA\":\"Zip Code\"}, inplace=True)\ncensus_data_df.rename(columns={\"Unnamed: 1\":\"Income Bracket\"}, inplace=True)\ncensus_data_df.rename(columns={\"Unnamed: 65\":\"Number of Tax Returns\"}, inplace=True)\ncensus_data_df.rename(columns={\"Unnamed: 66\":\"Total Income\"}, inplace=True)\n\nlist(census_data_df)",
"_____no_output_____"
],
[
"#Choose the most pertinent columns for the census part of the ETL Project\ncensus_data_df = census_data_df[[\"Zip Code\",\"Income Bracket\",\"Number of Tax Returns\",\"Total Income\"]]\ncensus_data_df.head(19)",
"_____no_output_____"
]
],
[
[
"################################################################################################################################################\n####This CSV file opened with a warning message that some columns had mixed types\n####We tried anyways to work it through pandas but hit a roadblock\n##At this point, it looks like we need to return to the Excel file and restructure that file into something more pandas-friendly situation\n################################################################################################################################################",
"_____no_output_____"
]
],
[
[
"#Read in new California_Census_Data\ncensus_data2 = \"../ETL_project/census_clean.csv\"\ncensus_data2_df = pd.read_csv(census_data2)\n#Rename the column names\ncensus_data2_df.columns = [\"Zip Code\",\"Total Income\",\"Number of Tax Returns\"]\ncensus_data2_df.head()",
"_____no_output_____"
],
[
"#Aggregate the group data per Zip Code via groupby function\naggregate_census_data_df = (census_data2_df.groupby('Zip Code').sum()).reset_index()\naggregate_census_data_df.head()",
"_____no_output_____"
],
[
"#Create a new \"Zip Code Income\" column\naggregate_census_data_df[\"Zip Code Income\"] = aggregate_census_data_df[\"Total Income\"]/aggregate_census_data_df[\"Number of Tax Returns\"]\naggregate_census_data_df[\"Zip Code Income\"] = aggregate_census_data_df[\"Zip Code Income\"].round()\naggregate_census_data_df.head()",
"_____no_output_____"
],
[
"#Reformat the \"Zip Code Income\" column so that it includes comma delimiters per thousand\n#This is aesthetically more pleasing on the final product\naggregate_census_data_df[\"Zip Code Income\"] = aggregate_census_data_df[\"Zip Code Income\"].apply(\"{:,}\".format)\naggregate_census_data_df.head()",
"_____no_output_____"
],
[
"##Clean the \"Zip Code Income\" column so that the \".0\" end of the string is eliminated\n# dropping null value columns to avoid errors \naggregate_census_data_df.dropna(inplace = True) \n \n# new data frame with split value columns \nnew = aggregate_census_data_df[\"Zip Code Income\"].str.split(\".\", n = 1, expand = True) \n \n# making separate \"Business Name\" column from new data frame \naggregate_census_data_df[\"Per Capita Income\"]= new[0] \n \n# making separate \"misc\" column from new data frame \naggregate_census_data_df[\"misc\"]=new[1]\n\n# Dropping aggregate_census_data[\"misc\"] column\n# Dropping aggregate_census_data[\"Zip Code Income\"] column\n# Dropping aggregate_census_data[\"Total Income\"] column\n# Dropping aggregate_census_data[\"Number of Tax Returns\"] column\naggregate_census_data_df.drop(columns =[\"misc\"], inplace = True) \naggregate_census_data_df.drop(columns =[\"Zip Code Income\"], inplace = True) \naggregate_census_data_df.drop(columns =[\"Total Income\"], inplace = True) \naggregate_census_data_df.drop(columns =[\"Number of Tax Returns\"], inplace = True) ",
"_____no_output_____"
],
[
"#Rename columns so that they are SQL friendly\naggregate_census_data_df.columns=[\"Zip_Code\",\"Per_Capita_Income\"]\n#display with the new columns\naggregate_census_data_df.head()",
"_____no_output_____"
],
[
"list(aggregate_census_data_df)",
"_____no_output_____"
]
],
[
[
"################################################################################################################################################\n##SECTION 3 Completed\n##Now we have 2 clean dataframes from 2 distinct sources:\n##california_data_df contains data pertaining to California Cannabis Licenses\n##aggregate_census_data_df contains data pertaining to the California Census \n##These 2 dataframes share \"Zip Code\" as a commonality that will be joined in the folowing sections of this project\n################################################################################################################################################",
"_____no_output_____"
],
[
"################################################################################################################################################\n### SECTION 4\n# Create SQL Database\n################################################################################################################################################",
"_____no_output_____"
],
[
"################################################################################################################################################\n## SECTION 4.1\n#Switch over to MySQL Workbench\n##Objective: Create 2 databases in MySQL named california_data and census_data\n################################################################################################################################################",
"_____no_output_____"
]
],
[
[
"#CREATE DATABASE california_data_db;\n\n# USE california_data_db;\n\n# CREATE TABLE california_data(\n# \tid INT PRIMARY KEY,\n# Company_Name TEXT,\n# Website_Address TEXT,\n# COUNTY TEXT,\n# Zip_Code TEXT\n# A INT\n# Latitude TEXT\n# Longitude TEXT\n# );\n\n# CREATE TABLE census_data(\n# \tid INT PRIMARY KEY,\n# Zip_Code TEXT,\n# Per_Capita_Income TEXT\n# );\n",
"_____no_output_____"
]
],
[
[
"################################################################################################################################################\n## SECTION 4.2\n#Now that the TABLES have been created in MySQL, continue to work in pandas\n##Objective: Create a connection and combine the 2 databases\n################################################################################################################################################",
"_____no_output_____"
]
],
[
[
"connection_string = \"sqlite:///CALIFORNIA_ETL_data_db.sqlite\"\nengine = create_engine(connection_string)",
"_____no_output_____"
],
[
"engine.table_names()",
"_____no_output_____"
],
[
"engine.execute(\"CREATE TABLE california_data(id INT PRIMARY KEY, Company_Name TEXT, Website_Address TEXT, County TEXT, Zip_Code INT, A INT, Latitude INT, Longitude INT);\")\n",
"_____no_output_____"
],
[
"engine.execute(\"CREATE TABLE census_data(id INT PRIMARY KEY, Zip_Code TEXT, Per_Capita_Income TEXT);\")\n",
"_____no_output_____"
],
[
"california_data_df.to_sql(name=\"california_data\", con=engine, if_exists=\"append\", index=False)\n",
"_____no_output_____"
],
[
"california_data_df[\"Zip_Code\"]=california_data_df[\"Zip_Code\"].astype(\"int64\")\ncalifornia_data_df.dtypes",
"_____no_output_____"
],
[
"pd.read_sql_query(\"SELECT * FROM california_data\",con=engine).head()\n",
"_____no_output_____"
],
[
"aggregate_census_data_df.to_sql(name = \"census_data\", con=engine, if_exists=\"append\", index=False)\n",
"_____no_output_____"
],
[
"aggregate_census_data_df.dtypes",
"_____no_output_____"
],
[
"pd.read_sql_query(\"SELECT * FROM census_data\",con=engine).head()\n",
"_____no_output_____"
],
[
"## Why are we getting \"none\" for both id columns ??? --- solved",
"_____no_output_____"
],
[
"query = \"\"\"\nSELECT\n*\nFROM california_data A\nINNER JOIN census_data B on A.Zip_Code = B.Zip_Code GROUP BY A.Zip_Code\n\"\"\"\npd.read_sql_query(query, con=engine).head()",
"_____no_output_____"
],
[
"## question: what is best way to make this join work, since the \"id\" columna are not working as planned ??\n",
"_____no_output_____"
],
[
"############################################################\n",
"_____no_output_____"
],
[
"california_data_df.head()",
"_____no_output_____"
],
[
"aggregate_census_data_df.head()",
"_____no_output_____"
],
[
"merged_data_df = pd.merge(california_data_df,aggregate_census_data_df,on=\"Zip_Code\")\n",
"_____no_output_____"
],
[
"merged_data_df.head()\n",
"_____no_output_____"
],
[
"\nmerged_data_df.head()\n",
"_____no_output_____"
],
[
"\n\n",
"_____no_output_____"
]
]
] |
[
"code",
"raw",
"code",
"raw",
"code",
"raw",
"code",
"raw",
"code",
"raw",
"code",
"raw",
"code",
"raw",
"code"
] |
[
[
"code"
],
[
"raw"
],
[
"code",
"code",
"code"
],
[
"raw",
"raw"
],
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"raw"
],
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"raw",
"raw"
],
[
"code",
"code",
"code",
"code"
],
[
"raw"
],
[
"code",
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"raw",
"raw",
"raw"
],
[
"code"
],
[
"raw"
],
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
]
] |
4ae87c1eef2bdcc93d1f0a3f7999dd92a1d1bb5c
| 882,264 |
ipynb
|
Jupyter Notebook
|
05_support_vector_machines.ipynb
|
AndyShaw1/handson-ml
|
907399680c1f06d906c46ad16eacea1bf9892835
|
[
"Apache-2.0"
] | 1 |
2018-12-21T08:18:00.000Z
|
2018-12-21T08:18:00.000Z
|
05_support_vector_machines.ipynb
|
AndyShaw1/handson-ml
|
907399680c1f06d906c46ad16eacea1bf9892835
|
[
"Apache-2.0"
] | 6 |
2021-06-08T23:04:44.000Z
|
2022-03-12T00:54:17.000Z
|
05_support_vector_machines.ipynb
|
AndyShaw1/handson-ml
|
907399680c1f06d906c46ad16eacea1bf9892835
|
[
"Apache-2.0"
] | null | null | null | 297.358948 | 169,208 | 0.922858 |
[
[
[
"**Chapter 5 – Support Vector Machines**\n\n_This notebook contains all the sample code and solutions to the exercises in chapter 5._",
"_____no_output_____"
],
[
"# Setup",
"_____no_output_____"
],
[
"First, let's make sure this notebook works well in both python 2 and 3, import a few common modules, ensure MatplotLib plots figures inline and prepare a function to save the figures:",
"_____no_output_____"
]
],
[
[
"# To support both python 2 and python 3\nfrom __future__ import division, print_function, unicode_literals\n\n# Common imports\nimport numpy as np\nimport os\n\n# to make this notebook's output stable across runs\nnp.random.seed(42)\n\n# To plot pretty figures\n%matplotlib inline\nimport matplotlib\nimport matplotlib.pyplot as plt\nplt.rcParams['axes.labelsize'] = 14\nplt.rcParams['xtick.labelsize'] = 12\nplt.rcParams['ytick.labelsize'] = 12\n\n# Where to save the figures\nPROJECT_ROOT_DIR = \".\"\nCHAPTER_ID = \"svm\"\n\ndef save_fig(fig_id, tight_layout=True):\n path = os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID, fig_id + \".png\")\n print(\"Saving figure\", fig_id)\n if tight_layout:\n plt.tight_layout()\n plt.savefig(path, format='png', dpi=300)",
"_____no_output_____"
]
],
[
[
"# Large margin classification",
"_____no_output_____"
],
[
"The next few code cells generate the first figures in chapter 5. The first actual code sample comes after:",
"_____no_output_____"
]
],
[
[
"from sklearn.svm import SVC\nfrom sklearn import datasets\n\niris = datasets.load_iris()\nX = iris[\"data\"][:, (2, 3)] # petal length, petal width\ny = iris[\"target\"]\n\nsetosa_or_versicolor = (y == 0) | (y == 1)\nX = X[setosa_or_versicolor]\ny = y[setosa_or_versicolor]\n\n# SVM Classifier model\nsvm_clf = SVC(kernel=\"linear\", C=float(\"inf\"))\nsvm_clf.fit(X, y)",
"_____no_output_____"
],
[
"# Bad models\nx0 = np.linspace(0, 5.5, 200)\npred_1 = 5*x0 - 20\npred_2 = x0 - 1.8\npred_3 = 0.1 * x0 + 0.5\n\ndef plot_svc_decision_boundary(svm_clf, xmin, xmax):\n w = svm_clf.coef_[0]\n b = svm_clf.intercept_[0]\n\n # At the decision boundary, w0*x0 + w1*x1 + b = 0\n # => x1 = -w0/w1 * x0 - b/w1\n x0 = np.linspace(xmin, xmax, 200)\n decision_boundary = -w[0]/w[1] * x0 - b/w[1]\n\n margin = 1/w[1]\n gutter_up = decision_boundary + margin\n gutter_down = decision_boundary - margin\n\n svs = svm_clf.support_vectors_\n plt.scatter(svs[:, 0], svs[:, 1], s=180, facecolors='#FFAAAA')\n plt.plot(x0, decision_boundary, \"k-\", linewidth=2)\n plt.plot(x0, gutter_up, \"k--\", linewidth=2)\n plt.plot(x0, gutter_down, \"k--\", linewidth=2)\n\nplt.figure(figsize=(12,2.7))\n\nplt.subplot(121)\nplt.plot(x0, pred_1, \"g--\", linewidth=2)\nplt.plot(x0, pred_2, \"m-\", linewidth=2)\nplt.plot(x0, pred_3, \"r-\", linewidth=2)\nplt.plot(X[:, 0][y==1], X[:, 1][y==1], \"bs\", label=\"Iris-Versicolor\")\nplt.plot(X[:, 0][y==0], X[:, 1][y==0], \"yo\", label=\"Iris-Setosa\")\nplt.xlabel(\"Petal length\", fontsize=14)\nplt.ylabel(\"Petal width\", fontsize=14)\nplt.legend(loc=\"upper left\", fontsize=14)\nplt.axis([0, 5.5, 0, 2])\n\nplt.subplot(122)\nplot_svc_decision_boundary(svm_clf, 0, 5.5)\nplt.plot(X[:, 0][y==1], X[:, 1][y==1], \"bs\")\nplt.plot(X[:, 0][y==0], X[:, 1][y==0], \"yo\")\nplt.xlabel(\"Petal length\", fontsize=14)\nplt.axis([0, 5.5, 0, 2])\n\nsave_fig(\"large_margin_classification_plot\")\nplt.show()",
"Saving figure large_margin_classification_plot\n"
]
],
[
[
"# Sensitivity to feature scales",
"_____no_output_____"
]
],
[
[
"Xs = np.array([[1, 50], [5, 20], [3, 80], [5, 60]]).astype(np.float64)\nys = np.array([0, 0, 1, 1])\nsvm_clf = SVC(kernel=\"linear\", C=100)\nsvm_clf.fit(Xs, ys)\n\nplt.figure(figsize=(12,3.2))\nplt.subplot(121)\nplt.plot(Xs[:, 0][ys==1], Xs[:, 1][ys==1], \"bo\")\nplt.plot(Xs[:, 0][ys==0], Xs[:, 1][ys==0], \"ms\")\nplot_svc_decision_boundary(svm_clf, 0, 6)\nplt.xlabel(\"$x_0$\", fontsize=20)\nplt.ylabel(\"$x_1$ \", fontsize=20, rotation=0)\nplt.title(\"Unscaled\", fontsize=16)\nplt.axis([0, 6, 0, 90])\n\nfrom sklearn.preprocessing import StandardScaler\nscaler = StandardScaler()\nX_scaled = scaler.fit_transform(Xs)\nsvm_clf.fit(X_scaled, ys)\n\nplt.subplot(122)\nplt.plot(X_scaled[:, 0][ys==1], X_scaled[:, 1][ys==1], \"bo\")\nplt.plot(X_scaled[:, 0][ys==0], X_scaled[:, 1][ys==0], \"ms\")\nplot_svc_decision_boundary(svm_clf, -2, 2)\nplt.xlabel(\"$x_0$\", fontsize=20)\nplt.title(\"Scaled\", fontsize=16)\nplt.axis([-2, 2, -2, 2])\n\nsave_fig(\"sensitivity_to_feature_scales_plot\")\n",
"Saving figure sensitivity_to_feature_scales_plot\n"
]
],
[
[
"# Sensitivity to outliers",
"_____no_output_____"
]
],
[
[
"X_outliers = np.array([[3.4, 1.3], [3.2, 0.8]])\ny_outliers = np.array([0, 0])\nXo1 = np.concatenate([X, X_outliers[:1]], axis=0)\nyo1 = np.concatenate([y, y_outliers[:1]], axis=0)\nXo2 = np.concatenate([X, X_outliers[1:]], axis=0)\nyo2 = np.concatenate([y, y_outliers[1:]], axis=0)\n\nsvm_clf2 = SVC(kernel=\"linear\", C=10**9)\nsvm_clf2.fit(Xo2, yo2)\n\nplt.figure(figsize=(12,2.7))\n\nplt.subplot(121)\nplt.plot(Xo1[:, 0][yo1==1], Xo1[:, 1][yo1==1], \"bs\")\nplt.plot(Xo1[:, 0][yo1==0], Xo1[:, 1][yo1==0], \"yo\")\nplt.text(0.3, 1.0, \"Impossible!\", fontsize=24, color=\"red\")\nplt.xlabel(\"Petal length\", fontsize=14)\nplt.ylabel(\"Petal width\", fontsize=14)\nplt.annotate(\"Outlier\",\n xy=(X_outliers[0][0], X_outliers[0][1]),\n xytext=(2.5, 1.7),\n ha=\"center\",\n arrowprops=dict(facecolor='black', shrink=0.1),\n fontsize=16,\n )\nplt.axis([0, 5.5, 0, 2])\n\nplt.subplot(122)\nplt.plot(Xo2[:, 0][yo2==1], Xo2[:, 1][yo2==1], \"bs\")\nplt.plot(Xo2[:, 0][yo2==0], Xo2[:, 1][yo2==0], \"yo\")\nplot_svc_decision_boundary(svm_clf2, 0, 5.5)\nplt.xlabel(\"Petal length\", fontsize=14)\nplt.annotate(\"Outlier\",\n xy=(X_outliers[1][0], X_outliers[1][1]),\n xytext=(3.2, 0.08),\n ha=\"center\",\n arrowprops=dict(facecolor='black', shrink=0.1),\n fontsize=16,\n )\nplt.axis([0, 5.5, 0, 2])\n\nsave_fig(\"sensitivity_to_outliers_plot\")\nplt.show()",
"Saving figure sensitivity_to_outliers_plot\n"
]
],
[
[
"# Large margin *vs* margin violations",
"_____no_output_____"
],
[
"This is the first code example in chapter 5:",
"_____no_output_____"
]
],
[
[
"import numpy as np\nfrom sklearn import datasets\nfrom sklearn.pipeline import Pipeline\nfrom sklearn.preprocessing import StandardScaler\nfrom sklearn.svm import LinearSVC\n\niris = datasets.load_iris()\nX = iris[\"data\"][:, (2, 3)] # petal length, petal width\ny = (iris[\"target\"] == 2).astype(np.float64) # Iris-Virginica\n\nsvm_clf = Pipeline([\n (\"scaler\", StandardScaler()),\n (\"linear_svc\", LinearSVC(C=1, loss=\"hinge\", random_state=42)),\n ])\n\nsvm_clf.fit(X, y)",
"_____no_output_____"
],
[
"svm_clf.predict([[5.5, 1.7]])",
"_____no_output_____"
]
],
[
[
"Now let's generate the graph comparing different regularization settings:",
"_____no_output_____"
]
],
[
[
"scaler = StandardScaler()\nsvm_clf1 = LinearSVC(C=1, loss=\"hinge\", random_state=42)\nsvm_clf2 = LinearSVC(C=100, loss=\"hinge\", random_state=42)\n\nscaled_svm_clf1 = Pipeline([\n (\"scaler\", scaler),\n (\"linear_svc\", svm_clf1),\n ])\nscaled_svm_clf2 = Pipeline([\n (\"scaler\", scaler),\n (\"linear_svc\", svm_clf2),\n ])\n\nscaled_svm_clf1.fit(X, y)\nscaled_svm_clf2.fit(X, y)",
"/Users/ageron/.virtualenvs/ml/lib/python3.6/site-packages/sklearn/svm/base.py:922: ConvergenceWarning: Liblinear failed to converge, increase the number of iterations.\n \"the number of iterations.\", ConvergenceWarning)\n"
],
[
"# Convert to unscaled parameters\nb1 = svm_clf1.decision_function([-scaler.mean_ / scaler.scale_])\nb2 = svm_clf2.decision_function([-scaler.mean_ / scaler.scale_])\nw1 = svm_clf1.coef_[0] / scaler.scale_\nw2 = svm_clf2.coef_[0] / scaler.scale_\nsvm_clf1.intercept_ = np.array([b1])\nsvm_clf2.intercept_ = np.array([b2])\nsvm_clf1.coef_ = np.array([w1])\nsvm_clf2.coef_ = np.array([w2])\n\n# Find support vectors (LinearSVC does not do this automatically)\nt = y * 2 - 1\nsupport_vectors_idx1 = (t * (X.dot(w1) + b1) < 1).ravel()\nsupport_vectors_idx2 = (t * (X.dot(w2) + b2) < 1).ravel()\nsvm_clf1.support_vectors_ = X[support_vectors_idx1]\nsvm_clf2.support_vectors_ = X[support_vectors_idx2]",
"_____no_output_____"
],
[
"plt.figure(figsize=(12,3.2))\nplt.subplot(121)\nplt.plot(X[:, 0][y==1], X[:, 1][y==1], \"g^\", label=\"Iris-Virginica\")\nplt.plot(X[:, 0][y==0], X[:, 1][y==0], \"bs\", label=\"Iris-Versicolor\")\nplot_svc_decision_boundary(svm_clf1, 4, 6)\nplt.xlabel(\"Petal length\", fontsize=14)\nplt.ylabel(\"Petal width\", fontsize=14)\nplt.legend(loc=\"upper left\", fontsize=14)\nplt.title(\"$C = {}$\".format(svm_clf1.C), fontsize=16)\nplt.axis([4, 6, 0.8, 2.8])\n\nplt.subplot(122)\nplt.plot(X[:, 0][y==1], X[:, 1][y==1], \"g^\")\nplt.plot(X[:, 0][y==0], X[:, 1][y==0], \"bs\")\nplot_svc_decision_boundary(svm_clf2, 4, 6)\nplt.xlabel(\"Petal length\", fontsize=14)\nplt.title(\"$C = {}$\".format(svm_clf2.C), fontsize=16)\nplt.axis([4, 6, 0.8, 2.8])\n\nsave_fig(\"regularization_plot\")",
"Saving figure regularization_plot\n"
]
],
[
[
"# Non-linear classification",
"_____no_output_____"
]
],
[
[
"X1D = np.linspace(-4, 4, 9).reshape(-1, 1)\nX2D = np.c_[X1D, X1D**2]\ny = np.array([0, 0, 1, 1, 1, 1, 1, 0, 0])\n\nplt.figure(figsize=(11, 4))\n\nplt.subplot(121)\nplt.grid(True, which='both')\nplt.axhline(y=0, color='k')\nplt.plot(X1D[:, 0][y==0], np.zeros(4), \"bs\")\nplt.plot(X1D[:, 0][y==1], np.zeros(5), \"g^\")\nplt.gca().get_yaxis().set_ticks([])\nplt.xlabel(r\"$x_1$\", fontsize=20)\nplt.axis([-4.5, 4.5, -0.2, 0.2])\n\nplt.subplot(122)\nplt.grid(True, which='both')\nplt.axhline(y=0, color='k')\nplt.axvline(x=0, color='k')\nplt.plot(X2D[:, 0][y==0], X2D[:, 1][y==0], \"bs\")\nplt.plot(X2D[:, 0][y==1], X2D[:, 1][y==1], \"g^\")\nplt.xlabel(r\"$x_1$\", fontsize=20)\nplt.ylabel(r\"$x_2$\", fontsize=20, rotation=0)\nplt.gca().get_yaxis().set_ticks([0, 4, 8, 12, 16])\nplt.plot([-4.5, 4.5], [6.5, 6.5], \"r--\", linewidth=3)\nplt.axis([-4.5, 4.5, -1, 17])\n\nplt.subplots_adjust(right=1)\n\nsave_fig(\"higher_dimensions_plot\", tight_layout=False)\nplt.show()",
"Saving figure higher_dimensions_plot\n"
],
[
"from sklearn.datasets import make_moons\nX, y = make_moons(n_samples=100, noise=0.15, random_state=42)\n\ndef plot_dataset(X, y, axes):\n plt.plot(X[:, 0][y==0], X[:, 1][y==0], \"bs\")\n plt.plot(X[:, 0][y==1], X[:, 1][y==1], \"g^\")\n plt.axis(axes)\n plt.grid(True, which='both')\n plt.xlabel(r\"$x_1$\", fontsize=20)\n plt.ylabel(r\"$x_2$\", fontsize=20, rotation=0)\n\nplot_dataset(X, y, [-1.5, 2.5, -1, 1.5])\nplt.show()",
"_____no_output_____"
],
[
"from sklearn.datasets import make_moons\nfrom sklearn.pipeline import Pipeline\nfrom sklearn.preprocessing import PolynomialFeatures\n\npolynomial_svm_clf = Pipeline([\n (\"poly_features\", PolynomialFeatures(degree=3)),\n (\"scaler\", StandardScaler()),\n (\"svm_clf\", LinearSVC(C=10, loss=\"hinge\", random_state=42))\n ])\n\npolynomial_svm_clf.fit(X, y)",
"_____no_output_____"
],
[
"def plot_predictions(clf, axes):\n x0s = np.linspace(axes[0], axes[1], 100)\n x1s = np.linspace(axes[2], axes[3], 100)\n x0, x1 = np.meshgrid(x0s, x1s)\n X = np.c_[x0.ravel(), x1.ravel()]\n y_pred = clf.predict(X).reshape(x0.shape)\n y_decision = clf.decision_function(X).reshape(x0.shape)\n plt.contourf(x0, x1, y_pred, cmap=plt.cm.brg, alpha=0.2)\n plt.contourf(x0, x1, y_decision, cmap=plt.cm.brg, alpha=0.1)\n\nplot_predictions(polynomial_svm_clf, [-1.5, 2.5, -1, 1.5])\nplot_dataset(X, y, [-1.5, 2.5, -1, 1.5])\n\nsave_fig(\"moons_polynomial_svc_plot\")\nplt.show()",
"Saving figure moons_polynomial_svc_plot\n"
],
[
"from sklearn.svm import SVC\n\npoly_kernel_svm_clf = Pipeline([\n (\"scaler\", StandardScaler()),\n (\"svm_clf\", SVC(kernel=\"poly\", degree=3, coef0=1, C=5))\n ])\npoly_kernel_svm_clf.fit(X, y)",
"_____no_output_____"
],
[
"poly100_kernel_svm_clf = Pipeline([\n (\"scaler\", StandardScaler()),\n (\"svm_clf\", SVC(kernel=\"poly\", degree=10, coef0=100, C=5))\n ])\npoly100_kernel_svm_clf.fit(X, y)",
"_____no_output_____"
],
[
"plt.figure(figsize=(11, 4))\n\nplt.subplot(121)\nplot_predictions(poly_kernel_svm_clf, [-1.5, 2.5, -1, 1.5])\nplot_dataset(X, y, [-1.5, 2.5, -1, 1.5])\nplt.title(r\"$d=3, r=1, C=5$\", fontsize=18)\n\nplt.subplot(122)\nplot_predictions(poly100_kernel_svm_clf, [-1.5, 2.5, -1, 1.5])\nplot_dataset(X, y, [-1.5, 2.5, -1, 1.5])\nplt.title(r\"$d=10, r=100, C=5$\", fontsize=18)\n\nsave_fig(\"moons_kernelized_polynomial_svc_plot\")\nplt.show()",
"Saving figure moons_kernelized_polynomial_svc_plot\n"
],
[
"def gaussian_rbf(x, landmark, gamma):\n return np.exp(-gamma * np.linalg.norm(x - landmark, axis=1)**2)\n\ngamma = 0.3\n\nx1s = np.linspace(-4.5, 4.5, 200).reshape(-1, 1)\nx2s = gaussian_rbf(x1s, -2, gamma)\nx3s = gaussian_rbf(x1s, 1, gamma)\n\nXK = np.c_[gaussian_rbf(X1D, -2, gamma), gaussian_rbf(X1D, 1, gamma)]\nyk = np.array([0, 0, 1, 1, 1, 1, 1, 0, 0])\n\nplt.figure(figsize=(11, 4))\n\nplt.subplot(121)\nplt.grid(True, which='both')\nplt.axhline(y=0, color='k')\nplt.scatter(x=[-2, 1], y=[0, 0], s=150, alpha=0.5, c=\"red\")\nplt.plot(X1D[:, 0][yk==0], np.zeros(4), \"bs\")\nplt.plot(X1D[:, 0][yk==1], np.zeros(5), \"g^\")\nplt.plot(x1s, x2s, \"g--\")\nplt.plot(x1s, x3s, \"b:\")\nplt.gca().get_yaxis().set_ticks([0, 0.25, 0.5, 0.75, 1])\nplt.xlabel(r\"$x_1$\", fontsize=20)\nplt.ylabel(r\"Similarity\", fontsize=14)\nplt.annotate(r'$\\mathbf{x}$',\n xy=(X1D[3, 0], 0),\n xytext=(-0.5, 0.20),\n ha=\"center\",\n arrowprops=dict(facecolor='black', shrink=0.1),\n fontsize=18,\n )\nplt.text(-2, 0.9, \"$x_2$\", ha=\"center\", fontsize=20)\nplt.text(1, 0.9, \"$x_3$\", ha=\"center\", fontsize=20)\nplt.axis([-4.5, 4.5, -0.1, 1.1])\n\nplt.subplot(122)\nplt.grid(True, which='both')\nplt.axhline(y=0, color='k')\nplt.axvline(x=0, color='k')\nplt.plot(XK[:, 0][yk==0], XK[:, 1][yk==0], \"bs\")\nplt.plot(XK[:, 0][yk==1], XK[:, 1][yk==1], \"g^\")\nplt.xlabel(r\"$x_2$\", fontsize=20)\nplt.ylabel(r\"$x_3$ \", fontsize=20, rotation=0)\nplt.annotate(r'$\\phi\\left(\\mathbf{x}\\right)$',\n xy=(XK[3, 0], XK[3, 1]),\n xytext=(0.65, 0.50),\n ha=\"center\",\n arrowprops=dict(facecolor='black', shrink=0.1),\n fontsize=18,\n )\nplt.plot([-0.1, 1.1], [0.57, -0.1], \"r--\", linewidth=3)\nplt.axis([-0.1, 1.1, -0.1, 1.1])\n \nplt.subplots_adjust(right=1)\n\nsave_fig(\"kernel_method_plot\")\nplt.show()",
"Saving figure kernel_method_plot\n"
],
[
"x1_example = X1D[3, 0]\nfor landmark in (-2, 1):\n k = gaussian_rbf(np.array([[x1_example]]), np.array([[landmark]]), gamma)\n print(\"Phi({}, {}) = {}\".format(x1_example, landmark, k))",
"Phi(-1.0, -2) = [0.74081822]\nPhi(-1.0, 1) = [0.30119421]\n"
],
[
"rbf_kernel_svm_clf = Pipeline([\n (\"scaler\", StandardScaler()),\n (\"svm_clf\", SVC(kernel=\"rbf\", gamma=5, C=0.001))\n ])\nrbf_kernel_svm_clf.fit(X, y)",
"_____no_output_____"
],
[
"from sklearn.svm import SVC\n\ngamma1, gamma2 = 0.1, 5\nC1, C2 = 0.001, 1000\nhyperparams = (gamma1, C1), (gamma1, C2), (gamma2, C1), (gamma2, C2)\n\nsvm_clfs = []\nfor gamma, C in hyperparams:\n rbf_kernel_svm_clf = Pipeline([\n (\"scaler\", StandardScaler()),\n (\"svm_clf\", SVC(kernel=\"rbf\", gamma=gamma, C=C))\n ])\n rbf_kernel_svm_clf.fit(X, y)\n svm_clfs.append(rbf_kernel_svm_clf)\n\nplt.figure(figsize=(11, 7))\n\nfor i, svm_clf in enumerate(svm_clfs):\n plt.subplot(221 + i)\n plot_predictions(svm_clf, [-1.5, 2.5, -1, 1.5])\n plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])\n gamma, C = hyperparams[i]\n plt.title(r\"$\\gamma = {}, C = {}$\".format(gamma, C), fontsize=16)\n\nsave_fig(\"moons_rbf_svc_plot\")\nplt.show()",
"Saving figure moons_rbf_svc_plot\n"
]
],
[
[
"# Regression\n",
"_____no_output_____"
]
],
[
[
"np.random.seed(42)\nm = 50\nX = 2 * np.random.rand(m, 1)\ny = (4 + 3 * X + np.random.randn(m, 1)).ravel()",
"_____no_output_____"
],
[
"from sklearn.svm import LinearSVR\n\nsvm_reg = LinearSVR(epsilon=1.5, random_state=42)\nsvm_reg.fit(X, y)",
"_____no_output_____"
],
[
"svm_reg1 = LinearSVR(epsilon=1.5, random_state=42)\nsvm_reg2 = LinearSVR(epsilon=0.5, random_state=42)\nsvm_reg1.fit(X, y)\nsvm_reg2.fit(X, y)\n\ndef find_support_vectors(svm_reg, X, y):\n y_pred = svm_reg.predict(X)\n off_margin = (np.abs(y - y_pred) >= svm_reg.epsilon)\n return np.argwhere(off_margin)\n\nsvm_reg1.support_ = find_support_vectors(svm_reg1, X, y)\nsvm_reg2.support_ = find_support_vectors(svm_reg2, X, y)\n\neps_x1 = 1\neps_y_pred = svm_reg1.predict([[eps_x1]])",
"_____no_output_____"
],
[
"def plot_svm_regression(svm_reg, X, y, axes):\n x1s = np.linspace(axes[0], axes[1], 100).reshape(100, 1)\n y_pred = svm_reg.predict(x1s)\n plt.plot(x1s, y_pred, \"k-\", linewidth=2, label=r\"$\\hat{y}$\")\n plt.plot(x1s, y_pred + svm_reg.epsilon, \"k--\")\n plt.plot(x1s, y_pred - svm_reg.epsilon, \"k--\")\n plt.scatter(X[svm_reg.support_], y[svm_reg.support_], s=180, facecolors='#FFAAAA')\n plt.plot(X, y, \"bo\")\n plt.xlabel(r\"$x_1$\", fontsize=18)\n plt.legend(loc=\"upper left\", fontsize=18)\n plt.axis(axes)\n\nplt.figure(figsize=(9, 4))\nplt.subplot(121)\nplot_svm_regression(svm_reg1, X, y, [0, 2, 3, 11])\nplt.title(r\"$\\epsilon = {}$\".format(svm_reg1.epsilon), fontsize=18)\nplt.ylabel(r\"$y$\", fontsize=18, rotation=0)\n#plt.plot([eps_x1, eps_x1], [eps_y_pred, eps_y_pred - svm_reg1.epsilon], \"k-\", linewidth=2)\nplt.annotate(\n '', xy=(eps_x1, eps_y_pred), xycoords='data',\n xytext=(eps_x1, eps_y_pred - svm_reg1.epsilon),\n textcoords='data', arrowprops={'arrowstyle': '<->', 'linewidth': 1.5}\n )\nplt.text(0.91, 5.6, r\"$\\epsilon$\", fontsize=20)\nplt.subplot(122)\nplot_svm_regression(svm_reg2, X, y, [0, 2, 3, 11])\nplt.title(r\"$\\epsilon = {}$\".format(svm_reg2.epsilon), fontsize=18)\nsave_fig(\"svm_regression_plot\")\nplt.show()",
"Saving figure svm_regression_plot\n"
],
[
"np.random.seed(42)\nm = 100\nX = 2 * np.random.rand(m, 1) - 1\ny = (0.2 + 0.1 * X + 0.5 * X**2 + np.random.randn(m, 1)/10).ravel()",
"_____no_output_____"
]
],
[
[
"**Warning**: the default value of `gamma` will change from `'auto'` to `'scale'` in version 0.22 to better account for unscaled features. To preserve the same results as in the book, we explicitly set it to `'auto'`, but you should probably just use the default in your own code.",
"_____no_output_____"
]
],
[
[
"from sklearn.svm import SVR\n\nsvm_poly_reg = SVR(kernel=\"poly\", degree=2, C=100, epsilon=0.1, gamma=\"auto\")\nsvm_poly_reg.fit(X, y)",
"_____no_output_____"
],
[
"from sklearn.svm import SVR\n\nsvm_poly_reg1 = SVR(kernel=\"poly\", degree=2, C=100, epsilon=0.1, gamma=\"auto\")\nsvm_poly_reg2 = SVR(kernel=\"poly\", degree=2, C=0.01, epsilon=0.1, gamma=\"auto\")\nsvm_poly_reg1.fit(X, y)\nsvm_poly_reg2.fit(X, y)",
"_____no_output_____"
],
[
"plt.figure(figsize=(9, 4))\nplt.subplot(121)\nplot_svm_regression(svm_poly_reg1, X, y, [-1, 1, 0, 1])\nplt.title(r\"$degree={}, C={}, \\epsilon = {}$\".format(svm_poly_reg1.degree, svm_poly_reg1.C, svm_poly_reg1.epsilon), fontsize=18)\nplt.ylabel(r\"$y$\", fontsize=18, rotation=0)\nplt.subplot(122)\nplot_svm_regression(svm_poly_reg2, X, y, [-1, 1, 0, 1])\nplt.title(r\"$degree={}, C={}, \\epsilon = {}$\".format(svm_poly_reg2.degree, svm_poly_reg2.C, svm_poly_reg2.epsilon), fontsize=18)\nsave_fig(\"svm_with_polynomial_kernel_plot\")\nplt.show()",
"Saving figure svm_with_polynomial_kernel_plot\n"
]
],
[
[
"# Under the hood",
"_____no_output_____"
]
],
[
[
"iris = datasets.load_iris()\nX = iris[\"data\"][:, (2, 3)] # petal length, petal width\ny = (iris[\"target\"] == 2).astype(np.float64) # Iris-Virginica",
"_____no_output_____"
],
[
"from mpl_toolkits.mplot3d import Axes3D\n\ndef plot_3D_decision_function(ax, w, b, x1_lim=[4, 6], x2_lim=[0.8, 2.8]):\n x1_in_bounds = (X[:, 0] > x1_lim[0]) & (X[:, 0] < x1_lim[1])\n X_crop = X[x1_in_bounds]\n y_crop = y[x1_in_bounds]\n x1s = np.linspace(x1_lim[0], x1_lim[1], 20)\n x2s = np.linspace(x2_lim[0], x2_lim[1], 20)\n x1, x2 = np.meshgrid(x1s, x2s)\n xs = np.c_[x1.ravel(), x2.ravel()]\n df = (xs.dot(w) + b).reshape(x1.shape)\n m = 1 / np.linalg.norm(w)\n boundary_x2s = -x1s*(w[0]/w[1])-b/w[1]\n margin_x2s_1 = -x1s*(w[0]/w[1])-(b-1)/w[1]\n margin_x2s_2 = -x1s*(w[0]/w[1])-(b+1)/w[1]\n ax.plot_surface(x1s, x2, np.zeros_like(x1),\n color=\"b\", alpha=0.2, cstride=100, rstride=100)\n ax.plot(x1s, boundary_x2s, 0, \"k-\", linewidth=2, label=r\"$h=0$\")\n ax.plot(x1s, margin_x2s_1, 0, \"k--\", linewidth=2, label=r\"$h=\\pm 1$\")\n ax.plot(x1s, margin_x2s_2, 0, \"k--\", linewidth=2)\n ax.plot(X_crop[:, 0][y_crop==1], X_crop[:, 1][y_crop==1], 0, \"g^\")\n ax.plot_wireframe(x1, x2, df, alpha=0.3, color=\"k\")\n ax.plot(X_crop[:, 0][y_crop==0], X_crop[:, 1][y_crop==0], 0, \"bs\")\n ax.axis(x1_lim + x2_lim)\n ax.text(4.5, 2.5, 3.8, \"Decision function $h$\", fontsize=15)\n ax.set_xlabel(r\"Petal length\", fontsize=15)\n ax.set_ylabel(r\"Petal width\", fontsize=15)\n ax.set_zlabel(r\"$h = \\mathbf{w}^T \\mathbf{x} + b$\", fontsize=18)\n ax.legend(loc=\"upper left\", fontsize=16)\n\nfig = plt.figure(figsize=(11, 6))\nax1 = fig.add_subplot(111, projection='3d')\nplot_3D_decision_function(ax1, w=svm_clf2.coef_[0], b=svm_clf2.intercept_[0])\n\n#save_fig(\"iris_3D_plot\")\nplt.show()",
"_____no_output_____"
]
],
[
[
"# Small weight vector results in a large margin",
"_____no_output_____"
]
],
[
[
"def plot_2D_decision_function(w, b, ylabel=True, x1_lim=[-3, 3]):\n x1 = np.linspace(x1_lim[0], x1_lim[1], 200)\n y = w * x1 + b\n m = 1 / w\n\n plt.plot(x1, y)\n plt.plot(x1_lim, [1, 1], \"k:\")\n plt.plot(x1_lim, [-1, -1], \"k:\")\n plt.axhline(y=0, color='k')\n plt.axvline(x=0, color='k')\n plt.plot([m, m], [0, 1], \"k--\")\n plt.plot([-m, -m], [0, -1], \"k--\")\n plt.plot([-m, m], [0, 0], \"k-o\", linewidth=3)\n plt.axis(x1_lim + [-2, 2])\n plt.xlabel(r\"$x_1$\", fontsize=16)\n if ylabel:\n plt.ylabel(r\"$w_1 x_1$ \", rotation=0, fontsize=16)\n plt.title(r\"$w_1 = {}$\".format(w), fontsize=16)\n\nplt.figure(figsize=(12, 3.2))\nplt.subplot(121)\nplot_2D_decision_function(1, 0)\nplt.subplot(122)\nplot_2D_decision_function(0.5, 0, ylabel=False)\nsave_fig(\"small_w_large_margin_plot\")\nplt.show()",
"Saving figure small_w_large_margin_plot\n"
],
[
"from sklearn.svm import SVC\nfrom sklearn import datasets\n\niris = datasets.load_iris()\nX = iris[\"data\"][:, (2, 3)] # petal length, petal width\ny = (iris[\"target\"] == 2).astype(np.float64) # Iris-Virginica\n\nsvm_clf = SVC(kernel=\"linear\", C=1)\nsvm_clf.fit(X, y)\nsvm_clf.predict([[5.3, 1.3]])",
"_____no_output_____"
]
],
[
[
"# Hinge loss",
"_____no_output_____"
]
],
[
[
"t = np.linspace(-2, 4, 200)\nh = np.where(1 - t < 0, 0, 1 - t) # max(0, 1-t)\n\nplt.figure(figsize=(5,2.8))\nplt.plot(t, h, \"b-\", linewidth=2, label=\"$max(0, 1 - t)$\")\nplt.grid(True, which='both')\nplt.axhline(y=0, color='k')\nplt.axvline(x=0, color='k')\nplt.yticks(np.arange(-1, 2.5, 1))\nplt.xlabel(\"$t$\", fontsize=16)\nplt.axis([-2, 4, -1, 2.5])\nplt.legend(loc=\"upper right\", fontsize=16)\nsave_fig(\"hinge_plot\")\nplt.show()",
"Saving figure hinge_plot\n"
]
],
[
[
"# Extra material",
"_____no_output_____"
],
[
"## Training time",
"_____no_output_____"
]
],
[
[
"X, y = make_moons(n_samples=1000, noise=0.4, random_state=42)\nplt.plot(X[:, 0][y==0], X[:, 1][y==0], \"bs\")\nplt.plot(X[:, 0][y==1], X[:, 1][y==1], \"g^\")",
"_____no_output_____"
],
[
"import time\n\ntol = 0.1\ntols = []\ntimes = []\nfor i in range(10):\n svm_clf = SVC(kernel=\"poly\", gamma=3, C=10, tol=tol, verbose=1)\n t1 = time.time()\n svm_clf.fit(X, y)\n t2 = time.time()\n times.append(t2-t1)\n tols.append(tol)\n print(i, tol, t2-t1)\n tol /= 10\nplt.semilogx(tols, times)",
"[LibSVM]0 0.1 0.8537578582763672\n[LibSVM]1 0.01 0.7340240478515625\n[LibSVM]2 0.001 0.7935328483581543\n[LibSVM]3 0.0001 1.4816207885742188\n[LibSVM]4 1e-05 2.543147087097168\n[LibSVM]5 1.0000000000000002e-06 2.138460159301758\n[LibSVM]6 1.0000000000000002e-07 2.3709118366241455\n[LibSVM]7 1.0000000000000002e-08 2.3185129165649414\n[LibSVM]8 1.0000000000000003e-09 2.213902235031128\n[LibSVM]9 1.0000000000000003e-10 2.2198519706726074\n"
]
],
[
[
"## Linear SVM classifier implementation using Batch Gradient Descent",
"_____no_output_____"
]
],
[
[
"# Training set\nX = iris[\"data\"][:, (2, 3)] # petal length, petal width\ny = (iris[\"target\"] == 2).astype(np.float64).reshape(-1, 1) # Iris-Virginica",
"_____no_output_____"
],
[
"from sklearn.base import BaseEstimator\n\nclass MyLinearSVC(BaseEstimator):\n def __init__(self, C=1, eta0=1, eta_d=10000, n_epochs=1000, random_state=None):\n self.C = C\n self.eta0 = eta0\n self.n_epochs = n_epochs\n self.random_state = random_state\n self.eta_d = eta_d\n\n def eta(self, epoch):\n return self.eta0 / (epoch + self.eta_d)\n \n def fit(self, X, y):\n # Random initialization\n if self.random_state:\n np.random.seed(self.random_state)\n w = np.random.randn(X.shape[1], 1) # n feature weights\n b = 0\n\n m = len(X)\n t = y * 2 - 1 # -1 if t==0, +1 if t==1\n X_t = X * t\n self.Js=[]\n\n # Training\n for epoch in range(self.n_epochs):\n support_vectors_idx = (X_t.dot(w) + t * b < 1).ravel()\n X_t_sv = X_t[support_vectors_idx]\n t_sv = t[support_vectors_idx]\n\n J = 1/2 * np.sum(w * w) + self.C * (np.sum(1 - X_t_sv.dot(w)) - b * np.sum(t_sv))\n self.Js.append(J)\n\n w_gradient_vector = w - self.C * np.sum(X_t_sv, axis=0).reshape(-1, 1)\n b_derivative = -C * np.sum(t_sv)\n \n w = w - self.eta(epoch) * w_gradient_vector\n b = b - self.eta(epoch) * b_derivative\n \n\n self.intercept_ = np.array([b])\n self.coef_ = np.array([w])\n support_vectors_idx = (X_t.dot(w) + t * b < 1).ravel()\n self.support_vectors_ = X[support_vectors_idx]\n return self\n\n def decision_function(self, X):\n return X.dot(self.coef_[0]) + self.intercept_[0]\n\n def predict(self, X):\n return (self.decision_function(X) >= 0).astype(np.float64)\n\nC=2\nsvm_clf = MyLinearSVC(C=C, eta0 = 10, eta_d = 1000, n_epochs=60000, random_state=2)\nsvm_clf.fit(X, y)\nsvm_clf.predict(np.array([[5, 2], [4, 1]]))",
"_____no_output_____"
],
[
"plt.plot(range(svm_clf.n_epochs), svm_clf.Js)\nplt.axis([0, svm_clf.n_epochs, 0, 100])",
"_____no_output_____"
],
[
"print(svm_clf.intercept_, svm_clf.coef_)",
"[-15.56761653] [[[2.28120287]\n [2.71621742]]]\n"
],
[
"svm_clf2 = SVC(kernel=\"linear\", C=C)\nsvm_clf2.fit(X, y.ravel())\nprint(svm_clf2.intercept_, svm_clf2.coef_)",
"[-15.51721253] [[2.27128546 2.71287145]]\n"
],
[
"yr = y.ravel()\nplt.figure(figsize=(12,3.2))\nplt.subplot(121)\nplt.plot(X[:, 0][yr==1], X[:, 1][yr==1], \"g^\", label=\"Iris-Virginica\")\nplt.plot(X[:, 0][yr==0], X[:, 1][yr==0], \"bs\", label=\"Not Iris-Virginica\")\nplot_svc_decision_boundary(svm_clf, 4, 6)\nplt.xlabel(\"Petal length\", fontsize=14)\nplt.ylabel(\"Petal width\", fontsize=14)\nplt.title(\"MyLinearSVC\", fontsize=14)\nplt.axis([4, 6, 0.8, 2.8])\n\nplt.subplot(122)\nplt.plot(X[:, 0][yr==1], X[:, 1][yr==1], \"g^\")\nplt.plot(X[:, 0][yr==0], X[:, 1][yr==0], \"bs\")\nplot_svc_decision_boundary(svm_clf2, 4, 6)\nplt.xlabel(\"Petal length\", fontsize=14)\nplt.title(\"SVC\", fontsize=14)\nplt.axis([4, 6, 0.8, 2.8])\n",
"_____no_output_____"
],
[
"from sklearn.linear_model import SGDClassifier\n\nsgd_clf = SGDClassifier(loss=\"hinge\", alpha = 0.017, max_iter = 50, tol=-np.infty, random_state=42)\nsgd_clf.fit(X, y.ravel())\n\nm = len(X)\nt = y * 2 - 1 # -1 if t==0, +1 if t==1\nX_b = np.c_[np.ones((m, 1)), X] # Add bias input x0=1\nX_b_t = X_b * t\nsgd_theta = np.r_[sgd_clf.intercept_[0], sgd_clf.coef_[0]]\nprint(sgd_theta)\nsupport_vectors_idx = (X_b_t.dot(sgd_theta) < 1).ravel()\nsgd_clf.support_vectors_ = X[support_vectors_idx]\nsgd_clf.C = C\n\nplt.figure(figsize=(5.5,3.2))\nplt.plot(X[:, 0][yr==1], X[:, 1][yr==1], \"g^\")\nplt.plot(X[:, 0][yr==0], X[:, 1][yr==0], \"bs\")\nplot_svc_decision_boundary(sgd_clf, 4, 6)\nplt.xlabel(\"Petal length\", fontsize=14)\nplt.ylabel(\"Petal width\", fontsize=14)\nplt.title(\"SGDClassifier\", fontsize=14)\nplt.axis([4, 6, 0.8, 2.8])\n",
"[-14.06195929 2.24179316 1.79750198]\n"
]
],
[
[
"# Exercise solutions",
"_____no_output_____"
],
[
"## 1. to 7.",
"_____no_output_____"
],
[
"See appendix A.",
"_____no_output_____"
],
[
"# 8.",
"_____no_output_____"
],
[
"_Exercise: train a `LinearSVC` on a linearly separable dataset. Then train an `SVC` and a `SGDClassifier` on the same dataset. See if you can get them to produce roughly the same model._",
"_____no_output_____"
],
[
"Let's use the Iris dataset: the Iris Setosa and Iris Versicolor classes are linearly separable.",
"_____no_output_____"
]
],
[
[
"from sklearn import datasets\n\niris = datasets.load_iris()\nX = iris[\"data\"][:, (2, 3)] # petal length, petal width\ny = iris[\"target\"]\n\nsetosa_or_versicolor = (y == 0) | (y == 1)\nX = X[setosa_or_versicolor]\ny = y[setosa_or_versicolor]",
"_____no_output_____"
],
[
"from sklearn.svm import SVC, LinearSVC\nfrom sklearn.linear_model import SGDClassifier\nfrom sklearn.preprocessing import StandardScaler\n\nC = 5\nalpha = 1 / (C * len(X))\n\nlin_clf = LinearSVC(loss=\"hinge\", C=C, random_state=42)\nsvm_clf = SVC(kernel=\"linear\", C=C)\nsgd_clf = SGDClassifier(loss=\"hinge\", learning_rate=\"constant\", eta0=0.001, alpha=alpha,\n max_iter=100000, tol=-np.infty, random_state=42)\n\nscaler = StandardScaler()\nX_scaled = scaler.fit_transform(X)\n\nlin_clf.fit(X_scaled, y)\nsvm_clf.fit(X_scaled, y)\nsgd_clf.fit(X_scaled, y)\n\nprint(\"LinearSVC: \", lin_clf.intercept_, lin_clf.coef_)\nprint(\"SVC: \", svm_clf.intercept_, svm_clf.coef_)\nprint(\"SGDClassifier(alpha={:.5f}):\".format(sgd_clf.alpha), sgd_clf.intercept_, sgd_clf.coef_)",
"LinearSVC: [0.28474532] [[1.05364923 1.09903601]]\nSVC: [0.31896852] [[1.1203284 1.02625193]]\nSGDClassifier(alpha=0.00200): [0.319] [[1.12072936 1.02666842]]\n"
]
],
[
[
"Let's plot the decision boundaries of these three models:",
"_____no_output_____"
]
],
[
[
"# Compute the slope and bias of each decision boundary\nw1 = -lin_clf.coef_[0, 0]/lin_clf.coef_[0, 1]\nb1 = -lin_clf.intercept_[0]/lin_clf.coef_[0, 1]\nw2 = -svm_clf.coef_[0, 0]/svm_clf.coef_[0, 1]\nb2 = -svm_clf.intercept_[0]/svm_clf.coef_[0, 1]\nw3 = -sgd_clf.coef_[0, 0]/sgd_clf.coef_[0, 1]\nb3 = -sgd_clf.intercept_[0]/sgd_clf.coef_[0, 1]\n\n# Transform the decision boundary lines back to the original scale\nline1 = scaler.inverse_transform([[-10, -10 * w1 + b1], [10, 10 * w1 + b1]])\nline2 = scaler.inverse_transform([[-10, -10 * w2 + b2], [10, 10 * w2 + b2]])\nline3 = scaler.inverse_transform([[-10, -10 * w3 + b3], [10, 10 * w3 + b3]])\n\n# Plot all three decision boundaries\nplt.figure(figsize=(11, 4))\nplt.plot(line1[:, 0], line1[:, 1], \"k:\", label=\"LinearSVC\")\nplt.plot(line2[:, 0], line2[:, 1], \"b--\", linewidth=2, label=\"SVC\")\nplt.plot(line3[:, 0], line3[:, 1], \"r-\", label=\"SGDClassifier\")\nplt.plot(X[:, 0][y==1], X[:, 1][y==1], \"bs\") # label=\"Iris-Versicolor\"\nplt.plot(X[:, 0][y==0], X[:, 1][y==0], \"yo\") # label=\"Iris-Setosa\"\nplt.xlabel(\"Petal length\", fontsize=14)\nplt.ylabel(\"Petal width\", fontsize=14)\nplt.legend(loc=\"upper center\", fontsize=14)\nplt.axis([0, 5.5, 0, 2])\n\nplt.show()",
"_____no_output_____"
]
],
[
[
"Close enough!",
"_____no_output_____"
],
[
"# 9.",
"_____no_output_____"
],
[
"_Exercise: train an SVM classifier on the MNIST dataset. Since SVM classifiers are binary classifiers, you will need to use one-versus-all to classify all 10 digits. You may want to tune the hyperparameters using small validation sets to speed up the process. What accuracy can you reach?_",
"_____no_output_____"
],
[
"First, let's load the dataset and split it into a training set and a test set. We could use `train_test_split()` but people usually just take the first 60,000 instances for the training set, and the last 10,000 instances for the test set (this makes it possible to compare your model's performance with others): ",
"_____no_output_____"
]
],
[
[
"try:\n from sklearn.datasets import fetch_openml\n mnist = fetch_openml('mnist_784', version=1, cache=True)\nexcept ImportError:\n from sklearn.datasets import fetch_mldata\n mnist = fetch_mldata('MNIST original')\n\nX = mnist[\"data\"]\ny = mnist[\"target\"]\n\nX_train = X[:60000]\ny_train = y[:60000]\nX_test = X[60000:]\ny_test = y[60000:]",
"_____no_output_____"
]
],
[
[
"Many training algorithms are sensitive to the order of the training instances, so it's generally good practice to shuffle them first:",
"_____no_output_____"
]
],
[
[
"np.random.seed(42)\nrnd_idx = np.random.permutation(60000)\nX_train = X_train[rnd_idx]\ny_train = y_train[rnd_idx]",
"_____no_output_____"
]
],
[
[
"Let's start simple, with a linear SVM classifier. It will automatically use the One-vs-All (also called One-vs-the-Rest, OvR) strategy, so there's nothing special we need to do. Easy!",
"_____no_output_____"
]
],
[
[
"lin_clf = LinearSVC(random_state=42)\nlin_clf.fit(X_train, y_train)",
"/Users/ageron/.virtualenvs/ml/lib/python3.6/site-packages/sklearn/svm/base.py:922: ConvergenceWarning: Liblinear failed to converge, increase the number of iterations.\n \"the number of iterations.\", ConvergenceWarning)\n"
]
],
[
[
"Let's make predictions on the training set and measure the accuracy (we don't want to measure it on the test set yet, since we have not selected and trained the final model yet):",
"_____no_output_____"
]
],
[
[
"from sklearn.metrics import accuracy_score\n\ny_pred = lin_clf.predict(X_train)\naccuracy_score(y_train, y_pred)",
"_____no_output_____"
]
],
[
[
"Wow, 86% accuracy on MNIST is a really bad performance. This linear model is certainly too simple for MNIST, but perhaps we just needed to scale the data first:",
"_____no_output_____"
]
],
[
[
"scaler = StandardScaler()\nX_train_scaled = scaler.fit_transform(X_train.astype(np.float32))\nX_test_scaled = scaler.transform(X_test.astype(np.float32))",
"_____no_output_____"
],
[
"lin_clf = LinearSVC(random_state=42)\nlin_clf.fit(X_train_scaled, y_train)",
"/Users/ageron/.virtualenvs/ml/lib/python3.6/site-packages/sklearn/svm/base.py:922: ConvergenceWarning: Liblinear failed to converge, increase the number of iterations.\n \"the number of iterations.\", ConvergenceWarning)\n"
],
[
"y_pred = lin_clf.predict(X_train_scaled)\naccuracy_score(y_train, y_pred)",
"_____no_output_____"
]
],
[
[
"That's much better (we cut the error rate in two), but still not great at all for MNIST. If we want to use an SVM, we will have to use a kernel. Let's try an `SVC` with an RBF kernel (the default).\n\n**Warning**: if you are using Scikit-Learn ≤ 0.19, the `SVC` class will use the One-vs-One (OvO) strategy by default, so you must explicitly set `decision_function_shape=\"ovr\"` if you want to use the OvR strategy instead (OvR is the default since 0.19).",
"_____no_output_____"
]
],
[
[
"svm_clf = SVC(decision_function_shape=\"ovr\", gamma=\"auto\")\nsvm_clf.fit(X_train_scaled[:10000], y_train[:10000])",
"_____no_output_____"
],
[
"y_pred = svm_clf.predict(X_train_scaled)\naccuracy_score(y_train, y_pred)",
"_____no_output_____"
]
],
[
[
"That's promising, we get better performance even though we trained the model on 6 times less data. Let's tune the hyperparameters by doing a randomized search with cross validation. We will do this on a small dataset just to speed up the process:",
"_____no_output_____"
]
],
[
[
"from sklearn.model_selection import RandomizedSearchCV\nfrom scipy.stats import reciprocal, uniform\n\nparam_distributions = {\"gamma\": reciprocal(0.001, 0.1), \"C\": uniform(1, 10)}\nrnd_search_cv = RandomizedSearchCV(svm_clf, param_distributions, n_iter=10, verbose=2, cv=3)\nrnd_search_cv.fit(X_train_scaled[:1000], y_train[:1000])",
"Fitting 3 folds for each of 10 candidates, totalling 30 fits\n[CV] C=8.852316058423087, gamma=0.001766074650481071 .................\n"
],
[
"rnd_search_cv.best_estimator_",
"_____no_output_____"
],
[
"rnd_search_cv.best_score_",
"_____no_output_____"
]
],
[
[
"This looks pretty low but remember we only trained the model on 1,000 instances. Let's retrain the best estimator on the whole training set (run this at night, it will take hours):",
"_____no_output_____"
]
],
[
[
"rnd_search_cv.best_estimator_.fit(X_train_scaled, y_train)",
"_____no_output_____"
],
[
"y_pred = rnd_search_cv.best_estimator_.predict(X_train_scaled)\naccuracy_score(y_train, y_pred)",
"_____no_output_____"
]
],
[
[
"Ah, this looks good! Let's select this model. Now we can test it on the test set:",
"_____no_output_____"
]
],
[
[
"y_pred = rnd_search_cv.best_estimator_.predict(X_test_scaled)\naccuracy_score(y_test, y_pred)",
"_____no_output_____"
]
],
[
[
"Not too bad, but apparently the model is overfitting slightly. It's tempting to tweak the hyperparameters a bit more (e.g. decreasing `C` and/or `gamma`), but we would run the risk of overfitting the test set. Other people have found that the hyperparameters `C=5` and `gamma=0.005` yield even better performance (over 98% accuracy). By running the randomized search for longer and on a larger part of the training set, you may be able to find this as well.",
"_____no_output_____"
],
[
"## 10.",
"_____no_output_____"
],
[
"_Exercise: train an SVM regressor on the California housing dataset._",
"_____no_output_____"
],
[
"Let's load the dataset using Scikit-Learn's `fetch_california_housing()` function:",
"_____no_output_____"
]
],
[
[
"from sklearn.datasets import fetch_california_housing\n\nhousing = fetch_california_housing()\nX = housing[\"data\"]\ny = housing[\"target\"]",
"_____no_output_____"
]
],
[
[
"Split it into a training set and a test set:",
"_____no_output_____"
]
],
[
[
"from sklearn.model_selection import train_test_split\n\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)",
"_____no_output_____"
]
],
[
[
"Don't forget to scale the data:",
"_____no_output_____"
]
],
[
[
"from sklearn.preprocessing import StandardScaler\n\nscaler = StandardScaler()\nX_train_scaled = scaler.fit_transform(X_train)\nX_test_scaled = scaler.transform(X_test)",
"_____no_output_____"
]
],
[
[
"Let's train a simple `LinearSVR` first:",
"_____no_output_____"
]
],
[
[
"from sklearn.svm import LinearSVR\n\nlin_svr = LinearSVR(random_state=42)\nlin_svr.fit(X_train_scaled, y_train)",
"/Users/ageron/.virtualenvs/ml/lib/python3.6/site-packages/sklearn/svm/base.py:922: ConvergenceWarning: Liblinear failed to converge, increase the number of iterations.\n \"the number of iterations.\", ConvergenceWarning)\n"
]
],
[
[
"Let's see how it performs on the training set:",
"_____no_output_____"
]
],
[
[
"from sklearn.metrics import mean_squared_error\n\ny_pred = lin_svr.predict(X_train_scaled)\nmse = mean_squared_error(y_train, y_pred)\nmse",
"_____no_output_____"
]
],
[
[
"Let's look at the RMSE:",
"_____no_output_____"
]
],
[
[
"np.sqrt(mse)",
"_____no_output_____"
]
],
[
[
"In this training set, the targets are tens of thousands of dollars. The RMSE gives a rough idea of the kind of error you should expect (with a higher weight for large errors): so with this model we can expect errors somewhere around $10,000. Not great. Let's see if we can do better with an RBF Kernel. We will use randomized search with cross validation to find the appropriate hyperparameter values for `C` and `gamma`:",
"_____no_output_____"
]
],
[
[
"from sklearn.svm import SVR\nfrom sklearn.model_selection import RandomizedSearchCV\nfrom scipy.stats import reciprocal, uniform\n\nparam_distributions = {\"gamma\": reciprocal(0.001, 0.1), \"C\": uniform(1, 10)}\nrnd_search_cv = RandomizedSearchCV(SVR(), param_distributions, n_iter=10, verbose=2, cv=3, random_state=42)\nrnd_search_cv.fit(X_train_scaled, y_train)",
"[Parallel(n_jobs=1)]: Using backend SequentialBackend with 1 concurrent workers.\n"
],
[
"rnd_search_cv.best_estimator_",
"_____no_output_____"
]
],
[
[
"Now let's measure the RMSE on the training set:",
"_____no_output_____"
]
],
[
[
"y_pred = rnd_search_cv.best_estimator_.predict(X_train_scaled)\nmse = mean_squared_error(y_train, y_pred)\nnp.sqrt(mse)",
"_____no_output_____"
]
],
[
[
"Looks much better than the linear model. Let's select this model and evaluate it on the test set:",
"_____no_output_____"
]
],
[
[
"y_pred = rnd_search_cv.best_estimator_.predict(X_test_scaled)\nmse = mean_squared_error(y_test, y_pred)\nnp.sqrt(mse)",
"_____no_output_____"
],
[
"cmap = matplotlib.cm.get_cmap(\"jet\")",
"_____no_output_____"
],
[
"from sklearn.datasets import fetch_openml\nmnist = fetch_openml(\"mnist_784\", version=1)\nprint(mnist.data.shape)",
"(70000, 784)\n"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code"
] |
[
[
"markdown",
"markdown",
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown",
"markdown",
"markdown",
"markdown",
"markdown",
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown",
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown",
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
]
] |
4ae87d69a16f63a0f6038dbc04e05ddb5ba69b7e
| 117,249 |
ipynb
|
Jupyter Notebook
|
ExamPrep/SciCompComplete/Final+Cheat+Sheet+UPDATE.ipynb
|
FHomewood/ScientificComputing
|
bc3477b4607b25a700f2d89ca4f01cb3ea0998c4
|
[
"IJG"
] | null | null | null |
ExamPrep/SciCompComplete/Final+Cheat+Sheet+UPDATE.ipynb
|
FHomewood/ScientificComputing
|
bc3477b4607b25a700f2d89ca4f01cb3ea0998c4
|
[
"IJG"
] | null | null | null |
ExamPrep/SciCompComplete/Final+Cheat+Sheet+UPDATE.ipynb
|
FHomewood/ScientificComputing
|
bc3477b4607b25a700f2d89ca4f01cb3ea0998c4
|
[
"IJG"
] | null | null | null | 116.665672 | 29,178 | 0.863444 |
[
[
[
"import numpy",
"_____no_output_____"
],
[
"%pylab inline",
"Populating the interactive namespace from numpy and matplotlib\n"
],
[
"pwd #import crap with this",
"_____no_output_____"
],
[
"import numpy\nimport matplotlib.pyplot as pl\nimport scipy\nfrom scipy import integrate\nfrom pylab import *\nimport numpy as np\nfrom numpy import zeros, array, asarray, dot, linspace, size, sin, cos, tan, pi, exp, random, linalg \nimport scipy as sci\nfrom scipy import optimize, integrate\nfrom scipy.interpolate import interp1d, barycentric_interpolate\nfrom scipy.optimize import curve_fit\nimport pylab as pl\nfrom gaussElimin import *\nfrom gaussPivot import *\n\nfrom ridder import *\nfrom newtonRaphson import *\nfrom newtonRaphson2 import *\nfrom printSoln import *\nimport run_kut4 as runkut\n\nimport time\nfrom scipy import interpolate, optimize\nfrom numpy import *",
"_____no_output_____"
]
],
[
[
"$$ Making-Matricies $$",
"_____no_output_____"
]
],
[
[
"from numpy import array,float\na=array([[2.0,1.0],[3.0,4.0]])\nprint(a)",
"[[ 2. 1.]\n [ 3. 4.]]\n"
],
[
"b=(numpy.zeros((2,2)))\nprint (b)",
"[[ 0. 0.]\n [ 0. 0.]]\n"
],
[
"c=(numpy.arange(10,20,2))\nprint (c)",
"[10 12 14 16 18]\n"
],
[
"d = numpy.linspace(0,8,9).reshape(3,3)\nprint(d)",
"[[ 0. 1. 2.]\n [ 3. 4. 5.]\n [ 6. 7. 8.]]\n"
],
[
"d[0]=[2,3,5] # Change a row\nd[1,1]=6 # Change an element\nd[2,0:2]=[8,-3] # Change part of a row\nprint(d)",
"[[ 2. 3. 5.]\n [ 3. 6. 5.]\n [ 8. -3. 8.]]\n"
]
],
[
[
"$$ Creating-matricies-of-functions $$",
"_____no_output_____"
]
],
[
[
"def f(x):\n return x**3 # sample function\n\nn = 5 # no of points in [0,1]\ndx = 1.0/(n-1) # x spacing\nxlist = [i*dx for i in range(n)]\nylist = [f(x) for x in xlist]",
"_____no_output_____"
],
[
"import numpy as np\nx2 = np.array(xlist)\ny2 = np.array(ylist)\nprint(x2,y2)",
"[ 0. 0.25 0.5 0.75 1. ] [ 0. 0.015625 0.125 0.421875 1. ]\n"
],
[
"n = 5 # number of points\nx3 = np.linspace(0, 1, n) # n points in [0, 1]\ny3 = np.zeros(n) # n zeros (float data type)\n\n\n\nfor i in range(n):\n y3[i] = f(x3[i])\n print(x3,y3)",
"[ 0. 0.25 0.5 0.75 1. ] [ 0. 0. 0. 0. 0.]\n[ 0. 0.25 0.5 0.75 1. ] [ 0. 0.015625 0. 0. 0. ]\n[ 0. 0.25 0.5 0.75 1. ] [ 0. 0.015625 0.125 0. 0. ]\n[ 0. 0.25 0.5 0.75 1. ] [ 0. 0.015625 0.125 0.421875 0. ]\n[ 0. 0.25 0.5 0.75 1. ] [ 0. 0.015625 0.125 0.421875 1. ]\n"
],
[
"from numpy.linalg import inv,solve\nprint(inv(a)) # Matrix inverse\nprint(solve(a,b)) # Solve the system of equations [A]{x} = {b}",
"[[ 0.8 -0.2]\n [-0.6 0.4]]\n[[ 0. 0.]\n [ 0. 0.]]\n"
]
],
[
[
"$$ Plotting $$",
"_____no_output_____"
]
],
[
[
"import numpy as np\nimport matplotlib.pyplot as plt",
"_____no_output_____"
],
[
"def f(x):\n return x**2\ndx = 1\nx0 = [i*dx for i in range (-5,6)]\ny = [f(x) for x in x0]",
"_____no_output_____"
],
[
"x1 = np.array(x0)\ny1 = np.array(y)\nprint (x1,y1)",
"[-5 -4 -3 -2 -1 0 1 2 3 4 5] [25 16 9 4 1 0 1 4 9 16 25]\n"
]
],
[
[
"$$ Fitting-data-to-graphs $$",
"_____no_output_____"
]
],
[
[
"plt.plot(x1,y1,':rs') #:rs = dotted red squares\nplt.xlabel(\"X crap\")\nplt.ylabel(\"Y crap\")\nplt.axis([-6,6,-1,30])\nplt.legend('$$')\nplt.show()",
"_____no_output_____"
]
],
[
[
"$$ Plotting:Ae^{-kx}*cos(2pi*nu*x) $$",
"_____no_output_____"
]
],
[
[
"#parameters\nA, nu, k = 10, 4, 2\n\n#function for creating the data points to be interpolated\ndef f(x, A, nu, k):\n return A * np.exp(-k*x) * np.cos(2*np.pi * nu * x)\n\n#create the data points to be interpolated\nxmax, nx = 0.5, 8 \nx = np.linspace(0, xmax, nx) #(starting point, end point, number of points)\ny = f(x, A, nu, k) #X and Y are the data points",
"_____no_output_____"
],
[
"#Polynomial Fit\n#generate the points where we want to evaluate the interpolating functions\nx0 = np.linspace(0, xmax, 100)\n\n#polynomial rpolinterpolation - this gives vector y where the polynomial is already evaluated\ny0 = (barycentric_interpolate(x, y, x0)) #X0 and Y0 are polynomial fitted data\nprint(y0)",
"[ 10. 11.76264339 12.71533871 12.99266266 12.7159795\n 11.99425605 10.92484697 9.59425101 8.07883857 6.44555114\n 4.75257308 3.04997619 1.38033767 -0.22066819 -1.72370395\n -3.10522825 -4.34697972 -5.43548515 -6.36159141 -7.1200206\n -7.70894806 -8.12960257 -8.3858884 -8.48402867 -8.43222952\n -8.24036461 -7.91967949 -7.48251527 -6.94205126 -6.31206587\n -5.60671548 -4.84033069 -4.0272295 -3.18154689 -2.31708036\n -1.44715092 -0.584479 0.25892508 1.07185673 1.84399922\n 2.56599273 3.22949092 3.82720552 4.35293926 4.80160786\n 5.16925139 5.45303558 5.65124348 5.76325813 5.78953651\n 5.73157542 5.5918697 5.37386334 5.08189386 4.72113061\n 4.2975073 3.81764938 3.28879673 2.71872207 2.11564572\n 1.48814704 0.84507317 0.19544551 -0.45163564 -1.08708766\n -1.701943 -2.28744694 -2.83515508 -3.33703025 -3.78553823\n -4.17374179 -4.49539269 -4.74502097 -4.9180212 -5.01073508 -5.02053\n -4.94587303 -4.78639978 -4.54297782 -4.21776395 -3.81425505\n -3.33733184 -2.79329516 -2.18989427 -1.53634668 -0.84334895\n -0.12307815 0.61081674 1.34323382 2.05764812 2.73615299\n 3.35951324 3.90723079 4.35762309 4.68791502 4.8743445\n 4.89228255 4.71636816 4.32065839 3.67879441]\n"
],
[
"# splines: linear and cubic\nf_linear = interp1d(x, y)\nf_cubic = interp1d(x, y, kind='cubic')",
"_____no_output_____"
],
[
"#plot all results and the original data\npl.plot(x, y, 'o', label='data points')\n\npl.plot(x0, y0, label='polynomial')\n\npl.plot(x0, f_linear(x0), label='linear')\n\npl.plot(x0, f_cubic(x0), label='cubic')\n\npl.legend()\npl.show()",
"_____no_output_____"
]
],
[
[
"$$ Solving-Equations $$",
"_____no_output_____"
]
],
[
[
"from bisection import *\nfrom ridder import *",
"_____no_output_____"
],
[
"# Import the required modules\nimport numpy as np\nimport pylab as pl\nimport scipy as sci\nfrom scipy import optimize\nfrom newtonRaphson import *",
"_____no_output_____"
],
[
"# First set up the system of equations - note that it is a vector of equations!\ndef f(x):\n return np.array([x[0]**2+x[1]**2-3,x[0]*x[1]-1])\n# Initial guess for the roots (e.g. from plotting the two functions) - again a vector\nx0=np.array([0.5,1.5])",
"_____no_output_____"
],
[
"roots_solve=sci.optimize.fsolve(f,x0)\nprint(roots_solve)",
"[ 0.61803399 1.61803399]\n"
]
],
[
[
"$$ Intergrating $$",
"_____no_output_____"
]
],
[
[
"import scipy\nfrom scipy import integrate\nfrom pylab import *\nfrom scipy import interpolate, optimize\nfrom numpy import *",
"_____no_output_____"
],
[
"def f(t):\n return -t**(2.0)+(3.0)*t+3.0",
"_____no_output_____"
],
[
"from trapezoid import *\nfrom romberg import *",
"_____no_output_____"
],
[
"scipy.integrate.romberg(f,-4.0,3.0)",
"_____no_output_____"
],
[
"scipy.integrate.quad(f,-4.0,3.0)",
"_____no_output_____"
],
[
"#Trapezoid method example\nr = zeros(21) # we will be storing the results here\nr[1] = trapezoid(f,1.0,3.0,1.0,3) # first call is special, since no \n # result to be refined yet exists\nfor k in range(2,21):\n r[k] = trapezoid(f,-4.0,3.0,r[k-1],k) # refinements of the answer using ever more points \n \nresult=r[20]\nprint('Trapezoid method result: ',result)",
"Trapezoid method result: -19.8331764541\n"
],
[
"from scipy.integrate import quad as sciquad",
"_____no_output_____"
],
[
"sciquad(f,-4.0,3.0) #wut how work wut",
"_____no_output_____"
]
],
[
[
"$$ Solving-Differential-Equations $$",
"_____no_output_____"
]
],
[
[
"from printSoln import *\nfrom run_kut4 import *\nimport pylab as pl",
"_____no_output_____"
],
[
"# First set up the right-hand side RHS) of the equation\ndef f(x,y):\n f=zeros(1) # sets up RHS as a vector (here of just one element)\n f[0]=y[0]*(1.0-y[0]) # RHS; note that y is also a vector\n return f",
"_____no_output_____"
],
[
"# For solving a first order differential equation\n# Example: using Runge-Kutta of 4th order\nx = 0.0 #Integration Start Limit\nxStop = 5.0 #Integration End Limit\n\ny = array([0.1]) # Initial value of\n\nh = 0.001 # Step size\nfreq = 1000 # Printout frequency - print the result every 1000 steps\n\nX,Y = integrate(f,x,y,xStop,h) # call the RK4 solver\nprintSoln(X,Y,freq) # Print the solution (code on SD)\n\npl.plot(X,Y[:,0]) # Plot the solution\npl.xlabel('Time')\npl.ylabel('Population')\npl.show()",
"\n x y[ 0 ] \n 0.0000e+00 1.0000e-01 \n 1.0000e+00 2.3197e-01 \n 2.0000e+00 4.5085e-01 \n 3.0000e+00 6.9057e-01 \n 4.0000e+00 8.5849e-01 \n 5.0000e+00 9.4283e-01 \n"
],
[
"# For solving a first order differential equation\n# Same example equation solved with the internal solver\n\n# First set up the right-hand side RHS) of the equation\n# NOTE THE DIFFERENT ORDER OF THE FUNCTION ARGUMENTS COMPARED TO ABOVE\ndef g(y,x):\n g=zeros(1) # sets up RHS as a vector \n g[0]=y[0]*(1.0-y[0]) # RHS; note that y is also a vector\n return g",
"_____no_output_____"
],
[
"x=np.linspace(0,5,100) # where do we want the solution\n\ny0=array([0.1]) # initial condition\n\nz=scipy.integrate.odeint(g,y0,x) # call the solver\nz=z.reshape(np.size(x)) # reformat the answer\n\npl.plot(x,z) # Plot the solution\npl.xlabel('Time')\npl.ylabel('Population')\npl.show()",
"_____no_output_____"
],
[
"# For solving two interlinked differential equations\n# Define right-hand sides of equations (into a vector!). \n# 'y', containing all functions to be solved for, is also a vector \ndef F(x,y,a=1.0,b=2.0,c=1.0,d=2.0):\n F = zeros(2)\n F[0] = y[0]*(a-b*y[1])\n F[1] = y[1]*(c*y[0]-d)\n return F\n\nx = 0.0 # Start of integration\nxStop = 10.0 # End of integration\ny = array([0.1, 0.03]) # Initial values of {y}\nh = 0.05 # Step size\nfreq = 20 # Printout frequency\nX,Y = integrate(F,x,y,xStop,h)\nprintSoln(X,Y,freq)\npl.plot(X,Y[:,0],label='Rabbit population')\npl.plot(X,Y[:,1],label='Fox population')\npl.xlabel('Time')\npl.legend()\npl.show()",
"\n x y[ 0 ] y[ 1 ] \n 0.0000e+00 1.0000e-01 3.0000e-02 \n 1.0000e+00 2.6454e-01 4.8052e-03 \n 2.0000e+00 7.1571e-01 1.0230e-03 \n 3.0000e+00 1.9430e+00 4.7308e-04 \n 4.0000e+00 5.2735e+00 1.7999e-03 \n 5.0000e+00 1.0558e+01 1.3727e+00 \n 6.0000e+00 5.9415e-02 1.4783e+00 \n 7.0000e+00 4.4089e-02 2.0868e-01 \n 8.0000e+00 9.9717e-02 3.0180e-02 \n 9.0000e+00 2.6375e-01 4.8316e-03 \n 1.0000e+01 7.1355e-01 1.0272e-03 \n"
],
[
"# Define the right hand side\ndef f(y,t):\n return y**2-y**3\n\n# Parameter\ndelta=0.001\n# Where do we want the solution?\nx=np.linspace(0,2./delta,100)\n# Call the solver\nz=scipy.integrate.odeint(f,delta,x)\nz=z.reshape(np.size(x)) # reformat the answer\n\npl.plot(x,z) # Plot the solution\npl.xlabel('Time')\npl.ylabel('Position')\npl.show()",
"_____no_output_____"
]
]
] |
[
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code"
] |
[
[
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code",
"code"
]
] |
4ae88014fa9d7cf625076cba62fdc3ae682954ed
| 11,099 |
ipynb
|
Jupyter Notebook
|
18.06.21 - Project1/Archive (Delete)/Candidate.ipynb
|
Reuben-Quinto/3_homework_submissions
|
f8d5618baea092c88e44851619cc3b5cc9004673
|
[
"MIT"
] | null | null | null |
18.06.21 - Project1/Archive (Delete)/Candidate.ipynb
|
Reuben-Quinto/3_homework_submissions
|
f8d5618baea092c88e44851619cc3b5cc9004673
|
[
"MIT"
] | null | null | null |
18.06.21 - Project1/Archive (Delete)/Candidate.ipynb
|
Reuben-Quinto/3_homework_submissions
|
f8d5618baea092c88e44851619cc3b5cc9004673
|
[
"MIT"
] | null | null | null | 60.650273 | 2,141 | 0.584918 |
[
[
[
"import tweepy\nimport json\nfrom config import (consumer_key, consumer_secret, \n access_token, access_token_secret)\n\n# Setup Tweepy API Authentication\nauth = tweepy.OAuthHandler(consumer_key, consumer_secret)\nauth.set_access_token(access_token, access_token_secret)\napi = tweepy.API(auth, parser=tweepy.parsers.JSONParser())",
"_____no_output_____"
]
],
[
[
"neils_text = []\nfor x in range(1,5):\n api.user_timeline(\"neiltyson\", page=x)\n for i in range(len(api.user_timeline(\"neiltyson\"))):\n neils_text.append(api.user_timeline(\"neiltyson\")[i][\"text\"])\n \nneils_text",
"_____no_output_____"
]
],
[
[
"# general loop\nfor i in range(len(api.search(\"travis allen\")[\"statuses\"])):\n print(api.search(\"travis allen\")[\"statuses\"][i][\"created_at\"])\n print(api.search(\"travis allen\")[\"statuses\"][i][\"text\"])\n print(\"---------------------------------------------\")",
"Wed Jun 13 02:11:51 +0000 2018\n@Kate1Kincaid @skramerbyu_82 Unfortunately, it’s too late! Our only hope was Travis Allen, but the deep state rigg… https://t.co/IgrdKL3wVl\n---------------------------------------------\nWed Jun 13 02:09:02 +0000 2018\n@ScottPresler @conservusa1980s I voted for Travis Allen in CA (Gov), but will support John Cox against Newsome ever… https://t.co/hjf0i3VxxJ\n---------------------------------------------\nWed Jun 13 02:03:33 +0000 2018\nLook how many supporters Travis Allen has👇But John Cox, his goons & the CA Sec of State say no...\nhttps://t.co/qshEz5pI7t\n---------------------------------------------\nWed Jun 13 01:55:42 +0000 2018\nRT @RodriguesNeal: In light of clear election fraud. I am asking all Travis Allen voters to focus on discovering as much evidence as possib…\n---------------------------------------------\nWed Jun 13 01:48:24 +0000 2018\nRT @WarriorofGod97: STILL STANDS! Plug/Shout-out for integrity 🇺🇸 #MAGA VALUES of #TravisAllenForCAGovernor \n\n🤡HOLD U'RE HORSES #johncox #…\n---------------------------------------------\nWed Jun 13 01:39:27 +0000 2018\nRT @sandraschulze: According to the Secretary of State website, on June 8th @JoinTravisAllen had 451,657 votes. Today, June 9th, the site s…\n---------------------------------------------\nWed Jun 13 01:39:22 +0000 2018\n@AmeriKindred @MagaCandidates2 @PhilMcCrackin44 @DonaldJTrumpJr @FLOTUS @RealDrGina @grizz_meister @herbegerenews… https://t.co/y2d129QUUS\n---------------------------------------------\nWed Jun 13 01:35:40 +0000 2018\nRT @Juliana4Trump: @SebGorka @realDonaldTrump What an amazing champion for the art of the deal and for win win negotiations. I’m so proud…\n---------------------------------------------\nWed Jun 13 01:35:02 +0000 2018\nRT @AllenVolunteers: We would love to hear from @AlexPadilla4CA @CASOSvote how a candidate LOSES votes after they have been cast and counte…\n---------------------------------------------\nWed Jun 13 01:29:53 +0000 2018\nRT @AllenVolunteers: We would love to hear from @AlexPadilla4CA @CASOSvote how a candidate LOSES votes after they have been cast and counte…\n---------------------------------------------\nWed Jun 13 01:28:29 +0000 2018\n@e2pilot @rm1evo ugh, that sucks.... that's the kind of thing I was worried about w/Travis Allen and the CA gov nomination.\n---------------------------------------------\nWed Jun 13 00:32:28 +0000 2018\nLove Trump but Catherine Templeton is a stronger conservative. You can compare her to Travis Allen in Cal. vs, Cox https://t.co/6x1atPQ1jt\n---------------------------------------------\nWed Jun 13 00:28:35 +0000 2018\nRT @GMconservative: The Western Journal conducted a survey to gather info on the CA 2018 GOP primary election. The Western Journal’s survey…\n---------------------------------------------\nWed Jun 13 00:25:47 +0000 2018\nRT @ScottPresler: I know many of you worked so hard for Travis Allen, and we're thankful for the energy he's brought to California.\n\nWe nee…\n---------------------------------------------\nWed Jun 13 00:08:55 +0000 2018\nRT @zuzu2007: #AB2943 The Voice of PEOPLE!#Takebackcalifornia Travis Allen is always a fighter! Live video in sacramento!https://t.co/dpqYe…\n---------------------------------------------\n"
],
[
"# page parameter\nfor x in range(1,5):\n api.search(\"travis allen\",page=x)\n for i in range(len(api.search(\"travis allen\"))):\n print(api.search(\"travis allen\")[\"statuses\"][i][\"created_at\"])\n print(api.search(\"travis allen\")[\"statuses\"][i][\"text\"])\n print(\"---------------------------------------------\")",
"_____no_output_____"
]
],
[
[
"# Carla Mauro",
"_____no_output_____"
]
]
] |
[
"code",
"raw",
"code",
"markdown"
] |
[
[
"code"
],
[
"raw"
],
[
"code",
"code"
],
[
"markdown"
]
] |
4ae88f30fb3db274b2ff09d78126b7d038fe69f5
| 35,932 |
ipynb
|
Jupyter Notebook
|
scripts/DDS phase truncation error.ipynb
|
doppioandante/tesi
|
aefb6607d2425ced5e923e91a95719a605212e3e
|
[
"MIT"
] | 3 |
2019-03-07T18:25:19.000Z
|
2021-03-29T22:56:48.000Z
|
scripts/DDS phase truncation error.ipynb
|
doppioandante/tesi
|
aefb6607d2425ced5e923e91a95719a605212e3e
|
[
"MIT"
] | null | null | null |
scripts/DDS phase truncation error.ipynb
|
doppioandante/tesi
|
aefb6607d2425ced5e923e91a95719a605212e3e
|
[
"MIT"
] | null | null | null | 221.802469 | 31,880 | 0.925526 |
[
[
[
"from generate_ftw_rom import get_ftws\nfrom generate_waveform_rom import get_waveform_rom\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom scipy import signal\nfrom scipy.fftpack import fft\n\nclock_frequency = 1e8\nsampling_frequency = 48828\npwm_frequency = clock_frequency\nphase_update_freq = clock_frequency\nphase_bits = 32\naddress_bits = 17\nsample_bits = 11\namplitude = 0.4\n\nftws = get_ftws(phase_bits, pwm_frequency)\nwaveform_rom = get_waveform_rom(address_bits, sample_bits)",
"_____no_output_____"
],
[
"# uses global params\ndef to_signed(value, bits):\n if value >= 2**(bits-1):\n return value - 2**bits\n return value\n \ndef dds_generate_phases(note_number, sampling_frequency, total_time):\n phase_register = 0\n ftw = ftws[note_number]\n \n values = []\n phase_updates_per_sample = int(phase_update_freq/sampling_frequency)\n total_steps = int(total_time*phase_update_freq)\n for i in range(0, total_steps):\n if i % phase_updates_per_sample == 0:\n values.append(phase_register)\n phase_register = (phase_register + ftw) % 2**phase_bits\n\n ts = np.arange(0, total_time, 1/sampling_frequency)\n lmin = min(len(ts), len(values))\n return ts[:lmin], values[:lmin]",
"_____no_output_____"
],
[
"def note_number_to_freq(note_number):\n s = 2**(1/12)\n return 440 * s**(note_number-69)\n\ndef plot_dds_phase_error(note_number, sampling_frequency, total_time=None):\n if total_time is None:\n total_time = 1/freq * 3\n ts, ys = dds_generate_phases(note_number, sampling_frequency, total_time)\n phase_error = np.remainder(ys, 2**(phase_bits-address_bits))\n fig = plt.figure()\n ax1 = fig.add_subplot()\n ax1.set_ylabel('Phase error')\n ax1.set_xlabel('time')\n ax1.set_title('Phase truncation error')\n plt.plot(ts, phase_error)\n return fig\n",
"_____no_output_____"
],
[
"number = 90\ntotal_time = 1.3/note_number_to_freq(number)\nfig = plot_dds_phase_error(70, sampling_frequency, total_time=total_time)\n",
"_____no_output_____"
],
[
"fig.savefig('phase_truncation_error.eps')",
"_____no_output_____"
],
[
"print(ftws[number])",
"63565\n"
]
]
] |
[
"code"
] |
[
[
"code",
"code",
"code",
"code",
"code",
"code"
]
] |
4ae8a0f7bcc35fe2d1e3c2e96346c99a2d9aa5b5
| 25,817 |
ipynb
|
Jupyter Notebook
|
notebooks/Link Tracts to HPI.ipynb
|
sandiegodata-projects/planning-database
|
f3bbcb91eaba895757902bb9bdc582374971ceb3
|
[
"BSD-2-Clause"
] | null | null | null |
notebooks/Link Tracts to HPI.ipynb
|
sandiegodata-projects/planning-database
|
f3bbcb91eaba895757902bb9bdc582374971ceb3
|
[
"BSD-2-Clause"
] | 4 |
2018-09-12T17:09:29.000Z
|
2018-09-16T15:03:19.000Z
|
notebooks/Link Tracts to HPI.ipynb
|
sandiegodata-projects/planning-database
|
f3bbcb91eaba895757902bb9bdc582374971ceb3
|
[
"BSD-2-Clause"
] | 1 |
2018-12-14T00:38:38.000Z
|
2018-12-14T00:38:38.000Z
| 121.206573 | 1,506 | 0.682225 |
[
[
[
"import metapack as mp\nhpi_p = mp.open_package('http://library.metatab.org/healthyplacesindex.org-healthy_places_index-san_diego-2.zip')\ncomm_p = mp.open_package('http://library.metatab.org/sandiegodata.org-communities-2018-6.zip')\n\nhpi = hpi_p.resource('hpi').dataframe()\ntracts = comm_p.resource('tracts').dataframe()",
"_____no_output_____"
],
[
"hpi.geoid.head()",
"_____no_output_____"
],
[
"tracts.geoid.head()",
"_____no_output_____"
],
[
"from geoid.tiger import Tract as TigerTract\nfrom geoid.acs import AcsGeoid\n\nhpi.head().geoid.apply ( lambda v : TigerTract(v).convert(AcsGeoid))",
"_____no_output_____"
],
[
"hpi_p",
"_____no_output_____"
],
[
"len('6037980010'.zfill(11))",
"_____no_output_____"
]
]
] |
[
"code"
] |
[
[
"code",
"code",
"code",
"code",
"code",
"code"
]
] |
4ae8ab9ee009a5dc2a22f4d4ee7b49a8142c6cca
| 5,391 |
ipynb
|
Jupyter Notebook
|
Monthly_Rent_Problem.ipynb
|
imanojkumar/Python-Programming-Tutorials
|
e43423749b732d3feb07133261c90c519860e6dc
|
[
"Apache-2.0"
] | null | null | null |
Monthly_Rent_Problem.ipynb
|
imanojkumar/Python-Programming-Tutorials
|
e43423749b732d3feb07133261c90c519860e6dc
|
[
"Apache-2.0"
] | null | null | null |
Monthly_Rent_Problem.ipynb
|
imanojkumar/Python-Programming-Tutorials
|
e43423749b732d3feb07133261c90c519860e6dc
|
[
"Apache-2.0"
] | null | null | null | 29.140541 | 226 | 0.482285 |
[
[
[
"# **Paying the rent**",
"_____no_output_____"
],
[
"You are moving to a new city for an internship for a few months and have to rent a house for that purpose.\n\nYou have to pay the full month's house rent even if you have lived for a few days for that month. i.e. if you start on 15th Jan and leave by 15th May, you still have to pay full rent for months of Jan and May too.\n\nYour task is to find the months that you have to pay rent for so that you can write post-dated cheques to your landlord.\n\nYou will be given two dates as input and your task is to print all months between the dates including the months the dates are from.\n\nThe input will contain the two dates in a list as follows: \n[2017,1,1, 2017,3,4] which corresponds to 1st Jan, 2017 and 4th March, 2017. \n\nThis date is in the format(yyyy,mm,dd)\n\nThe output should contain a list with names of months you have to pay the rent for (the list should be sorted chronologically based on months, i.e May should come before August).\n\nYou can assume that there won't be more than 12 months between two dates.",
"_____no_output_____"
]
],
[
[
"import datetime, time, ast, sys\nfrom dateutil.rrule import rrule, MONTHLY\nfrom datetime import datetime as dt",
"_____no_output_____"
],
[
"# input_str = sys.stdin.read()\ninput_str = input()\ninput_list = ast.literal_eval(input_str)\ndateStart=datetime.date(input_list[0],input_list[1],input_list[2])\ndateEnd=datetime.date(input_list[3],input_list[4],input_list[5])\ny1 = input_list[0]\nm1 = input_list[1]\ny2 = input_list[3]\nm2 = input_list[4]\n\n# provide the following as input:\n# [2017,8,2,2018,1,1]",
"[2017,8,2,2018,1,1]\n"
],
[
"if y1 > y2:\n raise Error(\"first date after second\")\nelif y1 == y2:\n if m1 == m2:\n count = 0\n elif m2 > m1:\n count = m2 - m1\n else:\n raise Error(\"first date after second\")\nelse:\n count = (12 + m2) - m1\n if count > 12:\n raise Error(\"more than 12 month difference\")\n \ncount += 1 # inclusive of the same month",
"_____no_output_____"
],
[
"date_start = datetime.date(y1, m1, 1)\nmonths = [dt.strftime(\"%B\") for dt in rrule(MONTHLY, dtstart=date_start, count=count)]\nprint(months)",
"['August', 'September', 'October', 'November', 'December', 'January']\n"
],
[
"months_sorted = sorted(months, key=lambda m: dt.strptime(m, \"%B\"))\nprint(months_sorted)",
"['January', 'August', 'September', 'October', 'November', 'December']\n"
],
[
"",
"_____no_output_____"
]
]
] |
[
"markdown",
"code"
] |
[
[
"markdown",
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code"
]
] |
4ae8acd6e6a82f6e8535a991f67d0b5e7baab746
| 4,912 |
ipynb
|
Jupyter Notebook
|
content/lessons/05/Now-You-Code/NYC2-Multiply-By.ipynb
|
yajiao-su/istpytonproject
|
d1434f31a639cbf9ad0df44c8c35b71f654bce9f
|
[
"MIT"
] | null | null | null |
content/lessons/05/Now-You-Code/NYC2-Multiply-By.ipynb
|
yajiao-su/istpytonproject
|
d1434f31a639cbf9ad0df44c8c35b71f654bce9f
|
[
"MIT"
] | null | null | null |
content/lessons/05/Now-You-Code/NYC2-Multiply-By.ipynb
|
yajiao-su/istpytonproject
|
d1434f31a639cbf9ad0df44c8c35b71f654bce9f
|
[
"MIT"
] | null | null | null | 24.437811 | 295 | 0.468445 |
[
[
[
"# Now You Code 2: Multiply By\n\nWrite a program to ask for a number to multiply by and then lists the multiplication table for that number from 1 to 10. This process will repeat until you enter quit as which point the program will exit.\n\nExample Run:\n\n```\nEnter number to multiply by or type 'quit': 10\n1 x 10 = 10\n2 x 10 = 20\n3 x 10 = 30\n4 x 10 = 40\n5 x 10 = 50\n6 x 10 = 60\n7 x 10 = 70\n8 x 10 = 80\n9 x 10 = 90\n10 x 10 = 100\nEnter number to multiply by or type 'quit': 5\n1 x 5 = 5\n2 x 5 = 10\n3 x 5 = 15\n4 x 5 = 20\n5 x 5 = 25\n6 x 5 = 30\n7 x 5 = 35\n8 x 5 = 40\n9 x 5 = 45\n10 x 5 = 50\nEnter number to multiply by or type 'quit': quit\n```\n\n**NOTE:** you need two loops to complete this program. You'll need an indefinite loop to process the input, and a definite loop to print the multiplication table. We suggest starting out by getting the program to work once and then figuring out the exit condition for the indefinite loop. ",
"_____no_output_____"
]
],
[
[
"#Write TODO list here\n#write count\n#increment by one each time\n#set a variable for the other factor(input type number or type quit)\n# mulitiply the two factors \n\n",
"_____no_output_____"
],
[
"#\n",
"Enter number to multiply by or type 'quit': 10\n1 x 10 = 10\n2 x 10 = 20\n3 x 10 = 30\n4 x 10 = 40\n5 x 10 = 50\n6 x 10 = 60\n7 x 10 = 70\n8 x 10 = 80\n9 x 10 = 90\n10 x 10 = 100\nEnter number to multiply by or type 'quit': 5\n1 x 5 = 5\n2 x 5 = 10\n3 x 5 = 15\n4 x 5 = 20\n5 x 5 = 25\n6 x 5 = 30\n7 x 5 = 35\n8 x 5 = 40\n9 x 5 = 45\n10 x 5 = 50\nEnter number to multiply by or type 'quit': quit\n"
],
[
"count=0\nproduct=0\nwhile True:\n try:\n count+=1\n number=input(\"Enter number to multiple or type 'quit'\")\n if number=='quit':\n break\n number=int(number)\n for count in range (1,11):\n product=count*number\n print(count,\"x\",number,\"=\",product)\n except:\n print(\"That's not a number\")\n ",
"Enter number to multiple or type 'quit'jk\nThat's not a number\nEnter number to multiple or type 'quit'ejil\nThat's not a number\nEnter number to multiple or type 'quit'99\n1 x 99 = 99\n2 x 99 = 198\n3 x 99 = 297\n4 x 99 = 396\n5 x 99 = 495\n6 x 99 = 594\n7 x 99 = 693\n8 x 99 = 792\n9 x 99 = 891\n10 x 99 = 990\nEnter number to multiple or type 'quit'990\n1 x 990 = 990\n2 x 990 = 1980\n3 x 990 = 2970\n4 x 990 = 3960\n5 x 990 = 4950\n6 x 990 = 5940\n7 x 990 = 6930\n8 x 990 = 7920\n9 x 990 = 8910\n10 x 990 = 9900\nEnter number to multiple or type 'quit'3\n1 x 3 = 3\n2 x 3 = 6\n3 x 3 = 9\n4 x 3 = 12\n5 x 3 = 15\n6 x 3 = 18\n7 x 3 = 21\n8 x 3 = 24\n9 x 3 = 27\n10 x 3 = 30\n"
]
]
] |
[
"markdown",
"code"
] |
[
[
"markdown"
],
[
"code",
"code",
"code"
]
] |
4ae8c77d33c4fc0a74fb5f5f9a252ee30be6428e
| 327,001 |
ipynb
|
Jupyter Notebook
|
.ipynb_checkpoints/Stu_MovieLoop-checkpoint.ipynb
|
arinmuk/python_apis
|
9cbf74d9c02f2437c0240b4dab0248d259d4a96f
|
[
"ADSL"
] | null | null | null |
.ipynb_checkpoints/Stu_MovieLoop-checkpoint.ipynb
|
arinmuk/python_apis
|
9cbf74d9c02f2437c0240b4dab0248d259d4a96f
|
[
"ADSL"
] | null | null | null |
.ipynb_checkpoints/Stu_MovieLoop-checkpoint.ipynb
|
arinmuk/python_apis
|
9cbf74d9c02f2437c0240b4dab0248d259d4a96f
|
[
"ADSL"
] | null | null | null | 1,229.327068 | 145,156 | 0.955511 |
[
[
[
"# Dependencies\nimport requests\nimport json\nimport matplotlib.pyplot as plt\nimport matplotlib.image as mpimg\nfrom pprint import pprint\nfrom skimage import io\nurl = \"http://www.omdbapi.com/?apikey=trilogy&t=\"\n\nmovies = [\"Aliens\", \"Sing\", \"Moana\"]",
"_____no_output_____"
],
[
"url = \"http://www.omdbapi.com/?t=\"\napi_key = \"&apikey=trilogy\"",
"_____no_output_____"
],
[
"for movie in movies:\n\n response = requests.get(url + movie + api_key)\n print(response.url)\n data = response.json()\n pprint(data)\n print(f\"Movie was directed by {data['Director']}.\")\n posterurl=data['Poster']\n io.imshow(io.imread(posterurl))\n io.show()",
"http://www.omdbapi.com/?t=Aliens&apikey=trilogy\n{'Actors': 'Sigourney Weaver, Carrie Henn, Michael Biehn, Paul Reiser',\n 'Awards': 'Won 2 Oscars. Another 18 wins & 22 nominations.',\n 'BoxOffice': 'N/A',\n 'Country': 'USA',\n 'DVD': '01 Jun 1999',\n 'Director': 'James Cameron',\n 'Genre': 'Action, Adventure, Sci-Fi, Thriller',\n 'Language': 'English',\n 'Metascore': '84',\n 'Plot': 'Ellen Ripley is rescued by a deep salvage team after being in '\n 'hypersleep for 57 years. The moon that the Nostromo visited has been '\n 'colonized, but contact is lost. This time, colonial marines have '\n 'impressive firepower, but will that be enough?',\n 'Poster': 'https://m.media-amazon.com/images/M/MV5BZGU2OGY5ZTYtMWNhYy00NjZiLWI0NjUtZmNhY2JhNDRmODU3XkEyXkFqcGdeQXVyNzkwMjQ5NzM@._V1_SX300.jpg',\n 'Production': '20th Century Fox Film Corporat',\n 'Rated': 'R',\n 'Ratings': [{'Source': 'Internet Movie Database', 'Value': '8.4/10'},\n {'Source': 'Rotten Tomatoes', 'Value': '99%'},\n {'Source': 'Metacritic', 'Value': '84/100'}],\n 'Released': '18 Jul 1986',\n 'Response': 'True',\n 'Runtime': '137 min',\n 'Title': 'Aliens',\n 'Type': 'movie',\n 'Website': 'N/A',\n 'Writer': 'James Cameron (story by), David Giler (story by), Walter Hill '\n \"(story by), Dan O'Bannon (based on characters created by), Ronald \"\n 'Shusett (based on characters created by), James Cameron '\n '(screenplay by)',\n 'Year': '1986',\n 'imdbID': 'tt0090605',\n 'imdbRating': '8.4',\n 'imdbVotes': '581,749'}\nMovie was directed by James Cameron.\n"
]
]
] |
[
"code"
] |
[
[
"code",
"code",
"code"
]
] |
4ae8cf933acb2401e704afb56bad2df01eb0a8b3
| 25,721 |
ipynb
|
Jupyter Notebook
|
courses/modsim2018/tasks/Tasks_DuringLecture18/BMC-master/notebooks/Biomechanics.ipynb
|
raissabthibes/bmc
|
840800fb94ea3bf188847d0771ca7197dfec68e3
|
[
"MIT"
] | 1 |
2018-06-23T20:09:07.000Z
|
2018-06-23T20:09:07.000Z
|
courses/modsim2018/tasks/Tasks_DuringLecture18/BMC-master/notebooks/Biomechanics.ipynb
|
raissabthibes/bmc
|
840800fb94ea3bf188847d0771ca7197dfec68e3
|
[
"MIT"
] | null | null | null |
courses/modsim2018/tasks/Tasks_DuringLecture18/BMC-master/notebooks/Biomechanics.ipynb
|
raissabthibes/bmc
|
840800fb94ea3bf188847d0771ca7197dfec68e3
|
[
"MIT"
] | 1 |
2019-01-02T23:17:40.000Z
|
2019-01-02T23:17:40.000Z
| 41.485484 | 754 | 0.640722 |
[
[
[
"# Introduction to Biomechanics\n\n> Marcos Duarte \n> Laboratory of Biomechanics and Motor Control ([http://demotu.org/](http://demotu.org/)) \n> Federal University of ABC, Brazil",
"_____no_output_____"
],
[
"## Biomechanics @ UFABC",
"_____no_output_____"
]
],
[
[
"from IPython.display import IFrame\nIFrame('http://demotu.org', width='100%', height=500)",
"_____no_output_____"
]
],
[
[
"## Biomechanics\n\nThe origin of the word *Biomechanics* is evident:\n\n$$ Biomechanics := bios \\, (life) + mechanics $$\n\nProfessor Herbert Hatze, on a letter to the editors of the Journal of Biomechanics in 1974, proposed a (very good) definition for *the science called Biomechanics*:\n\n> \"*Biomechanics is the study of the structure and function of biological systems by means of the methods of mechanics.*\" \nHatze H (1974) [The meaning of the term biomechanics](https://github.com/demotu/BMC/blob/master/courses/HatzeJB74biomechanics.pdf).",
"_____no_output_____"
],
[
"### Biomechanics & Mechanics\n\nAnd Hatze, advocating for *Biomechanics to be a science of its own*, argues that Biomechanics **is not** simply Mechanics of (applied to) living systems:\n\n> \"*It would not be correct to state that 'Biomechanics is the study of the mechanical aspects of the structure and function of biological systems' because biological systems do not have mechanical aspects. They only have biomechanical aspects (otherwise mechanics, as it exists, would be sufficient to describe all phenomena which we now call biomechanical features of biological systems).*\" Hatze (1974)",
"_____no_output_____"
],
[
"### Biomechanics vs. Mechanics\n\nTo support this argument, Hatze illustrates the difference between Biomechanics and the application of Mechanics, with an example of a javelin throw: studying the mechanics aspects of the javelin flight trajectory (use existing knowledge about aerodynamics and ballistics) vs. studying the biomechanical aspects of the phase before the javelin leaves the thrower’s hand (there are no established mechanical models for this system). ",
"_____no_output_____"
],
[
"### Branches of Mechanics \n\nMechanics is a branch of the physical sciences that is concerned with the state of rest or motion of bodies that are subjected to the action of forces. In general, this subject can be subdivided into three branches: rigid-body mechanics, deformable-body mechanics, and fluid mechanics (Hibbeler, 2012). \nIn fact, only a subset of Mechanics matters to Biomechanics, the Classical Mechanics subset, the domain of mechanics for bodies with moderate speeds $(\\ll 3.10^8 m/s!)$ and not very small $(\\gg 3.10^{-9} m!)$ as shown in the following diagram (image from [Wikipedia](http://en.wikipedia.org/wiki/Classical_mechanics)): \n\n<figure><img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/f/f0/Physicsdomains.svg/500px-Physicsdomains.svg.png\" width=300 alt=\"Domains of mechanics\"/>",
"_____no_output_____"
],
[
"### Biomechanics & other Sciences I\n\nOne last point about the excellent letter from Hatze, already in 1974 he points for the following problem:\n\n> \"*The use of the term biomechanics imposes rather severe restrictions on its meaning because of the established definition of the term, mechanics. This is unfortunate, since the synonym Biomechanics, as it is being understood by the majority of biomechanists today, has a much wider meaning.*\" Hatze (1974)",
"_____no_output_____"
],
[
"### Biomechanics & other Sciences II\n\nAlthough the term Biomechanics may sound new to you, it's not rare that people think the use of methods outside the realm of Mechanics as Biomechanics. \nFor instance, electromyography and thermography are two methods that although may be useful in Biomechanics, particularly the former, they clearly don't have any relation with Mechanics; Electromagnetism and Thermodynamics are other [branches of Physics](https://en.wikipedia.org/wiki/Branches_of_physics).",
"_____no_output_____"
],
[
"### Biomechanics & Engineering\n\nEven seeing Biomechanics as a field of Science, as argued by Hatze, it's also possible to refer to Engineering Biomechanics considering that Engineering is \"*the application of scientific and mathematical principles to practical ends*\" [[The Free Dictionary](http://www.thefreedictionary.com/engineering)] and particularly that \"*Engineering Mechanics is the application of Mechanics to solve problems involving common engineering elements*\" [[Wikibooks]](https://en.wikibooks.org/wiki/Engineering_Mechanics), and, last but not least, that Biomedical engineering is the application of engineering principles and design concepts to medicine and biology for healthcare purposes [[Wikipedia](https://en.wikipedia.org/wiki/Biomedical_engineering)].",
"_____no_output_____"
],
[
"### Applications of Biomechanics\n\nBiomechanics matters to fields of science and technology related to biology and health and it's also relevant for the development of synthetic systems inspired on biological systems, as in robotics. To illustrate the variety of applications of Biomechanics, this is the current list of topics covered in the Journal of Biomechanics:",
"_____no_output_____"
]
],
[
[
"from IPython.display import IFrame\nIFrame('http://www.jbiomech.com/aims', width='100%', height=500)",
"_____no_output_____"
]
],
[
[
"### On the branches of Mechanics and Biomechanics I\n\nNowadays, (Classical) Mechanics is typically partitioned in Statics and Dynamics. In turn, Dynamics is divided in Kinematics and Kinetics. This classification is clear; dynamics is the study of the motions of bodies and Statics is the study of forces in the absence of changes in motion. Kinematics is the study of motion without considering its possible causes (forces) and Kinetics is the study of the possible causes of motion. ",
"_____no_output_____"
],
[
"### On the branches of Mechanics and Biomechanics II\n\nNevertheless, it's common in Biomechanics to adopt a slightly different classification: to partition it between Kinematics and Kinetics, and then Kinetics into Statics and Dynamics (David Winter, Nigg & Herzog, and Vladimir Zatsiorsky, among others, use this classification in their books). The rationale is that we first separate the study of motion considering or not its causes (forces). The partition of (Bio)Mechanics in this way is useful because is simpler to study and describe (measure) the kinematics of human motion and then go to the more complicated issue of understanding (measuring) the forces related to the human motion.\n\nAnyway, these different classifications reveal a certain contradiction between Mechanics (particularly from an engineering point of view) and Biomechanics; some scholars will say that this taxonomy in Biomechanics is simply wrong and it should be corrected to align with the Mechanics. Be aware.",
"_____no_output_____"
],
[
"### The future of Biomechanics\n\n(Human) Movement Science combines many disciplines of science (such as, physiology, biomechanics, and psychology) for the study of human movement. Professor Benno Nigg claims that with the growing concern for the well-being of humankind, Movement Science will have an important role: \n> Movement science will be one of the most important and most recognized science fields in the twenty-first century... The future discipline of movement science has a unique opportunity to become an important contributor to the well-being of mankind. \nNigg BM (1993) [Sport science in the twenty-first century](http://www.ncbi.nlm.nih.gov/pubmed/8230394). Journal of Sports Sciences, 77, 343-347.\n\nAnd so Biomechanics will also become an important contributor to the well-being of humankind.",
"_____no_output_____"
],
[
"### Biomechanics and the Biomedical Engineering at UFABC (2017) I\n\nAt the university level, the study of Mechanics is typically done in the disciplines Statics and Dynamics (rigid-body mechanics), Strength of Materials (deformable-body mechanics), and Mechanics of Fluids (fluid mechanics). Consequently, the study on Biomechanics must also cover these topics for a greater understanding of the structure and function of biological systems. ",
"_____no_output_____"
],
[
"### Biomechanics and the Biomedical Engineering at UFABC (2017) II\n\nThe Biomedical Engineering degree at UFABC covers these topics for the study of biological systems in different courses: Ciência dos Materiais Biocompatíveis, Modelagem e Simulação de Sistemas Biomédicos, Métodos de Elementos Finitos aplicados a Sistemas Biomédicos, Mecânica dos Fluidos, Caracterização de Biomateriais, Sistemas Biológicos, and last but not least, Biomecânica I & Biomecânica II. \n\nHow much of biological systems is in fact studied in these disciplines varies a lot. Anyway, none of these courses cover the study of human motion with implications to health, rehabilitation, and sports, except the last course. This is the reason why the courses Biomecânica I & II focus on the analysis of the human movement.",
"_____no_output_____"
],
[
"### More on Biomechanics\n\nThe Wikipedia page on biomechanics is a good place to read more about Biomechanics:",
"_____no_output_____"
]
],
[
[
"from IPython.display import IFrame\nIFrame('http://en.m.wikipedia.org/wiki/Biomechanics', width='100%', height=400)",
"_____no_output_____"
]
],
[
[
"## History of Biomechanics\n\nBiomechanics progressed basically with the advancements in Mechanics and with the invention of instrumentations for measuring mechanical quantities and computing. \n\nThe development of Biomechanics was only possible because people became more interested in the understanding of the structure and function of biological systems and to apply these concepts to the progress of the humankind.",
"_____no_output_____"
],
[
"## Aristotle (384-322 BC) \nAristotle was the first to have written about the movement of animals in his works *On the Motion of Animals (De Motu Animalium)* and *On the Gait of Animals (De Incessu Animalium)* [[Works by Aristotle]](http://classics.mit.edu/Browse/index-Aristotle.html).\n\nAristotle clearly already knew what we nowadays refer as Newton's third law of motion: \n\"*For as the pusher pushes so is the pushed pushed, and with equal force.*\" [Part 3, [On the Motion of Animals](http://classics.mit.edu/Aristotle/motion_animals.html)]",
"_____no_output_____"
],
[
"### Aristotle & the Scientific Revolution I\n\nAlthough Aristotle's contributions were unvaluable to humankind, to make his discoveries he doesn't seem to have employed anything similar to what we today refer as [scientific method](https://en.wikipedia.org/wiki/Scientific_method) (the systematic observation, measurement, and experiment, and the formulation, testing, and modification of hypotheses). \n\nMost of the Physics of Aristotle was ambiguous or incorrect; for example, for him there was no motion without a force. He even deduced that speed was proportional to force and inversely proportional to resistance [[Book VII, Physics](http://classics.mit.edu/Aristotle/physics.7.vii.html)]. Perhaps Aristotle was too influenced by the observation of motion of a body under the action of a friction force, where this notion is not at all unreasonable.",
"_____no_output_____"
],
[
"### Aristotle & the Scientific Revolution II\n\nIf Aristotle performed any observation/experiment at all in his works, he probably was not good on that as, ironically, evinced in this part of his writing: \n> \"Males have more teeth than females in the case of men, sheep, goats, and swine; in the case of other animals observations have not yet been made\". Aristotle [The History of Animals](http://classics.mit.edu/Aristotle/history_anim.html).",
"_____no_output_____"
],
[
"## Leonardo da Vinci (1452-1519)\n\n<figure><img src='https://upload.wikimedia.org/wikipedia/commons/thumb/2/22/Da_Vinci_Vitruve_Luc_Viatour.jpg/353px-Da_Vinci_Vitruve_Luc_Viatour.jpg' width=\"240\" alt=\"Vitruvian Man\" style=\"float:right;margin: 0 0 0 20px;\"/></figure>\nContributions of Leonardo to Biomechanics:\n- Studies on the proportions of humans and animals\n- Anatomy studies of the human body, especially the foot\n- Studies on the mechanical function of muscles\n<br><br>\n*\"Le proporzioni del corpo umano secondo Vitruvio\", also known as the [Vitruvian Man](https://en.wikipedia.org/wiki/Vitruvian_Man), drawing by [Leonardo da Vinci](https://en.wikipedia.org/wiki/Leonardo_da_Vinci) circa 1490 based on the work of [Marcus Vitruvius Pollio](https://en.wikipedia.org/wiki/Vitruvius) (1st century BC), depicting a man in supposedly ideal human proportions (image from [Wikipedia](https://en.wikipedia.org/wiki/Vitruvian_Man)).",
"_____no_output_____"
],
[
"## Giovanni Alfonso Borelli (1608-1679)\n\n<figure><img src='.\\..\\images\\borelli.jpg' width=\"240\" alt=\"Borelli\" style=\"float:right;margin: 0 0 0 20px;\"/></figure>\n- [The father of biomechanics](https://en.wikipedia.org/wiki/Giovanni_Alfonso_Borelli); the first to use modern scienfic method into 'Biomechanics' in his book [De Motu Animalium](http://www.e-rara.ch/doi/10.3931/e-rara-28707). \n- Proposed that the levers of the musculoskeletal system magnify motion rather than force. \n- Calculated the forces required for equilibrium in various joints of the human body before Newton published the laws of motion. \n<br><br>\n*Excerpt from the book De Motu Animalium*.",
"_____no_output_____"
],
[
"## More on the history of Biomechanics\n\nSee: \n- <a href=http://courses.washington.edu/bioen520/notes/History_of_Biomechanics_(Martin_1999).pdf>http://courses.washington.edu/bioen520/notes/History_of_Biomechanics_(Martin_1999).pdf</a> \n- [http://biomechanics.vtheatre.net/doc/history.html](http://biomechanics.vtheatre.net/doc/history.html) \n- Chapter 1 of Nigg and Herzog (2006) [Biomechanics of the Musculo-skeletal System](https://books.google.com.br/books?id=hOIeAQAAIAAJ&dq=editions:ISBN0470017678)",
"_____no_output_____"
],
[
"### The International Society of Biomechanics\n\nThe biomechanics community has an official scientific society, the [International Society of Biomechanics](http://isbweb.org/), with a journal, the [Journal of Biomechanics](http://www.jbiomech.com), and an e-mail list, the [Biomch-L](http://biomch-l.isbweb.org):",
"_____no_output_____"
]
],
[
[
"from IPython.display import IFrame\nIFrame('http://biomch-l.isbweb.org/forums/2-General-Discussion', width='100%', height=400)",
"_____no_output_____"
]
],
[
[
"### Examples of Biomechanics Classes around the World",
"_____no_output_____"
]
],
[
[
"from IPython.display import IFrame\nIFrame('http://pages.uoregon.edu/karduna/biomechanics/bme.htm', width='100%', height=400)",
"_____no_output_____"
]
],
[
[
"## Problems\n\n1. Go to [Biomechanics Classes on the Web](http://pages.uoregon.edu/karduna/biomechanics/) to visit websites of biomechanics classes around the world and find out how biomechanics is studied in different fields. \n2. Find examples of applications of biomechanics in different areas. \n3. Watch the video [The Weird World of Eadweard Muybridge](http://youtu.be/5Awo-P3t4Ho) to learn about [Eadweard Muybridge](http://en.wikipedia.org/wiki/Eadweard_Muybridge), an important person to the development of instrumentation for biomechanics. \n4. Think about practical problems in nature that can be studied in biomechanics with simple approaches (simple modeling and low-tech methods) or very complicated approaches (complex modeling and high-tech methods). \n5. What the study in the biomechanics of athletes, children, elderlies, persons with disabilities, other animals, and computer animation for the cinema industry may have in common and different? \n6. Visit the website of the Laboratory of Biomechanics and Motor Control at UFABC and find out what we do and if there is anything you are interested in. \n7. Is there anything in biomechanics that interests you? How could you pursue this interest? ",
"_____no_output_____"
],
[
"## References\n\n- [Biomechanics - Wikipedia, the free encyclopedia](http://en.wikipedia.org/wiki/Biomechanics)\n- [Mechanics - Wikipedia, the free encyclopedia](http://en.wikipedia.org/wiki/Mechanics)\n- [International Society of Biomechanics](http://isbweb.org/)\n- [Biomech-l, the biomechanics' e-mail list](http://biomch-l.isbweb.org/)\n- [Journal of Biomechanics' aims](http://www.jbiomech.com/aims)\n- <a href=\"http://courses.washington.edu/bioen520/notes/History_of_Biomechanics_(Martin_1999).pdf\">A Genealogy of Biomechanics</a>\n- Duarte M (2014) A física da bicicleta no futebol. Ciência Hoje, 53, 313, 16-21. [Online](http://www.cienciahoje.org.br/revista/materia/id/824/n/a_fisica_da_bicicleta_no_futebol), [PDF](http://demotu.org/pubs/CH14.pdf). [Biomechanics of the Bicycle Kick website](http://demotu.org/x/pele/) \n- Hatze H (1974) [The meaning of the term biomechanics](https://github.com/demotu/BMC/blob/master/courses/HatzeJB74biomechanics.pdf). Journal of Biomechanics, 7, 189–190. \n- Hibbeler RC (2012) [Engineering Mechanics: Statics](http://books.google.com.br/books?id=PSEvAAAAQBAJ). Prentice Hall; 13 edition. \n- Nigg BM and Herzog W (2006) [Biomechanics of the Musculo-skeletal System](https://books.google.com.br/books?id=hOIeAQAAIAAJ&dq=editions:ISBN0470017678). 3rd Edition. Wiley. \n- Winter DA (2009) [Biomechanics and motor control of human movement](http://books.google.com.br/books?id=_bFHL08IWfwC). 4 ed. Hoboken, EUA: Wiley.\n- Zatsiorsky VM (1997) [Kinematics of Human Motion](http://books.google.com.br/books/about/Kinematics_of_Human_Motion.html?id=Pql_xXdbrMcC&redir_esc=y). Champaign, Human Kinetics. \n- Zatsiorsky VM (2002) [Kinetics of human motion](http://books.google.com.br/books?id=wp3zt7oF8a0C). Human Kinetics.",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown"
] |
[
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown",
"markdown",
"markdown",
"markdown",
"markdown",
"markdown",
"markdown",
"markdown"
],
[
"code"
],
[
"markdown",
"markdown",
"markdown",
"markdown",
"markdown",
"markdown"
],
[
"code"
],
[
"markdown",
"markdown",
"markdown",
"markdown",
"markdown",
"markdown",
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
]
] |
4ae8d09a4d886c898980d5d67b1425addac1c4a1
| 28,317 |
ipynb
|
Jupyter Notebook
|
Code/Day37-PoliticsEx(Keras).ipynb
|
MDSADABWASIM/ML-Project
|
04fddb611bff0a57229c6d6c5696dcc7e2361b8f
|
[
"MIT"
] | 11 |
2020-01-28T10:15:48.000Z
|
2021-09-04T03:02:03.000Z
|
Code/Day37-PoliticsEx(Keras).ipynb
|
MDSADABWASIM/ML-Project
|
04fddb611bff0a57229c6d6c5696dcc7e2361b8f
|
[
"MIT"
] | null | null | null |
Code/Day37-PoliticsEx(Keras).ipynb
|
MDSADABWASIM/ML-Project
|
04fddb611bff0a57229c6d6c5696dcc7e2361b8f
|
[
"MIT"
] | 3 |
2021-08-18T11:38:41.000Z
|
2022-02-12T00:37:19.000Z
| 106.05618 | 2,848 | 0.42395 |
[
[
[
"# Keras Exercise\n\n## Predict political party based on votes\n\nAs a fun little example, we'll use a public data set of how US congressmen voted on 17 different issues in the year 1984. Let's see if we can figure out their political party based on their votes alone, using a deep neural network!\n\nFor those outside the United States, our two main political parties are \"Democrat\" and \"Republican.\" In modern times they represent progressive and conservative ideologies, respectively.\n\nPolitics in 1984 weren't quite as polarized as they are today, but you should still be able to get over 90% accuracy without much trouble.\n\nSince the point of this exercise is implementing neural networks in Keras, I'll help you to load and prepare the data.\n\nLet's start by importing the raw CSV file using Pandas, and make a DataFrame out of it with nice column labels:",
"_____no_output_____"
]
],
[
[
"import pandas as pd\n\nfeature_names = ['party','handicapped-infants', 'water-project-cost-sharing', \n 'adoption-of-the-budget-resolution', 'physician-fee-freeze',\n 'el-salvador-aid', 'religious-groups-in-schools',\n 'anti-satellite-test-ban', 'aid-to-nicaraguan-contras',\n 'mx-missle', 'immigration', 'synfuels-corporation-cutback',\n 'education-spending', 'superfund-right-to-sue', 'crime',\n 'duty-free-exports', 'export-administration-act-south-africa']\n\nvoting_data = pd.read_csv('../datasets/house-votes-84.data.txt', na_values=['?'], \n names = feature_names)\nvoting_data.head()",
"_____no_output_____"
]
],
[
[
"We can use describe() to get a feel of how the data looks in aggregate:",
"_____no_output_____"
]
],
[
[
"voting_data.describe()",
"_____no_output_____"
]
],
[
[
"We can see there's some missing data to deal with here; some politicians abstained on some votes, or just weren't present when the vote was taken. We will just drop the rows with missing data to keep it simple, but in practice you'd want to first make sure that doing so didn't introduce any sort of bias into your analysis (if one party abstains more than another, that could be problematic for example.)",
"_____no_output_____"
]
],
[
[
"voting_data.dropna(inplace=True)\nvoting_data.describe()",
"_____no_output_____"
]
],
[
[
"Our neural network needs normalized numbers, not strings, to work. So let's replace all the y's and n's with 1's and 0's, and represent the parties as 1's and 0's as well.",
"_____no_output_____"
]
],
[
[
"voting_data.replace(('y', 'n'), (1, 0), inplace=True)\nvoting_data.replace(('democrat', 'republican'), (1, 0), inplace=True)",
"_____no_output_____"
],
[
"voting_data.head()",
"_____no_output_____"
]
],
[
[
"Finally let's extract the features and labels in the form that Keras will expect:",
"_____no_output_____"
]
],
[
[
"all_features = voting_data[feature_names].drop('party', axis=1).values\nall_classes = voting_data['party'].values",
"_____no_output_____"
]
],
[
[
"OK, so have a go at it! You'll want to refer back to the slide on using Keras with binary classification - there are only two parties, so this is a binary problem. This also saves us the hassle of representing classes with \"one-hot\" format like we had to do with MNIST; our output is just a single 0 or 1 value.\n\nAlso refer to the scikit_learn integration slide, and use cross_val_score to evaluate your resulting model with 10-fold cross-validation.\n\n**If you're using tensorflow-gpu on a Windows machine** by the way, you probably *do* want to peek a little bit at my solution - if you run into memory allocation errors, there's a workaround there you can use.\n\nTry out your code here:",
"_____no_output_____"
],
[
"## My implementation is below\n",
"_____no_output_____"
]
],
[
[
"from tensorflow.keras.layers import Dense, Dropout\nfrom tensorflow.keras.models import Sequential\nfrom sklearn.model_selection import cross_val_score\nfrom tensorflow.keras.wrappers.scikit_learn import KerasClassifier\n\ndef create_model():\n model = Sequential()\n #16 feature inputs (votes) going into an 32-unit layer \n model.add(Dense(32, input_dim=16, kernel_initializer='normal', activation='relu'))\n # Adding Dropout layer to prevent overfitting\n model.add(Dropout(0.5))\n # Another hidden layer of 16 units\n model.add(Dense(16, kernel_initializer='normal', activation='relu'))\n #Adding another Dropout layer\n model.add(Dropout(0.5))\n # Output layer with a binary classification (Democrat or Republican political party)\n model.add(Dense(1, kernel_initializer='normal', activation='sigmoid'))\n # Compile model\n model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])\n return model\n\n# Wrap our Keras model in an estimator compatible with scikit_learn\nestimator = KerasClassifier(build_fn=create_model, epochs=100, verbose=0)\n# Now we can use scikit_learn's cross_val_score to evaluate this model identically to the others\ncv_scores = cross_val_score(estimator, all_features, all_classes, cv=10)\ncv_scores.mean()",
"_____no_output_____"
]
],
[
[
"94% without even trying too hard! Did you do better? Maybe more neurons, more layers, or Dropout layers would help even more.",
"_____no_output_____"
],
[
"** Adding Dropout layer in between Dense layer will increase accuracy to 96 % **",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown"
] |
[
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
]
] |
4ae8df1940846ff9118d18d9ed4e8e09cb0986fa
| 21,378 |
ipynb
|
Jupyter Notebook
|
tutorials/text_processing/Inverse_Text_Normalization.ipynb
|
dimapihtar/NeMo
|
167aa5e80de9a20bc77ac152527b085bcc566863
|
[
"Apache-2.0"
] | null | null | null |
tutorials/text_processing/Inverse_Text_Normalization.ipynb
|
dimapihtar/NeMo
|
167aa5e80de9a20bc77ac152527b085bcc566863
|
[
"Apache-2.0"
] | null | null | null |
tutorials/text_processing/Inverse_Text_Normalization.ipynb
|
dimapihtar/NeMo
|
167aa5e80de9a20bc77ac152527b085bcc566863
|
[
"Apache-2.0"
] | null | null | null | 41.51068 | 552 | 0.569651 |
[
[
[
"if 'google.colab' in str(get_ipython()):\n !pip install -q condacolab\n import condacolab\n condacolab.install()",
"_____no_output_____"
],
[
"\"\"\"\nYou can run either this notebook locally (if you have all the dependencies and a GPU) or on Google Colab.\n\nInstructions for setting up Colab are as follows:\n1. Open a new Python 3 notebook.\n2. Import this notebook from GitHub (File -> Upload Notebook -> \"GITHUB\" tab -> copy/paste GitHub URL)\n3. Connect to an instance with a GPU (Runtime -> Change runtime type -> select \"GPU\" for hardware accelerator)\n\"\"\"\n\nBRANCH = 'r1.7.0'",
"_____no_output_____"
],
[
"\n# If you're using Google Colab and not running locally, run this cell.\n# install NeMo\nif 'google.colab' in str(get_ipython()):\n !python -m pip install git+https://github.com/NVIDIA/NeMo.git@$BRANCH#egg=nemo_toolkit[all]",
"_____no_output_____"
],
[
"if 'google.colab' in str(get_ipython()):\n !conda install -c conda-forge pynini=2.1.3\n ! mkdir images\n ! wget https://github.com/NVIDIA/NeMo/blob/$BRANCH/tutorials/text_processing/images/deployment.png -O images/deployment.png\n ! wget https://github.com/NVIDIA/NeMo/blob/$BRANCH/tutorials/text_processing/images/pipeline.png -O images/pipeline.png",
"_____no_output_____"
],
[
"import os\nimport wget\nimport pynini\nimport nemo_text_processing",
"_____no_output_____"
]
],
[
[
"# Task Description\n\nInverse text normalization (ITN) is a part of the Automatic Speech Recognition (ASR) post-processing pipeline. \n\nITN is the task of converting the raw spoken output of the ASR model into its written form to improve the text readability. For example, `in nineteen seventy five` should be changed to `in 1975` and `one hundred and twenty three dollars` to `$123`.",
"_____no_output_____"
],
[
"# NeMo Inverse Text Normalization\n\nNeMo ITN is based on weighted finite-state\ntransducer (WFST) grammars. The tool uses [`Pynini`](https://github.com/kylebgorman/pynini) to construct WFSTs, and the created grammars can be exported and integrated into [`Sparrowhawk`](https://github.com/google/sparrowhawk) (an open-source version of [The Kestrel TTS text normalization system](https://www.cambridge.org/core/journals/natural-language-engineering/article/abs/kestrel-tts-text-normalization-system/F0C18A3F596B75D83B75C479E23795DA)) for production. The NeMo ITN tool can be seen as a Python extension of `Sparrowhawk`. \n\nCurrently, NeMo ITN provides support for English and the following semiotic classes from the [Google Text normalization dataset](https://www.kaggle.com/richardwilliamsproat/text-normalization-for-english-russian-and-polish):\nDATE, CARDINAL, MEASURE, DECIMAL, ORDINAL, MONEY, TIME, PLAIN. \nWe additionally added the class `WHITELIST` for all whitelisted tokens whose verbalizations are directly looked up from a user-defined list.\n\nThe toolkit is modular, easily extendable, and can be adapted to other languages and tasks like [text normalization](https://github.com/NVIDIA/NeMo/blob/stable/tutorials/text_processing/Text_Normalization.ipynb). The Python environment enables an easy combination of text covering grammars with NNs. \n\nThe rule-based system is divided into a classifier and a verbalizer following [Google's Kestrel](https://www.researchgate.net/profile/Richard_Sproat/publication/277932107_The_Kestrel_TTS_text_normalization_system/links/57308b1108aeaae23f5cc8c4/The-Kestrel-TTS-text-normalization-system.pdf) design: the classifier is responsible for detecting and classifying semiotic classes in the underlying text, the verbalizer the verbalizes the detected text segment. \n\nThe overall NeMo ITN pipeline from development in `Pynini` to deployment in `Sparrowhawk` is shown below:\n",
"_____no_output_____"
],
[
"# Quick Start\n\n## Add ITN to your Python ASR post-processing workflow\n\nITN is a part of the `nemo_text_processing` package which is installed with `nemo_toolkit`. Installation instructions could be found [here](https://github.com/NVIDIA/NeMo/tree/main/README.rst).",
"_____no_output_____"
]
],
[
[
"from nemo_text_processing.inverse_text_normalization.inverse_normalize import InverseNormalizer\n\ninverse_normalizer = InverseNormalizer(lang='en')\n\nraw_text = \"we paid one hundred and twenty three dollars for this desk, and this.\"\ninverse_normalizer.inverse_normalize(raw_text, verbose=False)",
"_____no_output_____"
]
],
[
[
"In the above cell, `one hundred and twenty three dollars` would be converted to `$123`, and the rest of the words remain the same.\n\n## Run Inverse Text Normalization on an input from a file\n\nUse `run_predict.py` to convert a spoken text from a file `INPUT_FILE` to a written format and save the output to `OUTPUT_FILE`. Under the hood, `run_predict.py` is calling `inverse_normalize()` (see the above section).",
"_____no_output_____"
]
],
[
[
"# If you're running the notebook locally, update the NEMO_TEXT_PROCESSING_PATH below\n# In Colab, a few required scripts will be downloaded from NeMo github\n\nNEMO_TOOLS_PATH = '<UPDATE_PATH_TO_NeMo_root>/nemo_text_processing/inverse_text_normalization'\nDATA_DIR = 'data_dir'\nos.makedirs(DATA_DIR, exist_ok=True)\n\nif 'google.colab' in str(get_ipython()):\n NEMO_TOOLS_PATH = '.'\n\n required_files = ['run_predict.py',\n 'run_evaluate.py']\n for file in required_files:\n if not os.path.exists(file):\n file_path = 'https://raw.githubusercontent.com/NVIDIA/NeMo/' + BRANCH + '/nemo_text_processing/inverse_text_normalization/' + file\n print(file_path)\n wget.download(file_path)\nelif not os.path.exists(NEMO_TOOLS_PATH):\n raise ValueError(f'update path to NeMo root directory')\n\nINPUT_FILE = f'{DATA_DIR}/test.txt'\nOUTPUT_FILE = f'{DATA_DIR}/test_itn.txt'\n\n! echo \"on march second twenty twenty\" > $DATA_DIR/test.txt\n! python $NEMO_TOOLS_PATH/run_predict.py --input=$INPUT_FILE --output=$OUTPUT_FILE --language='en'",
"_____no_output_____"
],
[
"# check that the raw text was indeed converted to the written form\n! cat $OUTPUT_FILE",
"_____no_output_____"
]
],
[
[
"## Run evaluation\n\n[Google Text normalization dataset](https://www.kaggle.com/richardwilliamsproat/text-normalization-for-english-russian-and-polish) consists of 1.1 billion words of English text from Wikipedia, divided across 100 files. The normalized text is obtained with [The Kestrel TTS text normalization system](https://www.cambridge.org/core/journals/natural-language-engineering/article/abs/kestrel-tts-text-normalization-system/F0C18A3F596B75D83B75C479E23795DA)).\n\nAlthough a large fraction of this dataset can be reused for ITN by swapping input with output, the dataset is not bijective. \n\nFor example: `1,000 -> one thousand`, `1000 -> one thousand`, `3:00pm -> three p m`, `3 pm -> three p m` are valid data samples for normalization but the inverse does not hold for ITN. \n\nWe used regex rules to disambiguate samples where possible, see `nemo_text_processing/inverse_text_normalization/clean_eval_data.py`.\n\nTo run evaluation, the input file should follow the Google Text normalization dataset format. That is, every line of the file needs to have the format `<semiotic class>\\t<unnormalized text>\\t<self>` if it's trivial class or `<semiotic class>\\t<unnormalized text>\\t<normalized text>` in case of a semiotic class.\n\nExample evaluation run: \n\n`python run_evaluate.py \\\n --input=./en_with_types/output-00001-of-00100 \\\n [--language LANGUAGE] \\\n [--cat CATEGORY] \\\n [--filter]`\n \n \nUse `--cat` to specify a `CATEGORY` to run evaluation on (all other categories are going to be excluded from evaluation). With the option `--filter`, the provided data will be cleaned to avoid disambiguates (use `clean_eval_data.py` to clean up the data upfront).",
"_____no_output_____"
]
],
[
[
"eval_text = \"\"\"PLAIN\\ton\\t<self>\nDATE\\t22 july 2012\\tthe twenty second of july twenty twelve\nPLAIN\\tthey\\t<self>\nPLAIN\\tworked\\t<self>\nPLAIN\\tuntil\\t<self>\nTIME\\t12:00\\ttwelve o'clock\n<eos>\\t<eos>\n\"\"\"\n\nINPUT_FILE_EVAL = f'{DATA_DIR}/test_eval.txt'\n\nwith open(INPUT_FILE_EVAL, 'w') as f:\n f.write(eval_text)\n! cat $INPUT_FILE_EVAL",
"_____no_output_____"
],
[
"! python $NEMO_TOOLS_PATH/run_evaluate.py --input=$INPUT_FILE_EVAL --language='en'",
"_____no_output_____"
]
],
[
[
"`run_evaluate.py` call will output both **sentence level** and **token level** accuracies. \nFor our example, the expected output is the following:\n\n```\nLoading training data: data_dir/test_eval.txt\nSentence level evaluation...\n- Data: 1 sentences\n100% 1/1 [00:00<00:00, 58.42it/s]\n- Denormalized. Evaluating...\n- Accuracy: 1.0\nToken level evaluation...\n- Token type: PLAIN\n - Data: 4 tokens\n100% 4/4 [00:00<00:00, 504.73it/s]\n - Denormalized. Evaluating...\n - Accuracy: 1.0\n- Token type: DATE\n - Data: 1 tokens\n100% 1/1 [00:00<00:00, 118.95it/s]\n - Denormalized. Evaluating...\n - Accuracy: 1.0\n- Token type: TIME\n - Data: 1 tokens\n100% 1/1 [00:00<00:00, 230.44it/s]\n - Denormalized. Evaluating...\n - Accuracy: 1.0\n- Accuracy: 1.0\n - Total: 6 \n\nClass | Num Tokens | Denormalization\nsent level | 1 | 1.0 \nPLAIN | 4 | 1.0 \nDATE | 1 | 1.0 \nCARDINAL | 0 | 0 \nLETTERS | 0 | 0 \nVERBATIM | 0 | 0 \nMEASURE | 0 | 0 \nDECIMAL | 0 | 0 \nORDINAL | 0 | 0 \nDIGIT | 0 | 0 \nMONEY | 0 | 0 \nTELEPHONE | 0 | 0 \nELECTRONIC | 0 | 0 \nFRACTION | 0 | 0 \nTIME | 1 | 1.0 \nADDRESS | 0 | 0 \n```",
"_____no_output_____"
],
[
"# C++ deployment\n\nThe instructions on how to export `Pynini` grammars and to run them with `Sparrowhawk`, could be found at [NeMo/tools/text_processing_deployment](https://github.com/NVIDIA/NeMo/tree/main/tools/text_processing_deployment).",
"_____no_output_____"
],
[
"# WFST and Common Pynini Operations\n\nFinite-state acceptor (or FSA) is a finite state automaton that has a finite number of states and no output. FSA either accepts (when the matching patter is found) or rejects a string (no match is found). ",
"_____no_output_____"
]
],
[
[
"print([byte for byte in bytes('fst', 'utf-8')])\n\n# create an acceptor from a string\npynini.accep('fst')",
"_____no_output_____"
]
],
[
[
"Here `0` - is a start note, `1` and `2` are the accept nodes, while `3` is a finite state.\nBy default (token_type=\"byte\", `Pynini` interprets the string as a sequence of bytes, assigning one byte per arc. \n\nA finite state transducer (FST) not only matches the pattern but also produces output according to the defined transitions.",
"_____no_output_____"
]
],
[
[
"# create an FST\npynini.cross('fst', 'FST')",
"_____no_output_____"
]
],
[
[
"Pynini supports the following operations:\n\n- `closure` - Computes concatenative closure.\n- `compose` - Constructively composes two FSTs.\n- `concat` - Computes the concatenation (product) of two FSTs.\n- `difference` - Constructively computes the difference of two FSTs.\n- `invert` - Inverts the FST's transduction.\n- `optimize` - Performs a generic optimization of the FST.\n- `project` - Converts the FST to an acceptor using input or output labels.\n- `shortestpath` - Construct an FST containing the shortest path(s) in the input FST.\n- `union`- Computes the union (sum) of two or more FSTs.\n\n\nThe list of most commonly used `Pynini` operations could be found [https://github.com/kylebgorman/pynini/blob/master/CHEATSHEET](https://github.com/kylebgorman/pynini/blob/master/CHEATSHEET). \n\nPynini examples could be found at [https://github.com/kylebgorman/pynini/tree/master/pynini/examples](https://github.com/kylebgorman/pynini/tree/master/pynini/examples).\nUse `help()` to explore the functionality. For example:",
"_____no_output_____"
]
],
[
[
"help(pynini.union)",
"_____no_output_____"
]
],
[
[
"# NeMo ITN API",
"_____no_output_____"
],
[
"NeMo ITN defines the following APIs that are called in sequence:\n\n- `find_tags() + select_tag()` - creates a linear automaton from the input string and composes it with the final classification WFST, which transduces numbers and inserts semantic tags. \n- `parse()` - parses the tagged string into a list of key-value items representing the different semiotic tokens.\n- `generate_permutations()` - takes the parsed tokens and generates string serializations with different reorderings of the key-value items. This is important since WFSTs can only process input linearly, but the word order can change from spoken to written form (e.g., `three dollars -> $3`). \n- `find_verbalizer() + select_verbalizer` - takes the intermediate string representation and composes it with the final verbalization WFST, which removes the tags and returns the written form. \n\n",
"_____no_output_____"
],
[
"# References and Further Reading:\n\n\n- [Zhang, Yang, Bakhturina, Evelina, Gorman, Kyle and Ginsburg, Boris. \"NeMo Inverse Text Normalization: From Development To Production.\" (2021)](https://arxiv.org/abs/2104.05055)\n- [Ebden, Peter, and Richard Sproat. \"The Kestrel TTS text normalization system.\" Natural Language Engineering 21.3 (2015): 333.](https://www.cambridge.org/core/journals/natural-language-engineering/article/abs/kestrel-tts-text-normalization-system/F0C18A3F596B75D83B75C479E23795DA)\n- [Gorman, Kyle. \"Pynini: A Python library for weighted finite-state grammar compilation.\" Proceedings of the SIGFSM Workshop on Statistical NLP and Weighted Automata. 2016.](https://www.aclweb.org/anthology/W16-2409.pdf)\n- [Mohri, Mehryar, Fernando Pereira, and Michael Riley. \"Weighted finite-state transducers in speech recognition.\" Computer Speech & Language 16.1 (2002): 69-88.](https://cs.nyu.edu/~mohri/postscript/csl01.pdf)",
"_____no_output_____"
]
]
] |
[
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown"
] |
[
[
"code",
"code",
"code",
"code",
"code"
],
[
"markdown",
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown",
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown",
"markdown"
]
] |
4ae8e0855d2e13b76192ec85ab7065aad0c9a057
| 6,087 |
ipynb
|
Jupyter Notebook
|
notebook_examples/QAOA_example.ipynb
|
qcware/qusetta
|
cf4c1e47d819679a8b4d683326bd6d005686a285
|
[
"MIT"
] | 3 |
2020-07-15T15:59:41.000Z
|
2022-02-05T15:06:16.000Z
|
notebook_examples/QAOA_example.ipynb
|
qcware/qusetta
|
cf4c1e47d819679a8b4d683326bd6d005686a285
|
[
"MIT"
] | 2 |
2021-01-21T12:03:24.000Z
|
2021-01-26T18:07:27.000Z
|
notebook_examples/QAOA_example.ipynb
|
qcware/qusetta
|
cf4c1e47d819679a8b4d683326bd6d005686a285
|
[
"MIT"
] | 3 |
2020-07-15T15:59:47.000Z
|
2022-02-07T15:09:51.000Z
| 25.902128 | 331 | 0.422868 |
[
[
[
"# Simple qusetta QAOA example\n\nWe'll show a very basic construction of a $p = 1$ QAOA circuit in *qusetta* form, and then translate it to qiskit, cirq, and quasar.",
"_____no_output_____"
]
],
[
[
"import sys; sys.path.append(\"..\")\nimport qusetta as qs",
"_____no_output_____"
]
],
[
[
"We'll look at a 3 qubit QAOA example for the Hamiltonian $$H = z_0 z_1 + z_1 z_2$$ where each $z_i \\in \\{1, -1 \\}$. We'll first write our circuit as a big string.",
"_____no_output_____"
]
],
[
[
"# The first element of the circuit is a column of Hadamards\ncircuit = \"H(0); H(1); H(2); \"\n\n# next we have exp(-i z_0 z_1 gamma / 2)\ncircuit += \"CX(0, 1); RZ({gamma})(1); CX(0, 1); \"\n\n# now the same for exp(-i z_1 z_2 gamma / 2)\ncircuit += \"CX(1, 2); RZ({gamma})(2); CX(1, 2); \"\n\n# now we have a row of x rotations by beta\ncircuit += \"RX({beta})(0); RX({beta})(1); RX({beta})(2)\"",
"_____no_output_____"
]
],
[
[
"That's the circuit. We can format the string to substitute in for `beta` and `gamma`, and then we split around `';'` to get it into qusetta's form.",
"_____no_output_____"
]
],
[
[
"def qusetta_qaoa_circuit(beta, gamma):\n return circuit.format(beta=beta, gamma=gamma).split(\"; \")",
"_____no_output_____"
]
],
[
[
"Let's see what it looks like without substituting any values for `beta` or `gamma`.",
"_____no_output_____"
]
],
[
[
"print(qusetta_qaoa_circuit(\"beta\", \"gamma\"))",
"['H(0)', 'H(1)', 'H(2)', 'CX(0, 1)', 'RZ(gamma)(1)', 'CX(0, 1)', 'CX(1, 2)', 'RZ(gamma)(2)', 'CX(1, 2)', 'RX(beta)(0)', 'RX(beta)(1)', 'RX(beta)(2)']\n"
]
],
[
[
"Next let's substitute `beta` = $\\pi/2$ and `gamma` = $\\pi/4$.",
"_____no_output_____"
]
],
[
[
"c = qusetta_qaoa_circuit(\"PI/2\", \"PI/4\")\nprint(c)",
"['H(0)', 'H(1)', 'H(2)', 'CX(0, 1)', 'RZ(PI/4)(1)', 'CX(0, 1)', 'CX(1, 2)', 'RZ(PI/4)(2)', 'CX(1, 2)', 'RX(PI/2)(0)', 'RX(PI/2)(1)', 'RX(PI/2)(2)']\n"
]
],
[
[
"Now we convert it to a cirq circuit.",
"_____no_output_____"
]
],
[
[
"print(qs.Cirq.from_qusetta(c))",
"0: ───H───@───────────────@───Rx(0.5π)──────────────────────────────\n │ │\n1: ───H───X───Rz(0.25π)───X───@──────────────────────@───Rx(0.5π)───\n │ │\n2: ───H───────────────────────X──────────Rz(0.25π)───X───Rx(0.5π)───\n"
]
],
[
[
"And to quasar.",
"_____no_output_____"
]
],
[
[
"print(qs.Quasar.from_qusetta(c))",
"T : |0|1|2 |3|4 |5 |6|7 |\n\nq0 : -H-@----@-Rx---------\n | | \nq1 : -H-X-Rz-X-@-----@-Rx-\n | | \nq2 : -H--------X--Rz-X-Rx-\n \nT : |0|1|2 |3|4 |5 |6|7 |\n\n"
]
],
[
[
"And to qiskit.",
"_____no_output_____"
]
],
[
[
"print(qs.Qiskit.from_qusetta(c))",
" ┌───┐ ┌───┐ ┌──────────┐┌───┐┌──────────┐\nq_0: ┤ H ├─────────────────────────┤ X ├────┤ RZ(pi/4) ├┤ X ├┤ RX(pi/2) ├\n ├───┤┌───┐┌──────────┐┌───┐ └─┬─┘ └──────────┘└─┬─┘├──────────┤\nq_1: ┤ H ├┤ X ├┤ RZ(pi/4) ├┤ X ├─────■────────────────────■──┤ RX(pi/2) ├\n ├───┤└─┬─┘└──────────┘└─┬─┘┌──────────┐ └──────────┘\nq_2: ┤ H ├──■────────────────■──┤ RX(pi/2) ├─────────────────────────────\n └───┘ └──────────┘ \n"
]
],
[
[
"Notice how the bits are reversed in the qiskit circuit. Qiskit orders their qubits differently than everyone else, so qusetta automatically flips them so that the output probability vector of the qiskit circuit equivalent to that of the cirq and quasar circuit. See the README or the `qusetta.Qiskit` docstring for more info.",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown"
] |
[
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
]
] |
4ae8f485312c192d722cbd2760347bd82d070746
| 10,688 |
ipynb
|
Jupyter Notebook
|
6-External-Libraries.ipynb
|
chongsoon/intro-to-coding-with-python
|
af79bbabe5117c8c76da7a5153b86fe30cbc0da5
|
[
"MIT"
] | 1 |
2021-01-04T22:48:02.000Z
|
2021-01-04T22:48:02.000Z
|
6-External-Libraries.ipynb
|
chongsoon/intro-to-coding-with-python
|
af79bbabe5117c8c76da7a5153b86fe30cbc0da5
|
[
"MIT"
] | null | null | null |
6-External-Libraries.ipynb
|
chongsoon/intro-to-coding-with-python
|
af79bbabe5117c8c76da7a5153b86fe30cbc0da5
|
[
"MIT"
] | 3 |
2020-12-29T12:30:11.000Z
|
2021-01-04T22:48:04.000Z
| 26.587065 | 269 | 0.592159 |
[
[
[
"# 6. External Libraries\n\n<a href=\"https://colab.research.google.com/github/chongsoon/intro-to-coding-with-python/blob/main/6-External-Libraries.ipynb\" target=\"_parent\">\n <img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/>\n</a>\n\n\nUp till now, we have been using what ever is available to us in Python.\n\nSometimes, we need other people's help to solve our problem. For example, I need help in reading data from a website, or doing specific calculation on the data given to me.\n\nInstead of creating my own functions, I can use libraries/packages developed by other people specifically to solve my problem.\n\nLets look at some common libraries that I use.",
"_____no_output_____"
],
[
"## Installed Libraries/Packages in this Environment\n\nLets find out what has been installed on this environment by running the following code:",
"_____no_output_____"
]
],
[
[
"!conda list\n\n#If this code block fails, try the next one.",
"_____no_output_____"
],
[
"!pip list",
"_____no_output_____"
]
],
[
[
"You can see that a lot of packages have been installed. Let us try some of them.",
"_____no_output_____"
],
[
"## Getting data from web pages/api (Requests)\n\nHave you ever used apps such as bus apps that tell you when the arrival time is? Those information are actually retrieved from LTA web site.\n\nOf course in this practical, we will use some open and free website apis to get data.\n\nWe can use Requests package to get data from web pages and process them in Python.\n\nLets try it out.",
"_____no_output_____"
],
[
"First, we have to tell Python that we want to use this library. In order to do that, we have to \"import\" it into this program.",
"_____no_output_____"
]
],
[
[
"import requests\nimport json",
"_____no_output_____"
]
],
[
[
"Let us get data from Binance. Binance is a cryptocurrency exchange. Think of it like stock market for cryptocurrency like bitcoins. They have free public web api that we can get data from. We can start by declaring URL variables.\n\n[Reference to Binance API](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md)",
"_____no_output_____"
]
],
[
[
"url = 'https://api.binance.com/'\nexchange_info_url = url + 'api/v3/exchangeInfo'",
"_____no_output_____"
]
],
[
[
"Next, we will use requests.get with the url as the parameter and execute the cell.",
"_____no_output_____"
]
],
[
[
"response = requests.get(exchange_info_url)",
"_____no_output_____"
]
],
[
[
"Then we will extract the data from the response into dictionary.",
"_____no_output_____"
]
],
[
[
"response_data = response.json()",
"_____no_output_____"
]
],
[
[
"Lets explore what the keys are in the dictionary.",
"_____no_output_____"
]
],
[
[
"print(response_data.keys())",
"_____no_output_____"
]
],
[
[
"I wonder what is inside the \"symbols\" key.",
"_____no_output_____"
]
],
[
[
"print(type(response_data['symbols']))",
"_____no_output_____"
]
],
[
[
"Since it contains list, let us see what are the first 5 items in the list.",
"_____no_output_____"
]
],
[
[
"print(response_data['symbols'][:5])",
"_____no_output_____"
]
],
[
[
"That is still too much information, lets just inspect the first item.",
"_____no_output_____"
]
],
[
[
"print(response_data['symbols'][0])",
"_____no_output_____"
]
],
[
[
"### Try it yourself: Get the type of data\n\nThis is definitely more manageable. It seems like dictionary types are contained in the list. Are you able to confirm that through code? Print out what is the **type** of the **first** item in the list.",
"_____no_output_____"
]
],
[
[
"#Type in your code here to print the type of the first item in the list.\n\n\n",
"_____no_output_____"
]
],
[
[
"### Try it yourself: Find the crypto!\n\nHow can I find the crypto information in such a long list of items? Do you have any idea?\n\nFind information on Shiba Inu Coin (Symbol: SHIBUSDT), since Elon Musk's [tweet](https://twitter.com/elonmusk/status/1444840184500129797?s=20) increased the price of the coin recently.",
"_____no_output_____"
]
],
[
[
"coin_list = response_data['symbols']\n\n#Type your code below, get information on \"SHIBUSDT\" coin.\n\n",
"_____no_output_____"
]
],
[
[
"We can find the crypto, but there are a lot of information. If we only want to find the price of the crypto, we can refer to this [link](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md#symbol-price-ticker) to find the price of the crypto.",
"_____no_output_____"
]
],
[
[
"symbol_ticker_price_url = url + 'api/v3/ticker/price'\nsymbol_ticker_price_url",
"_____no_output_____"
],
[
"price_request = requests.get(symbol_ticker_price_url)\nprice_request.json()",
"_____no_output_____"
]
],
[
[
"Oh no, it is loading everything...Is there a way to just get the Shiba price? According to the documentation, we can add a parameter to find the price of a particular symbol. Let us see how we can do that.",
"_____no_output_____"
],
[
"Lets create a param payload.",
"_____no_output_____"
]
],
[
[
"symbol_parameter = {'symbol': 'SHIBUSDT'}",
"_____no_output_____"
]
],
[
[
"Then, use the same request, but add the symbol_paremeter that we created.",
"_____no_output_____"
]
],
[
[
"price_request = requests.get(symbol_ticker_price_url, params=symbol_parameter)\nprice_request.json()",
"_____no_output_____"
]
],
[
[
"Cool, now we are able to see the price of Shiba Crypto.\n\nSo far, we have used \"requests\" package to get data from website. There are a lot of other packages out there that could solve the problems that you encounter. Feel free to explore.\n\n- [Python Package Repository](https://pypi.org/)\n- [Conda Package Repository](https://anaconda.org/anaconda/repo)\n\nProceed to the next tutorial (last one) to learn simple data analysis.",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown"
] |
[
[
"markdown",
"markdown"
],
[
"code",
"code"
],
[
"markdown",
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
]
] |
4ae8f4a1096ee63598207fab045b2181c9e34cfd
| 17,934 |
ipynb
|
Jupyter Notebook
|
notebooks/tutorials/overland_flow/kinwave_implicit/kinwave_implicit_overland_flow.ipynb
|
CannedIce/landlab
|
e20455eee05cda1d999f8db66f145feb41f9805b
|
[
"MIT"
] | 1 |
2020-12-25T06:52:45.000Z
|
2020-12-25T06:52:45.000Z
|
notebooks/tutorials/overland_flow/kinwave_implicit/kinwave_implicit_overland_flow.ipynb
|
Sheehace/landlab
|
5cb625fb8e0f70f4943a9c516420ef7a1d5a7ff4
|
[
"MIT"
] | null | null | null |
notebooks/tutorials/overland_flow/kinwave_implicit/kinwave_implicit_overland_flow.ipynb
|
Sheehace/landlab
|
5cb625fb8e0f70f4943a9c516420ef7a1d5a7ff4
|
[
"MIT"
] | null | null | null | 33.458955 | 432 | 0.574384 |
[
[
[
"<a href=\"http://landlab.github.io\"><img style=\"float: left\" src=\"../../../landlab_header.png\"></a>",
"_____no_output_____"
],
[
"# The Implicit Kinematic Wave Overland Flow Component ",
"_____no_output_____"
],
[
"<hr>\n<small>For more Landlab tutorials, click here: <a href=\"https://landlab.readthedocs.io/en/latest/user_guide/tutorials.html\">https://landlab.readthedocs.io/en/latest/user_guide/tutorials.html</a></small>\n<hr>",
"_____no_output_____"
],
[
"## Overview\n\nThis notebook demonstrates the `KinwaveImplicitOverlandFlow` Landlab component. The component implements a two-dimensional kinematic wave model of overland flow, using a digital elevation model or other source of topography as the surface over which water flows.\n\n### Theory\n\nThe kinematic wave equations are a simplified form of the 2D shallow-water equations in which energy slope is assumed to equal bed slope. Conservation of water mass is expressed in terms of the time derivative of the local water depth, $H$, and the spatial derivative (divergence) of the unit discharge vector $\\mathbf{q} = UH$ (where $U$ is the 2D depth-averaged velocity vector):\n\n$$\\frac{\\partial H}{\\partial t} = R - \\nabla\\cdot \\mathbf{q}$$\n\nwhere $R$ is the local runoff rate [L/T] and $\\mathbf{q}$ has dimensions of volume flow per time per width [L$^2$/T]. The discharge depends on the local depth, bed-surface gradient $\\mathbf{S}=-\\nabla\\eta$ (this is the kinematic wave approximation; $\\eta$ is land surface height), and a roughness factor $C_r$:\n\n$$\\mathbf{q} = \\frac{1}{C_r} \\mathbf{S} H^\\alpha |S|^{-1/2}$$\n\nReads may recognize this as a form of the Manning, Chezy, or Darcy-Weisbach equation. If $\\alpha = 5/3$ then we have the Manning equation, and $C_r = n$ is \"Manning's n\". If $\\alpha = 3/2$ then we have the Chezy/Darcy-Weisbach equation, and $C_r = 1/C = (f/8g)^{1/2}$ represents the Chezy roughness factor $C$ and the equivalent Darcy-Weisbach factor $f$.\n\n### Numerical solution\n\nThe solution method used by this component is locally implicit, and works as follows. At each time step, we iterate from upstream to downstream over the topography. Because we are working downstream, we can assume that we know the total water inflow to a given cell. We solve the following mass conservation equation at each cell:\n\n$$\\frac{H^{t+1} - H^t}{\\Delta t }= \\frac{Q_{in}}{A} - \\frac{Q_{out}}{A} + R$$\n\nwhere $H$ is water depth at a given grid node, $t$ indicates time step number, $\\Delta t$ is time step duration, $Q_{in}$ is total inflow discharge, $Q_{out}$ is total outflow discharge, $A$ is cell area, and $R$ is local runoff rate (precipitation minus infiltration; could be negative if runon infiltration is occurring).\n\nThe specific outflow discharge leaving a cell along one of its faces is:\n\n$$q = (1/C_r) H^\\alpha S^{1/2}$$\n\nwhere $S$ is the downhill-positive gradient of the link that crosses this particular face. Outflow discharge is zero for links that are flat or \"uphill\" from the given node. Total discharge out of a cell is then the sum of (specific discharge x face width) over all outflow faces:\n\n$$Q_{out} = \\sum_{i=1}^N (1/C_r) H^\\alpha S_i^{1/2} W_i$$\n\nwhere $N$ is the number of outflow faces (i.e., faces where the ground slopes downhill away from the cell's node), and $W_i$ is the width of face $i$.\n\nWe use the depth at the cell's node, so this simplifies to:\n\n$$Q_{out} = (1/C_r) H'^\\alpha \\sum_{i=1}^N S_i^{1/2} W_i$$\n\nNotice that we know everything here except $H'$. The reason we know $Q_{out}$ is that it equals $Q_{in}$ (which is either zero or we calculated it previously) plus $RA$.\n\nWe define $H$ in the above as a weighted sum of the \"old\" (time step $t$) and \"new\" (time step $t+1$) depth values:\n\n$$H' = w H^{t+1} + (1-w) H^t$$\n\nIf $w=1$, the method is fully implicit. If $w=0$, it is a simple forward explicit method.\n\nWhen we combine these equations, we have an equation that includes the unknown $H^{t+1}$ and a bunch of terms that are known. If $w\\ne 0$, it is a nonlinear equation in $H^{t+1}$, and must be solved iteratively. We do this using a root-finding method in the scipy.optimize library.\n\nIn order to implement the algorithm, we must already know which of neighbors of each node are lower than the neighbor, and what the slopes between them are. We accomplish this using the `FlowAccumulator` and `FlowDirectorMFD` components. Running the `FlowAccumulator` also generates a sorted list (array) of nodes in drainage order.\n\n### The component\n\nImport the needed libraries, then inspect the component's docstring:",
"_____no_output_____"
]
],
[
[
"import copy\nimport numpy as np\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\nfrom landlab import RasterModelGrid, imshow_grid\nfrom landlab.components.overland_flow import KinwaveImplicitOverlandFlow\nfrom landlab.io.esri_ascii import read_esri_ascii",
"_____no_output_____"
],
[
"print(KinwaveImplicitOverlandFlow.__doc__)",
"_____no_output_____"
]
],
[
[
"The docstring for the `__init__` method will give us a list of parameters:",
"_____no_output_____"
]
],
[
[
"print(KinwaveImplicitOverlandFlow.__init__.__doc__)",
"_____no_output_____"
]
],
[
[
"## Example 1: downpour on a plane\n\nThe first example tests that the component can reproduce the expected steady flow pattern on a sloping plane, with a gradient of $S_p$. We'll adopt the Manning equation. Once the system comes into equilibrium, the discharge should increase width distance down the plane according to $q = Rx$. We can use this fact to solve for the corresponding water depth:\n\n$$(1/n) H^{5/3} S^{1/2} = R x$$\n\nwhich implies\n\n$$H = \\left( \\frac{nRx}{S^{1/2}} \\right)^{3/5}$$\n\nThis is the analytical solution against which to test the model.",
"_____no_output_____"
],
[
"Pick the initial and run conditions",
"_____no_output_____"
]
],
[
[
"# Process parameters\nn = 0.01 # roughness coefficient, (s/m^(1/3))\ndep_exp = 5.0 / 3.0 # depth exponent\nS = 0.01 # slope of plane\nR = 72.0 # runoff rate, mm/hr\n\n# Run-control parameters\nrun_time = 240.0 # duration of run, (s)\nnrows = 5 # number of node rows\nncols = 11 # number of node columns\ndx = 2.0 # node spacing, m\ndt = 10.0 # time-step size, s\nplot_every = 60.0 # plot interval, s\n\n# Derived parameters\nnum_steps = int(run_time / dt)",
"_____no_output_____"
]
],
[
[
"Create grid and fields:\n",
"_____no_output_____"
]
],
[
[
"# create and set up grid\ngrid = RasterModelGrid((nrows, ncols), xy_spacing=dx)\ngrid.set_closed_boundaries_at_grid_edges(False, True, True, True) # open only on east\n\n# add required field\nelev = grid.add_zeros('topographic__elevation', at='node')\n\n# set topography\nelev[grid.core_nodes] = S * (np.amax(grid.x_of_node) - grid.x_of_node[grid.core_nodes])",
"_____no_output_____"
]
],
[
[
"Plot topography, first in plan view...",
"_____no_output_____"
]
],
[
[
"imshow_grid(grid, elev)",
"_____no_output_____"
]
],
[
[
"...then as a cross-section:",
"_____no_output_____"
]
],
[
[
"plt.plot(grid.x_of_node, elev)\nplt.xlabel('Distance (m)')\nplt.ylabel('Height (m)')\nplt.grid(True)",
"_____no_output_____"
],
[
"# Instantiate the component\nolflow = KinwaveImplicitOverlandFlow(grid,\n runoff_rate=R, \n roughness=n,\n depth_exp=dep_exp\n )",
"_____no_output_____"
],
[
"# Helpful function to plot the profile\ndef plot_flow_profile(grid, olflow):\n \"\"\"Plot the middle row of topography and water surface\n for the overland flow model olflow.\"\"\"\n nc = grid.number_of_node_columns\n nr = grid.number_of_node_rows\n startnode = nc * (nr // 2) + 1\n midrow = np.arange(startnode, startnode + nc - 1, dtype=int)\n topo = grid.at_node['topographic__elevation']\n plt.plot(grid.x_of_node[midrow],\n topo[midrow] + grid.at_node['surface_water__depth'][midrow],\n 'b'\n )\n plt.plot(grid.x_of_node[midrow],\n topo[midrow],\n 'k'\n )\n plt.xlabel('Distance (m)')\n plt.ylabel('Ground and water surface height (m)')",
"_____no_output_____"
]
],
[
[
"Run the component forward in time, plotting the output in the form of a profile:",
"_____no_output_____"
]
],
[
[
"next_plot = plot_every\nfor i in range(num_steps):\n olflow.run_one_step(dt)\n if (i + 1) * dt >= next_plot:\n plot_flow_profile(grid, olflow)\n next_plot += plot_every",
"_____no_output_____"
],
[
"# Compare with analytical solution for depth\nRms = R / 3.6e6 # convert to m/s\nnc = grid.number_of_node_columns\nx = grid.x_of_node[grid.core_nodes][:nc - 2]\nHpred = (n * Rms * x / (S ** 0.5)) ** 0.6\nplt.plot(x, Hpred, 'r', label='Analytical')\nplt.plot(x,\n grid.at_node['surface_water__depth'][grid.core_nodes][:nc - 2],\n 'b--',\n label='Numerical'\n )\nplt.xlabel('Distance (m)')\nplt.ylabel('Water depth (m)')\nplt.grid(True)\nplt.legend()",
"_____no_output_____"
]
],
[
[
"## Example 2: overland flow on a DEM\n\nFor this example, we'll import a small digital elevation model (DEM) for a site in New Mexico, USA.",
"_____no_output_____"
]
],
[
[
"# Process parameters\nn = 0.1 # roughness coefficient, (s/m^(1/3))\ndep_exp = 5.0 / 3.0 # depth exponent\nR = 72.0 # runoff rate, mm/hr\n\n# Run-control parameters\nrain_duration = 240.0 # duration of rainfall, s\nrun_time = 480.0 # duration of run, s\ndt = 10.0 # time-step size, s\ndem_filename = '../hugo_site_filled.asc'\n\n# Derived parameters\nnum_steps = int(run_time / dt)\n\n# set up arrays to hold discharge and time\ntime_since_storm_start = np.arange(0.0, dt * (2 * num_steps + 1), dt)\ndischarge = np.zeros(2 * num_steps + 1)",
"_____no_output_____"
],
[
"# Read the DEM file as a grid with a 'topographic__elevation' field\n(grid, elev) = read_esri_ascii(dem_filename, name='topographic__elevation')\n\n# Configure the boundaries: valid right-edge nodes will be open; \n# all NODATA (= -9999) nodes will be closed.\ngrid.status_at_node[grid.nodes_at_right_edge] = grid.BC_NODE_IS_FIXED_VALUE\ngrid.status_at_node[np.isclose(elev, -9999.)] = grid.BC_NODE_IS_CLOSED",
"_____no_output_____"
],
[
"# display the topography\ncmap = copy.copy(mpl.cm.get_cmap('pink'))\nimshow_grid(grid, elev, colorbar_label='Elevation (m)', cmap=cmap)",
"_____no_output_____"
]
],
[
[
"It would be nice to track discharge at the watershed outlet, but how do we find the outlet location? We actually have several valid nodes along the right-hand edge. Then we'll keep track of the field `surface_water_inflow__discharge` at these nodes. We can identify the nodes by the fact that they are (a) at the right-hand edge of the grid, and (b) have positive elevations (the ones with -9999 are outside of the watershed).",
"_____no_output_____"
]
],
[
[
"indices = np.where(elev[grid.nodes_at_right_edge] > 0.0)[0]\noutlet_nodes = grid.nodes_at_right_edge[indices]\nprint('Outlet nodes:')\nprint(outlet_nodes)\nprint('Elevations of the outlet nodes:')\nprint(elev[outlet_nodes])",
"_____no_output_____"
],
[
"# Instantiate the component\nolflow = KinwaveImplicitOverlandFlow(grid,\n runoff_rate=R, \n roughness=n,\n depth_exp=dep_exp\n )",
"_____no_output_____"
],
[
"discharge_field = grid.at_node['surface_water_inflow__discharge']\n\nfor i in range(num_steps):\n olflow.run_one_step(dt)\n discharge[i+1] = np.sum(discharge_field[outlet_nodes])",
"_____no_output_____"
],
[
"plt.plot(time_since_storm_start[:num_steps], discharge[:num_steps])\nplt.xlabel('Time (s)')\nplt.ylabel('Discharge (cms)')\nplt.grid(True)",
"_____no_output_____"
],
[
"cmap = copy.copy(mpl.cm.get_cmap('Blues'))\nimshow_grid(grid,\n grid.at_node['surface_water__depth'],\n cmap=cmap,\n colorbar_label='Water depth (m)'\n )",
"_____no_output_____"
]
],
[
[
"Now turn down the rain and run it a bit longer...",
"_____no_output_____"
]
],
[
[
"olflow.runoff_rate = 1.0 # just 1 mm/hr\n\nfor i in range(num_steps, 2 * num_steps):\n olflow.run_one_step(dt)\n discharge[i+1] = np.sum(discharge_field[outlet_nodes])",
"_____no_output_____"
],
[
"plt.plot(time_since_storm_start, discharge)\nplt.xlabel('Time (s)')\nplt.ylabel('Discharge (cms)')\nplt.grid(True)",
"_____no_output_____"
],
[
"cmap = copy.copy(mpl.cm.get_cmap('Blues'))\nimshow_grid(grid,\n grid.at_node['surface_water__depth'],\n cmap=cmap,\n colorbar_label='Water depth (m)'\n )",
"_____no_output_____"
]
],
[
[
"Voila! A fine hydrograph, and a water-depth map that shows deeper water in the channels (and highlights depressions in the topography).",
"_____no_output_____"
],
[
"### Click here for more <a href=\"https://landlab.readthedocs.io/en/latest/user_guide/tutorials.html\">Landlab tutorials</a>",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown"
] |
[
[
"markdown",
"markdown",
"markdown",
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown",
"markdown"
]
] |
4ae9147b5aee23aa1f7f7e9a84c0e3090265e061
| 38,103 |
ipynb
|
Jupyter Notebook
|
1. Robot Moving and Sensing.ipynb
|
waldlecai/simultaneous_localization_and_mapping
|
6395877099dd167f05e4a2a0590c4c53dfbe996d
|
[
"MIT"
] | null | null | null |
1. Robot Moving and Sensing.ipynb
|
waldlecai/simultaneous_localization_and_mapping
|
6395877099dd167f05e4a2a0590c4c53dfbe996d
|
[
"MIT"
] | null | null | null |
1. Robot Moving and Sensing.ipynb
|
waldlecai/simultaneous_localization_and_mapping
|
6395877099dd167f05e4a2a0590c4c53dfbe996d
|
[
"MIT"
] | null | null | null | 79.216216 | 7,104 | 0.776238 |
[
[
[
"# Robot Class\n\nIn this project, we'll be localizing a robot in a 2D grid world. The basis for simultaneous localization and mapping (SLAM) is to gather information from a robot's sensors and motions over time, and then use information about measurements and motion to re-construct a map of the world.\n\n### Uncertainty\n\nAs you've learned, robot motion and sensors have some uncertainty associated with them. For example, imagine a car driving up hill and down hill; the speedometer reading will likely overestimate the speed of the car going up hill and underestimate the speed of the car going down hill because it cannot perfectly account for gravity. Similarly, we cannot perfectly predict the *motion* of a robot. A robot is likely to slightly overshoot or undershoot a target location.\n\nIn this notebook, we'll look at the `robot` class that is *partially* given to you for the upcoming SLAM notebook. First, we'll create a robot and move it around a 2D grid world. Then, **you'll be tasked with defining a `sense` function for this robot that allows it to sense landmarks in a given world**! It's important that you understand how this robot moves, senses, and how it keeps track of different landmarks that it sees in a 2D grid world, so that you can work with it's movement and sensor data.\n\n---\n\nBefore we start analyzing robot motion, let's load in our resources and define the `robot` class. You can see that this class initializes the robot's position and adds measures of uncertainty for motion. You'll also see a `sense()` function which is not yet implemented, and you will learn more about that later in this notebook.",
"_____no_output_____"
]
],
[
[
"# import some resources\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport random\n%matplotlib inline",
"_____no_output_____"
],
[
"# the robot class\nclass robot:\n\n # --------\n # init: \n # creates a robot with the specified parameters and initializes \n # the location (self.x, self.y) to the center of the world\n #\n def __init__(self, world_size = 100.0, measurement_range = 30.0,\n motion_noise = 1.0, measurement_noise = 1.0):\n self.measurement_noise = 0.0\n self.world_size = world_size\n self.measurement_range = measurement_range\n self.x = world_size / 2.0\n self.y = world_size / 2.0\n self.motion_noise = motion_noise\n self.measurement_noise = measurement_noise\n self.landmarks = []\n self.num_landmarks = 0\n\n\n # returns a positive, random float\n def rand(self):\n return random.random() * 2.0 - 1.0\n\n\n # --------\n # move: attempts to move robot by dx, dy. If outside world\n # boundary, then the move does nothing and instead returns failure\n #\n def move(self, dx, dy):\n\n x = self.x + dx + self.rand() * self.motion_noise\n y = self.y + dy + self.rand() * self.motion_noise\n\n if x < 0.0 or x > self.world_size or y < 0.0 or y > self.world_size:\n return False\n else:\n self.x = x\n self.y = y\n return True\n \n\n # --------\n # sense: returns x- and y- distances to landmarks within visibility range\n # because not all landmarks may be in this range, the list of measurements\n # is of variable length. Set measurement_range to -1 if you want all\n # landmarks to be visible at all times\n #\n \n ## TODO: complete the sense function\n def sense(self):\n ''' This function does not take in any parameters, instead it references internal variables\n (such as self.landamrks) to measure the distance between the robot and any landmarks\n that the robot can see (that are within its measurement range).\n This function returns a list of landmark indices, and the measured distances (dx, dy)\n between the robot's position and said landmarks.\n This function should account for measurement_noise and measurement_range.\n One item in the returned list should be in the form: [landmark_index, dx, dy].\n '''\n \n measurements = []\n \n ## TODO: iterate through all of the landmarks in a world\n \n ## TODO: For each landmark\n ## 1. compute dx and dy, the distances between the robot and the landmark\n ## 2. account for measurement noise by *adding* a noise component to dx and dy\n ## - The noise component should be a random value between [-1.0, 1.0)*measurement_noise\n ## - Feel free to use the function self.rand() to help calculate this noise component\n ## - It may help to reference the `move` function for noise calculation\n ## 3. If either of the distances, dx or dy, fall outside of the internal var, measurement_range\n ## then we cannot record them; if they do fall in the range, then add them to the measurements list\n ## as list.append([index, dx, dy]), this format is important for data creation done later\n \n ## TODO: return the final, complete list of measurements\n for i in range(self.num_landmarks):\n dx = self.landmarks[i][0] - self.x + self.rand() * self.measurement_noise\n dy = self.landmarks[i][1] - self.y + self.rand() * self.measurement_noise \n if self.measurement_range < 0.0 or abs(dx) + abs(dy) <= self.measurement_range:\n measurements.append([i, dx, dy])\n return measurements\n\n \n # --------\n # make_landmarks: \n # make random landmarks located in the world\n #\n def make_landmarks(self, num_landmarks):\n self.landmarks = []\n for i in range(num_landmarks):\n self.landmarks.append([round(random.random() * self.world_size),\n round(random.random() * self.world_size)])\n self.num_landmarks = num_landmarks\n \n \n # called when print(robot) is called; prints the robot's location\n def __repr__(self):\n return 'Robot: [x=%.5f y=%.5f]' % (self.x, self.y)\n",
"_____no_output_____"
]
],
[
[
"## Define a world and a robot\n\nNext, let's instantiate a robot object. As you can see in `__init__` above, the robot class takes in a number of parameters including a world size and some values that indicate the sensing and movement capabilities of the robot.\n\nIn the next example, we define a small 10x10 square world, a measurement range that is half that of the world and small values for motion and measurement noise. These values will typically be about 10 times larger, but we ust want to demonstrate this behavior on a small scale. You are also free to change these values and note what happens as your robot moves!",
"_____no_output_____"
]
],
[
[
"world_size = 10.0 # size of world (square)\nmeasurement_range = 5.0 # range at which we can sense landmarks\nmotion_noise = 0.2 # noise in robot motion\nmeasurement_noise = 0.2 # noise in the measurements\n\n# instantiate a robot, r\nr = robot(world_size, measurement_range, motion_noise, measurement_noise)\n\n# print out the location of r\nprint(r)",
"Robot: [x=5.00000 y=5.00000]\n"
]
],
[
[
"## Visualizing the World\n\nIn the given example, we can see/print out that the robot is in the middle of the 10x10 world at (x, y) = (5.0, 5.0), which is exactly what we expect!\n\nHowever, it's kind of hard to imagine this robot in the center of a world, without visualizing the grid itself, and so in the next cell we provide a helper visualization function, `display_world`, that will display a grid world in a plot and draw a red `o` at the location of our robot, `r`. The details of how this function wors can be found in the `helpers.py` file in the home directory; you do not have to change anything in this `helpers.py` file.",
"_____no_output_____"
]
],
[
[
"# import helper function\nfrom helpers import display_world\n\n# define figure size\nplt.rcParams[\"figure.figsize\"] = (5,5)\n\n# call display_world and display the robot in it's grid world\nprint(r)\ndisplay_world(int(world_size), [r.x, r.y])",
"Robot: [x=5.00000 y=5.00000]\n"
]
],
[
[
"## Movement\n\nNow you can really picture where the robot is in the world! Next, let's call the robot's `move` function. We'll ask it to move some distance `(dx, dy)` and we'll see that this motion is not perfect by the placement of our robot `o` and by the printed out position of `r`. \n\nTry changing the values of `dx` and `dy` and/or running this cell multiple times; see how the robot moves and how the uncertainty in robot motion accumulates over multiple movements.\n\n#### For a `dx` = 1, does the robot move *exactly* one spot to the right? What about `dx` = -1? What happens if you try to move the robot past the boundaries of the world?",
"_____no_output_____"
]
],
[
[
"# choose values of dx and dy (negative works, too)\ndx = 1\ndy = 2\nr.move(dx, dy)\n\n# print out the exact location\nprint(r)\n\n# display the world after movement, not that this is the same call as before\n# the robot tracks its own movement\ndisplay_world(int(world_size), [r.x, r.y])",
"Robot: [x=5.97455 y=6.83499]\n"
]
],
[
[
"## Landmarks\n\nNext, let's create landmarks, which are measurable features in the map. You can think of landmarks as things like notable buildings, or something smaller such as a tree, rock, or other feature.\n\nThe robot class has a function `make_landmarks` which randomly generates locations for the number of specified landmarks. Try changing `num_landmarks` or running this cell multiple times to see where these landmarks appear. We have to pass these locations as a third argument to the `display_world` function and the list of landmark locations is accessed similar to how we find the robot position `r.landmarks`. \n\nEach landmark is displayed as a purple `x` in the grid world, and we also print out the exact `[x, y]` locations of these landmarks at the end of this cell.",
"_____no_output_____"
]
],
[
[
"# create any number of landmarks\nnum_landmarks = 3\nr.make_landmarks(num_landmarks)\n\n# print out our robot's exact location\nprint(r)\n\n# display the world including these landmarks\ndisplay_world(int(world_size), [r.x, r.y], r.landmarks)\n\n# print the locations of the landmarks\nprint('Landmark locations [x,y]: ', r.landmarks)",
"Robot: [x=5.97455 y=6.83499]\n"
]
],
[
[
"## Sense\n\nOnce we have some landmarks to sense, we need to be able to tell our robot to *try* to sense how far they are away from it. It will be up t you to code the `sense` function in our robot class.\n\nThe `sense` function uses only internal class parameters and returns a list of the the measured/sensed x and y distances to the landmarks it senses within the specified `measurement_range`. \n\n### TODO: Implement the `sense` function \n\nFollow the `##TODO's` in the class code above to complete the `sense` function for the robot class. Once you have tested out your code, please **copy your complete `sense` code to the `robot_class.py` file in the home directory**. By placing this complete code in the `robot_class` Python file, we will be able to refernce this class in a later notebook.\n\nThe measurements have the format, `[i, dx, dy]` where `i` is the landmark index (0, 1, 2, ...) and `dx` and `dy` are the measured distance between the robot's location (x, y) and the landmark's location (x, y). This distance will not be perfect since our sense function has some associated `measurement noise`.\n\n---\n\nIn the example in the following cell, we have a given our robot a range of `5.0` so any landmarks that are within that range of our robot's location, should appear in a list of measurements. Not all landmarks are guaranteed to be in our visibility range, so this list will be variable in length.\n\n*Note: the robot's location is often called the **pose** or `[Pxi, Pyi]` and the landmark locations are often written as `[Lxi, Lyi]`. You'll see this notation in the next notebook.*",
"_____no_output_____"
]
],
[
[
"# try to sense any surrounding landmarks\nmeasurements = r.sense()\n\n# this will print out an empty list if `sense` has not been implemented\nprint(measurements)",
"[[0, -2.020526675259768, 0.12888381395122256], [1, -1.9944833653054967, 1.346114820209481], [2, 0.19964903482441454, -0.872578627336304]]\n"
]
],
[
[
"**Refer back to the grid map above. Do these measurements make sense to you? Are all the landmarks captured in this list (why/why not)?**",
"_____no_output_____"
],
[
"---\n## Data\n\n#### Putting it all together\n\nTo perform SLAM, we'll collect a series of robot sensor measurements and motions, in that order, over a defined period of time. Then we'll use only this data to re-construct the map of the world with the robot and landmar locations. You can think of SLAM as peforming what we've done in this notebook, only backwards. Instead of defining a world and robot and creating movement and sensor data, it will be up to you to use movement and sensor measurements to reconstruct the world!\n\nIn the next notebook, you'll see this list of movements and measurements (which you'll use to re-construct the world) listed in a structure called `data`. This is an array that holds sensor measurements and movements in a specific order, which will be useful to call upon when you have to extract this data and form constraint matrices and vectors.\n\n`data` is constructed over a series of time steps as follows:",
"_____no_output_____"
]
],
[
[
"data = []\n\n# after a robot first senses, then moves (one time step)\n# that data is appended like so:\ndata.append([measurements, [dx, dy]])\n\n# for our example movement and measurement\nprint(data)",
"[[[[0, -2.020526675259768, 0.12888381395122256], [1, -1.9944833653054967, 1.346114820209481], [2, 0.19964903482441454, -0.872578627336304]], [1, 2]]]\n"
],
[
"# in this example, we have only created one time step (0)\ntime_step = 0\n\n# so you can access robot measurements:\nprint('Measurements: ', data[time_step][0])\n\n# and its motion for a given time step:\nprint('Motion: ', data[time_step][1])",
"Measurements: [[0, -2.020526675259768, 0.12888381395122256], [1, -1.9944833653054967, 1.346114820209481], [2, 0.19964903482441454, -0.872578627336304]]\nMotion: [1, 2]\n"
]
],
[
[
"### Final robot class\n\nBefore moving on to the last notebook in this series, please make sure that you have copied your final, completed `sense` function into the `robot_class.py` file in the home directory. We will be using this file in the final implementation of slam!",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown"
] |
[
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code",
"code"
],
[
"markdown"
]
] |
4ae91bebbb6b4e940bd8ea2250466f14b846f822
| 269,163 |
ipynb
|
Jupyter Notebook
|
model-profiling-2/ProfilerReport/profiler-output/profiler-report.ipynb
|
simona-mircheva/deep-learning-udacity
|
d697fedd6829b715faf742be4d985fd4c2d9c664
|
[
"MIT"
] | 1 |
2022-01-20T20:11:46.000Z
|
2022-01-20T20:11:46.000Z
|
model-profiling-2/ProfilerReport/profiler-output/profiler-report.ipynb
|
simona-mircheva/deep-learning-udacity
|
d697fedd6829b715faf742be4d985fd4c2d9c664
|
[
"MIT"
] | null | null | null |
model-profiling-2/ProfilerReport/profiler-output/profiler-report.ipynb
|
simona-mircheva/deep-learning-udacity
|
d697fedd6829b715faf742be4d985fd4c2d9c664
|
[
"MIT"
] | null | null | null | 67.039352 | 21,443 | 0.512314 |
[
[
[
"# SageMaker Debugger Profiling Report\n\nSageMaker Debugger auto generated this report. You can generate similar reports on all supported training jobs. The report provides summary of training job, system resource usage statistics, framework metrics, rules summary, and detailed analysis from each rule. The graphs and tables are interactive. \n\n**Legal disclaimer:** This report and any recommendations are provided for informational purposes only and are not definitive. You are responsible for making your own independent assessment of the information.\n",
"_____no_output_____"
]
],
[
[
"import json\nimport pandas as pd\nimport glob\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport datetime\nfrom smdebug.profiler.utils import us_since_epoch_to_human_readable_time, ns_since_epoch_to_human_readable_time\nfrom smdebug.core.utils import setup_profiler_report\n",
"[2022-01-20 07:18:41.923 ip-10-2-233-87.ec2.internal:569 INFO utils.py:27] RULE_JOB_STOP_SIGNAL_FILENAME: /opt/ml/processing/input/profiler/signals/ProfilerReport\n"
],
[
"import bokeh\nfrom bokeh.io import output_notebook, show\nfrom bokeh.layouts import column, row\nfrom bokeh.plotting import figure\nfrom bokeh.models.widgets import DataTable, DateFormatter, TableColumn\nfrom bokeh.models import ColumnDataSource, PreText\nfrom math import pi\nfrom bokeh.transform import cumsum\nimport warnings\nfrom bokeh.models.widgets import Paragraph\nfrom bokeh.models import Legend\nfrom bokeh.util.warnings import BokehDeprecationWarning, BokehUserWarning\nwarnings.simplefilter('ignore', BokehDeprecationWarning)\nwarnings.simplefilter('ignore', BokehUserWarning)\n\noutput_notebook(hide_banner=True)",
"_____no_output_____"
],
[
"processing_job_arn = \"\"",
"_____no_output_____"
],
[
"# Parameters\nprocessing_job_arn = \"arn:aws:sagemaker:us-east-1:264082167679:processing-job/pytorch-training-2022-01-2-profilerreport-73c47060\"\n",
"_____no_output_____"
],
[
"setup_profiler_report(processing_job_arn)",
"_____no_output_____"
],
[
"def create_piechart(data_dict, title=None, height=400, width=400, x1=0, x2=0.1, radius=0.4, toolbar_location='right'):\n \n plot = figure(plot_height=height, \n plot_width=width,\n toolbar_location=toolbar_location,\n tools=\"hover,wheel_zoom,reset,pan\", \n tooltips=\"@phase:@value\", \n title=title,\n x_range=(-radius-x1, radius+x2))\n\n data = pd.Series(data_dict).reset_index(name='value').rename(columns={'index':'phase'})\n data['angle'] = data['value']/data['value'].sum() * 2*pi\n data['color'] = bokeh.palettes.viridis(len(data_dict))\n\n plot.wedge(x=0, y=0., radius=radius,\n start_angle=cumsum('angle', include_zero=True), \n end_angle=cumsum('angle'),\n line_color=\"white\", \n source=data, \n fill_color='color', \n legend='phase'\n )\n plot.legend.label_text_font_size = \"8pt\"\n plot.legend.location = 'center_right'\n plot.axis.axis_label=None\n plot.axis.visible=False\n plot.grid.grid_line_color = None\n plot.outline_line_color = \"white\"\n \n return plot",
"_____no_output_____"
],
[
"from IPython.display import display, HTML, Markdown, Image\ndef pretty_print(df):\n raw_html = df.to_html().replace(\"\\\\n\",\"<br>\").replace('<tr>','<tr style=\"text-align: left;\">')\n return display(HTML(raw_html))",
"_____no_output_____"
]
],
[
[
"## Training job summary",
"_____no_output_____"
]
],
[
[
"def load_report(rule_name):\n try:\n report = json.load(open('/opt/ml/processing/output/rule/profiler-output/profiler-reports/'+rule_name+'.json'))\n return report\n except FileNotFoundError:\n print (rule_name + ' not triggered')",
"_____no_output_____"
],
[
"\njob_statistics = {}\nreport = load_report('MaxInitializationTime')\nif report:\n if \"first\" in report['Details'][\"step_num\"] and \"last\" in report['Details'][\"step_num\"]:\n first_step = report['Details'][\"step_num\"][\"first\"]\n last_step = report['Details'][\"step_num\"][\"last\"]\n tmp = us_since_epoch_to_human_readable_time(report['Details']['job_start'] * 1000000)\n date = datetime.datetime.strptime(tmp, '%Y-%m-%dT%H:%M:%S:%f')\n day = date.date().strftime(\"%m/%d/%Y\")\n hour = date.time().strftime(\"%H:%M:%S\")\n job_statistics[\"Start time\"] = f\"{hour} {day}\"\n tmp = us_since_epoch_to_human_readable_time(report['Details']['job_end'] * 1000000)\n date = datetime.datetime.strptime(tmp, '%Y-%m-%dT%H:%M:%S:%f')\n day = date.date().strftime(\"%m/%d/%Y\")\n hour = date.time().strftime(\"%H:%M:%S\")\n job_statistics[\"End time\"] = f\"{hour} {day}\"\n job_duration_in_seconds = int(report['Details']['job_end'] - report['Details']['job_start']) \n job_statistics[\"Job duration\"] = f\"{job_duration_in_seconds} seconds\"\n if \"first\" in report['Details'][\"step_num\"] and \"last\" in report['Details'][\"step_num\"]:\n tmp = us_since_epoch_to_human_readable_time(first_step)\n date = datetime.datetime.strptime(tmp, '%Y-%m-%dT%H:%M:%S:%f')\n day = date.date().strftime(\"%m/%d/%Y\")\n hour = date.time().strftime(\"%H:%M:%S\")\n job_statistics[\"Training loop start\"] = f\"{hour} {day}\"\n tmp = us_since_epoch_to_human_readable_time(last_step)\n date = datetime.datetime.strptime(tmp, '%Y-%m-%dT%H:%M:%S:%f')\n day = date.date().strftime(\"%m/%d/%Y\")\n hour = date.time().strftime(\"%H:%M:%S\")\n job_statistics[\"Training loop end\"] = f\"{hour} {day}\"\n training_loop_duration_in_seconds = int((last_step - first_step) / 1000000)\n job_statistics[\"Training loop duration\"] = f\"{training_loop_duration_in_seconds} seconds\"\n initialization_in_seconds = int(first_step/1000000 - report['Details']['job_start'])\n job_statistics[\"Initialization time\"] = f\"{initialization_in_seconds} seconds\"\n finalization_in_seconds = int(np.abs(report['Details']['job_end'] - last_step/1000000))\n job_statistics[\"Finalization time\"] = f\"{finalization_in_seconds} seconds\"\n initialization_perc = int(initialization_in_seconds / job_duration_in_seconds * 100)\n job_statistics[\"Initialization\"] = f\"{initialization_perc} %\"\n training_loop_perc = int(training_loop_duration_in_seconds / job_duration_in_seconds * 100)\n job_statistics[\"Training loop\"] = f\"{training_loop_perc} %\"\n finalization_perc = int(finalization_in_seconds / job_duration_in_seconds * 100)\n job_statistics[\"Finalization\"] = f\"{finalization_perc} %\"",
"_____no_output_____"
],
[
"if report:\n text = \"\"\"The following table gives a summary about the training job. The table includes information about when the training job started and ended, how much time initialization, training loop and finalization took.\"\"\"\n if len(job_statistics) > 0:\n df = pd.DataFrame.from_dict(job_statistics, orient='index')\n start_time = us_since_epoch_to_human_readable_time(report['Details']['job_start'] * 1000000)\n date = datetime.datetime.strptime(start_time, '%Y-%m-%dT%H:%M:%S:%f')\n day = date.date().strftime(\"%m/%d/%Y\")\n hour = date.time().strftime(\"%H:%M:%S\")\n duration = job_duration_in_seconds\n text = f\"\"\"{text} \\n Your training job started on {day} at {hour} and ran for {duration} seconds.\"\"\"\n\n #pretty_print(df)\n if \"first\" in report['Details'][\"step_num\"] and \"last\" in report['Details'][\"step_num\"]:\n if finalization_perc < 0:\n job_statistics[\"Finalization%\"] = 0\n if training_loop_perc < 0:\n job_statistics[\"Training loop\"] = 0\n if initialization_perc < 0:\n job_statistics[\"Initialization\"] = 0\n else:\n text = f\"\"\"{text} \\n Your training job started on {day} at {hour} and ran for {duration} seconds.\"\"\"\n \n if len(job_statistics) > 0:\n df2 = df.reset_index()\n df2.columns = [\"0\", \"1\"]\n source = ColumnDataSource(data=df2)\n columns = [TableColumn(field='0', title=\"\"),\n TableColumn(field='1', title=\"Job Statistics\"),]\n table = DataTable(source=source, columns=columns, width=450, height=380)\n\n plot = None\n\n if \"Initialization\" in job_statistics:\n piechart_data = {}\n piechart_data[\"Initialization\"] = initialization_perc \n piechart_data[\"Training loop\"] = training_loop_perc\n piechart_data[\"Finalization\"] = finalization_perc \n\n plot = create_piechart(piechart_data, \n height=350,\n width=500,\n x1=0.15,\n x2=0.15,\n radius=0.15, \n toolbar_location=None)\n\n if plot != None:\n paragraph = Paragraph(text=f\"\"\"{text}\"\"\", width = 800)\n show(column(paragraph, row(table, plot)))\n else:\n paragraph = Paragraph(text=f\"\"\"{text}. No step information was profiled from your training job. The time spent on initialization and finalization cannot be computed.\"\"\" , width = 800)\n show(column(paragraph, row(table)))",
"_____no_output_____"
]
],
[
[
"## System usage statistics",
"_____no_output_____"
]
],
[
[
"report = load_report('OverallSystemUsage')",
"_____no_output_____"
],
[
"text1 = ''\nif report:\n if \"GPU\" in report[\"Details\"]:\n for node_id in report[\"Details\"][\"GPU\"]:\n gpu_p95 = report[\"Details\"][\"GPU\"][node_id][\"p95\"]\n gpu_p50 = report[\"Details\"][\"GPU\"][node_id][\"p50\"]\n cpu_p95 = report[\"Details\"][\"CPU\"][node_id][\"p95\"]\n cpu_p50 = report[\"Details\"][\"CPU\"][node_id][\"p50\"]\n \n if gpu_p95 < 70 and cpu_p95 < 70:\n text1 = f\"\"\"{text1}The 95th percentile of the total GPU utilization on node {node_id} is only {int(gpu_p95)}%. \n The 95th percentile of the total CPU utilization is only {int(cpu_p95)}%. Node {node_id} is underutilized. \n You may want to consider switching to a smaller instance type.\"\"\"\n elif gpu_p95 < 70 and cpu_p95 > 70:\n text1 = f\"\"\"{text1}The 95th percentile of the total GPU utilization on node {node_id} is only {int(gpu_p95)}%. \n However, the 95th percentile of the total CPU utilization is {int(cpu_p95)}%. GPUs on node {node_id} are underutilized, \n likely because of CPU bottlenecks.\"\"\"\n elif gpu_p50 > 70:\n text1 = f\"\"\"{text1}The median total GPU utilization on node {node_id} is {int(gpu_p50)}%. \n GPUs on node {node_id} are well utilized.\"\"\"\n else:\n text1 = f\"\"\"{text1}The median total GPU utilization on node {node_id} is {int(gpu_p50)}%. \n The median total CPU utilization is {int(cpu_p50)}%.\"\"\"\n else:\n for node_id in report[\"Details\"][\"CPU\"]:\n cpu_p95 = report[\"Details\"][\"CPU\"][node_id][\"p95\"]\n if cpu_p95 > 70:\n text1 = f\"\"\"{text1}The 95th percentile of the total CPU utilization on node {node_id} is {int**(cpu_p95)}%. CPUs on node {node_id} are well utilized.\"\"\"\n text1 = Paragraph(text=f\"\"\"{text1}\"\"\", width=1100)\n text2 = Paragraph(text=f\"\"\"The following table shows statistics of resource utilization per worker (node), \n such as the total CPU and GPU utilization, and the memory utilization on CPU and GPU. \n The table also includes the total I/O wait time and the total amount of data sent or received in bytes.\n The table shows min and max values as well as p99, p90 and p50 percentiles.\"\"\", width=900)\n",
"_____no_output_____"
],
[
"pd.set_option('display.float_format', lambda x: '%.2f' % x)\nrows = [] \nunits = {\"CPU\": \"percentage\", \"CPU memory\": \"percentage\", \"GPU\": \"percentage\", \"Network\": \"bytes\", \"GPU memory\": \"percentage\", \"I/O\": \"percentage\"}\nif report:\n for metric in report['Details']:\n for node_id in report['Details'][metric]:\n values = report['Details'][metric][node_id]\n rows.append([node_id, metric, units[metric], values['max'], values['p99'], values['p95'], values['p50'], values['min']])\n\n df = pd.DataFrame(rows) \n df.columns = ['Node', 'metric', 'unit', 'max', 'p99', 'p95', 'p50', 'min']\n df2 = df.reset_index()\n source = ColumnDataSource(data=df2)\n columns = [TableColumn(field='Node', title=\"node\"),\n TableColumn(field='metric', title=\"metric\"),\n TableColumn(field='unit', title=\"unit\"),\n TableColumn(field='max', title=\"max\"),\n TableColumn(field='p99', title=\"p99\"),\n TableColumn(field='p95', title=\"p95\"),\n TableColumn(field='p50', title=\"p50\"),\n TableColumn(field='min', title=\"min\"),]\n table = DataTable(source=source, columns=columns, width=800, height=df2.shape[0]*30)\n\n show(column( text1, text2, row(table)))",
"_____no_output_____"
],
[
"report = load_report('OverallFrameworkMetrics')\nif report:\n if 'Details' in report:\n\n display(Markdown(f\"\"\"## Framework metrics summary\"\"\"))\n plots = []\n text = ''\n if 'phase' in report['Details']:\n text = f\"\"\"The following two pie charts show the time spent on the TRAIN phase, the EVAL phase, \n and others. The 'others' includes the time spent between steps (after one step has finished and before\n the next step has started). Ideally, most of the training time should be spent on the \n TRAIN and EVAL phases. If TRAIN/EVAL were not specified in the training script, steps will be recorded as \n GLOBAL.\"\"\"\n\n if 'others' in report['Details']['phase']:\n others = float(report['Details']['phase']['others'])\n\n if others > 25:\n text = f\"\"\"{text} Your training job spent quite a significant amount of time ({round(others,2)}%) in phase \"others\".\n You should check what is happening in between the steps.\"\"\"\n\n plot = create_piechart(report['Details']['phase'], \n height=350,\n width=600,\n x1=0.2,\n x2=0.6,\n radius=0.3, \n title=\"The ratio between the time spent on the TRAIN/EVAL phase and others\")\n plots.append(plot)\n\n if 'forward_backward' in report['Details']:\n\n event = max(report['Details']['forward_backward'], key=report['Details']['forward_backward'].get)\n perc = report['Details']['forward_backward'][event]\n\n text = f\"\"\"{text} The pie chart on the right shows a more detailed breakdown. \n It shows that {int(perc)}% of the time was spent in event \"{event}\".\"\"\"\n\n if perc > 70:\n text = f\"\"\"There is quite a significant difference between the time spent on forward and backward\n pass.\"\"\"\n else:\n text = f\"\"\"{text} It shows that {int(perc)}% of the training time\n was spent on \"{event}\".\"\"\"\n\n plot = create_piechart(report['Details']['forward_backward'], \n height=350,\n width=600,\n x1=0.2,\n x2=0.6,\n radius=0.3, \n title=\"The ratio between forward and backward pass\") \n plots.append(plot)\n\n if len(plots) > 0:\n paragraph = Paragraph(text=text, width=1100)\n show(column(paragraph, row(plots)))\n\n plots = []\n text=''\n if 'ratio' in report['Details'] and len(report['Details']['ratio']) > 0:\n\n key = list(report['Details']['ratio'].keys())[0]\n ratio = report['Details']['ratio'][key]\n\n text = f\"\"\"The following piechart shows a breakdown of the CPU/GPU operators. \n It shows that {int(ratio)}% of training time was spent on executing the \"{key}\" operator.\"\"\"\n\n plot = create_piechart(report['Details']['ratio'], \n height=350,\n width=600,\n x1=0.2,\n x2=0.6,\n radius=0.3, \n title=\"The ratio between the time spent on CPU/GPU operators\")\n plots.append(plot)\n\n\n if 'general' in report['Details']:\n event = max(report['Details']['general'], key=report['Details']['general'].get)\n perc = report['Details']['general'][event]\n\n plot = create_piechart(report['Details']['general'], \n height=350,\n width=600,\n x1=0.2,\n x2=0.6,\n radius=0.3, \n title=\"General framework operations\")\n plots.append(plot)\n\n if len(plots) > 0:\n paragraph = Paragraph(text=text, width=1100)\n show(column(paragraph, row(plots)))\n\n plots = []\n text = ''\n if 'horovod' in report['Details']:\n display(Markdown(f\"\"\"#### Overview: Horovod metrics\"\"\"))\n event = max(report['Details']['horovod'], key=report['Details']['horovod'].get)\n perc = report['Details']['horovod'][event]\n text = f\"\"\"{text} The following pie chart shows a detailed breakdown of the Horovod metrics profiled\n from your training job. The most expensive function was \"{event}\" with {int(perc)}%.\"\"\"\n\n plot = create_piechart(report['Details']['horovod'], \n height=350,\n width=600,\n x1=0.2,\n x2=0.6,\n radius=0.3, \n title=\"Horovod metrics \")\n\n paragraph = Paragraph(text=text, width=1100)\n show(column(paragraph, row(plot)))\n",
"_____no_output_____"
],
[
"pd.set_option('display.float_format', lambda x: '%.2f' % x)\nrows = [] \nvalues = []\nif report:\n if 'CPU_total' in report['Details']:\n display(Markdown(f\"\"\"#### Overview: CPU operators\"\"\"))\n event = max(report['Details']['CPU'], key=report['Details']['CPU'].get)\n perc = report['Details']['CPU'][event]\n\n for function in report['Details']['CPU']:\n percentage = round(report['Details']['CPU'][function],2)\n time = report['Details']['CPU_total'][function] \n rows.append([percentage, time, function])\n\n df = pd.DataFrame(rows) \n df.columns = ['percentage', 'time', 'operator']\n\n df = df.sort_values(by=['percentage'], ascending=False)\n source = ColumnDataSource(data=df)\n columns = [TableColumn(field='percentage', title=\"Percentage\"),\n TableColumn(field='time', title=\"Cumulative time in microseconds\"),\n TableColumn(field='operator', title=\"CPU operator\"),]\n\n table = DataTable(source=source, columns=columns, width=550, height=350)\n\n text = Paragraph(text=f\"\"\"The following table shows a list of operators that ran on the CPUs.\n The most expensive operator on the CPUs was \"{event}\" with {int(perc)} %.\"\"\")\n\n plot = create_piechart(report['Details']['CPU'],\n height=350,\n width=600,\n x1=0.2,\n x2=0.6,\n radius=0.3, \n )\n\n show(column(text, row(table, plot)))\n",
"_____no_output_____"
],
[
"pd.set_option('display.float_format', lambda x: '%.2f' % x)\nrows = [] \nvalues = []\nif report:\n if 'GPU_total' in report['Details']:\n display(Markdown(f\"\"\"#### Overview: GPU operators\"\"\"))\n event = max(report['Details']['GPU'], key=report['Details']['GPU'].get)\n perc = report['Details']['GPU'][event]\n\n for function in report['Details']['GPU']:\n percentage = round(report['Details']['GPU'][function],2)\n time = report['Details']['GPU_total'][function] \n rows.append([percentage, time, function])\n\n df = pd.DataFrame(rows) \n df.columns = ['percentage', 'time', 'operator']\n\n df = df.sort_values(by=['percentage'], ascending=False)\n source = ColumnDataSource(data=df)\n columns = [TableColumn(field='percentage', title=\"Percentage\"),\n TableColumn(field='time', title=\"Cumulative time in microseconds\"),\n TableColumn(field='operator', title=\"GPU operator\"),]\n table = DataTable(source=source, columns=columns, width=450, height=350)\n\n text = Paragraph(text=f\"\"\"The following table shows a list of operators that your training job ran on GPU.\n The most expensive operator on GPU was \"{event}\" with {int(perc)} %\"\"\")\n\n plot = create_piechart(report['Details']['GPU'],\n height=350,\n width=600,\n x1=0.2,\n x2=0.6,\n radius=0.3, \n )\n\n show(column(text, row(table, plot)))",
"_____no_output_____"
]
],
[
[
"## Rules summary",
"_____no_output_____"
]
],
[
[
"description = {}\ndescription['CPUBottleneck'] = 'Checks if the CPU utilization is high and the GPU utilization is low. \\\nIt might indicate CPU bottlenecks, where the GPUs are waiting for data to arrive \\\nfrom the CPUs. The rule evaluates the CPU and GPU utilization rates, and triggers the issue \\\nif the time spent on the CPU bottlenecks exceeds a threshold percent of the total training time. The default threshold is 50 percent.'\ndescription['IOBottleneck'] = 'Checks if the data I/O wait time is high and the GPU utilization is low. \\\nIt might indicate IO bottlenecks where GPU is waiting for data to arrive from storage. \\\nThe rule evaluates the I/O and GPU utilization rates and triggers the issue \\\nif the time spent on the IO bottlenecks exceeds a threshold percent of the total training time. The default threshold is 50 percent.'\ndescription['Dataloader'] = 'Checks how many data loaders are running in parallel and whether the total number is equal the number \\\nof available CPU cores. The rule triggers if number is much smaller or larger than the number of available cores. \\\nIf too small, it might lead to low GPU utilization. If too large, it might impact other compute intensive operations on CPU.'\ndescription['GPUMemoryIncrease'] = 'Measures the average GPU memory footprint and triggers if there is a large increase.'\ndescription['BatchSize'] = 'Checks if GPUs are underutilized because the batch size is too small. \\\nTo detect this problem, the rule analyzes the average GPU memory footprint, \\\nthe CPU and the GPU utilization. '\ndescription['LowGPUUtilization'] = 'Checks if the GPU utilization is low or fluctuating. \\\nThis can happen due to bottlenecks, blocking calls for synchronizations, \\\nor a small batch size.'\ndescription['MaxInitializationTime'] = 'Checks if the time spent on initialization exceeds a threshold percent of the total training time. \\\nThe rule waits until the first step of training loop starts. The initialization can take longer \\\nif downloading the entire dataset from Amazon S3 in File mode. The default threshold is 20 minutes.'\ndescription['LoadBalancing'] = 'Detects workload balancing issues across GPUs. \\\nWorkload imbalance can occur in training jobs with data parallelism. \\\nThe gradients are accumulated on a primary GPU, and this GPU might be overused \\\nwith regard to other GPUs, resulting in reducing the efficiency of data parallelization.'\ndescription['StepOutlier'] = 'Detects outliers in step duration. The step duration for forward and backward pass should be \\\nroughly the same throughout the training. If there are significant outliers, \\\nit may indicate a system stall or bottleneck issues.'",
"_____no_output_____"
],
[
"recommendation = {}\nrecommendation['CPUBottleneck'] = 'Consider increasing the number of data loaders \\\nor applying data pre-fetching.'\nrecommendation['IOBottleneck'] = 'Pre-fetch data or choose different file formats, such as binary formats that \\\nimprove I/O performance.'\nrecommendation['Dataloader'] = 'Change the number of data loader processes.'\nrecommendation['GPUMemoryIncrease'] = 'Choose a larger instance type with more memory if footprint is close to maximum available memory.'\nrecommendation['BatchSize'] = 'The batch size is too small, and GPUs are underutilized. Consider running on a smaller instance type or increasing the batch size.'\nrecommendation['LowGPUUtilization'] = 'Check if there are bottlenecks, minimize blocking calls, \\\nchange distributed training strategy, or increase the batch size.'\nrecommendation['MaxInitializationTime'] = 'Initialization takes too long. \\\nIf using File mode, consider switching to Pipe mode in case you are using TensorFlow framework.'\nrecommendation['LoadBalancing'] = 'Choose a different distributed training strategy or \\\na different distributed training framework.'\nrecommendation['StepOutlier'] = 'Check if there are any bottlenecks (CPU, I/O) correlated to the step outliers.'",
"_____no_output_____"
],
[
"files = glob.glob('/opt/ml/processing/output/rule/profiler-output/profiler-reports/*json')\nsummary = {}\nfor i in files:\n rule_name = i.split('/')[-1].replace('.json','')\n if rule_name == \"OverallSystemUsage\" or rule_name == \"OverallFrameworkMetrics\":\n continue\n rule_report = json.load(open(i))\n summary[rule_name] = {}\n summary[rule_name]['Description'] = description[rule_name]\n summary[rule_name]['Recommendation'] = recommendation[rule_name]\n summary[rule_name]['Number of times rule triggered'] = rule_report['RuleTriggered'] \n #summary[rule_name]['Number of violations'] = rule_report['Violations'] \n summary[rule_name]['Number of datapoints'] = rule_report['Datapoints']\n summary[rule_name]['Rule parameters'] = rule_report['RuleParameters']\n\ndf = pd.DataFrame.from_dict(summary, orient='index')\ndf = df.sort_values(by=['Number of times rule triggered'], ascending=False)\n\n\ndisplay(Markdown(f\"\"\"The following table shows a profiling summary of the Debugger built-in rules. \nThe table is sorted by the rules that triggered the most frequently. During your training job, the {df.index[0]} rule\nwas the most frequently triggered. It processed {df.values[0,3]} datapoints and was triggered {df.values[0,2]} times.\"\"\"))\n\nwith pd.option_context('display.colheader_justify','left'): \n pretty_print(df)",
"_____no_output_____"
],
[
"analyse_phase = \"training\"\nif job_statistics and \"initialization_in_seconds\" in job_statistics:\n if job_statistics[\"initialization_in_seconds\"] > job_statistics[\"training_loop_duration_in_seconds\"]:\n analyse_phase = \"initialization\"\n time = job_statistics[\"initialization_in_seconds\"]\n perc = job_statistics[\"initialization_%\"]\n display(Markdown(f\"\"\"The initialization phase took {int(time)} seconds, which is {int(perc)}%*\n of the total training time. Since the training loop has taken the most time, \n we dive deep into the events occurring during this phase\"\"\"))\n display(Markdown(\"\"\"## Analyzing initialization\\n\\n\"\"\"))\n time = job_statistics[\"training_loop_duration_in_seconds\"]\n perc = job_statistics[\"training_loop_%\"]\n display(Markdown(f\"\"\"The training loop lasted for {int(time)} seconds which is {int(perc)}% of the training job time.\n Since the training loop has taken the most time, we dive deep into the events occured during this phase.\"\"\"))\nif analyse_phase == 'training':\n display(Markdown(\"\"\"## Analyzing the training loop\\n\\n\"\"\"))",
"_____no_output_____"
],
[
"if analyse_phase == \"initialization\":\n display(Markdown(\"\"\"### MaxInitializationTime\\n\\nThis rule helps to detect if the training initialization is taking too much time. \\nThe rule waits until first step is available. The rule takes the parameter `threshold` that defines how many minutes to wait for the first step to become available. Default is 20 minutes.\\nYou can run the rule locally in the following way:\n \"\"\"))\n \n _ = load_report(\"MaxInitializationTime\")",
"_____no_output_____"
],
[
"if analyse_phase == \"training\":\n display(Markdown(\"\"\"### Step duration analysis\"\"\"))\n report = load_report('StepOutlier')\n if report:\n parameters = report['RuleParameters']\n params = report['RuleParameters'].split('\\n')\n stddev = params[3].split(':')[1]\n mode = params[1].split(':')[1]\n n_outlier = params[2].split(':')[1]\n triggered = report['RuleTriggered']\n datapoints = report['Datapoints']\n\n text = f\"\"\"The StepOutlier rule measures step durations and checks for outliers. The rule \n returns True if duration is larger than {stddev} times the standard deviation. The rule \n also takes the parameter mode, that specifies whether steps from training or validation phase \n should be checked. In your processing job mode was specified as {mode}. \n Typically the first step is taking significantly more time and to avoid the \n rule triggering immediately, one can use n_outliers to specify the number of outliers to ignore. \n n_outliers was set to {n_outlier}.\n The rule analysed {datapoints} datapoints and triggered {triggered} times.\n \"\"\"\n\n paragraph = Paragraph(text=text, width=900)\n show(column(paragraph))\n\n if report and len(report['Details']['step_details']) > 0:\n for node_id in report['Details']['step_details']:\n tmp = report['RuleParameters'].split('threshold:')\n threshold = tmp[1].split('\\n')[0]\n n_outliers = report['Details']['step_details'][node_id]['number_of_outliers']\n mean = report['Details']['step_details'][node_id]['step_stats']['mean']\n stddev = report['Details']['step_details'][node_id]['stddev']\n phase = report['Details']['step_details'][node_id]['phase']\n display(Markdown(f\"\"\"**Step durations on node {node_id}:**\"\"\"))\n display(Markdown(f\"\"\"The following table is a summary of the statistics of step durations measured on node {node_id}.\n The rule has analyzed the step duration from {phase} phase.\n The average step duration on node {node_id} was {round(mean, 2)}s. \n The rule detected {n_outliers} outliers, where step duration was larger than {threshold} times the standard deviation of {stddev}s\n \\n\"\"\"))\n step_stats_df = pd.DataFrame.from_dict(report['Details']['step_details'][node_id]['step_stats'], orient='index').T\n step_stats_df.index = ['Step Durations in [s]']\n pretty_print(step_stats_df)\n\n display(Markdown(f\"\"\"The following histogram shows the step durations measured on the different nodes. \n You can turn on or turn off the visualization of histograms by selecting or unselecting the labels in the legend.\"\"\"))\n\n plot = figure(plot_height=450, \n plot_width=850, \n title=f\"\"\"Step durations\"\"\") \n\n colors = bokeh.palettes.viridis(len(report['Details']['step_details']))\n\n for index, node_id in enumerate(report['Details']['step_details']):\n probs = report['Details']['step_details'][node_id]['probs']\n binedges = report['Details']['step_details'][node_id]['binedges']\n\n plot.quad( top=probs,\n bottom=0,\n left=binedges[:-1],\n right=binedges[1:],\n line_color=\"white\",\n fill_color=colors[index],\n fill_alpha=0.7,\n legend=node_id)\n\n plot.add_layout(Legend(), 'right') \n plot.y_range.start = 0\n plot.xaxis.axis_label = f\"\"\"Step durations in [s]\"\"\"\n plot.yaxis.axis_label = \"Occurrences\"\n plot.grid.grid_line_color = \"white\"\n plot.legend.click_policy=\"hide\"\n plot.legend.location = 'center_right'\n show(plot)\n\n if report['RuleTriggered'] > 0:\n\n text=f\"\"\"To get a better understanding of what may have caused those outliers,\n we correlate the timestamps of step outliers with other framework metrics that happened at the same time.\n The left chart shows how much time was spent in the different framework\n metrics aggregated by event phase. The chart on the right shows the histogram of normal step durations (without\n outliers). The following chart shows how much time was spent in the different \n framework metrics when step outliers occurred. In this chart framework metrics are not aggregated byphase.\"\"\"\n plots = []\n if 'phase' in report['Details']:\n text = f\"\"\"{text} The chart (in the middle) shows whether step outliers mainly happened during TRAIN or EVAL phase.\n \"\"\"\n\n plot = create_piechart(report['Details']['phase'], \n height=350,\n width=600,\n x1=0.2,\n x2=0.6,\n radius=0.3, \n title=\"The ratio between the time spent on the TRAIN/EVAL phase\")\n plots.append(plot)\n\n if 'forward_backward' in report['Details'] and len(report['Details']['forward_backward']) > 0:\n\n event = max(report['Details']['forward_backward'], key=report['Details']['forward_backward'].get)\n perc = report['Details']['forward_backward'][event]\n\n text = f\"\"\"{text} The pie chart on the right shows a detailed breakdown. \n It shows that {int(perc)}% of the training time was spent on event \"{event}\".\"\"\"\n\n plot = create_piechart(report['Details']['forward_backward'], \n height=350,\n width=600,\n x1=0.2,\n x2=0.6,\n radius=0.3, \n title=\"The Ratio between forward and backward pass\") \n plots.append(plot)\n\n if len(plots) > 0:\n paragraph = Paragraph(text=text, width=900)\n show(column(paragraph, row(plots)))\n\n plots = []\n text = \"\"\n if 'ratio' in report['Details'] and len(report['Details']['ratio']) > 0:\n\n key = list(report['Details']['ratio'].keys())[0]\n ratio = report['Details']['ratio'][key]\n\n text = f\"\"\"The following pie chart shows a breakdown of the CPU/GPU operators executed during the step outliers. \n It shows that {int(ratio)}% of the training time was spent on executing operators in \"{key}\".\"\"\"\n\n plot = create_piechart(report['Details']['ratio'], \n height=350,\n width=600,\n x1=0.2,\n x2=0.6,\n radius=0.3, \n title=\"The ratio between CPU/GPU operators\")\n plots.append(plot)\n\n\n if 'general' in report['Details'] and len(report['Details']['general']) > 0:\n\n event = max(report['Details']['general'], key=report['Details']['general'].get)\n perc = report['Details']['general'][event]\n\n plot = create_piechart(report['Details']['general'], \n height=350,\n width=600,\n x1=0.2,\n x2=0.6,\n radius=0.3, \n title=\"General metrics recorded in framework \")\n plots.append(plot)\n\n if len(plots) > 0:\n paragraph = Paragraph(text=text, width=900)\n show(column(paragraph, row(plots)))\n\n plots = []\n text = \"\"\n if 'horovod' in report['Details'] and len(report['Details']['horovod']) > 0:\n\n event = max(report['Details']['horovod'], key=report['Details']['horovod'].get)\n perc = report['Details']['horovod'][event]\n text = f\"\"\"The following pie chart shows a detailed breakdown of the Horovod metrics that have been\n recorded when step outliers happened. The most expensive function was {event} with {int(perc)}%\"\"\"\n\n plot = create_piechart(report['Details']['horovod'], \n height=350,\n width=600,\n x1=0.2,\n x2=0.6,\n radius=0.3, \n title=\"General metrics recorded in framework \")\n\n paragraph = Paragraph(text=text, width=900)\n show(column(paragraph, row(plot))) ",
"_____no_output_____"
],
[
"if analyse_phase == \"training\":\n display(Markdown(\"\"\"### GPU utilization analysis\\n\\n\"\"\"))\n display(Markdown(\"\"\"**Usage per GPU** \\n\\n\"\"\"))\n report = load_report('LowGPUUtilization')\n if report:\n params = report['RuleParameters'].split('\\n')\n threshold_p95 = params[0].split(':')[1]\n threshold_p5 = params[1].split(':')[1]\n window = params[2].split(':')[1]\n patience = params[3].split(':')[1]\n violations = report['Violations']\n triggered = report['RuleTriggered']\n datapoints = report['Datapoints']\n \n text=Paragraph(text=f\"\"\"The LowGPUUtilization rule checks for a low and fluctuating GPU usage. If the GPU usage is \n consistently low, it might be caused by bottlenecks or a small batch size. If usage is heavily \n fluctuating, it can be due to bottlenecks or blocking calls. The rule computed the 95th and 5th \n percentile of GPU utilization on {window} continuous datapoints and found {violations} cases where \n p95 was above {threshold_p95}% and p5 was below {threshold_p5}%. If p95 is high and p5 is low,\n it might indicate that the GPU usage is highly fluctuating. If both values are very low, \n it would mean that the machine is underutilized. During initialization, the GPU usage is likely zero, \n so the rule skipped the first {patience} data points.\n The rule analysed {datapoints} datapoints and triggered {triggered} times.\"\"\", width=800)\n show(text)\n\n \n if len(report['Details']) > 0:\n \n timestamp = us_since_epoch_to_human_readable_time(report['Details']['last_timestamp'])\n date = datetime.datetime.strptime(timestamp, '%Y-%m-%dT%H:%M:%S:%f')\n day = date.date().strftime(\"%m/%d/%Y\")\n hour = date.time().strftime(\"%H:%M:%S\")\n text = Paragraph(text=f\"\"\"Your training job is underutilizing the instance. You may want to consider\n to either switch to a smaller instance type or to increase the batch size. \n The last time that the LowGPUUtilization rule was triggered in your training job was on {day} at {hour}.\n The following boxplots are a snapshot from the timestamps. \n They show the utilization per GPU (without outliers).\n To get a better understanding of the workloads throughout the whole training,\n you can check the workload histogram in the next section.\"\"\", width=800)\n show(text)\n \n del report['Details']['last_timestamp']\n \n for node_id in report['Details']:\n \n plot = figure(plot_height=350, \n plot_width=1000,\n toolbar_location='right',\n tools=\"hover,wheel_zoom,reset,pan\", \n title=f\"Node {node_id}\",\n x_range=(0,17),\n )\n \n for index, key in enumerate(report['Details'][node_id]):\n display(Markdown(f\"\"\"**GPU utilization of {key} on node {node_id}:**\"\"\"))\n text = \"\"\n gpu_max = report['Details'][node_id][key]['gpu_max']\n p_95 = report['Details'][node_id][key]['gpu_95']\n p_5 = report['Details'][node_id][key]['gpu_5']\n text = f\"\"\"{text} The max utilization of {key} on node {node_id} was {gpu_max}%\"\"\"\n if p_95 < int(threshold_p95): \n text = f\"\"\"{text} and the 95th percentile was only {p_95}%. \n {key} on node {node_id} is underutilized\"\"\"\n if p_5 < int(threshold_p5): \n text = f\"\"\"{text} and the 5th percentile was only {p_5}%\"\"\"\n if p_95 - p_5 > 50:\n text = f\"\"\"{text} The difference between 5th percentile {p_5}% and 95th percentile {p_95}% is quite \n significant, which means that utilization on {key} is fluctuating quite a lot.\\n\"\"\"\n \n upper = report['Details'][node_id][key]['upper']\n lower = report['Details'][node_id][key]['lower']\n p75 = report['Details'][node_id][key]['p75']\n p25 = report['Details'][node_id][key]['p25']\n p50 = report['Details'][node_id][key]['p50']\n\n plot.segment(index+1, upper, index+1, p75, line_color=\"black\")\n plot.segment(index+1, lower, index+1, p25, line_color=\"black\")\n\n plot.vbar(index+1, 0.7, p50, p75, fill_color=\"#FDE725\", line_color=\"black\")\n plot.vbar(index+1, 0.7, p25, p50, fill_color=\"#440154\", line_color=\"black\")\n\n plot.rect(index+1, lower, 0.2, 0.01, line_color=\"black\")\n plot.rect(index+1, upper, 0.2, 0.01, line_color=\"black\")\n\n plot.xaxis.major_label_overrides[index+1] = key\n plot.xgrid.grid_line_color = None\n plot.ygrid.grid_line_color = \"white\"\n plot.grid.grid_line_width = 0\n\n plot.xaxis.major_label_text_font_size=\"10px\"\n text=Paragraph(text=f\"\"\"{text}\"\"\", width=900)\n show(text)\n plot.yaxis.axis_label = \"Utilization in %\"\n plot.xaxis.ticker = np.arange(index+2)\n \n show(plot)",
"_____no_output_____"
],
[
" \nif analyse_phase == \"training\": \n display(Markdown(\"\"\"**Workload balancing**\\n\\n\"\"\")) \n report = load_report('LoadBalancing')\n if report:\n params = report['RuleParameters'].split('\\n')\n threshold = params[0].split(':')[1]\n patience = params[1].split(':')[1]\n triggered = report['RuleTriggered']\n datapoints = report['Datapoints']\n \n paragraph = Paragraph(text=f\"\"\"The LoadBalancing rule helps to detect issues in workload balancing \n between multiple GPUs. \n It computes a histogram of GPU utilization values for each GPU and compares then the \n similarity between histograms. The rule checked if the distance of histograms is larger than the \n threshold of {threshold}.\n During initialization utilization is likely zero, so the rule skipped the first {patience} data points.\n \"\"\", width=900)\n show(paragraph)\n \n if len(report['Details']) > 0:\n for node_id in report['Details']: \n \n \n text = f\"\"\"The following histogram shows the workload per GPU on node {node_id}. \n You can enable/disable the visualization of a workload by clicking on the label in the legend.\n \"\"\"\n if len(report['Details']) == 1 and len(report['Details'][node_id]['workloads']) == 1:\n text = f\"\"\"{text} Your training job only used one GPU so there is no workload balancing issue.\"\"\"\n \n plot = figure(plot_height=450, \n plot_width=850, \n x_range=(-1,100),\n title=f\"\"\"Workloads on node {node_id}\"\"\")\n \n colors = bokeh.palettes.viridis(len(report['Details'][node_id]['workloads']))\n \n for index, gpu_id2 in enumerate(report['Details'][node_id]['workloads']):\n probs = report['Details'][node_id]['workloads'][gpu_id2]\n plot.quad( top=probs,\n bottom=0,\n left=np.arange(0,98,2),\n right=np.arange(2,100,2),\n line_color=\"white\",\n fill_color=colors[index],\n fill_alpha=0.8,\n legend=gpu_id2 )\n\n plot.y_range.start = 0\n plot.xaxis.axis_label = f\"\"\"Utilization\"\"\"\n plot.yaxis.axis_label = \"Occurrences\"\n plot.grid.grid_line_color = \"white\"\n plot.legend.click_policy=\"hide\"\n \n paragraph = Paragraph(text=text)\n show(column(paragraph, plot))\n \n if \"distances\" in report['Details'][node_id]:\n text = f\"\"\"The rule identified workload balancing issues on node {node_id} \n where workloads differed by more than threshold {threshold}. \n \"\"\"\n for index, gpu_id2 in enumerate(report['Details'][node_id]['distances']):\n for gpu_id1 in report['Details'][node_id]['distances'][gpu_id2]:\n distance = round(report['Details'][node_id]['distances'][gpu_id2][gpu_id1], 2)\n text = f\"\"\"{text} The difference of workload between {gpu_id2} and {gpu_id1} is: {distance}.\"\"\"\n\n paragraph = Paragraph(text=f\"\"\"{text}\"\"\", width=900)\n show(column(paragraph))",
"_____no_output_____"
],
[
"if analyse_phase == \"training\":\n display(Markdown(\"\"\"### Dataloading analysis\\n\\n\"\"\"))\n report = load_report('Dataloader')\n if report:\n params = report['RuleParameters'].split(\"\\n\")\n min_threshold = params[0].split(':')[1]\n max_threshold = params[1].split(':')[1]\n triggered = report['RuleTriggered']\n datapoints = report['Datapoints']\n \n text=f\"\"\"The number of dataloader workers can greatly affect the overall performance \n of your training job. The rule analyzed the number of dataloading processes that have been running in \n parallel on the training instance and compares it against the total number of cores. \n The rule checked if the number of processes is smaller than {min_threshold}% or larger than \n {max_threshold}% the total number of cores. Having too few dataloader workers can slowdown data preprocessing and lead to GPU \n underutilization. Having too many dataloader workers may hurt the\n overall performance if you are running other compute intensive tasks on the CPU.\n The rule analysed {datapoints} datapoints and triggered {triggered} times.\"\"\"\n \n paragraph = Paragraph(text=f\"{text}\", width=900)\n show(paragraph)\n text = \"\"\n if 'cores' in report['Details']:\n cores = int(report['Details']['cores'])\n dataloaders = report['Details']['dataloaders']\n if dataloaders < cores: \n text=f\"\"\"{text} Your training instance provided {cores} CPU cores, however your training job only \n ran on average {dataloaders} dataloader workers in parallel. We recommend you to increase the number of\n dataloader workers.\"\"\"\n if dataloaders > cores:\n text=f\"\"\"{text} Your training instance provided {cores} CPU cores, however your training job ran \n on average {dataloaders} dataloader workers. We recommed you to decrease the number of dataloader\n workers.\"\"\"\n if 'pin_memory' in report['Details'] and report['Details']['pin_memory'] == False:\n text=f\"\"\"{text} Using pinned memory also improves performance because it enables fast data transfer to CUDA-enabled GPUs.\n The rule detected that your training job was not using pinned memory. \n In case of using PyTorch Dataloader, you can enable this by setting pin_memory=True.\"\"\"\n \n if 'prefetch' in report['Details'] and report['Details']['prefetch'] == False:\n text=f\"\"\"{text} It appears that your training job did not perform any data pre-fetching. Pre-fetching can improve your\n data input pipeline as it produces the data ahead of time.\"\"\"\n paragraph = Paragraph(text=f\"{text}\", width=900)\n show(paragraph)\n \n colors=bokeh.palettes.viridis(10)\n if \"dataloading_time\" in report['Details']:\n median = round(report['Details'][\"dataloading_time\"]['p50'],4)\n p95 = round(report['Details'][\"dataloading_time\"]['p95'],4)\n p25 = round(report['Details'][\"dataloading_time\"]['p25'],4)\n binedges = report['Details'][\"dataloading_time\"]['binedges']\n probs = report['Details'][\"dataloading_time\"]['probs']\n text=f\"\"\"The following histogram shows the distribution of dataloading times that have been measured throughout your training job. The median dataloading time was {median}s. \n The 95th percentile was {p95}s and the 25th percentile was {p25}s\"\"\"\n\n plot = figure(plot_height=450, \n plot_width=850,\n toolbar_location='right',\n tools=\"hover,wheel_zoom,reset,pan\",\n x_range=(binedges[0], binedges[-1])\n )\n \n plot.quad( top=probs,\n bottom=0,\n left=binedges[:-1],\n right=binedges[1:],\n line_color=\"white\",\n fill_color=colors[0],\n fill_alpha=0.8,\n legend=\"Dataloading events\" )\n\n plot.y_range.start = 0\n plot.xaxis.axis_label = f\"\"\"Dataloading in [s]\"\"\"\n plot.yaxis.axis_label = \"Occurrences\"\n plot.grid.grid_line_color = \"white\"\n plot.legend.click_policy=\"hide\"\n\n paragraph = Paragraph(text=f\"{text}\", width=900)\n show(column(paragraph, plot))",
"_____no_output_____"
],
[
"if analyse_phase == \"training\":\n display(Markdown(\"\"\" ### Batch size\"\"\"))\n report = load_report('BatchSize')\n if report:\n params = report['RuleParameters'].split('\\n')\n cpu_threshold_p95 = int(params[0].split(':')[1])\n gpu_threshold_p95 = int(params[1].split(':')[1])\n gpu_memory_threshold_p95 = int(params[2].split(':')[1])\n patience = int(params[3].split(':')[1])\n window = int(params[4].split(':')[1])\n violations = report['Violations']\n triggered = report['RuleTriggered']\n datapoints = report['Datapoints']\n \n text = Paragraph(text=f\"\"\"The BatchSize rule helps to detect if GPU is underutilized because of the batch size being \n too small. To detect this the rule analyzes the GPU memory footprint, CPU and GPU utilization. The rule checked if the 95th percentile of CPU utilization is below cpu_threshold_p95 of \n {cpu_threshold_p95}%, the 95th percentile of GPU utilization is below gpu_threshold_p95 of {gpu_threshold_p95}% and the 95th percentile of memory footprint \\\n below gpu_memory_threshold_p95 of {gpu_memory_threshold_p95}%. In your training job this happened {violations} times. \\\n The rule skipped the first {patience} datapoints. The rule computed the percentiles over window size of {window} continuous datapoints.\\n\n The rule analysed {datapoints} datapoints and triggered {triggered} times.\n \"\"\", width=800)\n show(text)\n if len(report['Details']) >0: \n timestamp = us_since_epoch_to_human_readable_time(report['Details']['last_timestamp'])\n date = datetime.datetime.strptime(timestamp, '%Y-%m-%dT%H:%M:%S:%f')\n day = date.date().strftime(\"%m/%d/%Y\")\n hour = date.time().strftime(\"%H:%M:%S\")\n del report['Details']['last_timestamp']\n text = Paragraph(text=f\"\"\"Your training job is underutilizing the instance. You may want to consider\n either switch to a smaller instance type or to increase the batch size. \n The last time the BatchSize rule triggered in your training job was on {day} at {hour}.\n The following boxplots are a snapshot from the timestamps. They the total \n CPU utilization, the GPU utilization, and the GPU memory usage per GPU (without outliers).\"\"\", \n width=800)\n show(text)\n\n for node_id in report['Details']:\n xmax = max(20, len(report['Details'][node_id]))\n \n plot = figure(plot_height=350, \n plot_width=1000,\n toolbar_location='right',\n tools=\"hover,wheel_zoom,reset,pan\", \n title=f\"Node {node_id}\",\n x_range=(0,xmax)\n )\n \n for index, key in enumerate(report['Details'][node_id]):\n upper = report['Details'][node_id][key]['upper']\n lower = report['Details'][node_id][key]['lower']\n p75 = report['Details'][node_id][key]['p75']\n p25 = report['Details'][node_id][key]['p25']\n p50 = report['Details'][node_id][key]['p50']\n\n plot.segment(index+1, upper, index+1, p75, line_color=\"black\")\n plot.segment(index+1, lower, index+1, p25, line_color=\"black\")\n\n plot.vbar(index+1, 0.7, p50, p75, fill_color=\"#FDE725\", line_color=\"black\")\n plot.vbar(index+1, 0.7, p25, p50, fill_color=\"#440154\", line_color=\"black\")\n\n plot.rect(index+1, lower, 0.2, 0.01, line_color=\"black\")\n plot.rect(index+1, upper, 0.2, 0.01, line_color=\"black\")\n\n plot.xaxis.major_label_overrides[index+1] = key\n plot.xgrid.grid_line_color = None\n plot.ygrid.grid_line_color = \"white\"\n plot.grid.grid_line_width = 0\n\n plot.xaxis.major_label_text_font_size=\"10px\"\n plot.xaxis.ticker = np.arange(index+2)\n plot.yaxis.axis_label = \"Utilization in %\"\n show(plot)",
"_____no_output_____"
],
[
"if analyse_phase == \"training\": \n display(Markdown(\"\"\"### CPU bottlenecks\\n\\n\"\"\"))\n\n report = load_report('CPUBottleneck')\n if report:\n params = report['RuleParameters'].split('\\n')\n threshold = int(params[0].split(':')[1])\n cpu_threshold = int(params[1].split(':')[1])\n gpu_threshold = int(params[2].split(':')[1])\n patience = int(params[3].split(':')[1])\n violations = report['Violations']\n triggered = report['RuleTriggered']\n datapoints = report['Datapoints']\n \n if report['Violations'] > 0:\n perc = int(report['Violations']/report['Datapoints']*100)\n else:\n perc = 0\n if perc < threshold:\n string = 'below'\n else:\n string = 'above'\n text = f\"\"\"The CPUBottleneck rule checked when the CPU utilization was above cpu_threshold of {cpu_threshold}% \n and GPU utilization was below gpu_threshold of {gpu_threshold}%. \n During initialization utilization is likely to be zero, so the rule skipped the first {patience} datapoints.\n With this configuration the rule found {violations} CPU bottlenecks which is {perc}% of the total time. This is {string} the threshold of {threshold}%\n The rule analysed {datapoints} data points and triggered {triggered} times.\"\"\"\n \n paragraph = Paragraph(text=text, width=900)\n show(paragraph)\n if report:\n\n plots = []\n text = \"\"\n if report['RuleTriggered'] > 0:\n\n low_gpu = report['Details']['low_gpu_utilization']\n cpu_bottleneck = {}\n cpu_bottleneck[\"GPU usage above threshold\"] = report[\"Datapoints\"] - report[\"Details\"][\"low_gpu_utilization\"]\n cpu_bottleneck[\"GPU usage below threshold\"] = report[\"Details\"][\"low_gpu_utilization\"] - len(report[\"Details\"])\n cpu_bottleneck[\"Low GPU usage due to CPU bottlenecks\"] = len(report[\"Details\"][\"bottlenecks\"])\n\n n_bottlenecks = round(len(report['Details']['bottlenecks'])/datapoints * 100, 2)\n text = f\"\"\"The following chart (left) shows how many datapoints were below the gpu_threshold of {gpu_threshold}%\n and how many of those datapoints were likely caused by a CPU bottleneck. The rule found {low_gpu} out of {datapoints} datapoints which had a GPU utilization \n below {gpu_threshold}%. Out of those datapoints {n_bottlenecks}% were likely caused by CPU bottlenecks. \n \"\"\"\n\n plot = create_piechart(cpu_bottleneck, \n height=350,\n width=600,\n x1=0.2,\n x2=0.6,\n radius=0.3, \n title=\"Low GPU usage caused by CPU bottlenecks\")\n\n plots.append(plot)\n\n if 'phase' in report['Details']:\n text = f\"\"\"{text} The chart (in the middle) shows whether CPU bottlenecks mainly \n happened during train/validation phase.\n \"\"\"\n\n plot = create_piechart(report['Details']['phase'], \n height=350,\n width=600,\n x1=0.2,\n x2=0.6,\n radius=0.3, \n title=\"The ratio between time spent on TRAIN/EVAL phase\")\n plots.append(plot)\n\n if 'forward_backward' in report['Details'] and len(report['Details']['forward_backward']) > 0:\n\n event = max(report['Details']['forward_backward'], key=report['Details']['forward_backward'].get)\n perc = report['Details']['forward_backward'][event]\n\n text = f\"\"\"{text} The pie charts on the right shows a more detailed breakdown. \n It shows that {int(perc)}% of the training time was spent on event {event}\"\"\"\n\n plot = create_piechart(report['Details']['forward_backward'], \n height=350,\n width=600,\n x1=0.2,\n x2=0.6,\n radius=0.3, \n title=\"The ratio between forward and backward pass\") \n plots.append(plot)\n\n if len(plots) > 0:\n paragraph = Paragraph(text=text, width=900)\n show(column(paragraph, row(plots)))\n\n plots = []\n text = \"\"\n if 'ratio' in report['Details'] and len(report['Details']['ratio']) > 0:\n\n key = list(report['Details']['ratio'].keys())[0]\n ratio = report['Details']['ratio'][key]\n\n text = f\"\"\"The following pie chart shows a breakdown of the CPU/GPU operators that happened during CPU bottlenecks. \n It shows that {int(ratio)}% of the training time was spent on executing operators in \"{key}\".\"\"\"\n\n plot = create_piechart(report['Details']['ratio'], \n height=350,\n width=600,\n x1=0.2,\n x2=0.6,\n radius=0.3, \n title=\"The ratio between CPU/GPU operators\")\n plots.append(plot)\n\n\n if 'general' in report['Details'] and len(report['Details']['general']) > 0:\n\n event = max(report['Details']['general'], key=report['Details']['general'].get)\n perc = report['Details']['general'][event]\n \n plot = create_piechart(report['Details']['general'], \n height=350,\n width=600,\n x1=0.2,\n x2=0.6,\n radius=0.3, \n title=\"General metrics recorded in framework \")\n plots.append(plot)\n\n if len(plots) > 0:\n paragraph = Paragraph(text=text, width=900)\n show(column(paragraph, row(plots)))\n\n plots = []\n text = \"\"\n if 'horovod' in report['Details'] and len(report['Details']['horovod']) > 0:\n\n event = max(report['Details']['horovod'], key=report['Details']['horovod'].get)\n perc = report['Details']['horovod'][event]\n text = f\"\"\"The following pie chart shows a detailed breakdown of the Horovod metrics \n that have been recorded when the CPU bottleneck happened. The most expensive function was \n {event} with {int(perc)}%\"\"\"\n\n plot = create_piechart(report['Details']['horovod'], \n height=350,\n width=600,\n x1=0.2,\n x2=0.6,\n radius=0.3, \n title=\"General metrics recorded in framework \")\n\n paragraph = Paragraph(text=text, width=900)\n show(column(paragraph, row(plot)))",
"_____no_output_____"
],
[
"if analyse_phase == \"training\": \n display(Markdown(\"\"\"### I/O bottlenecks\\n\\n\"\"\"))\n\n report = load_report('IOBottleneck')\n if report:\n params = report['RuleParameters'].split('\\n')\n threshold = int(params[0].split(':')[1])\n io_threshold = int(params[1].split(':')[1])\n gpu_threshold = int(params[2].split(':')[1])\n patience = int(params[3].split(':')[1])\n violations = report['Violations']\n triggered = report['RuleTriggered']\n datapoints = report['Datapoints']\n \n if report['Violations'] > 0:\n perc = int(report['Violations']/report['Datapoints']*100)\n else:\n perc = 0\n if perc < threshold:\n string = 'below'\n else:\n string = 'above'\n text = f\"\"\"The IOBottleneck rule checked when I/O wait time was above io_threshold of {io_threshold}% \n and GPU utilization was below gpu_threshold of {gpu_threshold}. During initialization utilization is likely to be zero, so the rule skipped the first {patience} datapoints. \n With this configuration the rule found {violations} I/O bottlenecks which is {perc}% of the total time. This is {string} the threshold of {threshold}%.\n The rule analysed {datapoints} datapoints and triggered {triggered} times.\"\"\"\n paragraph = Paragraph(text=text, width=900)\n show(paragraph)\n \n if report:\n\n plots = []\n text = \"\"\n if report['RuleTriggered'] > 0:\n\n low_gpu = report['Details']['low_gpu_utilization']\n cpu_bottleneck = {}\n cpu_bottleneck[\"GPU usage above threshold\"] = report[\"Datapoints\"] - report[\"Details\"][\"low_gpu_utilization\"]\n cpu_bottleneck[\"GPU usage below threshold\"] = report[\"Details\"][\"low_gpu_utilization\"] - len(report[\"Details\"])\n cpu_bottleneck[\"Low GPU usage due to I/O bottlenecks\"] = len(report[\"Details\"][\"bottlenecks\"])\n\n n_bottlenecks = round(len(report['Details']['bottlenecks'])/datapoints * 100, 2)\n text = f\"\"\"The following chart (left) shows how many datapoints were below the gpu_threshold of {gpu_threshold}%\n and how many of those datapoints were likely caused by a I/O bottleneck. The rule found {low_gpu} out of {datapoints} datapoints which had a GPU utilization \n below {gpu_threshold}%. Out of those datapoints {n_bottlenecks}% were likely caused by I/O bottlenecks. \n \"\"\"\n\n plot = create_piechart(cpu_bottleneck, \n height=350,\n width=600,\n x1=0.2,\n x2=0.6,\n radius=0.3, \n title=\"Low GPU usage caused by I/O bottlenecks\")\n\n plots.append(plot)\n\n if 'phase' in report['Details']:\n text = f\"\"\"{text} The chart (in the middle) shows whether I/O bottlenecks mainly happened during the training or validation phase.\n \"\"\"\n\n plot = create_piechart(report['Details']['phase'], \n height=350,\n width=600,\n x1=0.2,\n x2=0.6,\n radius=0.3, \n title=\"The ratio between the time spent on the TRAIN/EVAL phase\")\n plots.append(plot)\n\n if 'forward_backward' in report['Details'] and len(report['Details']['forward_backward']) > 0:\n\n event = max(report['Details']['forward_backward'], key=report['Details']['forward_backward'].get)\n perc = report['Details']['forward_backward'][event]\n\n text = f\"\"\"{text} The pie charts on the right shows a more detailed breakdown. \n It shows that {int(perc)}% of the training time was spent on event \"{event}\".\"\"\"\n\n plot = create_piechart(report['Details']['forward_backward'], \n height=350,\n width=600,\n x1=0.2,\n x2=0.6,\n radius=0.3, \n title=\"The ratio between forward and backward pass\") \n plots.append(plot)\n\n if len(plots) > 0:\n paragraph = Paragraph(text=text, width=900)\n show(column(paragraph, row(plots)))\n\n plots = []\n text = \"\"\n if 'ratio' in report['Details'] and len(report['Details']['ratio']) > 0:\n\n key = list(report['Details']['ratio'].keys())[0]\n ratio = report['Details']['ratio'][key]\n\n text = f\"\"\"The following pie chart shows a breakdown of the CPU/GPU operators that happened \n during I/O bottlenecks. It shows that {int(ratio)}% of the training time was spent on executing operators in \"{key}\".\"\"\"\n\n plot = create_piechart(report['Details']['ratio'], \n height=350,\n width=600,\n x1=0.2,\n x2=0.6,\n radius=0.3, \n title=\"Ratio between CPU/GPU operators\")\n plots.append(plot)\n\n\n if 'general' in report['Details'] and len(report['Details']['general']) > 0:\n\n event = max(report['Details']['general'], key=report['Details']['general'].get)\n perc = report['Details']['general'][event]\n\n plot = create_piechart(report['Details']['general'], \n height=350,\n width=600,\n x1=0.2,\n x2=0.6,\n radius=0.3, \n title=\"General metrics recorded in framework \")\n plots.append(plot)\n\n if len(plots) > 0:\n paragraph = Paragraph(text=text, width=900)\n show(column(paragraph, row(plots)))\n\n plots = []\n text = \"\"\n if 'horovod' in report['Details'] and len(report['Details']['horovod']) > 0:\n\n event = max(report['Details']['horovod'], key=report['Details']['horovod'].get)\n perc = report['Details']['horovod'][event]\n text = f\"\"\"The following pie chart shows a detailed breakdown of the Horovod metrics that have been\n recorded when I/O bottleneck happened. The most expensive function was {event} with {int(perc)}%\"\"\"\n\n plot = create_piechart(report['Details']['horovod'], \n height=350,\n width=600,\n x1=0.2,\n x2=0.6,\n radius=0.3, \n title=\"General metrics recorded in framework \")\n\n paragraph = Paragraph(text=text, width=900)\n show(column(paragraph, row(plot))) \n",
"_____no_output_____"
],
[
"if analyse_phase == \"training\":\n display(Markdown(\"\"\"### GPU memory\\n\\n\"\"\"))\n \n report = load_report('GPUMemoryIncrease')\n if report:\n params = report['RuleParameters'].split('\\n')\n increase = float(params[0].split(':')[1])\n patience = params[1].split(':')[1]\n window = params[2].split(':')[1]\n violations = report['Violations']\n triggered = report['RuleTriggered']\n datapoints = report['Datapoints']\n \n text=Paragraph(text=f\"\"\"The GPUMemoryIncrease rule helps to detect large increase in memory usage on GPUs. \n The rule checked if the moving average of memory increased by more than {increase}%. \n So if the moving average increased for instance from 10% to {11+increase}%, \n the rule would have triggered. During initialization utilization is likely 0, so the rule skipped the first {patience} datapoints.\n The moving average was computed on a window size of {window} continuous datapoints. The rule detected {violations} violations\n where the moving average between previous and current time window increased by more than {increase}%.\n The rule analysed {datapoints} datapoints and triggered {triggered} times.\"\"\",\n width=900)\n show(text)\n\n if len(report['Details']) > 0:\n \n timestamp = us_since_epoch_to_human_readable_time(report['Details']['last_timestamp'])\n date = datetime.datetime.strptime(timestamp, '%Y-%m-%dT%H:%M:%S:%f')\n day = date.date().strftime(\"%m/%d/%Y\")\n hour = date.time().strftime(\"%H:%M:%S\")\n text = Paragraph(text=f\"\"\"Your training job triggered memory spikes. \n The last time the GPUMemoryIncrease rule triggered in your training job was on {day} at {hour}.\n The following boxplots are a snapshot from the timestamps. They show for each node and GPU the corresponding\n memory utilization (without outliers).\"\"\", width=900)\n show(text)\n \n del report['Details']['last_timestamp']\n \n for node_id in report['Details']:\n \n plot = figure(plot_height=350, \n plot_width=1000,\n toolbar_location='right',\n tools=\"hover,wheel_zoom,reset,pan\", \n title=f\"Node {node_id}\",\n x_range=(0,17),\n )\n\n for index, key in enumerate(report['Details'][node_id]):\n display(Markdown(f\"\"\"**Memory utilization of {key} on node {node_id}:**\"\"\"))\n text = \"\"\n gpu_max = report['Details'][node_id][key]['gpu_max']\n text = f\"\"\"{text} The max memory utilization of {key} on node {node_id} was {gpu_max}%.\"\"\"\n \n p_95 = int(report['Details'][node_id][key]['p95'])\n p_5 = report['Details'][node_id][key]['p05']\n if p_95 < int(50): \n text = f\"\"\"{text} The 95th percentile was only {p_95}%.\"\"\"\n if p_5 < int(5): \n text = f\"\"\"{text} The 5th percentile was only {p_5}%.\"\"\"\n if p_95 - p_5 > 50:\n text = f\"\"\"{text} The difference between 5th percentile {p_5}% and 95th percentile {p_95}% is quite \n significant, which means that memory utilization on {key} is fluctuating quite a lot.\"\"\"\n \n text = Paragraph(text=f\"\"\"{text}\"\"\", width=900)\n show(text)\n \n upper = report['Details'][node_id][key]['upper']\n lower = report['Details'][node_id][key]['lower']\n p75 = report['Details'][node_id][key]['p75']\n p25 = report['Details'][node_id][key]['p25']\n p50 = report['Details'][node_id][key]['p50']\n\n plot.segment(index+1, upper, index+1, p75, line_color=\"black\")\n plot.segment(index+1, lower, index+1, p25, line_color=\"black\")\n\n plot.vbar(index+1, 0.7, p50, p75, fill_color=\"#FDE725\", line_color=\"black\")\n plot.vbar(index+1, 0.7, p25, p50, fill_color=\"#440154\", line_color=\"black\")\n\n plot.rect(index+1, lower, 0.2, 0.01, line_color=\"black\")\n plot.rect(index+1, upper, 0.2, 0.01, line_color=\"black\")\n\n plot.xaxis.major_label_overrides[index+1] = key\n plot.xgrid.grid_line_color = None\n plot.ygrid.grid_line_color = \"white\"\n plot.grid.grid_line_width = 0\n\n plot.xaxis.major_label_text_font_size=\"10px\"\n plot.xaxis.ticker = np.arange(index+2)\n plot.yaxis.axis_label = \"Utilization in %\"\n show(plot)",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code"
] |
[
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
]
] |
4ae928e20f0b9f284761db3a2b106763a205aa2d
| 7,384 |
ipynb
|
Jupyter Notebook
|
labs/lab7/fauxware/fauxware.ipynb
|
benjholla/PAC2020
|
67e205211306f593c8ea06ed37ec7b98e561e955
|
[
"MIT"
] | 3 |
2020-06-06T05:40:15.000Z
|
2020-07-03T16:08:24.000Z
|
labs/lab7/fauxware/fauxware.ipynb
|
benjholla/PAC2020
|
67e205211306f593c8ea06ed37ec7b98e561e955
|
[
"MIT"
] | null | null | null |
labs/lab7/fauxware/fauxware.ipynb
|
benjholla/PAC2020
|
67e205211306f593c8ea06ed37ec7b98e561e955
|
[
"MIT"
] | null | null | null | 40.130435 | 337 | 0.644772 |
[
[
[
"# Overview\n\nThis lab has been adapted from the angr [motivating example](https://github.com/angr/angr-doc/tree/master/examples/fauxware). It shows the basic lifecycle and capabilities of the angr framework. \n\nNote this lab (and other notebooks running angr) should be run with the Python 3 kernel!\n\nLook at fauxware.c! This is the source code for a \"faux firmware\" (@zardus really likes the puns) that's meant to be a simple representation of a firmware that can authenticate users but also has a backdoor - the backdoor is that anybody who provides the string \"SOSNEAKY\" as their password will be automatically authenticated.",
"_____no_output_____"
]
],
[
[
"# import the python system and angr libraries\n\nimport angr\nimport sys",
"_____no_output_____"
],
[
"# We can use this as a basic demonstration of using angr for symbolic execution. \n# First, we load the binary into an angr project.\n\np = angr.Project('/home/pac/Desktop/lab7/fauxware/fauxware')",
"_____no_output_____"
],
[
"# Now, we want to construct a representation of symbolic program state.\n# SimState objects are what angr manipulates when it symbolically executes\n# binary code.\n# The entry_state constructor generates a SimState that is a very generic\n# representation of the possible program states at the program's entry\n# point. There are more constructors, like blank_state, which constructs a\n# \"blank slate\" state that specifies as little concrete data as possible,\n# or full_init_state, which performs a slow and pedantic initialization of\n# program state as it would execute through the dynamic loader.\n\nstate = p.factory.entry_state()\n\n# Now, in order to manage the symbolic execution process from a very high\n# level, we have a SimulationManager. SimulationManager is just collections\n# of states with various tags attached with a number of convenient\n# interfaces for managing them.\n\nsm = p.factory.simulation_manager(state)",
"_____no_output_____"
],
[
"# Now, we begin execution. This will symbolically execute the program until\n# we reach a branch statement for which both branches are satisfiable.\n\nsm.run(until=lambda sm_: len(sm_.active) > 1)\n\n# If you look at the C code, you see that the first \"if\" statement that the\n# program can come across is comparing the result of the strcmp with the\n# backdoor password. So, we have halted execution with two states, each of\n# which has taken a different arm of that conditional branch. If you drop\n# an IPython shell here and examine sm.active[n].solver.constraints\n# you will see the encoding of the condition that was added to the state to\n# constrain it to going down this path, instead of the other one. These are\n# the constraints that will eventually be passed to our constraint solver\n# (z3) to produce a set of concrete inputs satisfying them.\n\n# As a matter of fact, we'll do that now.\n\ninput_0 = sm.active[0].posix.dumps(0)\ninput_1 = sm.active[1].posix.dumps(0)",
"WARNING | 2020-05-25 18:09:10,546 | \u001b[32mangr.state_plugins.symbolic_memory\u001b[0m | \u001b[32mThe program is accessing memory or registers with an unspecified value. This could indicate unwanted behavior.\u001b[0m\nWARNING | 2020-05-25 18:09:10,556 | \u001b[32mangr.state_plugins.symbolic_memory\u001b[0m | \u001b[32mangr will cope with this by generating an unconstrained symbolic variable and continuing. You can resolve this by:\u001b[0m\nWARNING | 2020-05-25 18:09:10,563 | \u001b[32mangr.state_plugins.symbolic_memory\u001b[0m | \u001b[32m1) setting a value to the initial state\u001b[0m\nWARNING | 2020-05-25 18:09:10,565 | \u001b[32mangr.state_plugins.symbolic_memory\u001b[0m | \u001b[32m2) adding the state option ZERO_FILL_UNCONSTRAINED_{MEMORY,REGISTERS}, to make unknown regions hold null\u001b[0m\nWARNING | 2020-05-25 18:09:10,566 | \u001b[32mangr.state_plugins.symbolic_memory\u001b[0m | \u001b[32m3) adding the state option SYMBOL_FILL_UNCONSTRAINED_{MEMORY_REGISTERS}, to suppress these messages.\u001b[0m\nWARNING | 2020-05-25 18:09:10,568 | \u001b[32mangr.state_plugins.symbolic_memory\u001b[0m | \u001b[32mFilling memory at 0x7fffffffffefff8 with 40 unconstrained bytes referenced from 0x109d800 (strcmp+0x0 in libc.so.6 (0x9d800))\u001b[0m\nWARNING | 2020-05-25 18:09:10,577 | \u001b[32mangr.state_plugins.symbolic_memory\u001b[0m | \u001b[32mFilling memory at 0x7fffffffffeff50 with 8 unconstrained bytes referenced from 0x109d800 (strcmp+0x0 in libc.so.6 (0x9d800))\u001b[0m\n"
],
[
"# We have used a utility function on the state's posix plugin to perform a\n# quick and dirty concretization of the content in file descriptor zero,\n# stdin. One of these strings should contain the substring \"SOSNEAKY\"!\n\nif b'SOSNEAKY' in input_0:\n analysis_result = input_0\nelse:\n analysis_result = input_1\n \nprint(\"Result: \" + str(analysis_result))\n\nwith open(\"/home/pac/Desktop/lab7/fauxware/analysis_result\", \"wb\") as file:\n file.write(analysis_result)",
"Result: b'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00SOSNEAKY\\x00'\n"
],
[
"# You should be able to run this script and pipe its output to fauxware and\n# fauxware will authenticate you!\n\nimport os\ncommand = \"/home/pac/Desktop/lab7/fauxware/fauxware < /home/pac/Desktop/lab7/fauxware/analysis_result\"\nprint(os.popen(command).read())",
"Username: \nPassword: \nWelcome to the admin console, trusted user!\n\n"
]
]
] |
[
"markdown",
"code"
] |
[
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code"
]
] |
4ae93059eb2e3efa91988318e36388f279be6f18
| 48,869 |
ipynb
|
Jupyter Notebook
|
Web-Scraping Scripts and Data/Accredited Canadian English Undergrad MechEng Programs/USaskatchewan/WS_USaskatchewan_Engineering_Common_First_Year.ipynb
|
JiaShengJerryLu/Keyword-Matching-for-Canadian-Mechanical-Engineering-Programs
|
21793105e6bf4babcce56d9fc5e8e196ba43d2a1
|
[
"MIT"
] | null | null | null |
Web-Scraping Scripts and Data/Accredited Canadian English Undergrad MechEng Programs/USaskatchewan/WS_USaskatchewan_Engineering_Common_First_Year.ipynb
|
JiaShengJerryLu/Keyword-Matching-for-Canadian-Mechanical-Engineering-Programs
|
21793105e6bf4babcce56d9fc5e8e196ba43d2a1
|
[
"MIT"
] | null | null | null |
Web-Scraping Scripts and Data/Accredited Canadian English Undergrad MechEng Programs/USaskatchewan/WS_USaskatchewan_Engineering_Common_First_Year.ipynb
|
JiaShengJerryLu/Keyword-Matching-for-Canadian-Mechanical-Engineering-Programs
|
21793105e6bf4babcce56d9fc5e8e196ba43d2a1
|
[
"MIT"
] | null | null | null | 71.866176 | 11,824 | 0.666394 |
[
[
[
"from bs4 import BeautifulSoup as soup\nfrom urllib.request import urlopen as ureq\nfrom selenium import webdriver\nimport time\nimport re",
"_____no_output_____"
],
[
"url = 'https://programs.usask.ca/engineering/first-year/index.php#Year14144creditunits'",
"_____no_output_____"
],
[
"chrome_options = webdriver.ChromeOptions()\nchrome_options.add_argument('--ignore-certificate-errors')\nchrome_options.add_argument('--incognito')\nchrome_options.add_argument('--headless')\n\ndriver = webdriver.Chrome(\"C:\\\\Users\\\\jerry\\\\Downloads\\\\chromedriver\", options=chrome_options)",
"_____no_output_____"
],
[
"driver.get(url)\ntime.sleep(3)",
"_____no_output_____"
]
],
[
[
"# 1. Collect course link texts for webdriver to click on",
"_____no_output_____"
]
],
[
[
"page_html = driver.page_source",
"_____no_output_____"
],
[
"link_texts = re.findall(\"[A-Z]+ [0-9]{3}\\.[0-9]\", page_html)\n\nlink_texts = list(dict.fromkeys(link_texts))\n\nlink_texts",
"_____no_output_____"
],
[
"len(link_texts)",
"_____no_output_____"
]
],
[
[
"# 2. Test run - try to scrape the first course",
"_____no_output_____"
]
],
[
[
"link = driver.find_element_by_link_text(link_texts[0])\nlink.click()\ntime.sleep(2)\ndriver.page_source",
"_____no_output_____"
],
[
"page_soup = soup(driver.page_source, 'lxml')",
"_____no_output_____"
],
[
"page_soup.find(\"h1\", {\"class\": \"uofs-page-title\"}).text.strip()[:-2]",
"_____no_output_____"
],
[
"page_soup.find(\"p\", {\"class\": \"lead\"}).text.strip()",
"_____no_output_____"
],
[
"page_soup.findAll(\"div\", {\"class\": \"uofs-subsection\"})[1].find(\"p\").text.strip()",
"_____no_output_____"
],
[
"driver.back()",
"_____no_output_____"
]
],
[
[
"# 3. Test run successful. Implement automation script to scrape all courses",
"_____no_output_____"
]
],
[
[
"from selenium.common.exceptions import NoSuchElementException\n\ncourse_codes = []\ncourse_names = []\ncourse_descs = []\ncounter = 0\n\nfor link_text in link_texts:\n \n #go to course page\n try:\n link = driver.find_element_by_partial_link_text(link_text)\n except NoSuchElementException:\n print(\"no link for {}\".format(link_text))\n continue\n \n time.sleep(2)\n link.click() \n time.sleep(2)\n page_soup = soup(driver.page_source, 'lxml')\n \n #scrape data\n course_codes.append(page_soup.find(\"h1\", {\"class\": \"uofs-page-title\"}).text.strip()[:-2])\n course_names.append(page_soup.find(\"p\", {\"class\": \"lead\"}).text.strip())\n course_descs.append(page_soup.findAll(\"div\", {\"class\": \"uofs-subsection\"})[1].find(\"p\").text.strip())\n \n print(\"Scraped \", page_soup.find(\"h1\", {\"class\": \"uofs-page-title\"}).text.strip()[:-2])\n counter += 1\n \n driver.back()\n time.sleep(2)\n \nprint(\"Finished scraping {} courses\".format(counter))",
"Scraped GE 102\nScraped GE 112\nScraped GE 122\nScraped GE 132\nScraped GE 142\nScraped GE 152\nScraped CMPT 142\nScraped MATH 133\nScraped PHYS 152\nScraped CHEM 142\nScraped GEOL 102\nScraped BIOL 102\nScraped GE 103\nScraped GE 123\nScraped GE 133\nScraped GE 143\nScraped GE 153\nScraped GE 163\nScraped CHEM 146\nScraped MATH 134\nScraped PHYS 156\nScraped CMPT 146\nScraped ME 113\nScraped CHE 113\nScraped CE 271\nFinished scraping 25 courses\n"
]
],
[
[
"# 4. Inspect, clean, and write to CSV",
"_____no_output_____"
]
],
[
[
"course_codes",
"_____no_output_____"
],
[
"course_names",
"_____no_output_____"
],
[
"course_descs",
"_____no_output_____"
],
[
"#the two last courses and the fourth last course are not taken by mech eng students\nirrelevant_codes = [\"CMPT 146\", \"CHE 113\", \"CE 271\"]\n\nmech_codes = []\nmech_names = []\nmech_descs = []\n\nfor i in range(len(course_codes)):\n if course_codes[i] not in irrelevant_codes:\n mech_codes.append(course_codes[i])\n mech_names.append(course_names[i])\n mech_descs.append(course_descs[i])\n \nmech_codes",
"_____no_output_____"
],
[
"mech_names",
"_____no_output_____"
],
[
"mech_descs",
"_____no_output_____"
],
[
"import pandas as pd\n\ndf = pd.DataFrame({\n \n \"Course Number\": mech_codes,\n \"Course Name\": mech_names,\n \"Course Description\": mech_descs \n \n})\n\ndf.to_csv('USaskatchewan_Engineeering_Common_First_Year_Courses.csv', index = False)\n",
"_____no_output_____"
],
[
"len(mech_codes)",
"_____no_output_____"
],
[
"driver.quit()",
"_____no_output_____"
]
]
] |
[
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code"
] |
[
[
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
]
] |
4ae93fd3f4146abb13541bda6f0c7673cd2e5d47
| 130 |
ipynb
|
Jupyter Notebook
|
classical_filtering.ipynb
|
carloseduardosg73/quantecon-notebooks-jl
|
4e2b5aaf5bf14d9db743b9fdfe1619e34daeb268
|
[
"BSD-3-Clause"
] | null | null | null |
classical_filtering.ipynb
|
carloseduardosg73/quantecon-notebooks-jl
|
4e2b5aaf5bf14d9db743b9fdfe1619e34daeb268
|
[
"BSD-3-Clause"
] | null | null | null |
classical_filtering.ipynb
|
carloseduardosg73/quantecon-notebooks-jl
|
4e2b5aaf5bf14d9db743b9fdfe1619e34daeb268
|
[
"BSD-3-Clause"
] | null | null | null | 32.5 | 75 | 0.884615 |
[
[
[
"empty"
]
]
] |
[
"empty"
] |
[
[
"empty"
]
] |
4ae94bee9e62874f94577c877a7472482a460561
| 25,490 |
ipynb
|
Jupyter Notebook
|
notebooks/text-vs-marker-alignment.ipynb
|
eaton-lab/toyplot
|
472f2f2f1bc048e485ade44d75c3ace310be4b41
|
[
"BSD-3-Clause"
] | 438 |
2015-01-06T20:54:02.000Z
|
2022-03-15T00:39:33.000Z
|
notebooks/text-vs-marker-alignment.ipynb
|
eaton-lab/toyplot
|
472f2f2f1bc048e485ade44d75c3ace310be4b41
|
[
"BSD-3-Clause"
] | 184 |
2015-01-26T17:04:47.000Z
|
2022-02-19T16:29:00.000Z
|
notebooks/text-vs-marker-alignment.ipynb
|
eaton-lab/toyplot
|
472f2f2f1bc048e485ade44d75c3ace310be4b41
|
[
"BSD-3-Clause"
] | 45 |
2015-07-06T18:00:27.000Z
|
2022-02-14T12:46:17.000Z
| 61.421687 | 7,473 | 0.469321 |
[
[
[
"import toyplot\n\ncanvas = toyplot.Canvas(width=300, height=300)\naxes = canvas.cartesian()\nm0 = axes.scatterplot([0, 1, 2], [0, 1, 2], size=25)\nm1 = axes.text([0, 1, 2], [0, 1, 2], [\"0\", \"55\", \"100\"], color=\"red\")\n\nmarks = []\nfor label in [\"0\", \"55\", \"100\"]:\n marks.append(toyplot.marker.create(\n shape=\"o\",\n label=label,\n size=25,\n ))\nm2 = axes.scatterplot([0, 1, 2], [1, 2, 3], marker=marks)",
"_____no_output_____"
],
[
"import toyplot.pdf\ntoyplot.pdf.render(canvas, \"test.pdf\")",
"_____no_output_____"
]
]
] |
[
"code"
] |
[
[
"code",
"code"
]
] |
4ae94faa2362621ff83c747e26496cdb99c07ebd
| 558,557 |
ipynb
|
Jupyter Notebook
|
Feature visualization/mceffnet_tsne.ipynb
|
anoopkdcs/GANvsGraphicsvsReal
|
53d07ac010d670b863cf913002619b24339e9afe
|
[
"MIT"
] | 1 |
2022-01-03T05:52:51.000Z
|
2022-01-03T05:52:51.000Z
|
Feature visualization/mceffnet_tsne.ipynb
|
manjaryp/GANvsGraphicsvsReal
|
850e09400cb96771a2621a124a5f1693a147edb3
|
[
"MIT"
] | null | null | null |
Feature visualization/mceffnet_tsne.ipynb
|
manjaryp/GANvsGraphicsvsReal
|
850e09400cb96771a2621a124a5f1693a147edb3
|
[
"MIT"
] | null | null | null | 558,557 | 558,557 | 0.875789 |
[
[
[
"pip install mlxtend --upgrade --no-deps",
"Requirement already satisfied: mlxtend in /usr/local/lib/python3.7/dist-packages (0.14.0)\nCollecting mlxtend\n Downloading mlxtend-0.19.0-py2.py3-none-any.whl (1.3 MB)\n\u001b[K |████████████████████████████████| 1.3 MB 18.3 MB/s \n\u001b[?25hInstalling collected packages: mlxtend\n Attempting uninstall: mlxtend\n Found existing installation: mlxtend 0.14.0\n Uninstalling mlxtend-0.14.0:\n Successfully uninstalled mlxtend-0.14.0\nSuccessfully installed mlxtend-0.19.0\n"
],
[
"import mlxtend \nprint(mlxtend.__version__) ",
"0.19.0\n"
],
[
"from google.colab import drive\ndrive.mount('/content/gdrive')",
"Mounted at /content/gdrive\n"
],
[
"import cv2\nimport skimage\nimport keras\nimport tensorflow\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport pandas as pd\nfrom mlxtend.evaluate import confusion_matrix\nfrom mlxtend.plotting import plot_confusion_matrix\nfrom keras.models import Sequential, Model, load_model\nfrom keras.preprocessing.image import ImageDataGenerator\nfrom keras.layers import Convolution2D, MaxPooling2D, Dense, Flatten, concatenate, Concatenate#, Dropout\nfrom keras import regularizers\nfrom keras.callbacks import ModelCheckpoint \nfrom sklearn.metrics import classification_report \nfrom skimage import color",
"_____no_output_____"
],
[
"# fix random seed for reproducibility\nseed = 7\nnp.random.seed(seed)",
"_____no_output_____"
],
[
"img_width, img_height = 224, 224\nbatch_size = 1\nepochs = 100 \ntrain_samples = 7200\nvalidation_samples = 2400\ntest_samples = 2400",
"_____no_output_____"
],
[
"train_data_dir = 'path to train data'\nvalidation_data_dir = 'path to validation data'\ntest_data_dir = 'path to test data'",
"_____no_output_____"
],
[
"def scale0to255(image):\n\n converted_image = image\n min_1 = np.min(converted_image[:,:,0])\n max_1 = np.max(converted_image[:,:,0])\n converted_image[:,:,0] = np.round(((converted_image[:,:,0] - min_1) / (max_1 - min_1)) * 255)\n \n min_2 = np.min(converted_image[:,:,1])\n max_2 = np.max(converted_image[:,:,1])\n converted_image[:,:,1] = np.round(((converted_image[:,:,1] - min_2) / (max_2 - min_2)) * 255)\n \n min_3 = np.min(converted_image[:,:,2])\n max_3 = np.max(converted_image[:,:,2])\n converted_image[:,:,2] = np.round(((converted_image[:,:,2] - min_3) / (max_3 - min_3)) * 255)\n\n return converted_image ",
"_____no_output_____"
],
[
"def log(image):\n gaus_image = cv2.GaussianBlur(image,(3,3),0)\n laplacian_image = cv2.Laplacian(np.uint8(gaus_image), cv2.CV_64F)\n sharp_image = np.uint8(image + laplacian_image)\n return sharp_image ",
"_____no_output_____"
],
[
"def lch_colorFunction(image):\n log_image = log(image)\n lab_image = skimage.color.rgb2lab(log_image)\n lch_image = skimage.color.lab2lch(lab_image)\n scale_lch_image = scale0to255(lch_image)\n return scale_lch_image ",
"_____no_output_____"
],
[
"def hsv_colorFunction(image):\n log_image = log(image)\n hsv_image = skimage.color.rgb2hsv(log_image)\n np.nan_to_num(hsv_image, copy=False, nan=0.0, posinf=None, neginf=None)\n scale_hsv_image = scale0to255(hsv_image)\n return scale_hsv_image ",
"_____no_output_____"
],
[
"datagen_rgb = ImageDataGenerator()\ndatagen_lch = ImageDataGenerator(preprocessing_function = lch_colorFunction)\ndatagen_hsv = ImageDataGenerator(preprocessing_function = hsv_colorFunction)",
"_____no_output_____"
],
[
"def myGenerator (gen1, gen2, gen3):#\n while True:\n xy1 = gen1.next()\n xy2 = gen2.next()\n xy3 = gen3.next()\n yield ([xy1[0], xy2[0], xy3[0]], xy1[1]) #",
"_____no_output_____"
],
[
"train_generator_rgb = datagen_rgb.flow_from_directory(\n train_data_dir,\n color_mode=\"rgb\",\n target_size=(img_width, img_height),\n batch_size=batch_size,\n shuffle=False,\n class_mode='categorical')\n\ntrain_generator_lch = datagen_lch.flow_from_directory(\n train_data_dir,\n color_mode=\"rgb\",\n target_size=(img_width, img_height),\n batch_size=batch_size,\n shuffle=False,\n class_mode='categorical')\n\ntrain_generator_hsv = datagen_hsv.flow_from_directory(\n train_data_dir,\n color_mode=\"rgb\",\n target_size=(img_width, img_height),\n batch_size=batch_size,\n shuffle=False,\n class_mode='categorical')",
"Found 7200 images belonging to 3 classes.\nFound 7200 images belonging to 3 classes.\nFound 7200 images belonging to 3 classes.\n"
],
[
"train_generator = myGenerator(train_generator_rgb, train_generator_lch, train_generator_hsv)#",
"_____no_output_____"
],
[
"validation_generator_rgb = datagen_rgb.flow_from_directory(\n validation_data_dir,\n color_mode=\"rgb\",\n target_size=(img_width, img_height),\n batch_size=batch_size,\n shuffle=False,\n class_mode='categorical')\n\nvalidation_generator_lch = datagen_lch.flow_from_directory(\n validation_data_dir,\n color_mode=\"rgb\",\n target_size=(img_width, img_height),\n batch_size=batch_size,\n shuffle=False,\n class_mode='categorical')\n\nvalidation_generator_hsv = datagen_hsv.flow_from_directory(\n validation_data_dir,\n color_mode=\"rgb\",\n target_size=(img_width, img_height),\n batch_size=batch_size,\n shuffle=False,\n class_mode='categorical')",
"Found 2400 images belonging to 3 classes.\nFound 2400 images belonging to 3 classes.\nFound 2400 images belonging to 3 classes.\n"
],
[
"validation_generator = myGenerator(validation_generator_rgb, validation_generator_lch, validation_generator_hsv)#",
"_____no_output_____"
],
[
"test_generator_rgb = datagen_rgb.flow_from_directory(\n test_data_dir,\n color_mode=\"rgb\",\n target_size=(img_width, img_height),\n batch_size= 1,\n shuffle=False,\n class_mode='categorical')\n\ntest_generator_lch = datagen_lch.flow_from_directory(\n test_data_dir,\n color_mode=\"rgb\",\n target_size=(img_width, img_height),\n batch_size= 1,\n shuffle=False,\n class_mode='categorical')\n\ntest_generator_hsv = datagen_hsv.flow_from_directory(\n test_data_dir,\n color_mode=\"rgb\",\n target_size=(img_width, img_height),\n batch_size= 1,\n shuffle=False,\n class_mode='categorical')",
"Found 2400 images belonging to 3 classes.\nFound 2400 images belonging to 3 classes.\nFound 2400 images belonging to 3 classes.\n"
],
[
"test_generator = myGenerator(test_generator_rgb, test_generator_lch, test_generator_hsv)#",
"_____no_output_____"
],
[
"model = load_model('path to mceffnet2_model.h5')\nmodel.summary()",
"Model: \"model\"\n__________________________________________________________________________________________________\nLayer (type) Output Shape Param # Connected to \n==================================================================================================\neff_rgb_0 (InputLayer) [(None, 224, 224, 3) 0 \n__________________________________________________________________________________________________\neff_lch_0 (InputLayer) [(None, 224, 224, 3) 0 \n__________________________________________________________________________________________________\neff_hsv_0 (InputLayer) [(None, 224, 224, 3) 0 \n__________________________________________________________________________________________________\neff_rgb_1 (Rescaling) (None, 224, 224, 3) 0 eff_rgb_0[0][0] \n__________________________________________________________________________________________________\neff_lch_1 (Rescaling) (None, 224, 224, 3) 0 eff_lch_0[0][0] \n__________________________________________________________________________________________________\neff_hsv_1 (Rescaling) (None, 224, 224, 3) 0 eff_hsv_0[0][0] \n__________________________________________________________________________________________________\neff_rgb_2 (Normalization) (None, 224, 224, 3) 7 eff_rgb_1[0][0] \n__________________________________________________________________________________________________\neff_lch_2 (Normalization) (None, 224, 224, 3) 7 eff_lch_1[0][0] \n__________________________________________________________________________________________________\neff_hsv_2 (Normalization) (None, 224, 224, 3) 7 eff_hsv_1[0][0] \n__________________________________________________________________________________________________\neff_rgb_3 (ZeroPadding2D) (None, 225, 225, 3) 0 eff_rgb_2[0][0] \n__________________________________________________________________________________________________\neff_lch_3 (ZeroPadding2D) (None, 225, 225, 3) 0 eff_lch_2[0][0] \n__________________________________________________________________________________________________\neff_hsv_3 (ZeroPadding2D) (None, 225, 225, 3) 0 eff_hsv_2[0][0] \n__________________________________________________________________________________________________\neff_rgb_4 (Conv2D) (None, 112, 112, 32) 864 eff_rgb_3[0][0] \n__________________________________________________________________________________________________\neff_lch_4 (Conv2D) (None, 112, 112, 32) 864 eff_lch_3[0][0] \n__________________________________________________________________________________________________\neff_hsv_4 (Conv2D) (None, 112, 112, 32) 864 eff_hsv_3[0][0] \n__________________________________________________________________________________________________\neff_rgb_5 (BatchNormalization) (None, 112, 112, 32) 128 eff_rgb_4[0][0] \n__________________________________________________________________________________________________\neff_lch_5 (BatchNormalization) (None, 112, 112, 32) 128 eff_lch_4[0][0] \n__________________________________________________________________________________________________\neff_hsv_5 (BatchNormalization) (None, 112, 112, 32) 128 eff_hsv_4[0][0] \n__________________________________________________________________________________________________\neff_rgb_6 (Activation) (None, 112, 112, 32) 0 eff_rgb_5[0][0] \n__________________________________________________________________________________________________\neff_lch_6 (Activation) (None, 112, 112, 32) 0 eff_lch_5[0][0] \n__________________________________________________________________________________________________\neff_hsv_6 (Activation) (None, 112, 112, 32) 0 eff_hsv_5[0][0] \n__________________________________________________________________________________________________\neff_rgb_7 (DepthwiseConv2D) (None, 112, 112, 32) 288 eff_rgb_6[0][0] \n__________________________________________________________________________________________________\neff_lch_7 (DepthwiseConv2D) (None, 112, 112, 32) 288 eff_lch_6[0][0] \n__________________________________________________________________________________________________\neff_hsv_7 (DepthwiseConv2D) (None, 112, 112, 32) 288 eff_hsv_6[0][0] \n__________________________________________________________________________________________________\neff_rgb_8 (BatchNormalization) (None, 112, 112, 32) 128 eff_rgb_7[0][0] \n__________________________________________________________________________________________________\neff_lch_8 (BatchNormalization) (None, 112, 112, 32) 128 eff_lch_7[0][0] \n__________________________________________________________________________________________________\neff_hsv_8 (BatchNormalization) (None, 112, 112, 32) 128 eff_hsv_7[0][0] \n__________________________________________________________________________________________________\neff_rgb_9 (Activation) (None, 112, 112, 32) 0 eff_rgb_8[0][0] \n__________________________________________________________________________________________________\neff_lch_9 (Activation) (None, 112, 112, 32) 0 eff_lch_8[0][0] \n__________________________________________________________________________________________________\neff_hsv_9 (Activation) (None, 112, 112, 32) 0 eff_hsv_8[0][0] \n__________________________________________________________________________________________________\neff_rgb_10 (GlobalAveragePoolin (None, 32) 0 eff_rgb_9[0][0] \n__________________________________________________________________________________________________\neff_lch_10 (GlobalAveragePoolin (None, 32) 0 eff_lch_9[0][0] \n__________________________________________________________________________________________________\neff_hsv_10 (GlobalAveragePoolin (None, 32) 0 eff_hsv_9[0][0] \n__________________________________________________________________________________________________\neff_rgb_11 (Reshape) (None, 1, 1, 32) 0 eff_rgb_10[0][0] \n__________________________________________________________________________________________________\neff_lch_11 (Reshape) (None, 1, 1, 32) 0 eff_lch_10[0][0] \n__________________________________________________________________________________________________\neff_hsv_11 (Reshape) (None, 1, 1, 32) 0 eff_hsv_10[0][0] \n__________________________________________________________________________________________________\neff_rgb_12 (Conv2D) (None, 1, 1, 8) 264 eff_rgb_11[0][0] \n__________________________________________________________________________________________________\neff_lch_12 (Conv2D) (None, 1, 1, 8) 264 eff_lch_11[0][0] \n__________________________________________________________________________________________________\neff_hsv_12 (Conv2D) (None, 1, 1, 8) 264 eff_hsv_11[0][0] \n__________________________________________________________________________________________________\neff_rgb_13 (Conv2D) (None, 1, 1, 32) 288 eff_rgb_12[0][0] \n__________________________________________________________________________________________________\neff_lch_13 (Conv2D) (None, 1, 1, 32) 288 eff_lch_12[0][0] \n__________________________________________________________________________________________________\neff_hsv_13 (Conv2D) (None, 1, 1, 32) 288 eff_hsv_12[0][0] \n__________________________________________________________________________________________________\neff_rgb_14 (Multiply) (None, 112, 112, 32) 0 eff_rgb_9[0][0] \n eff_rgb_13[0][0] \n__________________________________________________________________________________________________\neff_lch_14 (Multiply) (None, 112, 112, 32) 0 eff_lch_9[0][0] \n eff_lch_13[0][0] \n__________________________________________________________________________________________________\neff_hsv_14 (Multiply) (None, 112, 112, 32) 0 eff_hsv_9[0][0] \n eff_hsv_13[0][0] \n__________________________________________________________________________________________________\neff_rgb_15 (Conv2D) (None, 112, 112, 16) 512 eff_rgb_14[0][0] \n__________________________________________________________________________________________________\neff_lch_15 (Conv2D) (None, 112, 112, 16) 512 eff_lch_14[0][0] \n__________________________________________________________________________________________________\neff_hsv_15 (Conv2D) (None, 112, 112, 16) 512 eff_hsv_14[0][0] \n__________________________________________________________________________________________________\neff_rgb_16 (BatchNormalization) (None, 112, 112, 16) 64 eff_rgb_15[0][0] \n__________________________________________________________________________________________________\neff_lch_16 (BatchNormalization) (None, 112, 112, 16) 64 eff_lch_15[0][0] \n__________________________________________________________________________________________________\neff_hsv_16 (BatchNormalization) (None, 112, 112, 16) 64 eff_hsv_15[0][0] \n__________________________________________________________________________________________________\neff_rgb_17 (Conv2D) (None, 112, 112, 96) 1536 eff_rgb_16[0][0] \n__________________________________________________________________________________________________\neff_lch_17 (Conv2D) (None, 112, 112, 96) 1536 eff_lch_16[0][0] \n__________________________________________________________________________________________________\neff_hsv_17 (Conv2D) (None, 112, 112, 96) 1536 eff_hsv_16[0][0] \n__________________________________________________________________________________________________\neff_rgb_18 (BatchNormalization) (None, 112, 112, 96) 384 eff_rgb_17[0][0] \n__________________________________________________________________________________________________\neff_lch_18 (BatchNormalization) (None, 112, 112, 96) 384 eff_lch_17[0][0] \n__________________________________________________________________________________________________\neff_hsv_18 (BatchNormalization) (None, 112, 112, 96) 384 eff_hsv_17[0][0] \n__________________________________________________________________________________________________\neff_rgb_19 (Activation) (None, 112, 112, 96) 0 eff_rgb_18[0][0] \n__________________________________________________________________________________________________\neff_lch_19 (Activation) (None, 112, 112, 96) 0 eff_lch_18[0][0] \n__________________________________________________________________________________________________\neff_hsv_19 (Activation) (None, 112, 112, 96) 0 eff_hsv_18[0][0] \n__________________________________________________________________________________________________\neff_rgb_20 (ZeroPadding2D) (None, 113, 113, 96) 0 eff_rgb_19[0][0] \n__________________________________________________________________________________________________\neff_lch_20 (ZeroPadding2D) (None, 113, 113, 96) 0 eff_lch_19[0][0] \n__________________________________________________________________________________________________\neff_hsv_20 (ZeroPadding2D) (None, 113, 113, 96) 0 eff_hsv_19[0][0] \n__________________________________________________________________________________________________\neff_rgb_21 (DepthwiseConv2D) (None, 56, 56, 96) 864 eff_rgb_20[0][0] \n__________________________________________________________________________________________________\neff_lch_21 (DepthwiseConv2D) (None, 56, 56, 96) 864 eff_lch_20[0][0] \n__________________________________________________________________________________________________\neff_hsv_21 (DepthwiseConv2D) (None, 56, 56, 96) 864 eff_hsv_20[0][0] \n__________________________________________________________________________________________________\neff_rgb_22 (BatchNormalization) (None, 56, 56, 96) 384 eff_rgb_21[0][0] \n__________________________________________________________________________________________________\neff_lch_22 (BatchNormalization) (None, 56, 56, 96) 384 eff_lch_21[0][0] \n__________________________________________________________________________________________________\neff_hsv_22 (BatchNormalization) (None, 56, 56, 96) 384 eff_hsv_21[0][0] \n__________________________________________________________________________________________________\neff_rgb_23 (Activation) (None, 56, 56, 96) 0 eff_rgb_22[0][0] \n__________________________________________________________________________________________________\neff_lch_23 (Activation) (None, 56, 56, 96) 0 eff_lch_22[0][0] \n__________________________________________________________________________________________________\neff_hsv_23 (Activation) (None, 56, 56, 96) 0 eff_hsv_22[0][0] \n__________________________________________________________________________________________________\neff_rgb_24 (GlobalAveragePoolin (None, 96) 0 eff_rgb_23[0][0] \n__________________________________________________________________________________________________\neff_lch_24 (GlobalAveragePoolin (None, 96) 0 eff_lch_23[0][0] \n__________________________________________________________________________________________________\neff_hsv_24 (GlobalAveragePoolin (None, 96) 0 eff_hsv_23[0][0] \n__________________________________________________________________________________________________\neff_rgb_25 (Reshape) (None, 1, 1, 96) 0 eff_rgb_24[0][0] \n__________________________________________________________________________________________________\neff_lch_25 (Reshape) (None, 1, 1, 96) 0 eff_lch_24[0][0] \n__________________________________________________________________________________________________\neff_hsv_25 (Reshape) (None, 1, 1, 96) 0 eff_hsv_24[0][0] \n__________________________________________________________________________________________________\neff_rgb_26 (Conv2D) (None, 1, 1, 4) 388 eff_rgb_25[0][0] \n__________________________________________________________________________________________________\neff_lch_26 (Conv2D) (None, 1, 1, 4) 388 eff_lch_25[0][0] \n__________________________________________________________________________________________________\neff_hsv_26 (Conv2D) (None, 1, 1, 4) 388 eff_hsv_25[0][0] \n__________________________________________________________________________________________________\neff_rgb_27 (Conv2D) (None, 1, 1, 96) 480 eff_rgb_26[0][0] \n__________________________________________________________________________________________________\neff_lch_27 (Conv2D) (None, 1, 1, 96) 480 eff_lch_26[0][0] \n__________________________________________________________________________________________________\neff_hsv_27 (Conv2D) (None, 1, 1, 96) 480 eff_hsv_26[0][0] \n__________________________________________________________________________________________________\neff_rgb_28 (Multiply) (None, 56, 56, 96) 0 eff_rgb_23[0][0] \n eff_rgb_27[0][0] \n__________________________________________________________________________________________________\neff_lch_28 (Multiply) (None, 56, 56, 96) 0 eff_lch_23[0][0] \n eff_lch_27[0][0] \n__________________________________________________________________________________________________\neff_hsv_28 (Multiply) (None, 56, 56, 96) 0 eff_hsv_23[0][0] \n eff_hsv_27[0][0] \n__________________________________________________________________________________________________\neff_rgb_29 (Conv2D) (None, 56, 56, 24) 2304 eff_rgb_28[0][0] \n__________________________________________________________________________________________________\neff_lch_29 (Conv2D) (None, 56, 56, 24) 2304 eff_lch_28[0][0] \n__________________________________________________________________________________________________\neff_hsv_29 (Conv2D) (None, 56, 56, 24) 2304 eff_hsv_28[0][0] \n__________________________________________________________________________________________________\neff_rgb_30 (BatchNormalization) (None, 56, 56, 24) 96 eff_rgb_29[0][0] \n__________________________________________________________________________________________________\neff_lch_30 (BatchNormalization) (None, 56, 56, 24) 96 eff_lch_29[0][0] \n__________________________________________________________________________________________________\neff_hsv_30 (BatchNormalization) (None, 56, 56, 24) 96 eff_hsv_29[0][0] \n__________________________________________________________________________________________________\neff_rgb_31 (Conv2D) (None, 56, 56, 144) 3456 eff_rgb_30[0][0] \n__________________________________________________________________________________________________\neff_lch_31 (Conv2D) (None, 56, 56, 144) 3456 eff_lch_30[0][0] \n__________________________________________________________________________________________________\neff_hsv_31 (Conv2D) (None, 56, 56, 144) 3456 eff_hsv_30[0][0] \n__________________________________________________________________________________________________\neff_rgb_32 (BatchNormalization) (None, 56, 56, 144) 576 eff_rgb_31[0][0] \n__________________________________________________________________________________________________\neff_lch_32 (BatchNormalization) (None, 56, 56, 144) 576 eff_lch_31[0][0] \n__________________________________________________________________________________________________\neff_hsv_32 (BatchNormalization) (None, 56, 56, 144) 576 eff_hsv_31[0][0] \n__________________________________________________________________________________________________\neff_rgb_33 (Activation) (None, 56, 56, 144) 0 eff_rgb_32[0][0] \n__________________________________________________________________________________________________\neff_lch_33 (Activation) (None, 56, 56, 144) 0 eff_lch_32[0][0] \n__________________________________________________________________________________________________\neff_hsv_33 (Activation) (None, 56, 56, 144) 0 eff_hsv_32[0][0] \n__________________________________________________________________________________________________\neff_rgb_34 (DepthwiseConv2D) (None, 56, 56, 144) 1296 eff_rgb_33[0][0] \n__________________________________________________________________________________________________\neff_lch_34 (DepthwiseConv2D) (None, 56, 56, 144) 1296 eff_lch_33[0][0] \n__________________________________________________________________________________________________\neff_hsv_34 (DepthwiseConv2D) (None, 56, 56, 144) 1296 eff_hsv_33[0][0] \n__________________________________________________________________________________________________\neff_rgb_35 (BatchNormalization) (None, 56, 56, 144) 576 eff_rgb_34[0][0] \n__________________________________________________________________________________________________\neff_lch_35 (BatchNormalization) (None, 56, 56, 144) 576 eff_lch_34[0][0] \n__________________________________________________________________________________________________\neff_hsv_35 (BatchNormalization) (None, 56, 56, 144) 576 eff_hsv_34[0][0] \n__________________________________________________________________________________________________\neff_rgb_36 (Activation) (None, 56, 56, 144) 0 eff_rgb_35[0][0] \n__________________________________________________________________________________________________\neff_lch_36 (Activation) (None, 56, 56, 144) 0 eff_lch_35[0][0] \n__________________________________________________________________________________________________\neff_hsv_36 (Activation) (None, 56, 56, 144) 0 eff_hsv_35[0][0] \n__________________________________________________________________________________________________\neff_rgb_37 (GlobalAveragePoolin (None, 144) 0 eff_rgb_36[0][0] \n__________________________________________________________________________________________________\neff_lch_37 (GlobalAveragePoolin (None, 144) 0 eff_lch_36[0][0] \n__________________________________________________________________________________________________\neff_hsv_37 (GlobalAveragePoolin (None, 144) 0 eff_hsv_36[0][0] \n__________________________________________________________________________________________________\neff_rgb_38 (Reshape) (None, 1, 1, 144) 0 eff_rgb_37[0][0] \n__________________________________________________________________________________________________\neff_lch_38 (Reshape) (None, 1, 1, 144) 0 eff_lch_37[0][0] \n__________________________________________________________________________________________________\neff_hsv_38 (Reshape) (None, 1, 1, 144) 0 eff_hsv_37[0][0] \n__________________________________________________________________________________________________\neff_rgb_39 (Conv2D) (None, 1, 1, 6) 870 eff_rgb_38[0][0] \n__________________________________________________________________________________________________\neff_lch_39 (Conv2D) (None, 1, 1, 6) 870 eff_lch_38[0][0] \n__________________________________________________________________________________________________\neff_hsv_39 (Conv2D) (None, 1, 1, 6) 870 eff_hsv_38[0][0] \n__________________________________________________________________________________________________\neff_rgb_40 (Conv2D) (None, 1, 1, 144) 1008 eff_rgb_39[0][0] \n__________________________________________________________________________________________________\neff_lch_40 (Conv2D) (None, 1, 1, 144) 1008 eff_lch_39[0][0] \n__________________________________________________________________________________________________\neff_hsv_40 (Conv2D) (None, 1, 1, 144) 1008 eff_hsv_39[0][0] \n__________________________________________________________________________________________________\neff_rgb_41 (Multiply) (None, 56, 56, 144) 0 eff_rgb_36[0][0] \n eff_rgb_40[0][0] \n__________________________________________________________________________________________________\neff_lch_41 (Multiply) (None, 56, 56, 144) 0 eff_lch_36[0][0] \n eff_lch_40[0][0] \n__________________________________________________________________________________________________\neff_hsv_41 (Multiply) (None, 56, 56, 144) 0 eff_hsv_36[0][0] \n eff_hsv_40[0][0] \n__________________________________________________________________________________________________\neff_rgb_42 (Conv2D) (None, 56, 56, 24) 3456 eff_rgb_41[0][0] \n__________________________________________________________________________________________________\neff_lch_42 (Conv2D) (None, 56, 56, 24) 3456 eff_lch_41[0][0] \n__________________________________________________________________________________________________\neff_hsv_42 (Conv2D) (None, 56, 56, 24) 3456 eff_hsv_41[0][0] \n__________________________________________________________________________________________________\neff_rgb_43 (BatchNormalization) (None, 56, 56, 24) 96 eff_rgb_42[0][0] \n__________________________________________________________________________________________________\neff_lch_43 (BatchNormalization) (None, 56, 56, 24) 96 eff_lch_42[0][0] \n__________________________________________________________________________________________________\neff_hsv_43 (BatchNormalization) (None, 56, 56, 24) 96 eff_hsv_42[0][0] \n__________________________________________________________________________________________________\neff_rgb_44 (Dropout) (None, 56, 56, 24) 0 eff_rgb_43[0][0] \n__________________________________________________________________________________________________\neff_lch_44 (Dropout) (None, 56, 56, 24) 0 eff_lch_43[0][0] \n__________________________________________________________________________________________________\neff_hsv_44 (Dropout) (None, 56, 56, 24) 0 eff_hsv_43[0][0] \n__________________________________________________________________________________________________\neff_rgb_45 (Add) (None, 56, 56, 24) 0 eff_rgb_44[0][0] \n eff_rgb_30[0][0] \n__________________________________________________________________________________________________\neff_lch_45 (Add) (None, 56, 56, 24) 0 eff_lch_44[0][0] \n eff_lch_30[0][0] \n__________________________________________________________________________________________________\neff_hsv_45 (Add) (None, 56, 56, 24) 0 eff_hsv_44[0][0] \n eff_hsv_30[0][0] \n__________________________________________________________________________________________________\neff_rgb_46 (Conv2D) (None, 56, 56, 144) 3456 eff_rgb_45[0][0] \n__________________________________________________________________________________________________\neff_lch_46 (Conv2D) (None, 56, 56, 144) 3456 eff_lch_45[0][0] \n__________________________________________________________________________________________________\neff_hsv_46 (Conv2D) (None, 56, 56, 144) 3456 eff_hsv_45[0][0] \n__________________________________________________________________________________________________\neff_rgb_47 (BatchNormalization) (None, 56, 56, 144) 576 eff_rgb_46[0][0] \n__________________________________________________________________________________________________\neff_lch_47 (BatchNormalization) (None, 56, 56, 144) 576 eff_lch_46[0][0] \n__________________________________________________________________________________________________\neff_hsv_47 (BatchNormalization) (None, 56, 56, 144) 576 eff_hsv_46[0][0] \n__________________________________________________________________________________________________\neff_rgb_48 (Activation) (None, 56, 56, 144) 0 eff_rgb_47[0][0] \n__________________________________________________________________________________________________\neff_lch_48 (Activation) (None, 56, 56, 144) 0 eff_lch_47[0][0] \n__________________________________________________________________________________________________\neff_hsv_48 (Activation) (None, 56, 56, 144) 0 eff_hsv_47[0][0] \n__________________________________________________________________________________________________\neff_rgb_49 (ZeroPadding2D) (None, 59, 59, 144) 0 eff_rgb_48[0][0] \n__________________________________________________________________________________________________\neff_lch_49 (ZeroPadding2D) (None, 59, 59, 144) 0 eff_lch_48[0][0] \n__________________________________________________________________________________________________\neff_hsv_49 (ZeroPadding2D) (None, 59, 59, 144) 0 eff_hsv_48[0][0] \n__________________________________________________________________________________________________\neff_rgb_50 (DepthwiseConv2D) (None, 28, 28, 144) 3600 eff_rgb_49[0][0] \n__________________________________________________________________________________________________\neff_lch_50 (DepthwiseConv2D) (None, 28, 28, 144) 3600 eff_lch_49[0][0] \n__________________________________________________________________________________________________\neff_hsv_50 (DepthwiseConv2D) (None, 28, 28, 144) 3600 eff_hsv_49[0][0] \n__________________________________________________________________________________________________\neff_rgb_51 (BatchNormalization) (None, 28, 28, 144) 576 eff_rgb_50[0][0] \n__________________________________________________________________________________________________\neff_lch_51 (BatchNormalization) (None, 28, 28, 144) 576 eff_lch_50[0][0] \n__________________________________________________________________________________________________\neff_hsv_51 (BatchNormalization) (None, 28, 28, 144) 576 eff_hsv_50[0][0] \n__________________________________________________________________________________________________\neff_rgb_52 (Activation) (None, 28, 28, 144) 0 eff_rgb_51[0][0] \n__________________________________________________________________________________________________\neff_lch_52 (Activation) (None, 28, 28, 144) 0 eff_lch_51[0][0] \n__________________________________________________________________________________________________\neff_hsv_52 (Activation) (None, 28, 28, 144) 0 eff_hsv_51[0][0] \n__________________________________________________________________________________________________\neff_rgb_53 (GlobalAveragePoolin (None, 144) 0 eff_rgb_52[0][0] \n__________________________________________________________________________________________________\neff_lch_53 (GlobalAveragePoolin (None, 144) 0 eff_lch_52[0][0] \n__________________________________________________________________________________________________\neff_hsv_53 (GlobalAveragePoolin (None, 144) 0 eff_hsv_52[0][0] \n__________________________________________________________________________________________________\neff_rgb_54 (Reshape) (None, 1, 1, 144) 0 eff_rgb_53[0][0] \n__________________________________________________________________________________________________\neff_lch_54 (Reshape) (None, 1, 1, 144) 0 eff_lch_53[0][0] \n__________________________________________________________________________________________________\neff_hsv_54 (Reshape) (None, 1, 1, 144) 0 eff_hsv_53[0][0] \n__________________________________________________________________________________________________\neff_rgb_55 (Conv2D) (None, 1, 1, 6) 870 eff_rgb_54[0][0] \n__________________________________________________________________________________________________\neff_lch_55 (Conv2D) (None, 1, 1, 6) 870 eff_lch_54[0][0] \n__________________________________________________________________________________________________\neff_hsv_55 (Conv2D) (None, 1, 1, 6) 870 eff_hsv_54[0][0] \n__________________________________________________________________________________________________\neff_rgb_56 (Conv2D) (None, 1, 1, 144) 1008 eff_rgb_55[0][0] \n__________________________________________________________________________________________________\neff_lch_56 (Conv2D) (None, 1, 1, 144) 1008 eff_lch_55[0][0] \n__________________________________________________________________________________________________\neff_hsv_56 (Conv2D) (None, 1, 1, 144) 1008 eff_hsv_55[0][0] \n__________________________________________________________________________________________________\neff_rgb_57 (Multiply) (None, 28, 28, 144) 0 eff_rgb_52[0][0] \n eff_rgb_56[0][0] \n__________________________________________________________________________________________________\neff_lch_57 (Multiply) (None, 28, 28, 144) 0 eff_lch_52[0][0] \n eff_lch_56[0][0] \n__________________________________________________________________________________________________\neff_hsv_57 (Multiply) (None, 28, 28, 144) 0 eff_hsv_52[0][0] \n eff_hsv_56[0][0] \n__________________________________________________________________________________________________\neff_rgb_58 (Conv2D) (None, 28, 28, 40) 5760 eff_rgb_57[0][0] \n__________________________________________________________________________________________________\neff_lch_58 (Conv2D) (None, 28, 28, 40) 5760 eff_lch_57[0][0] \n__________________________________________________________________________________________________\neff_hsv_58 (Conv2D) (None, 28, 28, 40) 5760 eff_hsv_57[0][0] \n__________________________________________________________________________________________________\neff_rgb_59 (BatchNormalization) (None, 28, 28, 40) 160 eff_rgb_58[0][0] \n__________________________________________________________________________________________________\neff_lch_59 (BatchNormalization) (None, 28, 28, 40) 160 eff_lch_58[0][0] \n__________________________________________________________________________________________________\neff_hsv_59 (BatchNormalization) (None, 28, 28, 40) 160 eff_hsv_58[0][0] \n__________________________________________________________________________________________________\neff_rgb_60 (Conv2D) (None, 28, 28, 240) 9600 eff_rgb_59[0][0] \n__________________________________________________________________________________________________\neff_lch_60 (Conv2D) (None, 28, 28, 240) 9600 eff_lch_59[0][0] \n__________________________________________________________________________________________________\neff_hsv_60 (Conv2D) (None, 28, 28, 240) 9600 eff_hsv_59[0][0] \n__________________________________________________________________________________________________\neff_rgb_61 (BatchNormalization) (None, 28, 28, 240) 960 eff_rgb_60[0][0] \n__________________________________________________________________________________________________\neff_lch_61 (BatchNormalization) (None, 28, 28, 240) 960 eff_lch_60[0][0] \n__________________________________________________________________________________________________\neff_hsv_61 (BatchNormalization) (None, 28, 28, 240) 960 eff_hsv_60[0][0] \n__________________________________________________________________________________________________\neff_rgb_62 (Activation) (None, 28, 28, 240) 0 eff_rgb_61[0][0] \n__________________________________________________________________________________________________\neff_lch_62 (Activation) (None, 28, 28, 240) 0 eff_lch_61[0][0] \n__________________________________________________________________________________________________\neff_hsv_62 (Activation) (None, 28, 28, 240) 0 eff_hsv_61[0][0] \n__________________________________________________________________________________________________\neff_rgb_63 (DepthwiseConv2D) (None, 28, 28, 240) 6000 eff_rgb_62[0][0] \n__________________________________________________________________________________________________\neff_lch_63 (DepthwiseConv2D) (None, 28, 28, 240) 6000 eff_lch_62[0][0] \n__________________________________________________________________________________________________\neff_hsv_63 (DepthwiseConv2D) (None, 28, 28, 240) 6000 eff_hsv_62[0][0] \n__________________________________________________________________________________________________\neff_rgb_64 (BatchNormalization) (None, 28, 28, 240) 960 eff_rgb_63[0][0] \n__________________________________________________________________________________________________\neff_lch_64 (BatchNormalization) (None, 28, 28, 240) 960 eff_lch_63[0][0] \n__________________________________________________________________________________________________\neff_hsv_64 (BatchNormalization) (None, 28, 28, 240) 960 eff_hsv_63[0][0] \n__________________________________________________________________________________________________\neff_rgb_65 (Activation) (None, 28, 28, 240) 0 eff_rgb_64[0][0] \n__________________________________________________________________________________________________\neff_lch_65 (Activation) (None, 28, 28, 240) 0 eff_lch_64[0][0] \n__________________________________________________________________________________________________\neff_hsv_65 (Activation) (None, 28, 28, 240) 0 eff_hsv_64[0][0] \n__________________________________________________________________________________________________\neff_rgb_66 (GlobalAveragePoolin (None, 240) 0 eff_rgb_65[0][0] \n__________________________________________________________________________________________________\neff_lch_66 (GlobalAveragePoolin (None, 240) 0 eff_lch_65[0][0] \n__________________________________________________________________________________________________\neff_hsv_66 (GlobalAveragePoolin (None, 240) 0 eff_hsv_65[0][0] \n__________________________________________________________________________________________________\neff_rgb_67 (Reshape) (None, 1, 1, 240) 0 eff_rgb_66[0][0] \n__________________________________________________________________________________________________\neff_lch_67 (Reshape) (None, 1, 1, 240) 0 eff_lch_66[0][0] \n__________________________________________________________________________________________________\neff_hsv_67 (Reshape) (None, 1, 1, 240) 0 eff_hsv_66[0][0] \n__________________________________________________________________________________________________\neff_rgb_68 (Conv2D) (None, 1, 1, 10) 2410 eff_rgb_67[0][0] \n__________________________________________________________________________________________________\neff_lch_68 (Conv2D) (None, 1, 1, 10) 2410 eff_lch_67[0][0] \n__________________________________________________________________________________________________\neff_hsv_68 (Conv2D) (None, 1, 1, 10) 2410 eff_hsv_67[0][0] \n__________________________________________________________________________________________________\neff_rgb_69 (Conv2D) (None, 1, 1, 240) 2640 eff_rgb_68[0][0] \n__________________________________________________________________________________________________\neff_lch_69 (Conv2D) (None, 1, 1, 240) 2640 eff_lch_68[0][0] \n__________________________________________________________________________________________________\neff_hsv_69 (Conv2D) (None, 1, 1, 240) 2640 eff_hsv_68[0][0] \n__________________________________________________________________________________________________\neff_rgb_70 (Multiply) (None, 28, 28, 240) 0 eff_rgb_65[0][0] \n eff_rgb_69[0][0] \n__________________________________________________________________________________________________\neff_lch_70 (Multiply) (None, 28, 28, 240) 0 eff_lch_65[0][0] \n eff_lch_69[0][0] \n__________________________________________________________________________________________________\neff_hsv_70 (Multiply) (None, 28, 28, 240) 0 eff_hsv_65[0][0] \n eff_hsv_69[0][0] \n__________________________________________________________________________________________________\neff_rgb_71 (Conv2D) (None, 28, 28, 40) 9600 eff_rgb_70[0][0] \n__________________________________________________________________________________________________\neff_lch_71 (Conv2D) (None, 28, 28, 40) 9600 eff_lch_70[0][0] \n__________________________________________________________________________________________________\neff_hsv_71 (Conv2D) (None, 28, 28, 40) 9600 eff_hsv_70[0][0] \n__________________________________________________________________________________________________\neff_rgb_72 (BatchNormalization) (None, 28, 28, 40) 160 eff_rgb_71[0][0] \n__________________________________________________________________________________________________\neff_lch_72 (BatchNormalization) (None, 28, 28, 40) 160 eff_lch_71[0][0] \n__________________________________________________________________________________________________\neff_hsv_72 (BatchNormalization) (None, 28, 28, 40) 160 eff_hsv_71[0][0] \n__________________________________________________________________________________________________\neff_rgb_73 (Dropout) (None, 28, 28, 40) 0 eff_rgb_72[0][0] \n__________________________________________________________________________________________________\neff_lch_73 (Dropout) (None, 28, 28, 40) 0 eff_lch_72[0][0] \n__________________________________________________________________________________________________\neff_hsv_73 (Dropout) (None, 28, 28, 40) 0 eff_hsv_72[0][0] \n__________________________________________________________________________________________________\neff_rgb_74 (Add) (None, 28, 28, 40) 0 eff_rgb_73[0][0] \n eff_rgb_59[0][0] \n__________________________________________________________________________________________________\neff_lch_74 (Add) (None, 28, 28, 40) 0 eff_lch_73[0][0] \n eff_lch_59[0][0] \n__________________________________________________________________________________________________\neff_hsv_74 (Add) (None, 28, 28, 40) 0 eff_hsv_73[0][0] \n eff_hsv_59[0][0] \n__________________________________________________________________________________________________\neff_rgb_75 (Conv2D) (None, 28, 28, 240) 9600 eff_rgb_74[0][0] \n__________________________________________________________________________________________________\neff_lch_75 (Conv2D) (None, 28, 28, 240) 9600 eff_lch_74[0][0] \n__________________________________________________________________________________________________\neff_hsv_75 (Conv2D) (None, 28, 28, 240) 9600 eff_hsv_74[0][0] \n__________________________________________________________________________________________________\neff_rgb_76 (BatchNormalization) (None, 28, 28, 240) 960 eff_rgb_75[0][0] \n__________________________________________________________________________________________________\neff_lch_76 (BatchNormalization) (None, 28, 28, 240) 960 eff_lch_75[0][0] \n__________________________________________________________________________________________________\neff_hsv_76 (BatchNormalization) (None, 28, 28, 240) 960 eff_hsv_75[0][0] \n__________________________________________________________________________________________________\neff_rgb_77 (Activation) (None, 28, 28, 240) 0 eff_rgb_76[0][0] \n__________________________________________________________________________________________________\neff_lch_77 (Activation) (None, 28, 28, 240) 0 eff_lch_76[0][0] \n__________________________________________________________________________________________________\neff_hsv_77 (Activation) (None, 28, 28, 240) 0 eff_hsv_76[0][0] \n__________________________________________________________________________________________________\neff_rgb_78 (ZeroPadding2D) (None, 29, 29, 240) 0 eff_rgb_77[0][0] \n__________________________________________________________________________________________________\neff_lch_78 (ZeroPadding2D) (None, 29, 29, 240) 0 eff_lch_77[0][0] \n__________________________________________________________________________________________________\neff_hsv_78 (ZeroPadding2D) (None, 29, 29, 240) 0 eff_hsv_77[0][0] \n__________________________________________________________________________________________________\neff_rgb_79 (DepthwiseConv2D) (None, 14, 14, 240) 2160 eff_rgb_78[0][0] \n__________________________________________________________________________________________________\neff_lch_79 (DepthwiseConv2D) (None, 14, 14, 240) 2160 eff_lch_78[0][0] \n__________________________________________________________________________________________________\neff_hsv_79 (DepthwiseConv2D) (None, 14, 14, 240) 2160 eff_hsv_78[0][0] \n__________________________________________________________________________________________________\neff_rgb_80 (BatchNormalization) (None, 14, 14, 240) 960 eff_rgb_79[0][0] \n__________________________________________________________________________________________________\neff_lch_80 (BatchNormalization) (None, 14, 14, 240) 960 eff_lch_79[0][0] \n__________________________________________________________________________________________________\neff_hsv_80 (BatchNormalization) (None, 14, 14, 240) 960 eff_hsv_79[0][0] \n__________________________________________________________________________________________________\neff_rgb_81 (Activation) (None, 14, 14, 240) 0 eff_rgb_80[0][0] \n__________________________________________________________________________________________________\neff_lch_81 (Activation) (None, 14, 14, 240) 0 eff_lch_80[0][0] \n__________________________________________________________________________________________________\neff_hsv_81 (Activation) (None, 14, 14, 240) 0 eff_hsv_80[0][0] \n__________________________________________________________________________________________________\neff_rgb_82 (GlobalAveragePoolin (None, 240) 0 eff_rgb_81[0][0] \n__________________________________________________________________________________________________\neff_lch_82 (GlobalAveragePoolin (None, 240) 0 eff_lch_81[0][0] \n__________________________________________________________________________________________________\neff_hsv_82 (GlobalAveragePoolin (None, 240) 0 eff_hsv_81[0][0] \n__________________________________________________________________________________________________\neff_rgb_83 (Reshape) (None, 1, 1, 240) 0 eff_rgb_82[0][0] \n__________________________________________________________________________________________________\neff_lch_83 (Reshape) (None, 1, 1, 240) 0 eff_lch_82[0][0] \n__________________________________________________________________________________________________\neff_hsv_83 (Reshape) (None, 1, 1, 240) 0 eff_hsv_82[0][0] \n__________________________________________________________________________________________________\neff_rgb_84 (Conv2D) (None, 1, 1, 10) 2410 eff_rgb_83[0][0] \n__________________________________________________________________________________________________\neff_lch_84 (Conv2D) (None, 1, 1, 10) 2410 eff_lch_83[0][0] \n__________________________________________________________________________________________________\neff_hsv_84 (Conv2D) (None, 1, 1, 10) 2410 eff_hsv_83[0][0] \n__________________________________________________________________________________________________\neff_rgb_85 (Conv2D) (None, 1, 1, 240) 2640 eff_rgb_84[0][0] \n__________________________________________________________________________________________________\neff_lch_85 (Conv2D) (None, 1, 1, 240) 2640 eff_lch_84[0][0] \n__________________________________________________________________________________________________\neff_hsv_85 (Conv2D) (None, 1, 1, 240) 2640 eff_hsv_84[0][0] \n__________________________________________________________________________________________________\neff_rgb_86 (Multiply) (None, 14, 14, 240) 0 eff_rgb_81[0][0] \n eff_rgb_85[0][0] \n__________________________________________________________________________________________________\neff_lch_86 (Multiply) (None, 14, 14, 240) 0 eff_lch_81[0][0] \n eff_lch_85[0][0] \n__________________________________________________________________________________________________\neff_hsv_86 (Multiply) (None, 14, 14, 240) 0 eff_hsv_81[0][0] \n eff_hsv_85[0][0] \n__________________________________________________________________________________________________\neff_rgb_87 (Conv2D) (None, 14, 14, 80) 19200 eff_rgb_86[0][0] \n__________________________________________________________________________________________________\neff_lch_87 (Conv2D) (None, 14, 14, 80) 19200 eff_lch_86[0][0] \n__________________________________________________________________________________________________\neff_hsv_87 (Conv2D) (None, 14, 14, 80) 19200 eff_hsv_86[0][0] \n__________________________________________________________________________________________________\neff_rgb_88 (BatchNormalization) (None, 14, 14, 80) 320 eff_rgb_87[0][0] \n__________________________________________________________________________________________________\neff_lch_88 (BatchNormalization) (None, 14, 14, 80) 320 eff_lch_87[0][0] \n__________________________________________________________________________________________________\neff_hsv_88 (BatchNormalization) (None, 14, 14, 80) 320 eff_hsv_87[0][0] \n__________________________________________________________________________________________________\neff_rgb_89 (Conv2D) (None, 14, 14, 480) 38400 eff_rgb_88[0][0] \n__________________________________________________________________________________________________\neff_lch_89 (Conv2D) (None, 14, 14, 480) 38400 eff_lch_88[0][0] \n__________________________________________________________________________________________________\neff_hsv_89 (Conv2D) (None, 14, 14, 480) 38400 eff_hsv_88[0][0] \n__________________________________________________________________________________________________\neff_rgb_90 (BatchNormalization) (None, 14, 14, 480) 1920 eff_rgb_89[0][0] \n__________________________________________________________________________________________________\neff_lch_90 (BatchNormalization) (None, 14, 14, 480) 1920 eff_lch_89[0][0] \n__________________________________________________________________________________________________\neff_hsv_90 (BatchNormalization) (None, 14, 14, 480) 1920 eff_hsv_89[0][0] \n__________________________________________________________________________________________________\neff_rgb_91 (Activation) (None, 14, 14, 480) 0 eff_rgb_90[0][0] \n__________________________________________________________________________________________________\neff_lch_91 (Activation) (None, 14, 14, 480) 0 eff_lch_90[0][0] \n__________________________________________________________________________________________________\neff_hsv_91 (Activation) (None, 14, 14, 480) 0 eff_hsv_90[0][0] \n__________________________________________________________________________________________________\neff_rgb_92 (DepthwiseConv2D) (None, 14, 14, 480) 4320 eff_rgb_91[0][0] \n__________________________________________________________________________________________________\neff_lch_92 (DepthwiseConv2D) (None, 14, 14, 480) 4320 eff_lch_91[0][0] \n__________________________________________________________________________________________________\neff_hsv_92 (DepthwiseConv2D) (None, 14, 14, 480) 4320 eff_hsv_91[0][0] \n__________________________________________________________________________________________________\neff_rgb_93 (BatchNormalization) (None, 14, 14, 480) 1920 eff_rgb_92[0][0] \n__________________________________________________________________________________________________\neff_lch_93 (BatchNormalization) (None, 14, 14, 480) 1920 eff_lch_92[0][0] \n__________________________________________________________________________________________________\neff_hsv_93 (BatchNormalization) (None, 14, 14, 480) 1920 eff_hsv_92[0][0] \n__________________________________________________________________________________________________\neff_rgb_94 (Activation) (None, 14, 14, 480) 0 eff_rgb_93[0][0] \n__________________________________________________________________________________________________\neff_lch_94 (Activation) (None, 14, 14, 480) 0 eff_lch_93[0][0] \n__________________________________________________________________________________________________\neff_hsv_94 (Activation) (None, 14, 14, 480) 0 eff_hsv_93[0][0] \n__________________________________________________________________________________________________\neff_rgb_95 (GlobalAveragePoolin (None, 480) 0 eff_rgb_94[0][0] \n__________________________________________________________________________________________________\neff_lch_95 (GlobalAveragePoolin (None, 480) 0 eff_lch_94[0][0] \n__________________________________________________________________________________________________\neff_hsv_95 (GlobalAveragePoolin (None, 480) 0 eff_hsv_94[0][0] \n__________________________________________________________________________________________________\neff_rgb_96 (Reshape) (None, 1, 1, 480) 0 eff_rgb_95[0][0] \n__________________________________________________________________________________________________\neff_lch_96 (Reshape) (None, 1, 1, 480) 0 eff_lch_95[0][0] \n__________________________________________________________________________________________________\neff_hsv_96 (Reshape) (None, 1, 1, 480) 0 eff_hsv_95[0][0] \n__________________________________________________________________________________________________\neff_rgb_97 (Conv2D) (None, 1, 1, 20) 9620 eff_rgb_96[0][0] \n__________________________________________________________________________________________________\neff_lch_97 (Conv2D) (None, 1, 1, 20) 9620 eff_lch_96[0][0] \n__________________________________________________________________________________________________\neff_hsv_97 (Conv2D) (None, 1, 1, 20) 9620 eff_hsv_96[0][0] \n__________________________________________________________________________________________________\neff_rgb_98 (Conv2D) (None, 1, 1, 480) 10080 eff_rgb_97[0][0] \n__________________________________________________________________________________________________\neff_lch_98 (Conv2D) (None, 1, 1, 480) 10080 eff_lch_97[0][0] \n__________________________________________________________________________________________________\neff_hsv_98 (Conv2D) (None, 1, 1, 480) 10080 eff_hsv_97[0][0] \n__________________________________________________________________________________________________\neff_rgb_99 (Multiply) (None, 14, 14, 480) 0 eff_rgb_94[0][0] \n eff_rgb_98[0][0] \n__________________________________________________________________________________________________\neff_lch_99 (Multiply) (None, 14, 14, 480) 0 eff_lch_94[0][0] \n eff_lch_98[0][0] \n__________________________________________________________________________________________________\neff_hsv_99 (Multiply) (None, 14, 14, 480) 0 eff_hsv_94[0][0] \n eff_hsv_98[0][0] \n__________________________________________________________________________________________________\neff_rgb_100 (Conv2D) (None, 14, 14, 80) 38400 eff_rgb_99[0][0] \n__________________________________________________________________________________________________\neff_lch_100 (Conv2D) (None, 14, 14, 80) 38400 eff_lch_99[0][0] \n__________________________________________________________________________________________________\neff_hsv_100 (Conv2D) (None, 14, 14, 80) 38400 eff_hsv_99[0][0] \n__________________________________________________________________________________________________\neff_rgb_101 (BatchNormalization (None, 14, 14, 80) 320 eff_rgb_100[0][0] \n__________________________________________________________________________________________________\neff_lch_101 (BatchNormalization (None, 14, 14, 80) 320 eff_lch_100[0][0] \n__________________________________________________________________________________________________\neff_hsv_101 (BatchNormalization (None, 14, 14, 80) 320 eff_hsv_100[0][0] \n__________________________________________________________________________________________________\neff_rgb_102 (Dropout) (None, 14, 14, 80) 0 eff_rgb_101[0][0] \n__________________________________________________________________________________________________\neff_lch_102 (Dropout) (None, 14, 14, 80) 0 eff_lch_101[0][0] \n__________________________________________________________________________________________________\neff_hsv_102 (Dropout) (None, 14, 14, 80) 0 eff_hsv_101[0][0] \n__________________________________________________________________________________________________\neff_rgb_103 (Add) (None, 14, 14, 80) 0 eff_rgb_102[0][0] \n eff_rgb_88[0][0] \n__________________________________________________________________________________________________\neff_lch_103 (Add) (None, 14, 14, 80) 0 eff_lch_102[0][0] \n eff_lch_88[0][0] \n__________________________________________________________________________________________________\neff_hsv_103 (Add) (None, 14, 14, 80) 0 eff_hsv_102[0][0] \n eff_hsv_88[0][0] \n__________________________________________________________________________________________________\neff_rgb_104 (Conv2D) (None, 14, 14, 480) 38400 eff_rgb_103[0][0] \n__________________________________________________________________________________________________\neff_lch_104 (Conv2D) (None, 14, 14, 480) 38400 eff_lch_103[0][0] \n__________________________________________________________________________________________________\neff_hsv_104 (Conv2D) (None, 14, 14, 480) 38400 eff_hsv_103[0][0] \n__________________________________________________________________________________________________\neff_rgb_105 (BatchNormalization (None, 14, 14, 480) 1920 eff_rgb_104[0][0] \n__________________________________________________________________________________________________\neff_lch_105 (BatchNormalization (None, 14, 14, 480) 1920 eff_lch_104[0][0] \n__________________________________________________________________________________________________\neff_hsv_105 (BatchNormalization (None, 14, 14, 480) 1920 eff_hsv_104[0][0] \n__________________________________________________________________________________________________\neff_rgb_106 (Activation) (None, 14, 14, 480) 0 eff_rgb_105[0][0] \n__________________________________________________________________________________________________\neff_lch_106 (Activation) (None, 14, 14, 480) 0 eff_lch_105[0][0] \n__________________________________________________________________________________________________\neff_hsv_106 (Activation) (None, 14, 14, 480) 0 eff_hsv_105[0][0] \n__________________________________________________________________________________________________\neff_rgb_107 (DepthwiseConv2D) (None, 14, 14, 480) 4320 eff_rgb_106[0][0] \n__________________________________________________________________________________________________\neff_lch_107 (DepthwiseConv2D) (None, 14, 14, 480) 4320 eff_lch_106[0][0] \n__________________________________________________________________________________________________\neff_hsv_107 (DepthwiseConv2D) (None, 14, 14, 480) 4320 eff_hsv_106[0][0] \n__________________________________________________________________________________________________\neff_rgb_108 (BatchNormalization (None, 14, 14, 480) 1920 eff_rgb_107[0][0] \n__________________________________________________________________________________________________\neff_lch_108 (BatchNormalization (None, 14, 14, 480) 1920 eff_lch_107[0][0] \n__________________________________________________________________________________________________\neff_hsv_108 (BatchNormalization (None, 14, 14, 480) 1920 eff_hsv_107[0][0] \n__________________________________________________________________________________________________\neff_rgb_109 (Activation) (None, 14, 14, 480) 0 eff_rgb_108[0][0] \n__________________________________________________________________________________________________\neff_lch_109 (Activation) (None, 14, 14, 480) 0 eff_lch_108[0][0] \n__________________________________________________________________________________________________\neff_hsv_109 (Activation) (None, 14, 14, 480) 0 eff_hsv_108[0][0] \n__________________________________________________________________________________________________\neff_rgb_110 (GlobalAveragePooli (None, 480) 0 eff_rgb_109[0][0] \n__________________________________________________________________________________________________\neff_lch_110 (GlobalAveragePooli (None, 480) 0 eff_lch_109[0][0] \n__________________________________________________________________________________________________\neff_hsv_110 (GlobalAveragePooli (None, 480) 0 eff_hsv_109[0][0] \n__________________________________________________________________________________________________\neff_rgb_111 (Reshape) (None, 1, 1, 480) 0 eff_rgb_110[0][0] \n__________________________________________________________________________________________________\neff_lch_111 (Reshape) (None, 1, 1, 480) 0 eff_lch_110[0][0] \n__________________________________________________________________________________________________\neff_hsv_111 (Reshape) (None, 1, 1, 480) 0 eff_hsv_110[0][0] \n__________________________________________________________________________________________________\neff_rgb_112 (Conv2D) (None, 1, 1, 20) 9620 eff_rgb_111[0][0] \n__________________________________________________________________________________________________\neff_lch_112 (Conv2D) (None, 1, 1, 20) 9620 eff_lch_111[0][0] \n__________________________________________________________________________________________________\neff_hsv_112 (Conv2D) (None, 1, 1, 20) 9620 eff_hsv_111[0][0] \n__________________________________________________________________________________________________\neff_rgb_113 (Conv2D) (None, 1, 1, 480) 10080 eff_rgb_112[0][0] \n__________________________________________________________________________________________________\neff_lch_113 (Conv2D) (None, 1, 1, 480) 10080 eff_lch_112[0][0] \n__________________________________________________________________________________________________\neff_hsv_113 (Conv2D) (None, 1, 1, 480) 10080 eff_hsv_112[0][0] \n__________________________________________________________________________________________________\neff_rgb_114 (Multiply) (None, 14, 14, 480) 0 eff_rgb_109[0][0] \n eff_rgb_113[0][0] \n__________________________________________________________________________________________________\neff_lch_114 (Multiply) (None, 14, 14, 480) 0 eff_lch_109[0][0] \n eff_lch_113[0][0] \n__________________________________________________________________________________________________\neff_hsv_114 (Multiply) (None, 14, 14, 480) 0 eff_hsv_109[0][0] \n eff_hsv_113[0][0] \n__________________________________________________________________________________________________\neff_rgb_115 (Conv2D) (None, 14, 14, 80) 38400 eff_rgb_114[0][0] \n__________________________________________________________________________________________________\neff_lch_115 (Conv2D) (None, 14, 14, 80) 38400 eff_lch_114[0][0] \n__________________________________________________________________________________________________\neff_hsv_115 (Conv2D) (None, 14, 14, 80) 38400 eff_hsv_114[0][0] \n__________________________________________________________________________________________________\neff_rgb_116 (BatchNormalization (None, 14, 14, 80) 320 eff_rgb_115[0][0] \n__________________________________________________________________________________________________\neff_lch_116 (BatchNormalization (None, 14, 14, 80) 320 eff_lch_115[0][0] \n__________________________________________________________________________________________________\neff_hsv_116 (BatchNormalization (None, 14, 14, 80) 320 eff_hsv_115[0][0] \n__________________________________________________________________________________________________\neff_rgb_117 (Dropout) (None, 14, 14, 80) 0 eff_rgb_116[0][0] \n__________________________________________________________________________________________________\neff_lch_117 (Dropout) (None, 14, 14, 80) 0 eff_lch_116[0][0] \n__________________________________________________________________________________________________\neff_hsv_117 (Dropout) (None, 14, 14, 80) 0 eff_hsv_116[0][0] \n__________________________________________________________________________________________________\neff_rgb_118 (Add) (None, 14, 14, 80) 0 eff_rgb_117[0][0] \n eff_rgb_103[0][0] \n__________________________________________________________________________________________________\neff_lch_118 (Add) (None, 14, 14, 80) 0 eff_lch_117[0][0] \n eff_lch_103[0][0] \n__________________________________________________________________________________________________\neff_hsv_118 (Add) (None, 14, 14, 80) 0 eff_hsv_117[0][0] \n eff_hsv_103[0][0] \n__________________________________________________________________________________________________\neff_rgb_119 (Conv2D) (None, 14, 14, 480) 38400 eff_rgb_118[0][0] \n__________________________________________________________________________________________________\neff_lch_119 (Conv2D) (None, 14, 14, 480) 38400 eff_lch_118[0][0] \n__________________________________________________________________________________________________\neff_hsv_119 (Conv2D) (None, 14, 14, 480) 38400 eff_hsv_118[0][0] \n__________________________________________________________________________________________________\neff_rgb_120 (BatchNormalization (None, 14, 14, 480) 1920 eff_rgb_119[0][0] \n__________________________________________________________________________________________________\neff_lch_120 (BatchNormalization (None, 14, 14, 480) 1920 eff_lch_119[0][0] \n__________________________________________________________________________________________________\neff_hsv_120 (BatchNormalization (None, 14, 14, 480) 1920 eff_hsv_119[0][0] \n__________________________________________________________________________________________________\neff_rgb_121 (Activation) (None, 14, 14, 480) 0 eff_rgb_120[0][0] \n__________________________________________________________________________________________________\neff_lch_121 (Activation) (None, 14, 14, 480) 0 eff_lch_120[0][0] \n__________________________________________________________________________________________________\neff_hsv_121 (Activation) (None, 14, 14, 480) 0 eff_hsv_120[0][0] \n__________________________________________________________________________________________________\neff_rgb_122 (DepthwiseConv2D) (None, 14, 14, 480) 12000 eff_rgb_121[0][0] \n__________________________________________________________________________________________________\neff_lch_122 (DepthwiseConv2D) (None, 14, 14, 480) 12000 eff_lch_121[0][0] \n__________________________________________________________________________________________________\neff_hsv_122 (DepthwiseConv2D) (None, 14, 14, 480) 12000 eff_hsv_121[0][0] \n__________________________________________________________________________________________________\neff_rgb_123 (BatchNormalization (None, 14, 14, 480) 1920 eff_rgb_122[0][0] \n__________________________________________________________________________________________________\neff_lch_123 (BatchNormalization (None, 14, 14, 480) 1920 eff_lch_122[0][0] \n__________________________________________________________________________________________________\neff_hsv_123 (BatchNormalization (None, 14, 14, 480) 1920 eff_hsv_122[0][0] \n__________________________________________________________________________________________________\neff_rgb_124 (Activation) (None, 14, 14, 480) 0 eff_rgb_123[0][0] \n__________________________________________________________________________________________________\neff_lch_124 (Activation) (None, 14, 14, 480) 0 eff_lch_123[0][0] \n__________________________________________________________________________________________________\neff_hsv_124 (Activation) (None, 14, 14, 480) 0 eff_hsv_123[0][0] \n__________________________________________________________________________________________________\neff_rgb_125 (GlobalAveragePooli (None, 480) 0 eff_rgb_124[0][0] \n__________________________________________________________________________________________________\neff_lch_125 (GlobalAveragePooli (None, 480) 0 eff_lch_124[0][0] \n__________________________________________________________________________________________________\neff_hsv_125 (GlobalAveragePooli (None, 480) 0 eff_hsv_124[0][0] \n__________________________________________________________________________________________________\neff_rgb_126 (Reshape) (None, 1, 1, 480) 0 eff_rgb_125[0][0] \n__________________________________________________________________________________________________\neff_lch_126 (Reshape) (None, 1, 1, 480) 0 eff_lch_125[0][0] \n__________________________________________________________________________________________________\neff_hsv_126 (Reshape) (None, 1, 1, 480) 0 eff_hsv_125[0][0] \n__________________________________________________________________________________________________\neff_rgb_127 (Conv2D) (None, 1, 1, 20) 9620 eff_rgb_126[0][0] \n__________________________________________________________________________________________________\neff_lch_127 (Conv2D) (None, 1, 1, 20) 9620 eff_lch_126[0][0] \n__________________________________________________________________________________________________\neff_hsv_127 (Conv2D) (None, 1, 1, 20) 9620 eff_hsv_126[0][0] \n__________________________________________________________________________________________________\neff_rgb_128 (Conv2D) (None, 1, 1, 480) 10080 eff_rgb_127[0][0] \n__________________________________________________________________________________________________\neff_lch_128 (Conv2D) (None, 1, 1, 480) 10080 eff_lch_127[0][0] \n__________________________________________________________________________________________________\neff_hsv_128 (Conv2D) (None, 1, 1, 480) 10080 eff_hsv_127[0][0] \n__________________________________________________________________________________________________\neff_rgb_129 (Multiply) (None, 14, 14, 480) 0 eff_rgb_124[0][0] \n eff_rgb_128[0][0] \n__________________________________________________________________________________________________\neff_lch_129 (Multiply) (None, 14, 14, 480) 0 eff_lch_124[0][0] \n eff_lch_128[0][0] \n__________________________________________________________________________________________________\neff_hsv_129 (Multiply) (None, 14, 14, 480) 0 eff_hsv_124[0][0] \n eff_hsv_128[0][0] \n__________________________________________________________________________________________________\neff_rgb_130 (Conv2D) (None, 14, 14, 112) 53760 eff_rgb_129[0][0] \n__________________________________________________________________________________________________\neff_lch_130 (Conv2D) (None, 14, 14, 112) 53760 eff_lch_129[0][0] \n__________________________________________________________________________________________________\neff_hsv_130 (Conv2D) (None, 14, 14, 112) 53760 eff_hsv_129[0][0] \n__________________________________________________________________________________________________\neff_rgb_131 (BatchNormalization (None, 14, 14, 112) 448 eff_rgb_130[0][0] \n__________________________________________________________________________________________________\neff_lch_131 (BatchNormalization (None, 14, 14, 112) 448 eff_lch_130[0][0] \n__________________________________________________________________________________________________\neff_hsv_131 (BatchNormalization (None, 14, 14, 112) 448 eff_hsv_130[0][0] \n__________________________________________________________________________________________________\neff_rgb_132 (Conv2D) (None, 14, 14, 672) 75264 eff_rgb_131[0][0] \n__________________________________________________________________________________________________\neff_lch_132 (Conv2D) (None, 14, 14, 672) 75264 eff_lch_131[0][0] \n__________________________________________________________________________________________________\neff_hsv_132 (Conv2D) (None, 14, 14, 672) 75264 eff_hsv_131[0][0] \n__________________________________________________________________________________________________\neff_rgb_133 (BatchNormalization (None, 14, 14, 672) 2688 eff_rgb_132[0][0] \n__________________________________________________________________________________________________\neff_lch_133 (BatchNormalization (None, 14, 14, 672) 2688 eff_lch_132[0][0] \n__________________________________________________________________________________________________\neff_hsv_133 (BatchNormalization (None, 14, 14, 672) 2688 eff_hsv_132[0][0] \n__________________________________________________________________________________________________\neff_rgb_134 (Activation) (None, 14, 14, 672) 0 eff_rgb_133[0][0] \n__________________________________________________________________________________________________\neff_lch_134 (Activation) (None, 14, 14, 672) 0 eff_lch_133[0][0] \n__________________________________________________________________________________________________\neff_hsv_134 (Activation) (None, 14, 14, 672) 0 eff_hsv_133[0][0] \n__________________________________________________________________________________________________\neff_rgb_135 (DepthwiseConv2D) (None, 14, 14, 672) 16800 eff_rgb_134[0][0] \n__________________________________________________________________________________________________\neff_lch_135 (DepthwiseConv2D) (None, 14, 14, 672) 16800 eff_lch_134[0][0] \n__________________________________________________________________________________________________\neff_hsv_135 (DepthwiseConv2D) (None, 14, 14, 672) 16800 eff_hsv_134[0][0] \n__________________________________________________________________________________________________\neff_rgb_136 (BatchNormalization (None, 14, 14, 672) 2688 eff_rgb_135[0][0] \n__________________________________________________________________________________________________\neff_lch_136 (BatchNormalization (None, 14, 14, 672) 2688 eff_lch_135[0][0] \n__________________________________________________________________________________________________\neff_hsv_136 (BatchNormalization (None, 14, 14, 672) 2688 eff_hsv_135[0][0] \n__________________________________________________________________________________________________\neff_rgb_137 (Activation) (None, 14, 14, 672) 0 eff_rgb_136[0][0] \n__________________________________________________________________________________________________\neff_lch_137 (Activation) (None, 14, 14, 672) 0 eff_lch_136[0][0] \n__________________________________________________________________________________________________\neff_hsv_137 (Activation) (None, 14, 14, 672) 0 eff_hsv_136[0][0] \n__________________________________________________________________________________________________\neff_rgb_138 (GlobalAveragePooli (None, 672) 0 eff_rgb_137[0][0] \n__________________________________________________________________________________________________\neff_lch_138 (GlobalAveragePooli (None, 672) 0 eff_lch_137[0][0] \n__________________________________________________________________________________________________\neff_hsv_138 (GlobalAveragePooli (None, 672) 0 eff_hsv_137[0][0] \n__________________________________________________________________________________________________\neff_rgb_139 (Reshape) (None, 1, 1, 672) 0 eff_rgb_138[0][0] \n__________________________________________________________________________________________________\neff_lch_139 (Reshape) (None, 1, 1, 672) 0 eff_lch_138[0][0] \n__________________________________________________________________________________________________\neff_hsv_139 (Reshape) (None, 1, 1, 672) 0 eff_hsv_138[0][0] \n__________________________________________________________________________________________________\neff_rgb_140 (Conv2D) (None, 1, 1, 28) 18844 eff_rgb_139[0][0] \n__________________________________________________________________________________________________\neff_lch_140 (Conv2D) (None, 1, 1, 28) 18844 eff_lch_139[0][0] \n__________________________________________________________________________________________________\neff_hsv_140 (Conv2D) (None, 1, 1, 28) 18844 eff_hsv_139[0][0] \n__________________________________________________________________________________________________\neff_rgb_141 (Conv2D) (None, 1, 1, 672) 19488 eff_rgb_140[0][0] \n__________________________________________________________________________________________________\neff_lch_141 (Conv2D) (None, 1, 1, 672) 19488 eff_lch_140[0][0] \n__________________________________________________________________________________________________\neff_hsv_141 (Conv2D) (None, 1, 1, 672) 19488 eff_hsv_140[0][0] \n__________________________________________________________________________________________________\neff_rgb_142 (Multiply) (None, 14, 14, 672) 0 eff_rgb_137[0][0] \n eff_rgb_141[0][0] \n__________________________________________________________________________________________________\neff_lch_142 (Multiply) (None, 14, 14, 672) 0 eff_lch_137[0][0] \n eff_lch_141[0][0] \n__________________________________________________________________________________________________\neff_hsv_142 (Multiply) (None, 14, 14, 672) 0 eff_hsv_137[0][0] \n eff_hsv_141[0][0] \n__________________________________________________________________________________________________\neff_rgb_143 (Conv2D) (None, 14, 14, 112) 75264 eff_rgb_142[0][0] \n__________________________________________________________________________________________________\neff_lch_143 (Conv2D) (None, 14, 14, 112) 75264 eff_lch_142[0][0] \n__________________________________________________________________________________________________\neff_hsv_143 (Conv2D) (None, 14, 14, 112) 75264 eff_hsv_142[0][0] \n__________________________________________________________________________________________________\neff_rgb_144 (BatchNormalization (None, 14, 14, 112) 448 eff_rgb_143[0][0] \n__________________________________________________________________________________________________\neff_lch_144 (BatchNormalization (None, 14, 14, 112) 448 eff_lch_143[0][0] \n__________________________________________________________________________________________________\neff_hsv_144 (BatchNormalization (None, 14, 14, 112) 448 eff_hsv_143[0][0] \n__________________________________________________________________________________________________\neff_rgb_145 (Dropout) (None, 14, 14, 112) 0 eff_rgb_144[0][0] \n__________________________________________________________________________________________________\neff_lch_145 (Dropout) (None, 14, 14, 112) 0 eff_lch_144[0][0] \n__________________________________________________________________________________________________\neff_hsv_145 (Dropout) (None, 14, 14, 112) 0 eff_hsv_144[0][0] \n__________________________________________________________________________________________________\neff_rgb_146 (Add) (None, 14, 14, 112) 0 eff_rgb_145[0][0] \n eff_rgb_131[0][0] \n__________________________________________________________________________________________________\neff_lch_146 (Add) (None, 14, 14, 112) 0 eff_lch_145[0][0] \n eff_lch_131[0][0] \n__________________________________________________________________________________________________\neff_hsv_146 (Add) (None, 14, 14, 112) 0 eff_hsv_145[0][0] \n eff_hsv_131[0][0] \n__________________________________________________________________________________________________\neff_rgb_147 (Conv2D) (None, 14, 14, 672) 75264 eff_rgb_146[0][0] \n__________________________________________________________________________________________________\neff_lch_147 (Conv2D) (None, 14, 14, 672) 75264 eff_lch_146[0][0] \n__________________________________________________________________________________________________\neff_hsv_147 (Conv2D) (None, 14, 14, 672) 75264 eff_hsv_146[0][0] \n__________________________________________________________________________________________________\neff_rgb_148 (BatchNormalization (None, 14, 14, 672) 2688 eff_rgb_147[0][0] \n__________________________________________________________________________________________________\neff_lch_148 (BatchNormalization (None, 14, 14, 672) 2688 eff_lch_147[0][0] \n__________________________________________________________________________________________________\neff_hsv_148 (BatchNormalization (None, 14, 14, 672) 2688 eff_hsv_147[0][0] \n__________________________________________________________________________________________________\neff_rgb_149 (Activation) (None, 14, 14, 672) 0 eff_rgb_148[0][0] \n__________________________________________________________________________________________________\neff_lch_149 (Activation) (None, 14, 14, 672) 0 eff_lch_148[0][0] \n__________________________________________________________________________________________________\neff_hsv_149 (Activation) (None, 14, 14, 672) 0 eff_hsv_148[0][0] \n__________________________________________________________________________________________________\neff_rgb_150 (DepthwiseConv2D) (None, 14, 14, 672) 16800 eff_rgb_149[0][0] \n__________________________________________________________________________________________________\neff_lch_150 (DepthwiseConv2D) (None, 14, 14, 672) 16800 eff_lch_149[0][0] \n__________________________________________________________________________________________________\neff_hsv_150 (DepthwiseConv2D) (None, 14, 14, 672) 16800 eff_hsv_149[0][0] \n__________________________________________________________________________________________________\neff_rgb_151 (BatchNormalization (None, 14, 14, 672) 2688 eff_rgb_150[0][0] \n__________________________________________________________________________________________________\neff_lch_151 (BatchNormalization (None, 14, 14, 672) 2688 eff_lch_150[0][0] \n__________________________________________________________________________________________________\neff_hsv_151 (BatchNormalization (None, 14, 14, 672) 2688 eff_hsv_150[0][0] \n__________________________________________________________________________________________________\neff_rgb_152 (Activation) (None, 14, 14, 672) 0 eff_rgb_151[0][0] \n__________________________________________________________________________________________________\neff_lch_152 (Activation) (None, 14, 14, 672) 0 eff_lch_151[0][0] \n__________________________________________________________________________________________________\neff_hsv_152 (Activation) (None, 14, 14, 672) 0 eff_hsv_151[0][0] \n__________________________________________________________________________________________________\neff_rgb_153 (GlobalAveragePooli (None, 672) 0 eff_rgb_152[0][0] \n__________________________________________________________________________________________________\neff_lch_153 (GlobalAveragePooli (None, 672) 0 eff_lch_152[0][0] \n__________________________________________________________________________________________________\neff_hsv_153 (GlobalAveragePooli (None, 672) 0 eff_hsv_152[0][0] \n__________________________________________________________________________________________________\neff_rgb_154 (Reshape) (None, 1, 1, 672) 0 eff_rgb_153[0][0] \n__________________________________________________________________________________________________\neff_lch_154 (Reshape) (None, 1, 1, 672) 0 eff_lch_153[0][0] \n__________________________________________________________________________________________________\neff_hsv_154 (Reshape) (None, 1, 1, 672) 0 eff_hsv_153[0][0] \n__________________________________________________________________________________________________\neff_rgb_155 (Conv2D) (None, 1, 1, 28) 18844 eff_rgb_154[0][0] \n__________________________________________________________________________________________________\neff_lch_155 (Conv2D) (None, 1, 1, 28) 18844 eff_lch_154[0][0] \n__________________________________________________________________________________________________\neff_hsv_155 (Conv2D) (None, 1, 1, 28) 18844 eff_hsv_154[0][0] \n__________________________________________________________________________________________________\neff_rgb_156 (Conv2D) (None, 1, 1, 672) 19488 eff_rgb_155[0][0] \n__________________________________________________________________________________________________\neff_lch_156 (Conv2D) (None, 1, 1, 672) 19488 eff_lch_155[0][0] \n__________________________________________________________________________________________________\neff_hsv_156 (Conv2D) (None, 1, 1, 672) 19488 eff_hsv_155[0][0] \n__________________________________________________________________________________________________\neff_rgb_157 (Multiply) (None, 14, 14, 672) 0 eff_rgb_152[0][0] \n eff_rgb_156[0][0] \n__________________________________________________________________________________________________\neff_lch_157 (Multiply) (None, 14, 14, 672) 0 eff_lch_152[0][0] \n eff_lch_156[0][0] \n__________________________________________________________________________________________________\neff_hsv_157 (Multiply) (None, 14, 14, 672) 0 eff_hsv_152[0][0] \n eff_hsv_156[0][0] \n__________________________________________________________________________________________________\neff_rgb_158 (Conv2D) (None, 14, 14, 112) 75264 eff_rgb_157[0][0] \n__________________________________________________________________________________________________\neff_lch_158 (Conv2D) (None, 14, 14, 112) 75264 eff_lch_157[0][0] \n__________________________________________________________________________________________________\neff_hsv_158 (Conv2D) (None, 14, 14, 112) 75264 eff_hsv_157[0][0] \n__________________________________________________________________________________________________\neff_rgb_159 (BatchNormalization (None, 14, 14, 112) 448 eff_rgb_158[0][0] \n__________________________________________________________________________________________________\neff_lch_159 (BatchNormalization (None, 14, 14, 112) 448 eff_lch_158[0][0] \n__________________________________________________________________________________________________\neff_hsv_159 (BatchNormalization (None, 14, 14, 112) 448 eff_hsv_158[0][0] \n__________________________________________________________________________________________________\neff_rgb_160 (Dropout) (None, 14, 14, 112) 0 eff_rgb_159[0][0] \n__________________________________________________________________________________________________\neff_lch_160 (Dropout) (None, 14, 14, 112) 0 eff_lch_159[0][0] \n__________________________________________________________________________________________________\neff_hsv_160 (Dropout) (None, 14, 14, 112) 0 eff_hsv_159[0][0] \n__________________________________________________________________________________________________\neff_rgb_161 (Add) (None, 14, 14, 112) 0 eff_rgb_160[0][0] \n eff_rgb_146[0][0] \n__________________________________________________________________________________________________\neff_lch_161 (Add) (None, 14, 14, 112) 0 eff_lch_160[0][0] \n eff_lch_146[0][0] \n__________________________________________________________________________________________________\neff_hsv_161 (Add) (None, 14, 14, 112) 0 eff_hsv_160[0][0] \n eff_hsv_146[0][0] \n__________________________________________________________________________________________________\neff_rgb_162 (Conv2D) (None, 14, 14, 672) 75264 eff_rgb_161[0][0] \n__________________________________________________________________________________________________\neff_lch_162 (Conv2D) (None, 14, 14, 672) 75264 eff_lch_161[0][0] \n__________________________________________________________________________________________________\neff_hsv_162 (Conv2D) (None, 14, 14, 672) 75264 eff_hsv_161[0][0] \n__________________________________________________________________________________________________\neff_rgb_163 (BatchNormalization (None, 14, 14, 672) 2688 eff_rgb_162[0][0] \n__________________________________________________________________________________________________\neff_lch_163 (BatchNormalization (None, 14, 14, 672) 2688 eff_lch_162[0][0] \n__________________________________________________________________________________________________\neff_hsv_163 (BatchNormalization (None, 14, 14, 672) 2688 eff_hsv_162[0][0] \n__________________________________________________________________________________________________\neff_rgb_164 (Activation) (None, 14, 14, 672) 0 eff_rgb_163[0][0] \n__________________________________________________________________________________________________\neff_lch_164 (Activation) (None, 14, 14, 672) 0 eff_lch_163[0][0] \n__________________________________________________________________________________________________\neff_hsv_164 (Activation) (None, 14, 14, 672) 0 eff_hsv_163[0][0] \n__________________________________________________________________________________________________\neff_rgb_165 (ZeroPadding2D) (None, 17, 17, 672) 0 eff_rgb_164[0][0] \n__________________________________________________________________________________________________\neff_lch_165 (ZeroPadding2D) (None, 17, 17, 672) 0 eff_lch_164[0][0] \n__________________________________________________________________________________________________\neff_hsv_165 (ZeroPadding2D) (None, 17, 17, 672) 0 eff_hsv_164[0][0] \n__________________________________________________________________________________________________\neff_rgb_166 (DepthwiseConv2D) (None, 7, 7, 672) 16800 eff_rgb_165[0][0] \n__________________________________________________________________________________________________\neff_lch_166 (DepthwiseConv2D) (None, 7, 7, 672) 16800 eff_lch_165[0][0] \n__________________________________________________________________________________________________\neff_hsv_166 (DepthwiseConv2D) (None, 7, 7, 672) 16800 eff_hsv_165[0][0] \n__________________________________________________________________________________________________\neff_rgb_167 (BatchNormalization (None, 7, 7, 672) 2688 eff_rgb_166[0][0] \n__________________________________________________________________________________________________\neff_lch_167 (BatchNormalization (None, 7, 7, 672) 2688 eff_lch_166[0][0] \n__________________________________________________________________________________________________\neff_hsv_167 (BatchNormalization (None, 7, 7, 672) 2688 eff_hsv_166[0][0] \n__________________________________________________________________________________________________\neff_rgb_168 (Activation) (None, 7, 7, 672) 0 eff_rgb_167[0][0] \n__________________________________________________________________________________________________\neff_lch_168 (Activation) (None, 7, 7, 672) 0 eff_lch_167[0][0] \n__________________________________________________________________________________________________\neff_hsv_168 (Activation) (None, 7, 7, 672) 0 eff_hsv_167[0][0] \n__________________________________________________________________________________________________\neff_rgb_169 (GlobalAveragePooli (None, 672) 0 eff_rgb_168[0][0] \n__________________________________________________________________________________________________\neff_lch_169 (GlobalAveragePooli (None, 672) 0 eff_lch_168[0][0] \n__________________________________________________________________________________________________\neff_hsv_169 (GlobalAveragePooli (None, 672) 0 eff_hsv_168[0][0] \n__________________________________________________________________________________________________\neff_rgb_170 (Reshape) (None, 1, 1, 672) 0 eff_rgb_169[0][0] \n__________________________________________________________________________________________________\neff_lch_170 (Reshape) (None, 1, 1, 672) 0 eff_lch_169[0][0] \n__________________________________________________________________________________________________\neff_hsv_170 (Reshape) (None, 1, 1, 672) 0 eff_hsv_169[0][0] \n__________________________________________________________________________________________________\neff_rgb_171 (Conv2D) (None, 1, 1, 28) 18844 eff_rgb_170[0][0] \n__________________________________________________________________________________________________\neff_lch_171 (Conv2D) (None, 1, 1, 28) 18844 eff_lch_170[0][0] \n__________________________________________________________________________________________________\neff_hsv_171 (Conv2D) (None, 1, 1, 28) 18844 eff_hsv_170[0][0] \n__________________________________________________________________________________________________\neff_rgb_172 (Conv2D) (None, 1, 1, 672) 19488 eff_rgb_171[0][0] \n__________________________________________________________________________________________________\neff_lch_172 (Conv2D) (None, 1, 1, 672) 19488 eff_lch_171[0][0] \n__________________________________________________________________________________________________\neff_hsv_172 (Conv2D) (None, 1, 1, 672) 19488 eff_hsv_171[0][0] \n__________________________________________________________________________________________________\neff_rgb_173 (Multiply) (None, 7, 7, 672) 0 eff_rgb_168[0][0] \n eff_rgb_172[0][0] \n__________________________________________________________________________________________________\neff_lch_173 (Multiply) (None, 7, 7, 672) 0 eff_lch_168[0][0] \n eff_lch_172[0][0] \n__________________________________________________________________________________________________\neff_hsv_173 (Multiply) (None, 7, 7, 672) 0 eff_hsv_168[0][0] \n eff_hsv_172[0][0] \n__________________________________________________________________________________________________\neff_rgb_174 (Conv2D) (None, 7, 7, 192) 129024 eff_rgb_173[0][0] \n__________________________________________________________________________________________________\neff_lch_174 (Conv2D) (None, 7, 7, 192) 129024 eff_lch_173[0][0] \n__________________________________________________________________________________________________\neff_hsv_174 (Conv2D) (None, 7, 7, 192) 129024 eff_hsv_173[0][0] \n__________________________________________________________________________________________________\neff_rgb_175 (BatchNormalization (None, 7, 7, 192) 768 eff_rgb_174[0][0] \n__________________________________________________________________________________________________\neff_lch_175 (BatchNormalization (None, 7, 7, 192) 768 eff_lch_174[0][0] \n__________________________________________________________________________________________________\neff_hsv_175 (BatchNormalization (None, 7, 7, 192) 768 eff_hsv_174[0][0] \n__________________________________________________________________________________________________\neff_rgb_176 (Conv2D) (None, 7, 7, 1152) 221184 eff_rgb_175[0][0] \n__________________________________________________________________________________________________\neff_lch_176 (Conv2D) (None, 7, 7, 1152) 221184 eff_lch_175[0][0] \n__________________________________________________________________________________________________\neff_hsv_176 (Conv2D) (None, 7, 7, 1152) 221184 eff_hsv_175[0][0] \n__________________________________________________________________________________________________\neff_rgb_177 (BatchNormalization (None, 7, 7, 1152) 4608 eff_rgb_176[0][0] \n__________________________________________________________________________________________________\neff_lch_177 (BatchNormalization (None, 7, 7, 1152) 4608 eff_lch_176[0][0] \n__________________________________________________________________________________________________\neff_hsv_177 (BatchNormalization (None, 7, 7, 1152) 4608 eff_hsv_176[0][0] \n__________________________________________________________________________________________________\neff_rgb_178 (Activation) (None, 7, 7, 1152) 0 eff_rgb_177[0][0] \n__________________________________________________________________________________________________\neff_lch_178 (Activation) (None, 7, 7, 1152) 0 eff_lch_177[0][0] \n__________________________________________________________________________________________________\neff_hsv_178 (Activation) (None, 7, 7, 1152) 0 eff_hsv_177[0][0] \n__________________________________________________________________________________________________\neff_rgb_179 (DepthwiseConv2D) (None, 7, 7, 1152) 28800 eff_rgb_178[0][0] \n__________________________________________________________________________________________________\neff_lch_179 (DepthwiseConv2D) (None, 7, 7, 1152) 28800 eff_lch_178[0][0] \n__________________________________________________________________________________________________\neff_hsv_179 (DepthwiseConv2D) (None, 7, 7, 1152) 28800 eff_hsv_178[0][0] \n__________________________________________________________________________________________________\neff_rgb_180 (BatchNormalization (None, 7, 7, 1152) 4608 eff_rgb_179[0][0] \n__________________________________________________________________________________________________\neff_lch_180 (BatchNormalization (None, 7, 7, 1152) 4608 eff_lch_179[0][0] \n__________________________________________________________________________________________________\neff_hsv_180 (BatchNormalization (None, 7, 7, 1152) 4608 eff_hsv_179[0][0] \n__________________________________________________________________________________________________\neff_rgb_181 (Activation) (None, 7, 7, 1152) 0 eff_rgb_180[0][0] \n__________________________________________________________________________________________________\neff_lch_181 (Activation) (None, 7, 7, 1152) 0 eff_lch_180[0][0] \n__________________________________________________________________________________________________\neff_hsv_181 (Activation) (None, 7, 7, 1152) 0 eff_hsv_180[0][0] \n__________________________________________________________________________________________________\neff_rgb_182 (GlobalAveragePooli (None, 1152) 0 eff_rgb_181[0][0] \n__________________________________________________________________________________________________\neff_lch_182 (GlobalAveragePooli (None, 1152) 0 eff_lch_181[0][0] \n__________________________________________________________________________________________________\neff_hsv_182 (GlobalAveragePooli (None, 1152) 0 eff_hsv_181[0][0] \n__________________________________________________________________________________________________\neff_rgb_183 (Reshape) (None, 1, 1, 1152) 0 eff_rgb_182[0][0] \n__________________________________________________________________________________________________\neff_lch_183 (Reshape) (None, 1, 1, 1152) 0 eff_lch_182[0][0] \n__________________________________________________________________________________________________\neff_hsv_183 (Reshape) (None, 1, 1, 1152) 0 eff_hsv_182[0][0] \n__________________________________________________________________________________________________\neff_rgb_184 (Conv2D) (None, 1, 1, 48) 55344 eff_rgb_183[0][0] \n__________________________________________________________________________________________________\neff_lch_184 (Conv2D) (None, 1, 1, 48) 55344 eff_lch_183[0][0] \n__________________________________________________________________________________________________\neff_hsv_184 (Conv2D) (None, 1, 1, 48) 55344 eff_hsv_183[0][0] \n__________________________________________________________________________________________________\neff_rgb_185 (Conv2D) (None, 1, 1, 1152) 56448 eff_rgb_184[0][0] \n__________________________________________________________________________________________________\neff_lch_185 (Conv2D) (None, 1, 1, 1152) 56448 eff_lch_184[0][0] \n__________________________________________________________________________________________________\neff_hsv_185 (Conv2D) (None, 1, 1, 1152) 56448 eff_hsv_184[0][0] \n__________________________________________________________________________________________________\neff_rgb_186 (Multiply) (None, 7, 7, 1152) 0 eff_rgb_181[0][0] \n eff_rgb_185[0][0] \n__________________________________________________________________________________________________\neff_lch_186 (Multiply) (None, 7, 7, 1152) 0 eff_lch_181[0][0] \n eff_lch_185[0][0] \n__________________________________________________________________________________________________\neff_hsv_186 (Multiply) (None, 7, 7, 1152) 0 eff_hsv_181[0][0] \n eff_hsv_185[0][0] \n__________________________________________________________________________________________________\neff_rgb_187 (Conv2D) (None, 7, 7, 192) 221184 eff_rgb_186[0][0] \n__________________________________________________________________________________________________\neff_lch_187 (Conv2D) (None, 7, 7, 192) 221184 eff_lch_186[0][0] \n__________________________________________________________________________________________________\neff_hsv_187 (Conv2D) (None, 7, 7, 192) 221184 eff_hsv_186[0][0] \n__________________________________________________________________________________________________\neff_rgb_188 (BatchNormalization (None, 7, 7, 192) 768 eff_rgb_187[0][0] \n__________________________________________________________________________________________________\neff_lch_188 (BatchNormalization (None, 7, 7, 192) 768 eff_lch_187[0][0] \n__________________________________________________________________________________________________\neff_hsv_188 (BatchNormalization (None, 7, 7, 192) 768 eff_hsv_187[0][0] \n__________________________________________________________________________________________________\neff_rgb_189 (Dropout) (None, 7, 7, 192) 0 eff_rgb_188[0][0] \n__________________________________________________________________________________________________\neff_lch_189 (Dropout) (None, 7, 7, 192) 0 eff_lch_188[0][0] \n__________________________________________________________________________________________________\neff_hsv_189 (Dropout) (None, 7, 7, 192) 0 eff_hsv_188[0][0] \n__________________________________________________________________________________________________\neff_rgb_190 (Add) (None, 7, 7, 192) 0 eff_rgb_189[0][0] \n eff_rgb_175[0][0] \n__________________________________________________________________________________________________\neff_lch_190 (Add) (None, 7, 7, 192) 0 eff_lch_189[0][0] \n eff_lch_175[0][0] \n__________________________________________________________________________________________________\neff_hsv_190 (Add) (None, 7, 7, 192) 0 eff_hsv_189[0][0] \n eff_hsv_175[0][0] \n__________________________________________________________________________________________________\neff_rgb_191 (Conv2D) (None, 7, 7, 1152) 221184 eff_rgb_190[0][0] \n__________________________________________________________________________________________________\neff_lch_191 (Conv2D) (None, 7, 7, 1152) 221184 eff_lch_190[0][0] \n__________________________________________________________________________________________________\neff_hsv_191 (Conv2D) (None, 7, 7, 1152) 221184 eff_hsv_190[0][0] \n__________________________________________________________________________________________________\neff_rgb_192 (BatchNormalization (None, 7, 7, 1152) 4608 eff_rgb_191[0][0] \n__________________________________________________________________________________________________\neff_lch_192 (BatchNormalization (None, 7, 7, 1152) 4608 eff_lch_191[0][0] \n__________________________________________________________________________________________________\neff_hsv_192 (BatchNormalization (None, 7, 7, 1152) 4608 eff_hsv_191[0][0] \n__________________________________________________________________________________________________\neff_rgb_193 (Activation) (None, 7, 7, 1152) 0 eff_rgb_192[0][0] \n__________________________________________________________________________________________________\neff_lch_193 (Activation) (None, 7, 7, 1152) 0 eff_lch_192[0][0] \n__________________________________________________________________________________________________\neff_hsv_193 (Activation) (None, 7, 7, 1152) 0 eff_hsv_192[0][0] \n__________________________________________________________________________________________________\neff_rgb_194 (DepthwiseConv2D) (None, 7, 7, 1152) 28800 eff_rgb_193[0][0] \n__________________________________________________________________________________________________\neff_lch_194 (DepthwiseConv2D) (None, 7, 7, 1152) 28800 eff_lch_193[0][0] \n__________________________________________________________________________________________________\neff_hsv_194 (DepthwiseConv2D) (None, 7, 7, 1152) 28800 eff_hsv_193[0][0] \n__________________________________________________________________________________________________\neff_rgb_195 (BatchNormalization (None, 7, 7, 1152) 4608 eff_rgb_194[0][0] \n__________________________________________________________________________________________________\neff_lch_195 (BatchNormalization (None, 7, 7, 1152) 4608 eff_lch_194[0][0] \n__________________________________________________________________________________________________\neff_hsv_195 (BatchNormalization (None, 7, 7, 1152) 4608 eff_hsv_194[0][0] \n__________________________________________________________________________________________________\neff_rgb_196 (Activation) (None, 7, 7, 1152) 0 eff_rgb_195[0][0] \n__________________________________________________________________________________________________\neff_lch_196 (Activation) (None, 7, 7, 1152) 0 eff_lch_195[0][0] \n__________________________________________________________________________________________________\neff_hsv_196 (Activation) (None, 7, 7, 1152) 0 eff_hsv_195[0][0] \n__________________________________________________________________________________________________\neff_rgb_197 (GlobalAveragePooli (None, 1152) 0 eff_rgb_196[0][0] \n__________________________________________________________________________________________________\neff_lch_197 (GlobalAveragePooli (None, 1152) 0 eff_lch_196[0][0] \n__________________________________________________________________________________________________\neff_hsv_197 (GlobalAveragePooli (None, 1152) 0 eff_hsv_196[0][0] \n__________________________________________________________________________________________________\neff_rgb_198 (Reshape) (None, 1, 1, 1152) 0 eff_rgb_197[0][0] \n__________________________________________________________________________________________________\neff_lch_198 (Reshape) (None, 1, 1, 1152) 0 eff_lch_197[0][0] \n__________________________________________________________________________________________________\neff_hsv_198 (Reshape) (None, 1, 1, 1152) 0 eff_hsv_197[0][0] \n__________________________________________________________________________________________________\neff_rgb_199 (Conv2D) (None, 1, 1, 48) 55344 eff_rgb_198[0][0] \n__________________________________________________________________________________________________\neff_lch_199 (Conv2D) (None, 1, 1, 48) 55344 eff_lch_198[0][0] \n__________________________________________________________________________________________________\neff_hsv_199 (Conv2D) (None, 1, 1, 48) 55344 eff_hsv_198[0][0] \n__________________________________________________________________________________________________\neff_rgb_200 (Conv2D) (None, 1, 1, 1152) 56448 eff_rgb_199[0][0] \n__________________________________________________________________________________________________\neff_lch_200 (Conv2D) (None, 1, 1, 1152) 56448 eff_lch_199[0][0] \n__________________________________________________________________________________________________\neff_hsv_200 (Conv2D) (None, 1, 1, 1152) 56448 eff_hsv_199[0][0] \n__________________________________________________________________________________________________\neff_rgb_201 (Multiply) (None, 7, 7, 1152) 0 eff_rgb_196[0][0] \n eff_rgb_200[0][0] \n__________________________________________________________________________________________________\neff_lch_201 (Multiply) (None, 7, 7, 1152) 0 eff_lch_196[0][0] \n eff_lch_200[0][0] \n__________________________________________________________________________________________________\neff_hsv_201 (Multiply) (None, 7, 7, 1152) 0 eff_hsv_196[0][0] \n eff_hsv_200[0][0] \n__________________________________________________________________________________________________\neff_rgb_202 (Conv2D) (None, 7, 7, 192) 221184 eff_rgb_201[0][0] \n__________________________________________________________________________________________________\neff_lch_202 (Conv2D) (None, 7, 7, 192) 221184 eff_lch_201[0][0] \n__________________________________________________________________________________________________\neff_hsv_202 (Conv2D) (None, 7, 7, 192) 221184 eff_hsv_201[0][0] \n__________________________________________________________________________________________________\neff_rgb_203 (BatchNormalization (None, 7, 7, 192) 768 eff_rgb_202[0][0] \n__________________________________________________________________________________________________\neff_lch_203 (BatchNormalization (None, 7, 7, 192) 768 eff_lch_202[0][0] \n__________________________________________________________________________________________________\neff_hsv_203 (BatchNormalization (None, 7, 7, 192) 768 eff_hsv_202[0][0] \n__________________________________________________________________________________________________\neff_rgb_204 (Dropout) (None, 7, 7, 192) 0 eff_rgb_203[0][0] \n__________________________________________________________________________________________________\neff_lch_204 (Dropout) (None, 7, 7, 192) 0 eff_lch_203[0][0] \n__________________________________________________________________________________________________\neff_hsv_204 (Dropout) (None, 7, 7, 192) 0 eff_hsv_203[0][0] \n__________________________________________________________________________________________________\neff_rgb_205 (Add) (None, 7, 7, 192) 0 eff_rgb_204[0][0] \n eff_rgb_190[0][0] \n__________________________________________________________________________________________________\neff_lch_205 (Add) (None, 7, 7, 192) 0 eff_lch_204[0][0] \n eff_lch_190[0][0] \n__________________________________________________________________________________________________\neff_hsv_205 (Add) (None, 7, 7, 192) 0 eff_hsv_204[0][0] \n eff_hsv_190[0][0] \n__________________________________________________________________________________________________\neff_rgb_206 (Conv2D) (None, 7, 7, 1152) 221184 eff_rgb_205[0][0] \n__________________________________________________________________________________________________\neff_lch_206 (Conv2D) (None, 7, 7, 1152) 221184 eff_lch_205[0][0] \n__________________________________________________________________________________________________\neff_hsv_206 (Conv2D) (None, 7, 7, 1152) 221184 eff_hsv_205[0][0] \n__________________________________________________________________________________________________\neff_rgb_207 (BatchNormalization (None, 7, 7, 1152) 4608 eff_rgb_206[0][0] \n__________________________________________________________________________________________________\neff_lch_207 (BatchNormalization (None, 7, 7, 1152) 4608 eff_lch_206[0][0] \n__________________________________________________________________________________________________\neff_hsv_207 (BatchNormalization (None, 7, 7, 1152) 4608 eff_hsv_206[0][0] \n__________________________________________________________________________________________________\neff_rgb_208 (Activation) (None, 7, 7, 1152) 0 eff_rgb_207[0][0] \n__________________________________________________________________________________________________\neff_lch_208 (Activation) (None, 7, 7, 1152) 0 eff_lch_207[0][0] \n__________________________________________________________________________________________________\neff_hsv_208 (Activation) (None, 7, 7, 1152) 0 eff_hsv_207[0][0] \n__________________________________________________________________________________________________\neff_rgb_209 (DepthwiseConv2D) (None, 7, 7, 1152) 28800 eff_rgb_208[0][0] \n__________________________________________________________________________________________________\neff_lch_209 (DepthwiseConv2D) (None, 7, 7, 1152) 28800 eff_lch_208[0][0] \n__________________________________________________________________________________________________\neff_hsv_209 (DepthwiseConv2D) (None, 7, 7, 1152) 28800 eff_hsv_208[0][0] \n__________________________________________________________________________________________________\neff_rgb_210 (BatchNormalization (None, 7, 7, 1152) 4608 eff_rgb_209[0][0] \n__________________________________________________________________________________________________\neff_lch_210 (BatchNormalization (None, 7, 7, 1152) 4608 eff_lch_209[0][0] \n__________________________________________________________________________________________________\neff_hsv_210 (BatchNormalization (None, 7, 7, 1152) 4608 eff_hsv_209[0][0] \n__________________________________________________________________________________________________\neff_rgb_211 (Activation) (None, 7, 7, 1152) 0 eff_rgb_210[0][0] \n__________________________________________________________________________________________________\neff_lch_211 (Activation) (None, 7, 7, 1152) 0 eff_lch_210[0][0] \n__________________________________________________________________________________________________\neff_hsv_211 (Activation) (None, 7, 7, 1152) 0 eff_hsv_210[0][0] \n__________________________________________________________________________________________________\neff_rgb_212 (GlobalAveragePooli (None, 1152) 0 eff_rgb_211[0][0] \n__________________________________________________________________________________________________\neff_lch_212 (GlobalAveragePooli (None, 1152) 0 eff_lch_211[0][0] \n__________________________________________________________________________________________________\neff_hsv_212 (GlobalAveragePooli (None, 1152) 0 eff_hsv_211[0][0] \n__________________________________________________________________________________________________\neff_rgb_213 (Reshape) (None, 1, 1, 1152) 0 eff_rgb_212[0][0] \n__________________________________________________________________________________________________\neff_lch_213 (Reshape) (None, 1, 1, 1152) 0 eff_lch_212[0][0] \n__________________________________________________________________________________________________\neff_hsv_213 (Reshape) (None, 1, 1, 1152) 0 eff_hsv_212[0][0] \n__________________________________________________________________________________________________\neff_rgb_214 (Conv2D) (None, 1, 1, 48) 55344 eff_rgb_213[0][0] \n__________________________________________________________________________________________________\neff_lch_214 (Conv2D) (None, 1, 1, 48) 55344 eff_lch_213[0][0] \n__________________________________________________________________________________________________\neff_hsv_214 (Conv2D) (None, 1, 1, 48) 55344 eff_hsv_213[0][0] \n__________________________________________________________________________________________________\neff_rgb_215 (Conv2D) (None, 1, 1, 1152) 56448 eff_rgb_214[0][0] \n__________________________________________________________________________________________________\neff_lch_215 (Conv2D) (None, 1, 1, 1152) 56448 eff_lch_214[0][0] \n__________________________________________________________________________________________________\neff_hsv_215 (Conv2D) (None, 1, 1, 1152) 56448 eff_hsv_214[0][0] \n__________________________________________________________________________________________________\neff_rgb_216 (Multiply) (None, 7, 7, 1152) 0 eff_rgb_211[0][0] \n eff_rgb_215[0][0] \n__________________________________________________________________________________________________\neff_lch_216 (Multiply) (None, 7, 7, 1152) 0 eff_lch_211[0][0] \n eff_lch_215[0][0] \n__________________________________________________________________________________________________\neff_hsv_216 (Multiply) (None, 7, 7, 1152) 0 eff_hsv_211[0][0] \n eff_hsv_215[0][0] \n__________________________________________________________________________________________________\neff_rgb_217 (Conv2D) (None, 7, 7, 192) 221184 eff_rgb_216[0][0] \n__________________________________________________________________________________________________\neff_lch_217 (Conv2D) (None, 7, 7, 192) 221184 eff_lch_216[0][0] \n__________________________________________________________________________________________________\neff_hsv_217 (Conv2D) (None, 7, 7, 192) 221184 eff_hsv_216[0][0] \n__________________________________________________________________________________________________\neff_rgb_218 (BatchNormalization (None, 7, 7, 192) 768 eff_rgb_217[0][0] \n__________________________________________________________________________________________________\neff_lch_218 (BatchNormalization (None, 7, 7, 192) 768 eff_lch_217[0][0] \n__________________________________________________________________________________________________\neff_hsv_218 (BatchNormalization (None, 7, 7, 192) 768 eff_hsv_217[0][0] \n__________________________________________________________________________________________________\neff_rgb_219 (Dropout) (None, 7, 7, 192) 0 eff_rgb_218[0][0] \n__________________________________________________________________________________________________\neff_lch_219 (Dropout) (None, 7, 7, 192) 0 eff_lch_218[0][0] \n__________________________________________________________________________________________________\neff_hsv_219 (Dropout) (None, 7, 7, 192) 0 eff_hsv_218[0][0] \n__________________________________________________________________________________________________\neff_rgb_220 (Add) (None, 7, 7, 192) 0 eff_rgb_219[0][0] \n eff_rgb_205[0][0] \n__________________________________________________________________________________________________\neff_lch_220 (Add) (None, 7, 7, 192) 0 eff_lch_219[0][0] \n eff_lch_205[0][0] \n__________________________________________________________________________________________________\neff_hsv_220 (Add) (None, 7, 7, 192) 0 eff_hsv_219[0][0] \n eff_hsv_205[0][0] \n__________________________________________________________________________________________________\neff_rgb_221 (Conv2D) (None, 7, 7, 1152) 221184 eff_rgb_220[0][0] \n__________________________________________________________________________________________________\neff_lch_221 (Conv2D) (None, 7, 7, 1152) 221184 eff_lch_220[0][0] \n__________________________________________________________________________________________________\neff_hsv_221 (Conv2D) (None, 7, 7, 1152) 221184 eff_hsv_220[0][0] \n__________________________________________________________________________________________________\neff_rgb_222 (BatchNormalization (None, 7, 7, 1152) 4608 eff_rgb_221[0][0] \n__________________________________________________________________________________________________\neff_lch_222 (BatchNormalization (None, 7, 7, 1152) 4608 eff_lch_221[0][0] \n__________________________________________________________________________________________________\neff_hsv_222 (BatchNormalization (None, 7, 7, 1152) 4608 eff_hsv_221[0][0] \n__________________________________________________________________________________________________\neff_rgb_223 (Activation) (None, 7, 7, 1152) 0 eff_rgb_222[0][0] \n__________________________________________________________________________________________________\neff_lch_223 (Activation) (None, 7, 7, 1152) 0 eff_lch_222[0][0] \n__________________________________________________________________________________________________\neff_hsv_223 (Activation) (None, 7, 7, 1152) 0 eff_hsv_222[0][0] \n__________________________________________________________________________________________________\neff_rgb_224 (DepthwiseConv2D) (None, 7, 7, 1152) 10368 eff_rgb_223[0][0] \n__________________________________________________________________________________________________\neff_lch_224 (DepthwiseConv2D) (None, 7, 7, 1152) 10368 eff_lch_223[0][0] \n__________________________________________________________________________________________________\neff_hsv_224 (DepthwiseConv2D) (None, 7, 7, 1152) 10368 eff_hsv_223[0][0] \n__________________________________________________________________________________________________\neff_rgb_225 (BatchNormalization (None, 7, 7, 1152) 4608 eff_rgb_224[0][0] \n__________________________________________________________________________________________________\neff_lch_225 (BatchNormalization (None, 7, 7, 1152) 4608 eff_lch_224[0][0] \n__________________________________________________________________________________________________\neff_hsv_225 (BatchNormalization (None, 7, 7, 1152) 4608 eff_hsv_224[0][0] \n__________________________________________________________________________________________________\neff_rgb_226 (Activation) (None, 7, 7, 1152) 0 eff_rgb_225[0][0] \n__________________________________________________________________________________________________\neff_lch_226 (Activation) (None, 7, 7, 1152) 0 eff_lch_225[0][0] \n__________________________________________________________________________________________________\neff_hsv_226 (Activation) (None, 7, 7, 1152) 0 eff_hsv_225[0][0] \n__________________________________________________________________________________________________\neff_rgb_227 (GlobalAveragePooli (None, 1152) 0 eff_rgb_226[0][0] \n__________________________________________________________________________________________________\neff_lch_227 (GlobalAveragePooli (None, 1152) 0 eff_lch_226[0][0] \n__________________________________________________________________________________________________\neff_hsv_227 (GlobalAveragePooli (None, 1152) 0 eff_hsv_226[0][0] \n__________________________________________________________________________________________________\neff_rgb_228 (Reshape) (None, 1, 1, 1152) 0 eff_rgb_227[0][0] \n__________________________________________________________________________________________________\neff_lch_228 (Reshape) (None, 1, 1, 1152) 0 eff_lch_227[0][0] \n__________________________________________________________________________________________________\neff_hsv_228 (Reshape) (None, 1, 1, 1152) 0 eff_hsv_227[0][0] \n__________________________________________________________________________________________________\neff_rgb_229 (Conv2D) (None, 1, 1, 48) 55344 eff_rgb_228[0][0] \n__________________________________________________________________________________________________\neff_lch_229 (Conv2D) (None, 1, 1, 48) 55344 eff_lch_228[0][0] \n__________________________________________________________________________________________________\neff_hsv_229 (Conv2D) (None, 1, 1, 48) 55344 eff_hsv_228[0][0] \n__________________________________________________________________________________________________\neff_rgb_230 (Conv2D) (None, 1, 1, 1152) 56448 eff_rgb_229[0][0] \n__________________________________________________________________________________________________\neff_lch_230 (Conv2D) (None, 1, 1, 1152) 56448 eff_lch_229[0][0] \n__________________________________________________________________________________________________\neff_hsv_230 (Conv2D) (None, 1, 1, 1152) 56448 eff_hsv_229[0][0] \n__________________________________________________________________________________________________\neff_rgb_231 (Multiply) (None, 7, 7, 1152) 0 eff_rgb_226[0][0] \n eff_rgb_230[0][0] \n__________________________________________________________________________________________________\neff_lch_231 (Multiply) (None, 7, 7, 1152) 0 eff_lch_226[0][0] \n eff_lch_230[0][0] \n__________________________________________________________________________________________________\neff_hsv_231 (Multiply) (None, 7, 7, 1152) 0 eff_hsv_226[0][0] \n eff_hsv_230[0][0] \n__________________________________________________________________________________________________\neff_rgb_232 (Conv2D) (None, 7, 7, 320) 368640 eff_rgb_231[0][0] \n__________________________________________________________________________________________________\neff_lch_232 (Conv2D) (None, 7, 7, 320) 368640 eff_lch_231[0][0] \n__________________________________________________________________________________________________\neff_hsv_232 (Conv2D) (None, 7, 7, 320) 368640 eff_hsv_231[0][0] \n__________________________________________________________________________________________________\neff_rgb_233 (BatchNormalization (None, 7, 7, 320) 1280 eff_rgb_232[0][0] \n__________________________________________________________________________________________________\neff_lch_233 (BatchNormalization (None, 7, 7, 320) 1280 eff_lch_232[0][0] \n__________________________________________________________________________________________________\neff_hsv_233 (BatchNormalization (None, 7, 7, 320) 1280 eff_hsv_232[0][0] \n__________________________________________________________________________________________________\neff_rgb_234 (Conv2D) (None, 7, 7, 1280) 409600 eff_rgb_233[0][0] \n__________________________________________________________________________________________________\neff_lch_234 (Conv2D) (None, 7, 7, 1280) 409600 eff_lch_233[0][0] \n__________________________________________________________________________________________________\neff_hsv_234 (Conv2D) (None, 7, 7, 1280) 409600 eff_hsv_233[0][0] \n__________________________________________________________________________________________________\neff_rgb_235 (BatchNormalization (None, 7, 7, 1280) 5120 eff_rgb_234[0][0] \n__________________________________________________________________________________________________\neff_lch_235 (BatchNormalization (None, 7, 7, 1280) 5120 eff_lch_234[0][0] \n__________________________________________________________________________________________________\neff_hsv_235 (BatchNormalization (None, 7, 7, 1280) 5120 eff_hsv_234[0][0] \n__________________________________________________________________________________________________\neff_rgb_236 (Activation) (None, 7, 7, 1280) 0 eff_rgb_235[0][0] \n__________________________________________________________________________________________________\neff_lch_236 (Activation) (None, 7, 7, 1280) 0 eff_lch_235[0][0] \n__________________________________________________________________________________________________\neff_hsv_236 (Activation) (None, 7, 7, 1280) 0 eff_hsv_235[0][0] \n__________________________________________________________________________________________________\neff_rgb_237 (GlobalAveragePooli (None, 1280) 0 eff_rgb_236[0][0] \n__________________________________________________________________________________________________\neff_lch_237 (GlobalAveragePooli (None, 1280) 0 eff_lch_236[0][0] \n__________________________________________________________________________________________________\neff_hsv_237 (GlobalAveragePooli (None, 1280) 0 eff_hsv_236[0][0] \n__________________________________________________________________________________________________\neff_rgb_238 (Dropout) (None, 1280) 0 eff_rgb_237[0][0] \n__________________________________________________________________________________________________\neff_lch_238 (Dropout) (None, 1280) 0 eff_lch_237[0][0] \n__________________________________________________________________________________________________\neff_hsv_238 (Dropout) (None, 1280) 0 eff_hsv_237[0][0] \n__________________________________________________________________________________________________\nconcatenate (Concatenate) (None, 3840) 0 eff_rgb_238[0][0] \n eff_lch_238[0][0] \n eff_hsv_238[0][0] \n__________________________________________________________________________________________________\nprediction (Dense) (None, 3) 11523 concatenate[0][0] \n==================================================================================================\nTotal params: 12,160,236\nTrainable params: 11,523\nNon-trainable params: 12,148,713\n__________________________________________________________________________________________________\n"
],
[
"inp = model.input\nout =model.layers[-1].output\nmodel2 = Model(inp, out)\nmodel2.summary()",
"_____no_output_____"
],
[
"keras.utils.plot_model(model2, \"model.png\", show_shapes=True)",
"_____no_output_____"
],
[
"train_pred = model2.predict_generator(train_generator,train_samples, verbose=1)\ntrain_pred.shape",
"_____no_output_____"
],
[
"train_target = train_generator_rgb.classes\ntrain_target.shape",
"_____no_output_____"
],
[
"val_pred = model2.predict_generator(validation_generator,validation_samples, verbose=1)\nval_pred.shape",
"_____no_output_____"
],
[
"val_target = validation_generator_rgb.classes\nval_target.shape",
"_____no_output_____"
],
[
"test_pred = model2.predict_generator(test_generator,test_samples, verbose=1)\ntest_pred.shape",
"_____no_output_____"
],
[
"test_target = test_generator_rgb.classes\ntest_target.shape",
"_____no_output_____"
],
[
"X = np.append(train_pred, val_pred, axis=0)\nX = np.append(X, test_pred, axis=0)\nnp.save(\"path to save mceffnet_features.npy\", X)\nX.shape",
"_____no_output_____"
],
[
"y = np.append(train_target, val_target, axis=0)\ny = np.append(y, test_target, axis=0)\nnp.save(\"path to save labels.npy\", y)\ny.shape",
"_____no_output_____"
],
[
"list_fams = ['gan', 'graphics', 'real']\nlist_fams",
"_____no_output_____"
],
[
"pip install tsne",
"_____no_output_____"
],
[
"import numpy as np\nfrom numpy.random import RandomState\nnp.random.seed(1)\n\nfrom tsne import bh_sne\nfrom sklearn.manifold import TSNE\n\nimport matplotlib.pyplot as plt\n\nimport os\nimport os.path\nimport glob\n\nfrom keras.preprocessing import image",
"_____no_output_____"
],
[
"print(\"Running t-SNE ...\")\nvis_eff_data = bh_sne(np.float64(X), d=2, perplexity=30., theta=0.5, random_state=RandomState(1))",
"Running t-SNE ...\n"
],
[
"np.save(\"path to save mceffnet_tsne_features.npy\", vis_eff_data)\nvis_eff_data.shape",
"_____no_output_____"
],
[
"vis_eff_data = np.load(\"path to mceffnet_tsne_features.npy\")\ny = np.load(\"path to labels.npy\")",
"_____no_output_____"
],
[
"print(\"Plotting t-SNE ...\")\nfigure = plt.gcf()\nfigure.set_size_inches(20, 17)\nplt.scatter(vis_eff_data[y.astype(int)==0, 0], vis_eff_data[y.astype(int)==0, 1], c='green', marker='o', edgecolors=\"black\", label=\"GAN\")\nplt.scatter(vis_eff_data[y.astype(int)==1, 0], vis_eff_data[y.astype(int)==1, 1], c='white', marker='s', edgecolors=\"blue\", label=\"Graphics\")\nplt.scatter(vis_eff_data[y.astype(int)==2, 0], vis_eff_data[y.astype(int)==2, 1], c='red', marker='D', edgecolors=\"pink\", label=\"Real\")\nplt.clim(-0.5, len(list_fams)-0.5)\nframe1 = plt.gca()\nframe1.axes.xaxis.set_ticklabels([])\nframe1.axes.yaxis.set_ticklabels([])\nframe1.axes.get_xaxis().set_visible(False)\nframe1.axes.get_yaxis().set_visible(False)\nplt.legend(loc=\"upper right\", prop={'size': 35})\n#plt.savefig('TSNE_EfficientNet_features_visualization_color_size_20_17.jpg', format='jpg') \nplt.show()",
"Plotting t-SNE ...\n"
]
]
] |
[
"code"
] |
[
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
]
] |
4ae95a39541e2cc1ecdd438d56efe2dd7206ef7c
| 892,602 |
ipynb
|
Jupyter Notebook
|
tutorials/W3D1_RealNeurons/W3D1_Tutorial2.ipynb
|
hnoamany/course-content
|
d89047537e57854c62cb9536a9c768b235fe4bf8
|
[
"CC-BY-4.0"
] | 1 |
2020-08-04T10:11:55.000Z
|
2020-08-04T10:11:55.000Z
|
tutorials/W3D1_RealNeurons/W3D1_Tutorial2.ipynb
|
hnoamany/course-content
|
d89047537e57854c62cb9536a9c768b235fe4bf8
|
[
"CC-BY-4.0"
] | null | null | null |
tutorials/W3D1_RealNeurons/W3D1_Tutorial2.ipynb
|
hnoamany/course-content
|
d89047537e57854c62cb9536a9c768b235fe4bf8
|
[
"CC-BY-4.0"
] | 1 |
2021-03-27T10:57:54.000Z
|
2021-03-27T10:57:54.000Z
| 431.41711 | 475,744 | 0.933509 |
[
[
[
"<a href=\"https://colab.research.google.com/github/NeuromatchAcademy/course-content/blob/master/tutorials/W3D1_RealNeurons/W3D1_Tutorial2.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>",
"_____no_output_____"
],
[
"# Neuromatch Academy: Week 3, Day 1, Tutorial 2\n# Real Neurons: Effects of Input Correlation\n__Content creators:__ Qinglong Gu, Songtin Li, John Murray, Richard Naud, Arvind Kumar\n\n__Content reviewers:__ Maryam Vaziri-Pashkam, Ella Batty, Lorenzo Fontolan, Richard Gao, Matthew Krause, Spiros Chavlis, Michael Waskom",
"_____no_output_____"
],
[
"---\n# Tutorial Objectives\nIn this tutorial, we will use the leaky integrate-and-fire (LIF) neuron model (see Tutorial 1) to study how they transform input correlations to output properties (transfer of correlations). In particular, we are going to write a few lines of code to:\n\n- inject correlated GWN in a pair of neurons\n\n- measure correlations between the spiking activity of the two neurons\n\n- study how the transfer of correlation depends on the statistics of the input, i.e. mean and standard deviation.",
"_____no_output_____"
],
[
"---\n# Setup",
"_____no_output_____"
]
],
[
[
"# Import libraries\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport time",
"_____no_output_____"
],
[
"# @title Figure Settings\nimport ipywidgets as widgets # interactive display\n%config InlineBackend.figure_format = 'retina'\n# use NMA plot style\nplt.style.use(\"https://raw.githubusercontent.com/NeuromatchAcademy/course-content/master/nma.mplstyle\")\nmy_layout = widgets.Layout()",
"_____no_output_____"
],
[
"# @title Helper functions\ndef default_pars(**kwargs):\n pars = {}\n\n ### typical neuron parameters###\n pars['V_th'] = -55. # spike threshold [mV]\n pars['V_reset'] = -75. # reset potential [mV]\n pars['tau_m'] = 10. # membrane time constant [ms]\n pars['g_L'] = 10. # leak conductance [nS]\n pars['V_init'] = -75. # initial potential [mV]\n pars['V_L'] = -75. # leak reversal potential [mV]\n pars['tref'] = 2. # refractory time (ms)\n\n ### simulation parameters ###\n pars['T'] = 400. # Total duration of simulation [ms]\n pars['dt'] = .1 # Simulation time step [ms]\n\n ### external parameters if any ###\n for k in kwargs:\n pars[k] = kwargs[k]\n\n pars['range_t'] = np.arange(0, pars['T'], pars['dt']) # Vector of discretized\n # time points [ms]\n return pars\n\n\ndef run_LIF(pars, Iinj):\n \"\"\"\n Simulate the LIF dynamics with external input current\n\n Args:\n pars : parameter dictionary\n Iinj : input current [pA]. The injected current here can be a value or an array\n\n Returns:\n rec_spikes : spike times\n rec_v : mebrane potential\n \"\"\"\n\n # Set parameters\n V_th, V_reset = pars['V_th'], pars['V_reset']\n tau_m, g_L = pars['tau_m'], pars['g_L']\n V_init, V_L = pars['V_init'], pars['V_L']\n dt, range_t = pars['dt'], pars['range_t']\n Lt = range_t.size\n tref = pars['tref']\n\n # Initialize voltage and current\n v = np.zeros(Lt)\n v[0] = V_init\n Iinj = Iinj * np.ones(Lt)\n tr = 0.\n\n # simulate the LIF dynamics\n rec_spikes = [] # record spike times\n for it in range(Lt - 1):\n if tr > 0:\n v[it] = V_reset\n tr = tr - 1\n elif v[it] >= V_th: # reset voltage and record spike event\n rec_spikes.append(it)\n v[it] = V_reset\n tr = tref / dt\n\n # calculate the increment of the membrane potential\n dv = (-(v[it] - V_L) + Iinj[it] / g_L) * (dt / tau_m)\n\n # update the membrane potential\n v[it + 1] = v[it] + dv\n\n rec_spikes = np.array(rec_spikes) * dt\n\n return v, rec_spikes\n\n\ndef my_GWN(pars, sig, myseed=False):\n \"\"\"\n Function that calculates Gaussian white noise inputs\n\n Args:\n pars : parameter dictionary\n mu : noise baseline (mean)\n sig : noise amplitute (standard deviation)\n myseed : random seed. int or boolean\n the same seed will give the same random number sequence\n\n Returns:\n I : Gaussian white noise input\n \"\"\"\n\n # Retrieve simulation parameters\n dt, range_t = pars['dt'], pars['range_t']\n Lt = range_t.size\n\n # Set random seed. You can fix the seed of the random number generator so\n # that the results are reliable however, when you want to generate multiple\n # realization make sure that you change the seed for each new realization\n if myseed:\n np.random.seed(seed=myseed)\n else:\n np.random.seed()\n\n # generate GWN\n # we divide here by 1000 to convert units to sec.\n I_GWN = sig * np.random.randn(Lt) * np.sqrt(pars['tau_m'] / dt)\n\n return I_GWN\n\n\ndef Poisson_generator(pars, rate, n, myseed=False):\n \"\"\"\n Generates poisson trains\n\n Args:\n pars : parameter dictionary\n rate : noise amplitute [Hz]\n n : number of Poisson trains\n myseed : random seed. int or boolean\n\n Returns:\n pre_spike_train : spike train matrix, ith row represents whether\n there is a spike in ith spike train over time\n (1 if spike, 0 otherwise)\n \"\"\"\n\n # Retrieve simulation parameters\n dt, range_t = pars['dt'], pars['range_t']\n Lt = range_t.size\n\n # set random seed\n if myseed:\n np.random.seed(seed=myseed)\n else:\n np.random.seed()\n\n # generate uniformly distributed random variables\n u_rand = np.random.rand(n, Lt)\n\n # generate Poisson train\n poisson_train = 1. * (u_rand < rate * (dt / 1000.))\n\n return poisson_train\n\ndef example_plot_myCC():\n pars = default_pars(T=50000, dt=.1)\n\n c = np.arange(10) * 0.1\n r12 = np.zeros(10)\n for i in range(10):\n I1gL, I2gL = correlate_input(pars, mu=20.0, sig=7.5, c=c[i])\n r12[i] = my_CC(I1gL, I2gL)\n\n plt.figure()\n plt.plot(c, r12, 'bo', alpha=0.7, label='Simulation', zorder=2)\n plt.plot([-0.05, 0.95], [-0.05, 0.95], 'k--', label='y=x',\n dashes=(2, 2), zorder=1)\n plt.xlabel('True CC')\n plt.ylabel('Sample CC')\n plt.legend(loc='best')\n \ndef LIF_output_cc(pars, mu, sig, c, bin_size, n_trials=20):\n \"\"\" Simulates two LIF neurons with correlated input and computes output correlation\n \n Args:\n pars : parameter dictionary\n mu : noise baseline (mean)\n sig : noise amplitute (standard deviation)\n c : correlation coefficient ~[0, 1]\n bin_size : bin size used for time series\n n_trials : total simulation trials\n\n Returns:\n r : output corr. coe.\n sp_rate : spike rate\n sp1 : spike times of neuron 1 in the last trial\n sp2 : spike times of neuron 2 in the last trial\n \"\"\"\n\n r12 = np.zeros(n_trials)\n sp_rate = np.zeros(n_trials)\n for i_trial in range(n_trials):\n I1gL, I2gL = correlate_input(pars, mu, sig, c)\n _, sp1 = run_LIF(pars, pars['g_L'] * I1gL)\n _, sp2 = run_LIF(pars, pars['g_L'] * I2gL)\n\n my_bin = np.arange(0, pars['T'], bin_size)\n\n sp1_count, _ = np.histogram(sp1, bins=my_bin)\n sp2_count, _ = np.histogram(sp2, bins=my_bin)\n\n r12[i_trial] = my_CC(sp1_count[::20], sp2_count[::20])\n sp_rate[i_trial] = len(sp1) / pars['T'] * 1000.\n\n return r12.mean(), sp_rate.mean(), sp1, sp2\n\n\ndef plot_c_r_LIF(c, r, mycolor, mylabel):\n z = np.polyfit(c, r, deg=1)\n c_range = np.array([c.min() - 0.05, c.max() + 0.05])\n plt.plot(c, r, 'o', color=mycolor, alpha=0.7, label=mylabel, zorder=2)\n plt.plot(c_range, z[0] * c_range + z[1], color=mycolor, zorder=1)\n\n",
"_____no_output_____"
]
],
[
[
"The helper function contains the:\n\n- Parameter dictionary: `default_pars( **kwargs)`\n- LIF simulator: `run_LIF`\n- Gaussian white noise generator: `my_GWN(pars, sig, myseed=False)`\n- Poisson type spike train generator: `Poisson_generator(pars, rate, n, myseed=False)`\n- Two LIF neurons with correlated inputs simulator: `LIF_output_cc(pars, mu, sig, c, bin_size, n_trials=20)`\n- Some additional plotting utilities",
"_____no_output_____"
],
[
"---\n# Section 1: Correlations (Synchrony)\nCorrelation or synchrony in neuronal activity can be described for any readout of brain activity. Here, we are concerned with the spiking activity of neurons. \n\nIn the simplest way, correlation/synchrony refers to coincident spiking of neurons, i.e., when two neurons spike together, they are firing in **synchrony** or are **correlated**. Neurons can be synchronous in their instantaneous activity, i.e., they spike together with some probability. However, it is also possible that spiking of a neuron at time $t$ is correlated with the spikes of another neuron with a delay (time-delayed synchrony). \n\n## Origin of synchronous neuronal activity:\n- Common inputs, i.e., two neurons are receiving input from the same sources. The degree of correlation of the shared inputs is proportional to their output correlation.\n- Pooling from the same sources. Neurons do not share the same input neurons but are receiving inputs from neurons which themselves are correlated.\n- Neurons are connected to each other (uni- or bi-directionally): This will only give rise to time-delayed synchrony. Neurons could also be connected via gap-junctions.\n- Neurons have similar parameters and initial conditions.\n\n## Implications of synchrony\nWhen neurons spike together, they can have a stronger impact on downstream neurons. Synapses in the brain are sensitive to the temporal correlations (i.e., delay) between pre- and postsynaptic activity, and this, in turn, can lead to the formation of functional neuronal networks - the basis of unsupervised learning (we will study some of these concepts in a forthcoming tutorial).\n\nSynchrony implies a reduction in the dimensionality of the system. In addition, correlations, in many cases, can impair the decoding of neuronal activity.",
"_____no_output_____"
]
],
[
[
"# @title Video 1: Input & output correlations\nfrom IPython.display import YouTubeVideo\nvideo = YouTubeVideo(id=\"nsAYFBcAkes\", width=854, height=480, fs=1)\nprint(\"Video available at https://youtube.com/watch?v=\" + video.id)\nvideo",
"Video available at https://youtube.com/watch?v=nsAYFBcAkes\n"
]
],
[
[
"## How to study the emergence of correlations\n",
"_____no_output_____"
],
[
"A simple model to study the emergence of correlations is to inject common inputs to a pair of neurons and measure the output correlation as a function of the fraction of common inputs. \n\nHere, we are going to investigate the transfer of correlations by computing the correlation coefficient of spike trains recorded from two unconnected LIF neurons, which received correlated inputs.\n\n\nThe input current to LIF neuron $i$ $(i=1,2)$ is:\n\n\\begin{equation}\n\\frac{I_i}{g_L} =\\mu_i + \\sigma_i (\\sqrt{1-c}\\xi_i + \\sqrt{c}\\xi_c) \\quad (1)\n\\end{equation}\n\nwhere $\\mu_i$ is the temporal average of the current. The Gaussian white noise $\\xi_i$ is independent for each neuron, while $\\xi_c$ is common to all neurons. The variable $c$ ($0\\le c\\le1$) controls the fraction of common and independent inputs. $\\sigma_i$ shows the variance of the total input.\n\nSo, first, we will generate correlated inputs.",
"_____no_output_____"
]
],
[
[
"# @title \n#@markdown Execute this cell to get a function for generating correlated GWN inputs\ndef correlate_input(pars, mu=20., sig=7.5, c=0.3):\n \"\"\"\n Args:\n pars : parameter dictionary\n mu : noise baseline (mean)\n sig : noise amplitute (standard deviation)\n c. : correlation coefficient ~[0, 1]\n\n Returns:\n I1gL, I2gL : two correlated inputs with corr. coe. c\n \"\"\"\n\n # generate Gaussian whute noise xi_1, xi_2, xi_c\n xi_1 = my_GWN(pars, sig)\n xi_2 = my_GWN(pars, sig)\n xi_c = my_GWN(pars, sig)\n\n # Generate two correlated inputs by Equation. (1)\n I1gL = mu + np.sqrt(1. - c) * xi_1 + np.sqrt(c) * xi_c\n I2gL = mu + np.sqrt(1. - c) * xi_2 + np.sqrt(c) * xi_c\n\n return I1gL, I2gL\n\nprint(help(correlate_input))",
"Help on function correlate_input in module __main__:\n\ncorrelate_input(pars, mu=20.0, sig=7.5, c=0.3)\n Args:\n pars : parameter dictionary\n mu : noise baseline (mean)\n sig : noise amplitute (standard deviation)\n c. : correlation coefficient ~[0, 1]\n \n Returns:\n I1gL, I2gL : two correlated inputs with corr. coe. c\n\nNone\n"
]
],
[
[
"### Exercise 1: Compute the correlation\n\nThe _sample correlation coefficient_ between two input currents $I_i$ and $I_j$ is defined as the sample covariance of $I_i$ and $I_j$ divided by the square root of the sample variance of $I_i$ multiplied with the square root of the sample variance of $I_j$. In equation form: \n\n\\begin{align}\nr_{ij} &= \\frac{cov(I_i, I_j)}{\\sqrt{var(I_i)} \\sqrt{var(I_j)}}\\\\\ncov(I_i, I_j) &= \\sum_{k=1}^L (I_i^k -\\bar{I}_i)(I_j^k -\\bar{I}_j) \\\\\nvar(I_i) &= \\sum_{k=1}^L (I_i^k -\\bar{I}_i)^2\n\\end{align}\n\nwhere $\\bar{I}_i$ is the sample mean, k is the time bin, and L is the length of $I$. This means that $I_i^k$ is current i at time $k\\cdot dt$. Note that the equations above are not accurate for sample covariances and variances as they should be additionally divided by L-1 - we have dropped this term because it cancels out in the sample correlation coefficient formula.\n\nThe _sample correlation coefficient_ may also be referred to as the _sample Pearson correlation coefficient_. Here, is a beautiful paper that explains multiple ways to calculate and understand correlations [Rodgers and Nicewander 1988](https://www.stat.berkeley.edu/~rabbee/correlation.pdf).\n\nIn this exercise, we will create a function, `my_CC` to compute the sample correlation coefficient between two time series. Note that while we introduced this computation here in the context of input currents, the sample correlation coefficient is used to compute the correlation between any two time series - we will use it later on binned spike trains.",
"_____no_output_____"
]
],
[
[
"def my_CC(i, j):\n \"\"\"\n Args:\n i, j : two time series with the same length\n\n Returns:\n rij : correlation coefficient\n \"\"\"\n ########################################################################\n ## TODO for students: compute rxy, then remove the NotImplementedError #\n # Tip1: array([a1, a2, a3])*array([b1, b2, b3]) = array([a1*b1, a2*b2, a3*b3])\n # Tip2: np.sum(array([a1, a2, a3])) = a1+a2+a3\n # Tip3: square root, np.sqrt()\n # Fill out function and remove\n raise NotImplementedError(\"Student exercise: compute the sample correlation coefficient\")\n ########################################################################\n # Calculate the covariance of i and j\n cov = ...\n # Calculate the variance of i\n var_i = ...\n # Calculate the variance of j\n var_j = ...\n # Calculate the correlation coefficient\n rij = ...\n\n return rij\n\n\n# Uncomment the line after completing the my_CC function\n# example_plot_myCC()",
"_____no_output_____"
],
[
"# to_remove solution\ndef my_CC(i, j):\n \"\"\"\n Args:\n i, j : two time series with the same length\n\n Returns:\n rij : correlation coefficient\n \"\"\"\n\n # Calculate the covariance of i and j\n cov = ((i - i.mean()) * (j - j.mean())).sum()\n # Calculate the variance of i\n var_i = ((i - i.mean()) * (i - i.mean())).sum()\n # Calculate the variance of j\n var_j = ((j - j.mean()) * (j - j.mean())).sum()\n # Calculate the correlation coefficient\n rij = cov / np.sqrt(var_i*var_j)\n\n return rij\n\n\nwith plt.xkcd():\n example_plot_myCC()",
"_____no_output_____"
]
],
[
[
"### Exercise 2: Measure the correlation between spike trains\n\nAfter recording the spike times of the two neurons, how can we estimate their correlation coefficient? \n\nIn order to find this, we need to bin the spike times and obtain two time series. Each data point in the time series is the number of spikes in the corresponding time bin. You can use `np.histogram()` to bin the spike times.\n\nComplete the code below to bin the spike times and calculate the correlation coefficient for two Poisson spike trains. Note that `c` here is the ground-truth correlation coefficient that we define.",
"_____no_output_____"
]
],
[
[
"# @title\n\n# @markdown Execute this cell to get a function for generating correlated Poisson inputs (generate_corr_Poisson)\n\n\ndef generate_corr_Poisson(pars, poi_rate, c, myseed=False):\n \"\"\"\n function to generate correlated Poisson type spike trains\n Args:\n pars : parameter dictionary\n poi_rate : rate of the Poisson train\n c. : correlation coefficient ~[0, 1]\n\n Returns:\n sp1, sp2 : two correlated spike time trains with corr. coe. c\n \"\"\"\n\n range_t = pars['range_t']\n\n mother_rate = poi_rate / c\n mother_spike_train = Poisson_generator(pars, rate=mother_rate,\n n=1, myseed=myseed)[0]\n sp_mother = range_t[mother_spike_train > 0]\n\n L_sp_mother = len(sp_mother)\n sp_mother_id = np.arange(L_sp_mother)\n L_sp_corr = int(L_sp_mother * c)\n\n np.random.shuffle(sp_mother_id)\n sp1 = np.sort(sp_mother[sp_mother_id[:L_sp_corr]])\n\n np.random.shuffle(sp_mother_id)\n sp2 = np.sort(sp_mother[sp_mother_id[:L_sp_corr]])\n\n return sp1, sp2\n\n\nprint(help(generate_corr_Poisson))",
"Help on function generate_corr_Poisson in module __main__:\n\ngenerate_corr_Poisson(pars, poi_rate, c, myseed=False)\n function to generate correlated Poisson type spike trains\n Args:\n pars : parameter dictionary\n poi_rate : rate of the Poisson train\n c. : correlation coefficient ~[0, 1]\n \n Returns:\n sp1, sp2 : two correlated spike time trains with corr. coe. c\n\nNone\n"
],
[
"def corr_coeff_pairs(pars, rate, c, trials, bins):\n \"\"\"\n Calculate the correlation coefficient of two spike trains, for different\n realizations\n\n Args:\n pars : parameter dictionary\n rate : rate of poisson inputs\n c : correlation coefficient ~ [0, 1]\n trials : number of realizations\n bins : vector with bins for time discretization\n\n Returns:\n r12 : correlation coefficient of a pair of inputs\n \"\"\"\n\n r12 = np.zeros(n_trials)\n\n for i in range(n_trials):\n ##############################################################\n ## TODO for students: Use np.histogram to bin the spike time #\n ## e.g., sp1_count, _= np.histogram(...)\n # Use my_CC() compute corr coe, compare with c\n # Note that you can run multiple realizations and compute their r_12(diff_trials)\n # with the defined function above. The average r_12 over trials can get close to c.\n # Note: change seed to generate different input per trial\n # Fill out function and remove\n raise NotImplementedError(\"Student exercise: compute the correlation coefficient\")\n ##############################################################\n\n # Generate correlated Poisson inputs\n sp1, sp2 = generate_corr_Poisson(pars, ..., ..., myseed=2020+i)\n\n # Bin the spike times of the first input\n sp1_count, _ = np.histogram(..., bins=...)\n\n # Bin the spike times of the second input\n sp2_count, _ = np.histogram(..., bins=...)\n\n # Calculate the correlation coefficient\n r12[i] = my_CC(..., ...)\n\n return r12\n\n\npoi_rate = 20.\nc = 0.2 # set true correlation\npars = default_pars(T=10000)\n\n# bin the spike time\nbin_size = 20 # [ms]\nmy_bin = np.arange(0, pars['T'], bin_size)\nn_trials = 100 # 100 realizations\n\n# Uncomment to test your function\n# r12 = corr_coeff_pairs(pars, rate=poi_rate, c=c, trials=n_trials, bins=my_bin)\n# print(f'True corr coe = {c:.3f}')\n# print(f'Simu corr coe = {r12.mean():.3f}')",
"_____no_output_____"
]
],
[
[
"Sample output\n\n```\nTrue corr coe = 0.200\nSimu corr coe = 0.197\n```",
"_____no_output_____"
]
],
[
[
"# to_remove solution\ndef corr_coeff_pairs(pars, rate, c, trials, bins):\n \"\"\"\n Calculate the correlation coefficient of two spike trains, for different\n realizations\n\n Args:\n pars : parameter dictionary\n rate : rate of poisson inputs\n c : correlation coefficient ~ [0, 1]\n trials : number of realizations\n bins : vector with bins for time discretization\n\n Returns:\n r12 : correlation coefficient of a pair of inputs\n \"\"\"\n\n r12 = np.zeros(n_trials)\n\n for i in range(n_trials):\n # Generate correlated Poisson inputs\n sp1, sp2 = generate_corr_Poisson(pars, poi_rate, c, myseed=2020+i)\n\n # Bin the spike times of the first input\n sp1_count, _ = np.histogram(sp1, bins=bins)\n\n # Bin the spike times of the second input\n sp2_count, _ = np.histogram(sp2, bins=bins)\n \n # Calculate the correlation coefficient\n r12[i] = my_CC(sp1_count, sp2_count)\n\n return r12\n\n\npoi_rate = 20.\nc = 0.2 # set true correlation\npars = default_pars(T=10000)\n# bin the spike time\nbin_size = 20 # [ms]\nmy_bin = np.arange(0, pars['T'], bin_size)\nn_trials = 100 # 100 realizations\n\nr12 = corr_coeff_pairs(pars, rate=poi_rate, c=c, trials=n_trials, bins=my_bin)\nprint(f'True corr coe = {c:.3f}')\nprint(f'Simu corr coe = {r12.mean():.3f}')",
"True corr coe = 0.200\nSimu corr coe = 0.197\n"
]
],
[
[
"---\n# Section 2: Investigate the effect of input correlation on the output correlation\n\nNow let's combine the aforementioned two procedures. We first generate the correlated inputs by Equation (1). Then we inject the correlated inputs $I_1, I_2$ into a pair of neurons and record their output spike times. We continue measuring the correlation between the output and \ninvestigate the relationship between the input correlation and the output correlation.",
"_____no_output_____"
],
[
"## Drive a neuron with correlated inputs and visualize its output\nIn the following, you will inject correlated GWN in two neurons. You need to define the mean (`gwn_mean`), standard deviation (`gwn_std`), and input correlations (`c_in`).\n\nWe will simulate $10$ trials to get a better estimate of the output correlation. Change the values in the following cell for the above variables (and then run the next cell) to explore how they impact the output correlation.",
"_____no_output_____"
]
],
[
[
"# Play around with these parameters\n\npars = default_pars(T=80000, dt=1.) # get the parameters\nc_in = 0.3 # set input correlation value\ngwn_mean = 10.\ngwn_std = 10.\n",
"_____no_output_____"
],
[
"# @title\n\n# @markdown Do not forget to execute this cell to simulate the LIF\n\n\nbin_size = 10. # ms\n\nstarttime = time.perf_counter() # time clock\n\nr12_ss, sp_ss, sp1, sp2 = LIF_output_cc(pars, mu=gwn_mean, sig=gwn_std, c=c_in,\n bin_size=bin_size, n_trials=10)\n\n# just the time counter\nendtime = time.perf_counter()\ntimecost = (endtime - starttime) / 60.\nprint(f\"Simulation time = {timecost:.2f} min\")\n\nprint(f\"Input correlation = {c_in}\")\nprint(f\"Output correlation = {r12_ss}\")\n\nplt.figure(figsize=(12, 6))\nplt.plot(sp1, np.ones(len(sp1)) * 1, '|', ms=20, label='neuron 1')\nplt.plot(sp2, np.ones(len(sp2)) * 1.1, '|', ms=20, label='neuron 2')\nplt.xlabel('time (ms)')\nplt.ylabel('neuron id.')\nplt.xlim(1000, 8000)\nplt.ylim(0.9, 1.2)\nplt.legend()\nplt.show()",
"Simulation time = 0.05 min\nInput correlation = 0.3\nOutput correlation = 0.07493360325177058\n"
]
],
[
[
"## Think!\n- Is the output correlation always smaller than the input correlation? If yes, why?\n- Should there be a systematic relationship between input and output correlations? \n\nYou will explore these questions in the next figure but try to develop your own intuitions first!",
"_____no_output_____"
],
[
"Lets vary `c_in` and plot the relationship between the `c_in` and output correlation. This might take some time depending on the number of trials. ",
"_____no_output_____"
]
],
[
[
"#@title\n\n#@markdown Don't forget to execute this cell!\n\npars = default_pars(T=80000, dt=1.) # get the parameters\nbin_size = 10.\nc_in = np.arange(0, 1.0, 0.1) # set the range for input CC\nr12_ss = np.zeros(len(c_in)) # small mu, small sigma\n\nstarttime = time.perf_counter() # time clock\nfor ic in range(len(c_in)):\n r12_ss[ic], sp_ss, sp1, sp2 = LIF_output_cc(pars, mu=10.0, sig=10.,\n c=c_in[ic], bin_size=bin_size,\n n_trials=10)\n\nendtime = time.perf_counter()\ntimecost = (endtime - starttime) / 60.\nprint(f\"Simulation time = {timecost:.2f} min\")\n\nplt.figure(figsize=(7, 6))\nplot_c_r_LIF(c_in, r12_ss, mycolor='b', mylabel='Output CC')\nplt.plot([c_in.min() - 0.05, c_in.max() + 0.05], \n [c_in.min() - 0.05, c_in.max() + 0.05], \n 'k--', dashes=(2, 2), label='y=x')\n\nplt.xlabel('Input CC')\nplt.ylabel('Output CC')\nplt.legend(loc='best', fontsize=16)\nplt.show()",
"Simulation time = 0.51 min\n"
],
[
"# to_remove explanation\n\n\"\"\"\nDiscussion: The results above show that\n- output correlation is smaller than input correlation\n- output correlation varies linearly as a function of input correlation.\n\nWhile the general result holds, this relationship might change depending on the neuron type. \n\"\"\";",
"_____no_output_____"
]
],
[
[
"---\n# Section 3: Correlation transfer function\nThe above plot of input correlation vs. output correlation is called the __correlation transfer function__ of the neurons. ",
"_____no_output_____"
],
[
"## Section 3.1: How do the mean and standard deviation of the GWN affect the correlation transfer function?\n\nThe correlations transfer function appears to be linear. The above can be taken as the input/output transfer function of LIF neurons for correlations, instead of the transfer function for input/output firing rates as we had discussed in the previous tutorial (i.e., F-I curve).\n\nWhat would you expect to happen to the slope of the correlation transfer function if you vary the mean and/or the standard deviation of the GWN?",
"_____no_output_____"
]
],
[
[
"#@markdown Execute this cell to visualize correlation transfer functions\n\npars = default_pars(T=80000, dt=1.) # get the parameters\nno_trial = 10\nbin_size = 10.\nc_in = np.arange(0., 1., 0.2) # set the range for input CC\nr12_ss = np.zeros(len(c_in)) # small mu, small sigma\nr12_ls = np.zeros(len(c_in)) # large mu, small sigma\nr12_sl = np.zeros(len(c_in)) # small mu, large sigma\n\nstarttime = time.perf_counter() # time clock\nfor ic in range(len(c_in)):\n r12_ss[ic], sp_ss, sp1, sp2 = LIF_output_cc(pars, mu=10.0, sig=10.,\n c=c_in[ic], bin_size=bin_size,\n n_trials=no_trial)\n r12_ls[ic], sp_ls, sp1, sp2 = LIF_output_cc(pars, mu=18.0, sig=10.,\n c=c_in[ic], bin_size=bin_size,\n n_trials=no_trial)\n r12_sl[ic], sp_sl, sp1, sp2 = LIF_output_cc(pars, mu=10.0, sig=20.,\n c=c_in[ic], bin_size=bin_size,\n n_trials=no_trial)\nendtime = time.perf_counter()\ntimecost = (endtime - starttime) / 60.\nprint(f\"Simulation time = {timecost:.2f} min\")\n\nplt.figure(figsize=(7, 6))\nplot_c_r_LIF(c_in, r12_ss, mycolor='b', mylabel=r'Small $\\mu$, small $\\sigma$')\nplot_c_r_LIF(c_in, r12_ls, mycolor='y', mylabel=r'Large $\\mu$, small $\\sigma$')\nplot_c_r_LIF(c_in, r12_sl, mycolor='r', mylabel=r'Small $\\mu$, large $\\sigma$')\nplt.plot([c_in.min() - 0.05, c_in.max() + 0.05],\n [c_in.min() - 0.05, c_in.max() + 0.05],\n 'k--', dashes=(2, 2), label='y=x')\nplt.xlabel('Input CC')\nplt.ylabel('Output CC')\nplt.legend(loc='best', fontsize=14)\nplt.show()",
"Simulation time = 0.77 min\n"
]
],
[
[
"### Think!\nWhy do both the mean and the standard deviation of the GWN affect the slope of the correlation transfer function? ",
"_____no_output_____"
]
],
[
[
"# to_remove explanation\n\n\"\"\"\nDiscussion: This has got to do with which part of the input current distribution \nis transferred to the spiking activity.\n\nIntuitive understanding is difficult but this relationship arises due to non-linearities \nin the neuron F-I curve. When F-I curve is linear, output correlation is independent \nof the mean and standard deviation. But this relationship arises even in neurons with \nthreshold-linear F-I curve.\n\nPlease see:\nDe La Rocha J, Doiron B, Shea-Brown E, Josić K, Reyes A. Correlation between \nneural spike trains increases with firing rate. Nature. 2007 Aug;448(7155):802-6. \n\"\"\";",
"_____no_output_____"
]
],
[
[
"## Section 3.2: What is the rationale behind varying $\\mu$ and $\\sigma$?\nThe mean and the variance of the synaptic current depends on the spike rate of a Poisson process. We can use [Campbell's theorem](https://en.wikipedia.org/wiki/Campbell%27s_theorem_(probability)) to estimate the mean and the variance of the synaptic current:\n\n\\begin{align}\n\\mu_{\\rm syn} = \\lambda J \\int P(t) \\\\\n\\sigma_{\\rm syn} = \\lambda J \\int P(t)^2 dt\\\\\n\\end{align}\n\nwhere $\\lambda$ is the firing rate of the Poisson input, $J$ the amplitude of the postsynaptic current and $P(t)$ is the shape of the postsynaptic current as a function of time. \n\nTherefore, when we varied $\\mu$ and/or $\\sigma$ of the GWN, we mimicked a change in the input firing rate. Note that, if we change the firing rate, both $\\mu$ and $\\sigma$ will change simultaneously, not independently. \n\nHere, since we observe an effect of $\\mu$ and $\\sigma$ on correlation transfer, this implies that the input rate has an impact on the correlation transfer function.\n",
"_____no_output_____"
],
[
"### Think!\n\n- What are the factors that would make output correlations smaller than input correlations? (Notice that the colored lines are below the black dashed line)\n- What does it mean for the correlation in the network?\n- Here we have studied the transfer of correlations by injecting GWN. But in the previous tutorial, we mentioned that GWN is unphysiological. Indeed, neurons receive colored noise (i.e., Shot noise or OU process). How do these results obtained from injection of GWN apply to the case where correlated spiking inputs are injected in the two LIFs? Will the results be the same or different?\n\nReference\n- De La Rocha, Jaime, et al. \"Correlation between neural spike trains increases with firing rate.\" Nature (2007) (https://www.nature.com/articles/nature06028/)\n\n- Bujan AF, Aertsen A, Kumar A. Role of input correlations in shaping the variability and noise correlations of evoked activity in the neocortex. Journal of Neuroscience. 2015 Jun 3;35(22):8611-25. (https://www.jneurosci.org/content/35/22/8611)",
"_____no_output_____"
]
],
[
[
"# to_remove explanation\n\n\"\"\"\nDiscussion: \n\n1. Anything that tries to reduce the mean or variance of the input e.g. mean can \nbe reduced by inhibition, sigma can be reduced by the membrane time constant. \nObviously, if the two neurons have different parameters that will decorrelate them. \nBut more importantly, it is the slope of neuron transfer function that will affect the \noutput correlation.\n\n2. These observations pose an interesting problem at the network level. If the \noutput correlation are smaller than the input correlation, then the network activity \nshould eventually converge to zero correlation. But that does not happen. So there \nis something missing in this model to understand origin of synchrony in the network.\n\n3. For spike trains, if we do not have explicit control over mu and sigma. \nAnd these two variables will be tied to the firing rate of the inputs. So the \nresults will be qualitatively similar. But when we think of multiple spike inputs \ntwo different types of correlations arise (see Bujan et al. 2015 for more info)\n\"\"\";",
"_____no_output_____"
]
],
[
[
"---\n# Summary\n\nIn this tutorial, we studied how the input correlation of two LIF neurons is mapped to their output correlation. Specifically, we:\n\n- injected correlated GWN in a pair of neurons,\n\n- measured correlations between the spiking activity of the two neurons, and\n\n- studied how the transfer of correlation depends on the statistics of the input, i.e., mean and standard deviation.\n\nHere, we were concerned with zero time lag correlation. For this reason, we restricted estimation of correlation to instantaneous correlations. If you are interested in time-lagged correlation, then we should estimate the cross-correlogram of the spike trains and find out the dominant peak and area under the peak to get an estimate of output correlations. \n\nWe leave this as a future to-do for you if you are interested.",
"_____no_output_____"
],
[
"---\n# Bonus 1: Example of a conductance-based LIF model\nAbove, we have written code to generate correlated Poisson spike trains. You can write code to stimulate the LIF neuron with such correlated spike trains and study the correlation transfer function for spiking input and compare it to the correlation transfer function obtained by injecting correlated GWNs.",
"_____no_output_____"
]
],
[
[
"# @title Function to simulate conductance-based LIF\n\ndef run_LIF_cond(pars, I_inj, pre_spike_train_ex, pre_spike_train_in):\n \"\"\"\n conductance-based LIF dynamics\n\n Args:\n pars : parameter dictionary\n I_inj : injected current [pA]. The injected current here can\n be a value or an array\n pre_spike_train_ex : spike train input from presynaptic excitatory neuron\n pre_spike_train_in : spike train input from presynaptic inhibitory neuron\n\n Returns:\n rec_spikes : spike times\n rec_v : mebrane potential\n gE : postsynaptic excitatory conductance\n gI : postsynaptic inhibitory conductance\n \"\"\"\n\n # Retrieve parameters\n V_th, V_reset = pars['V_th'], pars['V_reset']\n tau_m, g_L = pars['tau_m'], pars['g_L']\n V_init, E_L = pars['V_init'], pars['E_L']\n gE_bar, gI_bar = pars['gE_bar'], pars['gI_bar']\n VE, VI = pars['VE'], pars['VI']\n tau_syn_E, tau_syn_I = pars['tau_syn_E'], pars['tau_syn_I']\n tref = pars['tref']\n dt, range_t = pars['dt'], pars['range_t']\n Lt = range_t.size\n\n # Initialize\n tr = 0.\n v = np.zeros(Lt)\n v[0] = V_init\n gE = np.zeros(Lt)\n gI = np.zeros(Lt)\n Iinj = I_inj * np.ones(Lt) # ensure I has length Lt\n\n if pre_spike_train_ex.max() == 0:\n pre_spike_train_ex_total = np.zeros(Lt)\n else:\n pre_spike_train_ex_total = pre_spike_train_ex * np.ones(Lt)\n\n if pre_spike_train_in.max() == 0:\n pre_spike_train_in_total = np.zeros(Lt)\n else:\n pre_spike_train_in_total = pre_spike_train_in * np.ones(Lt)\n\n # simulation\n rec_spikes = [] # recording spike times\n for it in range(Lt - 1):\n if tr > 0:\n v[it] = V_reset\n tr = tr - 1\n elif v[it] >= V_th: # reset voltage and record spike event\n rec_spikes.append(it)\n v[it] = V_reset\n tr = tref / dt\n # update the synaptic conductance\n gE[it+1] = gE[it] - (dt / tau_syn_E) * gE[it] + gE_bar * pre_spike_train_ex_total[it + 1]\n gI[it+1] = gI[it] - (dt / tau_syn_I) * gI[it] + gI_bar * pre_spike_train_in_total[it + 1]\n\n # calculate the increment of the membrane potential\n dv = (-(v[it] - E_L) - (gE[it + 1] / g_L) * (v[it] - VE) - \\\n (gI[it + 1] / g_L) * (v[it] - VI) + Iinj[it] / g_L) * (dt / tau_m)\n\n # update membrane potential\n v[it + 1] = v[it] + dv\n\n rec_spikes = np.array(rec_spikes) * dt\n\n return v, rec_spikes, gE, gI\n\n\nprint(help(run_LIF_cond))",
"Help on function run_LIF_cond in module __main__:\n\nrun_LIF_cond(pars, I_inj, pre_spike_train_ex, pre_spike_train_in)\n conductance-based LIF dynamics\n \n Args:\n pars : parameter dictionary\n I_inj : injected current [pA]. The injected current here can\n be a value or an array\n pre_spike_train_ex : spike train input from presynaptic excitatory neuron\n pre_spike_train_in : spike train input from presynaptic inhibitory neuron\n \n Returns:\n rec_spikes : spike times\n rec_v : mebrane potential\n gE : postsynaptic excitatory conductance\n gI : postsynaptic inhibitory conductance\n\nNone\n"
]
],
[
[
"## Interactive Demo: Correlated spike input to an LIF neuron \n\nIn the following you can explore what happens when the neurons receive correlated spiking input.\n\nYou can vary the correlation between excitatory input spike trains. For simplicity, the correlation between inhibitory spike trains is set to 0.01.\n\nVary both excitatory rate and correlation and see how the output correlation changes. Check if the results are qualitatively similar to what you observed previously when you varied the $\\mu$ and $\\sigma$.\n",
"_____no_output_____"
]
],
[
[
"# @title\n\n# @markdown Make sure you execute this cell to enable the widget!\n\nmy_layout.width = '450px'\[email protected](\n pwc_ee=widgets.FloatSlider(0.3, min=0.05, max=0.99, step=0.01,\n layout=my_layout),\n exc_rate=widgets.FloatSlider(1e3, min=500., max=5e3, step=50.,\n layout=my_layout),\n inh_rate=widgets.FloatSlider(500., min=300., max=5e3, step=5.,\n layout=my_layout),\n)\n\n\ndef EI_isi_regularity(pwc_ee, exc_rate, inh_rate):\n pars = default_pars(T=1000.)\n # Add parameters\n pars['V_th'] = -55. # spike threshold [mV]\n pars['V_reset'] = -75. # reset potential [mV]\n pars['tau_m'] = 10. # membrane time constant [ms]\n pars['g_L'] = 10. # leak conductance [nS]\n pars['V_init'] = -65. # initial potential [mV]\n pars['E_L'] = -75. # leak reversal potential [mV]\n pars['tref'] = 2. # refractory time (ms)\n\n pars['gE_bar'] = 4.0 # [nS]\n pars['VE'] = 0. # [mV] excitatory reversal potential\n pars['tau_syn_E'] = 2. # [ms]\n pars['gI_bar'] = 2.4 # [nS]\n pars['VI'] = -80. # [mV] inhibitory reversal potential\n pars['tau_syn_I'] = 5. # [ms]\n\n my_bin = np.arange(0, pars['T']+pars['dt'], .1) # 20 [ms] bin-size\n\n # exc_rate = 1e3\n # inh_rate = 0.4e3\n # pwc_ee = 0.3\n pwc_ii = 0.01\n # generate two correlated spike trains for excitatory input\n sp1e, sp2e = generate_corr_Poisson(pars, exc_rate, pwc_ee)\n\n sp1_spike_train_ex, _ = np.histogram(sp1e, bins=my_bin)\n sp2_spike_train_ex, _ = np.histogram(sp2e, bins=my_bin)\n\n # generate two uncorrelated spike trains for inhibitory input\n sp1i, sp2i = generate_corr_Poisson(pars, inh_rate, pwc_ii)\n sp1_spike_train_in, _ = np.histogram(sp1i, bins=my_bin)\n sp2_spike_train_in, _ = np.histogram(sp2i, bins=my_bin)\n\n v1, rec_spikes1, gE, gI = run_LIF_cond(pars, 0, sp1_spike_train_ex, sp1_spike_train_in)\n v2, rec_spikes2, gE, gI = run_LIF_cond(pars, 0, sp2_spike_train_ex, sp2_spike_train_in)\n\n # bin the spike time\n bin_size = 20 # [ms]\n my_bin = np.arange(0, pars['T'], bin_size)\n spk_1, _ = np.histogram(rec_spikes1, bins=my_bin)\n spk_2, _ = np.histogram(rec_spikes2, bins=my_bin)\n\n r12 = my_CC(spk_1, spk_2)\n print(f\"Input correlation = {pwc_ee}\")\n print(f\"Output correlation = {r12}\")\n\n plt.figure(figsize=(14, 7))\n plt.subplot(211)\n plt.plot(sp1e, np.ones(len(sp1e)) * 1, '|', ms=20,\n label='Exc. input 1')\n plt.plot(sp2e, np.ones(len(sp2e)) * 1.1, '|', ms=20,\n label='Exc. input 2')\n plt.plot(sp1i, np.ones(len(sp1i)) * 1.3, '|k', ms=20,\n label='Inh. input 1')\n plt.plot(sp2i, np.ones(len(sp2i)) * 1.4, '|k', ms=20,\n label='Inh. input 2')\n\n plt.ylim(0.9, 1.5)\n plt.legend()\n plt.ylabel('neuron id.')\n\n plt.subplot(212)\n plt.plot(pars['range_t'], v1, label='neuron 1')\n plt.plot(pars['range_t'], v2, label='neuron 2')\n plt.xlabel('time (ms)')\n plt.ylabel('membrane voltage $V_{m}$')\n plt.tight_layout()\n plt.show()",
"Input correlation = 0.3\nOutput correlation = 0.5240669646233612\n"
]
],
[
[
"\nAbove, we are estimating the output correlation for one trial. You can modify the code to get a trial average of output correlations.\n\n\n",
"_____no_output_____"
],
[
"---\n# Bonus 2: Ensemble Response\n\nFinally, there is a short BONUS lecture video on the firing response of an ensemble of neurons to time-varying input. There are no associated coding exercises - just enjoy.",
"_____no_output_____"
]
],
[
[
"#@title Video 2 (Bonus): Response of ensemble of neurons to time-varying input\nfrom IPython.display import YouTubeVideo\nvideo = YouTubeVideo(id=\"78_dWa4VOIo\", width=854, height=480, fs=1)\nprint(\"Video available at https://youtube.com/watch?v=\" + video.id)\nvideo",
"Video available at https://youtube.com/watch?v=78_dWa4VOIo\n"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code"
] |
[
[
"markdown",
"markdown",
"markdown",
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code",
"code"
],
[
"markdown",
"markdown"
],
[
"code",
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code"
]
] |
4ae95cfeb4a5b4df1dcf556fb21318d78b258c5a
| 484,074 |
ipynb
|
Jupyter Notebook
|
Practice_Notebooks/Day2.ipynb
|
Aujasvi-Moudgil/EDA-Miscellaneous-Data
|
7c0fbd745918fec316fda2e5a0392a5f63fec24a
|
[
"MIT"
] | null | null | null |
Practice_Notebooks/Day2.ipynb
|
Aujasvi-Moudgil/EDA-Miscellaneous-Data
|
7c0fbd745918fec316fda2e5a0392a5f63fec24a
|
[
"MIT"
] | null | null | null |
Practice_Notebooks/Day2.ipynb
|
Aujasvi-Moudgil/EDA-Miscellaneous-Data
|
7c0fbd745918fec316fda2e5a0392a5f63fec24a
|
[
"MIT"
] | null | null | null | 65.89627 | 32,732 | 0.597221 |
[
[
[
"# Fundamental types in Python",
"_____no_output_____"
],
[
"# Integers\nInteger literals are created by any number without a decimal or complex component.",
"_____no_output_____"
]
],
[
[
"x = 1\nprint(x)\ny=5\nprint(y)\nz=\"Test\"\nprint(z)",
"1\n5\nTest\n"
]
],
[
[
"# Lets check if a number is integer or not",
"_____no_output_____"
]
],
[
[
"isinstance(x, int)",
"_____no_output_____"
]
],
[
[
"# Floats\nFloat literals can be created by adding a decimal component to a number.",
"_____no_output_____"
]
],
[
[
"# No concept of declaring variable types in Python\nx = 1.0\ny = 5.7\nprint(y)\ny=3\nprint(y)\ny=5.6\nprint(x)\nprint(y)",
"5.7\n3\n1.0\n5.6\n"
]
],
[
[
"# Boolean\nBoolean can be defined by typing True/False without quotes",
"_____no_output_____"
]
],
[
[
"# Case Sensitive. True is different from TRUE. Dynamic Typing\nb1 = True\nprint(b1)\nb2 = False\nb1 = 6\nprint(b1)",
"True\n6\n"
]
],
[
[
"# Strings\nString literals can be defined with any of single quotes ('), double quotes (\") or triple quotes (''' or \"\"\"). All give the same result with two important differences.\n\nIf you quote with single quotes, you do not have to escape double quotes and vice-versa. If you quote with triple quotes, your string can span multiple lines.",
"_____no_output_____"
]
],
[
[
"a=\"Test\"\nb=5\nprint(type(a))\nprint(type(b))",
"<type 'str'>\n<type 'int'>\n"
],
[
"# string\nname1 = 'your name'\nprint(name1)\nname2 = \"He's coming to the party\"\nprint(name2)\nname3 = '''XNews quotes : \"He's coming to the party\"'''\nprint(name3)",
"your name\nHe's coming to the party\nXNews quotes : \"He's coming to the party\"\n"
]
],
[
[
"# Summary Statitics",
"_____no_output_____"
]
],
[
[
"import pandas as pd \nimport numpy as np\nimport csv\ndata = pd.read_csv(\"wine.csv\", encoding=\"latin-1\")\n#byte_string = chr(195) + chr(167) + chr(97)\n#unicode_string = byte_string.decode('latin-1')\n#print(unicode_string) # prints: ça",
"_____no_output_____"
]
],
[
[
"# Lets have a brief look at the first four rows of the data in table",
"_____no_output_____"
]
],
[
[
"data.head()",
"_____no_output_____"
],
[
"df = pd.DataFrame(data)\nprint (df)",
" Unnamed: 0 country \\\n0 0 Italy \n1 1 Portugal \n2 2 US \n3 3 US \n4 4 US \n5 5 Spain \n6 6 Italy \n7 7 France \n8 8 Germany \n9 9 France \n10 10 US \n11 11 France \n12 12 US \n13 13 Italy \n14 14 US \n15 15 Germany \n16 16 Argentina \n17 17 Argentina \n18 18 Spain \n19 19 US \n20 20 US \n21 21 US \n22 22 Italy \n23 23 US \n24 24 Italy \n25 25 US \n26 26 Italy \n27 27 Italy \n28 28 Italy \n29 29 US \n... ... ... \n129941 129941 US \n129942 129942 US \n129943 129943 Italy \n129944 129944 Israel \n129945 129945 US \n129946 129946 Germany \n129947 129947 Italy \n129948 129948 Argentina \n129949 129949 US \n129950 129950 US \n129951 129951 France \n129952 129952 US \n129953 129953 New Zealand \n129954 129954 New Zealand \n129955 129955 New Zealand \n129956 129956 New Zealand \n129957 129957 Spain \n129958 129958 New Zealand \n129959 129959 France \n129960 129960 Portugal \n129961 129961 Italy \n129962 129962 Italy \n129963 129963 Israel \n129964 129964 France \n129965 129965 France \n129966 129966 Germany \n129967 129967 US \n129968 129968 France \n129969 129969 France \n129970 129970 France \n\n description \\\n0 Aromas include tropical fruit, broom, brimston... \n1 This is ripe and fruity, a wine that is smooth... \n2 Tart and snappy, the flavors of lime flesh and... \n3 Pineapple rind, lemon pith and orange blossom ... \n4 Much like the regular bottling from 2012, this... \n5 Blackberry and raspberry aromas show a typical... \n6 Here's a bright, informal red that opens with ... \n7 This dry and restrained wine offers spice in p... \n8 Savory dried thyme notes accent sunnier flavor... \n9 This has great depth of flavor with its fresh ... \n10 Soft, supple plum envelopes an oaky structure ... \n11 This is a dry wine, very spicy, with a tight, ... \n12 Slightly reduced, this wine offers a chalky, t... \n13 This is dominated by oak and oak-driven aromas... \n14 Building on 150 years and six generations of w... \n15 Zesty orange peels and apple notes abound in t... \n16 Baked plum, molasses, balsamic vinegar and che... \n17 Raw black-cherry aromas are direct and simple ... \n18 Desiccated blackberry, leather, charred wood a... \n19 Red fruit aromas pervade on the nose, with cig... \n20 Ripe aromas of dark berries mingle with ample ... \n21 A sleek mix of tart berry, stem and herb, alon... \n22 Delicate aromas recall white flower and citrus... \n23 This wine from the Geneseo district offers aro... \n24 Aromas of prune, blackcurrant, toast and oak c... \n25 Oak and earth intermingle around robust aromas... \n26 Pretty aromas of yellow flower and stone fruit... \n27 Aromas recall ripe dark berry, toast and a whi... \n28 Aromas suggest mature berry, scorched earth, a... \n29 Clarksburg is becoming a haven for Chenin Blan... \n... ... \n129941 A Chardonnay with an unusual companion, 8% Sé... \n129942 This is classic in herbaceous aromas and flavo... \n129943 A blend of Nero d'Avola and Syrah, this convey... \n129944 Deep garnet in the glass, this has a nose of b... \n129945 Hailing from one of the more popular vineyards... \n129946 Plump, clingy peach and honey notes are cut wi... \n129947 A blend of 65% Cabernet Sauvignon, 30% Merlot ... \n129948 Raspberry and cassis aromas are fresh and upri... \n129949 There's no bones about the use of oak in this ... \n129950 This opens with herbaceous dollops of thyme an... \n129951 Hugely spicy this rich wine is described as sw... \n129952 This Zinfandel from the eastern section of Nap... \n129953 Roughly two-thirds Cabernet and one-third Merl... \n129954 One of the more characterful Pinot Gris for th... \n129955 Like Dog Point's 2011 Chardonnay, this wine is... \n129956 The blend is 44% Merlot, 33% Cabernet Sauvigno... \n129957 Lightly baked berry aromas vie for attention w... \n129958 This blend of Cabernet Sauvignon-Merlot and Ca... \n129959 The granite soil of the Brand Grand Cru vineya... \n129960 Fresh and fruity, this is full of red cherry f... \n129961 Intense aromas of wild cherry, baking spice, t... \n129962 Blackberry, cassis, grilled herb and toasted a... \n129963 A bouquet of black cherry, tart cranberry and ... \n129964 Initially quite muted, this wine slowly develo... \n129965 While it's rich, this beautiful dry wine also ... \n129966 Notes of honeysuckle and cantaloupe sweeten th... \n129967 Citation is given as much as a decade of bottl... \n129968 Well-drained gravel soil gives this wine its c... \n129969 A dry style of Pinot Gris, this is crisp with ... \n129970 Big, rich and off-dry, this is powered by inte... \n\n designation points price \\\n0 Vulkà Bianco 87 NaN \n1 Avidagos 87 15.0 \n2 NaN 87 14.0 \n3 Reserve Late Harvest 87 13.0 \n4 Vintner's Reserve Wild Child Block 87 65.0 \n5 Ars In Vitro 87 15.0 \n6 Belsito 87 16.0 \n7 NaN 87 24.0 \n8 Shine 87 12.0 \n9 Les Natures 87 27.0 \n10 Mountain Cuvée 87 19.0 \n11 NaN 87 30.0 \n12 NaN 87 34.0 \n13 Rosso 87 NaN \n14 NaN 87 12.0 \n15 Devon 87 24.0 \n16 Felix 87 30.0 \n17 Winemaker Selection 87 13.0 \n18 Vendimia Seleccionada Finca Valdelayegua Singl... 87 28.0 \n19 NaN 87 32.0 \n20 Vin de Maison 87 23.0 \n21 NaN 87 20.0 \n22 Ficiligno 87 19.0 \n23 Signature Selection 87 22.0 \n24 Aynat 87 35.0 \n25 King Ridge Vineyard 87 69.0 \n26 Dalila 87 13.0 \n27 NaN 87 10.0 \n28 Mascaria Barricato 87 17.0 \n29 NaN 86 16.0 \n... ... ... ... \n129941 NaN 90 20.0 \n129942 NaN 90 35.0 \n129943 Adènzia 90 29.0 \n129944 Special Reserve Winemakers' Choice 90 25.0 \n129945 Jurassic Park Vineyard Old Vines 90 20.0 \n129946 Dom 90 17.0 \n129947 Symposio 90 20.0 \n129948 Pedernal 90 43.0 \n129949 Barrel Fermented 90 35.0 \n129950 Blocks 7 & 22 90 35.0 \n129951 Holder 90 30.0 \n129952 NaN 90 22.0 \n129953 Elspeth 90 25.0 \n129954 Single Estate 90 15.0 \n129955 NaN 90 40.0 \n129956 Gimblett Gravels Merlot-Cabernet Sauvignon-Malbec 90 19.0 \n129957 Crianza 90 17.0 \n129958 Irongate 90 35.0 \n129959 Brand Grand Cru 90 57.0 \n129960 Vértice 90 48.0 \n129961 NaN 90 30.0 \n129962 Sà gana Tenuta San Giacomo 90 40.0 \n129963 Oak Aged 90 20.0 \n129964 Domaine Saint-Rémy Herrenweg 90 NaN \n129965 Seppi Landmann Vallée Noble 90 28.0 \n129966 Brauneberger Juffer-Sonnenuhr Spätlese 90 28.0 \n129967 NaN 90 75.0 \n129968 Kritt 90 30.0 \n129969 NaN 90 32.0 \n129970 Lieu-dit Harth Cuvée Caroline 90 21.0 \n\n province region_1 region_2 \\\n0 Sicily & Sardinia Etna NaN \n1 Douro NaN NaN \n2 Oregon Willamette Valley Willamette Valley \n3 Michigan Lake Michigan Shore NaN \n4 Oregon Willamette Valley Willamette Valley \n5 Northern Spain Navarra NaN \n6 Sicily & Sardinia Vittoria NaN \n7 Alsace Alsace NaN \n8 Rheinhessen NaN NaN \n9 Alsace Alsace NaN \n10 California Napa Valley Napa \n11 Alsace Alsace NaN \n12 California Alexander Valley Sonoma \n13 Sicily & Sardinia Etna NaN \n14 California Central Coast Central Coast \n15 Mosel NaN NaN \n16 Other Cafayate NaN \n17 Mendoza Province Mendoza NaN \n18 Northern Spain Ribera del Duero NaN \n19 Virginia Virginia NaN \n20 Virginia Virginia NaN \n21 Oregon Oregon Oregon Other \n22 Sicily & Sardinia Sicilia NaN \n23 California Paso Robles Central Coast \n24 Sicily & Sardinia Sicilia NaN \n25 California Sonoma Coast Sonoma \n26 Sicily & Sardinia Terre Siciliane NaN \n27 Sicily & Sardinia Terre Siciliane NaN \n28 Sicily & Sardinia Cerasuolo di Vittoria NaN \n29 California Clarksburg Central Valley \n... ... ... ... \n129941 California Mendocino County NaN \n129942 California Sonoma County Sonoma \n129943 Sicily & Sardinia Sicilia NaN \n129944 Galilee NaN NaN \n129945 California Santa Ynez Valley Central Coast \n129946 Mosel NaN NaN \n129947 Sicily & Sardinia Terre Siciliane NaN \n129948 Other San Juan NaN \n129949 California Napa Valley Napa \n129950 California Napa Valley Napa \n129951 Alsace Alsace NaN \n129952 California Chiles Valley Napa \n129953 Hawke's Bay NaN NaN \n129954 Marlborough NaN NaN \n129955 Marlborough NaN NaN \n129956 Hawke's Bay NaN NaN \n129957 Northern Spain Rioja NaN \n129958 Hawke's Bay NaN NaN \n129959 Alsace Alsace NaN \n129960 Douro NaN NaN \n129961 Sicily & Sardinia Sicilia NaN \n129962 Sicily & Sardinia Sicilia NaN \n129963 Galilee NaN NaN \n129964 Alsace Alsace NaN \n129965 Alsace Alsace NaN \n129966 Mosel NaN NaN \n129967 Oregon Oregon Oregon Other \n129968 Alsace Alsace NaN \n129969 Alsace Alsace NaN \n129970 Alsace Alsace NaN \n\n taster_name taster_twitter_handle \\\n0 Kerin OâKeefe @kerinokeefe \n1 Roger Voss @vossroger \n2 Paul Gregutt @paulgwine \n3 Alexander Peartree NaN \n4 Paul Gregutt @paulgwine \n5 Michael Schachner @wineschach \n6 Kerin OâKeefe @kerinokeefe \n7 Roger Voss @vossroger \n8 Anna Lee C. Iijima NaN \n9 Roger Voss @vossroger \n10 Virginie Boone @vboone \n11 Roger Voss @vossroger \n12 Virginie Boone @vboone \n13 Kerin OâKeefe @kerinokeefe \n14 Matt Kettmann @mattkettmann \n15 Anna Lee C. Iijima NaN \n16 Michael Schachner @wineschach \n17 Michael Schachner @wineschach \n18 Michael Schachner @wineschach \n19 Alexander Peartree NaN \n20 Alexander Peartree NaN \n21 Paul Gregutt @paulgwine \n22 Kerin OâKeefe @kerinokeefe \n23 Matt Kettmann @mattkettmann \n24 Kerin OâKeefe @kerinokeefe \n25 Virginie Boone @vboone \n26 Kerin OâKeefe @kerinokeefe \n27 Kerin OâKeefe @kerinokeefe \n28 Kerin OâKeefe @kerinokeefe \n29 Virginie Boone @vboone \n... ... ... \n129941 Virginie Boone @vboone \n129942 Virginie Boone @vboone \n129943 Kerin OâKeefe @kerinokeefe \n129944 Mike DeSimone @worldwineguys \n129945 Matt Kettmann @mattkettmann \n129946 Anna Lee C. Iijima NaN \n129947 Kerin OâKeefe @kerinokeefe \n129948 Michael Schachner @wineschach \n129949 Virginie Boone @vboone \n129950 Virginie Boone @vboone \n129951 Roger Voss @vossroger \n129952 Virginie Boone @vboone \n129953 Joe Czerwinski @JoeCz \n129954 Joe Czerwinski @JoeCz \n129955 Joe Czerwinski @JoeCz \n129956 Joe Czerwinski @JoeCz \n129957 Michael Schachner @wineschach \n129958 Joe Czerwinski @JoeCz \n129959 Roger Voss @vossroger \n129960 Roger Voss @vossroger \n129961 Kerin OâKeefe @kerinokeefe \n129962 Kerin OâKeefe @kerinokeefe \n129963 Mike DeSimone @worldwineguys \n129964 Roger Voss @vossroger \n129965 Roger Voss @vossroger \n129966 Anna Lee C. Iijima NaN \n129967 Paul Gregutt @paulgwine \n129968 Roger Voss @vossroger \n129969 Roger Voss @vossroger \n129970 Roger Voss @vossroger \n\n title \\\n0 Nicosia 2013 Vulkà Bianco (Etna) \n1 Quinta dos Avidagos 2011 Avidagos Red (Douro) \n2 Rainstorm 2013 Pinot Gris (Willamette Valley) \n3 St. Julian 2013 Reserve Late Harvest Riesling ... \n4 Sweet Cheeks 2012 Vintner's Reserve Wild Child... \n5 Tandem 2011 Ars In Vitro Tempranillo-Merlot (N... \n6 Terre di Giurfo 2013 Belsito Frappato (Vittoria) \n7 Trimbach 2012 Gewurztraminer (Alsace) \n8 Heinz Eifel 2013 Shine Gewürztraminer (Rheinh... \n9 Jean-Baptiste Adam 2012 Les Natures Pinot Gris... \n10 Kirkland Signature 2011 Mountain Cuvée Cabern... \n11 Leon Beyer 2012 Gewurztraminer (Alsace) \n12 Louis M. Martini 2012 Cabernet Sauvignon (Alex... \n13 Masseria Setteporte 2012 Rosso (Etna) \n14 Mirassou 2012 Chardonnay (Central Coast) \n15 Richard Böcking 2013 Devon Riesling (Mosel) \n16 Felix Lavaque 2010 Felix Malbec (Cafayate) \n17 Gaucho Andino 2011 Winemaker Selection Malbec ... \n18 Pradorey 2010 Vendimia Seleccionada Finca Vald... \n19 Quiévremont 2012 Meritage (Virginia) \n20 Quiévremont 2012 Vin de Maison Red (Virginia) \n21 Acrobat 2013 Pinot Noir (Oregon) \n22 Baglio di Pianetto 2007 Ficiligno White (Sicilia) \n23 Bianchi 2011 Signature Selection Merlot (Paso ... \n24 Canicattì 2009 Aynat Nero d'Avola (Sicilia) \n25 Castello di Amorosa 2011 King Ridge Vineyard P... \n26 Stemmari 2013 Dalila White (Terre Siciliane) \n27 Stemmari 2013 Nero d'Avola (Terre Siciliane) \n28 Terre di Giurfo 2011 Mascaria Barricato (Cera... \n29 Clarksburg Wine Company 2010 Chenin Blanc (Cla... \n... ... \n129941 Apriori 2013 Chardonnay (Mendocino County) \n129942 Arrowood 2010 Cabernet Sauvignon (Sonoma County) \n129943 Baglio del Cristo di Campobello 2012 Adènzia ... \n129944 Barkan 2011 Special Reserve Winemakers' Choice... \n129945 Birichino 2013 Jurassic Park Vineyard Old Vine... \n129946 Bischöfliche Weingüter Trier 2013 Dom Riesli... \n129947 Feudo Principi di Butera 2012 Symposio Red (Te... \n129948 Finca Las Moras 2010 Pedernal Malbec (San Juan) \n129949 Flora Springs 2013 Barrel Fermented Chardonnay... \n129950 Hendry 2012 Blocks 7 & 22 Zinfandel (Napa Valley) \n129951 Henri Schoenheitz 2012 Holder Gewurztraminer (... \n129952 Houdini 2011 Zinfandel (Chiles Valley) \n129953 Mills Reef 2011 Elspeth Cabernet Merlot (Hawke... \n129954 Ara 2013 Single Estate Pinot Gris (Marlborough) \n129955 Dog Point 2012 Chardonnay (Marlborough) \n129956 Esk Valley 2011 Gimblett Gravels Merlot-Cabern... \n129957 Viñedos Real Rubio 2010 Crianza (Rioja) \n129958 Babich 2010 Irongate Red (Hawke's Bay) \n129959 Cave de Turckheim 2010 Brand Grand Cru Pinot G... \n129960 Caves Transmontanas 2006 Vértice Pinot Noir (... \n129961 COS 2013 Frappato (Sicilia) \n129962 Cusumano 2012 Sà gana Tenuta San Giacomo Nero ... \n129963 Dalton 2012 Oak Aged Cabernet Sauvignon (Galilee) \n129964 Domaine Ehrhart 2013 Domaine Saint-Rémy Herre... \n129965 Domaine Rieflé-Landmann 2013 Seppi Landmann V... \n129966 Dr. H. Thanisch (Erben Müller-Burggraef) 2013... \n129967 Citation 2004 Pinot Noir (Oregon) \n129968 Domaine Gresser 2013 Kritt Gewurztraminer (Als... \n129969 Domaine Marcel Deiss 2012 Pinot Gris (Alsace) \n129970 Domaine Schoffit 2012 Lieu-dit Harth Cuvée Ca... \n\n variety winery \n0 White Blend Nicosia \n1 Portuguese Red Quinta dos Avidagos \n2 Pinot Gris Rainstorm \n3 Riesling St. Julian \n4 Pinot Noir Sweet Cheeks \n5 Tempranillo-Merlot Tandem \n6 Frappato Terre di Giurfo \n7 Gewürztraminer Trimbach \n8 Gewürztraminer Heinz Eifel \n9 Pinot Gris Jean-Baptiste Adam \n10 Cabernet Sauvignon Kirkland Signature \n11 Gewürztraminer Leon Beyer \n12 Cabernet Sauvignon Louis M. Martini \n13 Nerello Mascalese Masseria Setteporte \n14 Chardonnay Mirassou \n15 Riesling Richard Böcking \n16 Malbec Felix Lavaque \n17 Malbec Gaucho Andino \n18 Tempranillo Blend Pradorey \n19 Meritage Quiévremont \n20 Red Blend Quiévremont \n21 Pinot Noir Acrobat \n22 White Blend Baglio di Pianetto \n23 Merlot Bianchi \n24 Nero d'Avola Canicattì \n25 Pinot Noir Castello di Amorosa \n26 White Blend Stemmari \n27 Nero d'Avola Stemmari \n28 Red Blend Terre di Giurfo \n29 Chenin Blanc Clarksburg Wine Company \n... ... ... \n129941 Chardonnay Apriori \n129942 Cabernet Sauvignon Arrowood \n129943 Red Blend Baglio del Cristo di Campobello \n129944 Shiraz Barkan \n129945 Chenin Blanc Birichino \n129946 Riesling Bischöfliche Weingüter Trier \n129947 Red Blend Feudo Principi di Butera \n129948 Malbec Finca Las Moras \n129949 Chardonnay Flora Springs \n129950 Zinfandel Hendry \n129951 Gewürztraminer Henri Schoenheitz \n129952 Zinfandel Houdini \n129953 Cabernet Merlot Mills Reef \n129954 Pinot Gris Ara \n129955 Chardonnay Dog Point \n129956 Bordeaux-style Red Blend Esk Valley \n129957 Tempranillo Blend Viñedos Real Rubio \n129958 Bordeaux-style Red Blend Babich \n129959 Pinot Gris Cave de Turckheim \n129960 Pinot Noir Caves Transmontanas \n129961 Frappato COS \n129962 Nero d'Avola Cusumano \n129963 Cabernet Sauvignon Dalton \n129964 Gewürztraminer Domaine Ehrhart \n129965 Pinot Gris Domaine Rieflé-Landmann \n129966 Riesling Dr. H. Thanisch (Erben Müller-Burggraef) \n129967 Pinot Noir Citation \n129968 Gewürztraminer Domaine Gresser \n129969 Pinot Gris Domaine Marcel Deiss \n129970 Gewürztraminer Domaine Schoffit \n\n[129971 rows x 14 columns]\n"
],
[
"print (df.describe())",
" Unnamed: 0 points price\ncount 129971.000000 129971.000000 120975.000000\nmean 64985.000000 88.447138 35.363389\nstd 37519.540256 3.039730 41.022218\nmin 0.000000 80.000000 4.000000\n25% 32492.500000 86.000000 17.000000\n50% 64985.000000 88.000000 25.000000\n75% 97477.500000 91.000000 42.000000\nmax 129970.000000 100.000000 3300.000000\n"
],
[
"df.describe()",
"_____no_output_____"
],
[
"data.columns",
"_____no_output_____"
]
],
[
[
"# Lets find out the mean of the wine score",
"_____no_output_____"
]
],
[
[
"data['points'].mean() #Mean of the dataframe:",
"_____no_output_____"
]
],
[
[
"# Lets find out the column mean of the dataframe",
"_____no_output_____"
]
],
[
[
"df1 = data[['points','price']]\ndf1.mean(axis=0)",
"_____no_output_____"
]
],
[
[
"Note: axis=0 argument calculates the coloumn wise mean of the dataframe",
"_____no_output_____"
]
],
[
[
"# Row Mean of the dataframe:",
"_____no_output_____"
]
],
[
[
"df1.mean(axis=1).head()",
"_____no_output_____"
]
],
[
[
"Note: axis=1 argument calculates the row wise mean of the dataframe",
"_____no_output_____"
]
],
[
[
"# Lets calculate the median of the specific Column",
"_____no_output_____"
]
],
[
[
"data['points'].median()",
"_____no_output_____"
]
],
[
[
"# Lets calculate the mode of the specific column",
"_____no_output_____"
]
],
[
[
"data['points'].mode()",
"_____no_output_____"
]
],
[
[
"# Lets calculate the standard deviation of a data frame ",
"_____no_output_____"
]
],
[
[
"df.std()",
"_____no_output_____"
]
],
[
[
"# Lets calculate the standard deviation of the data frame column wise",
"_____no_output_____"
]
],
[
[
"df.std(axis=0)",
"_____no_output_____"
]
],
[
[
"# WAP - In class exe :Calculate the standard deviation of the data frame row wise?",
"_____no_output_____"
],
[
"# Lets calculate the standard deviation of a specefic column \"points\"",
"_____no_output_____"
]
],
[
[
"df.loc[:,\"points\"].std()",
"_____no_output_____"
]
],
[
[
"# WAP - In class exe :Calculate the standard deviation of a specefic column \"price\"?",
"_____no_output_____"
]
],
[
[
"df.loc[:,\"price\"].std()",
"_____no_output_____"
],
[
"df.var()",
"_____no_output_____"
]
],
[
[
"# WAP - In class exe :Calculate the column and row variance of the data frame?",
"_____no_output_____"
],
[
"# Lets calculate the variance of a specefic column \"points\"",
"_____no_output_____"
]
],
[
[
"df.loc[:,\"points\"].var()",
"_____no_output_____"
]
],
[
[
"# WAP - In class exe :Calculate the variance of a specefic column \"price\"?",
"_____no_output_____"
],
[
"# A complete measures of wine price",
"_____no_output_____"
]
],
[
[
"# dispersion measures\nprint('Min price : {0}'.format(df.price.min())) # minimum\nprint('Max price : {0}'.format(df.price.max())) # maximum\nprint('price range : {0}'.format(df.price.max() - df.price.min())) # range\nprint('25 percentile : {0}'.format(df.price.quantile(.25))) # 25 percentile\nprint('50 percentile : {0}'.format(df.price.quantile(.5))) # 50 percentile\nprint('75 percentile : {0}'.format(df.price.quantile(.75))) # 75 percentile\nprint('Variance price : {0}'.format(df.price.var())) # variance\nprint('Standard deviation price : {0}'.format(df.price.std())) # standard deviation",
"Min price : 4.0\nMax price : 3300.0\nprice range : 3296.0\n25 percentile : 17.0\n50 percentile : 25.0\n75 percentile : 42.0\nVariance price : 1682.82234241\nStandard deviation price : 41.0222176681\n"
]
],
[
[
"# Visualization: Seaborne and matplotlib",
"_____no_output_____"
]
],
[
[
"Lets use the same wine dataset for visualization",
"_____no_output_____"
]
],
[
[
"import seaborn as sns\nimport matplotlib.pyplot as plt",
"_____no_output_____"
]
],
[
[
"# Lets display a Seaborn distplot",
"_____no_output_____"
]
],
[
[
"sns.distplot(df['points'])\nplt.show()",
"/Users/aniruddhakalbande/anaconda2/lib/python2.7/site-packages/matplotlib/axes/_axes.py:6462: UserWarning: The 'normed' kwarg is deprecated, and has been replaced by the 'density' kwarg.\n warnings.warn(\"The 'normed' kwarg is deprecated, and has been \"\n"
]
],
[
[
"# Lets display a Seaborn distplot with dark background",
"_____no_output_____"
]
],
[
[
"sns.set_style('dark')\nsns.distplot(df['points'])\nplt.show()\n\n# Clear the figure\nplt.clf()",
"/Users/aniruddhakalbande/anaconda2/lib/python2.7/site-packages/matplotlib/axes/_axes.py:6462: UserWarning: The 'normed' kwarg is deprecated, and has been replaced by the 'density' kwarg.\n warnings.warn(\"The 'normed' kwarg is deprecated, and has been \"\n"
]
],
[
[
"# WAP - In class exe :Display a distplot for \"price\"?",
"_____no_output_____"
],
[
"# Lets display a distplot of \"price\" in 20 different bins",
"_____no_output_____"
]
],
[
[
"# Create a distplot\nsns.distplot(df['points'],\n kde=False,\n bins=20)\n\n# Display a plot\nplt.show()",
"/Users/aniruddhakalbande/anaconda2/lib/python2.7/site-packages/matplotlib/axes/_axes.py:6462: UserWarning: The 'normed' kwarg is deprecated, and has been replaced by the 'density' kwarg.\n warnings.warn(\"The 'normed' kwarg is deprecated, and has been \"\n"
]
],
[
[
"# Lets plot a histogram for points",
"_____no_output_____"
]
],
[
[
"df['points'].plot.hist()\nplt.show()\nplt.clf()",
"_____no_output_____"
]
],
[
[
"# WAP - In class exe :Plot histogram for \"price\"?",
"_____no_output_____"
],
[
"# Lets plot the same histogram with a default seaborn style",
"_____no_output_____"
]
],
[
[
"# Set the default seaborn style\nsns.set()\n\n# Plot the pandas histogram again\ndf['points'].plot.hist()\nplt.show()\nplt.clf()",
"_____no_output_____"
]
],
[
[
"# Lets display the above histogram with whitegrid using seaborn",
"_____no_output_____"
]
],
[
[
"# Plot with a whitegrid style\nsns.set()\nsns.set_style('whitegrid')\n# Plot the pandas histogram again\ndf['points'].plot.hist()\nplt.show()\nplt.clf() #clears the graph",
"_____no_output_____"
]
],
[
[
"# Lets create a box plot for points and price",
"_____no_output_____"
]
],
[
[
"#Create a boxplot\nsns.boxplot(data=df,\n x='points',\n y='price')\n\nplt.show()\nplt.clf()",
"_____no_output_____"
]
],
[
[
"# Lets create a bar plot for points and price",
"_____no_output_____"
]
],
[
[
"sns.barplot(data=df,\n x='points',\n y='price')\n\nplt.show()\nplt.clf()",
"_____no_output_____"
]
],
[
[
"# Lets create scatter plot with respect to country and price",
"_____no_output_____"
]
],
[
[
"sns.regplot(data=df,\n y='points',\n x=\"price\",\n fit_reg=False)\n\nplt.show()\nplt.clf()",
"_____no_output_____"
]
],
[
[
"# Lets check the skewness of the data",
"_____no_output_____"
]
],
[
[
"df.skew() #skewness value > 0 means that there is more weight in the left tail of the distribution.",
"_____no_output_____"
],
[
"print('skewness for points : {0:.2f}'.format(df.points.skew()))",
"skewness for points : 0.05\n"
],
[
"print('skewness for price : {0:.2f}'.format(df.price.skew()))",
"skewness for price : 18.00\n"
]
],
[
[
"# Outlier detection and treatment ",
"_____no_output_____"
]
],
[
[
"We are using the boston housing data set for this.",
"_____no_output_____"
]
],
[
[
"from sklearn.datasets import load_boston\nboston = load_boston()\nx = boston.data\ny = boston.target\ncolumns = boston.feature_names",
"_____no_output_____"
],
[
"#create the dataframe\nboston_df = pd.DataFrame(boston.data)\nboston_df.columns = columns\nboston_df.head()",
"_____no_output_____"
]
],
[
[
"# Lets detect the outliers using visulaization tool",
"_____no_output_____"
],
[
"# 1.Boxplot",
"_____no_output_____"
]
],
[
[
"import seaborn as sns\nimport matplotlib.pyplot as plt\nsns.boxplot(x=boston_df['DIS'])",
"_____no_output_____"
]
],
[
[
"Above plot shows three points between 10 to 12",
"_____no_output_____"
]
],
[
[
"# 2.Scatter plot",
"_____no_output_____"
]
],
[
[
"fig, ax = plt.subplots(figsize=(16,8))\nax.scatter(boston_df['INDUS'], boston_df['TAX'])\nax.set_xlabel('Proportion of non-retail business acres per town')\nax.set_ylabel('Full-value property-tax rate per $10,000')\nplt.show()",
"_____no_output_____"
]
],
[
[
"we can see most of data points are lying bottom left side but there are points which are far from the population like top right corner.",
"_____no_output_____"
]
],
[
[
"# Lets detect the outliers using mathematical functions",
"_____no_output_____"
],
[
"# 1. Z-score",
"_____no_output_____"
]
],
[
[
"from scipy import stats\nimport numpy as np\nz = np.abs(stats.zscore(boston_df))\nprint(z)",
"[[0.41771335 0.28482986 1.2879095 ... 1.45900038 0.44105193 1.0755623 ]\n [0.41526932 0.48772236 0.59338101 ... 0.30309415 0.44105193 0.49243937]\n [0.41527165 0.48772236 0.59338101 ... 0.30309415 0.39642699 1.2087274 ]\n ...\n [0.41137448 0.48772236 0.11573841 ... 1.17646583 0.44105193 0.98304761]\n [0.40568883 0.48772236 0.11573841 ... 1.17646583 0.4032249 0.86530163]\n [0.41292893 0.48772236 0.11573841 ... 1.17646583 0.44105193 0.66905833]]\n"
]
],
[
[
"It is difficult to say which data point is an outlier. Let’s try and define a threshold to identify an outlier.",
"_____no_output_____"
]
],
[
[
"# Lets define threshold for the above z-score to identify the outlier.",
"_____no_output_____"
]
],
[
[
"threshold = 3\nprint(np.where(z > 3))",
"(array([ 55, 56, 57, 102, 141, 142, 152, 154, 155, 160, 162, 163, 199,\n 200, 201, 202, 203, 204, 208, 209, 210, 211, 212, 216, 218, 219,\n 220, 221, 222, 225, 234, 236, 256, 257, 262, 269, 273, 274, 276,\n 277, 282, 283, 283, 284, 347, 351, 352, 353, 353, 354, 355, 356,\n 357, 358, 363, 364, 364, 365, 367, 369, 370, 372, 373, 374, 374,\n 380, 398, 404, 405, 406, 410, 410, 411, 412, 412, 414, 414, 415,\n 416, 418, 418, 419, 423, 424, 425, 426, 427, 427, 429, 431, 436,\n 437, 438, 445, 450, 454, 455, 456, 457, 466]), array([ 1, 1, 1, 11, 12, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1,\n 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 3, 1, 5,\n 5, 3, 3, 3, 3, 3, 3, 1, 3, 1, 1, 7, 7, 1, 7, 7, 7,\n 3, 3, 3, 3, 3, 5, 5, 5, 3, 3, 3, 12, 5, 12, 0, 0, 0,\n 0, 5, 0, 11, 11, 11, 12, 0, 12, 11, 11, 0, 11, 11, 11, 11, 11,\n 11, 0, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11]))\n"
]
],
[
[
"The first array contains the list of row numbers and second array respective column numbers, which mean z[55][1] have a Z-score higher than 3.",
"_____no_output_____"
]
],
[
[
"print(z[55][1])",
"3.375038763517309\n"
]
],
[
[
"The data point — 55th record on column ZN is an outlier.",
"_____no_output_____"
]
],
[
[
"# 2. IQR score",
"_____no_output_____"
]
],
[
[
"Q1 = boston_df.quantile(0.25)\nQ3 = boston_df.quantile(0.75)\nIQR = Q3 - Q1\nprint(IQR)",
"CRIM 3.565378\nZN 12.500000\nINDUS 12.910000\nCHAS 0.000000\nNOX 0.175000\nRM 0.738000\nAGE 49.050000\nDIS 3.088250\nRAD 20.000000\nTAX 387.000000\nPTRATIO 2.800000\nB 20.847500\nLSTAT 10.005000\ndtype: float64\n"
],
[
"print(boston_df < (Q1 - 1.5 * IQR)) |(boston_df > (Q3 + 1.5 * IQR))",
" CRIM ZN INDUS CHAS NOX RM AGE DIS RAD TAX \\\n0 False False False False False False False False False False \n1 False False False False False False False False False False \n2 False False False False False False False False False False \n3 False False False False False False False False False False \n4 False False False False False False False False False False \n5 False False False False False False False False False False \n6 False False False False False False False False False False \n7 False False False False False False False False False False \n8 False False False False False False False False False False \n9 False False False False False False False False False False \n10 False False False False False False False False False False \n11 False False False False False False False False False False \n12 False False False False False False False False False False \n13 False False False False False False False False False False \n14 False False False False False False False False False False \n15 False False False False False False False False False False \n16 False False False False False False False False False False \n17 False False False False False False False False False False \n18 False False False False False False False False False False \n19 False False False False False False False False False False \n20 False False False False False False False False False False \n21 False False False False False False False False False False \n22 False False False False False False False False False False \n23 False False False False False False False False False False \n24 False False False False False False False False False False \n25 False False False False False False False False False False \n26 False False False False False False False False False False \n27 False False False False False False False False False False \n28 False False False False False False False False False False \n29 False False False False False False False False False False \n.. ... ... ... ... ... ... ... ... ... ... \n476 False False False False False False False False False False \n477 True False False False False False False False False False \n478 True False False False False False False False False False \n479 True False False False False False False False False False \n480 False False False False False False False False False False \n481 False False False False False False False False False False \n482 False False False False False False False False False False \n483 False False False False False False False False False False \n484 False False False False False False False False False False \n485 False False False False False False False False False False \n486 False False False False False False False False False False \n487 False False False False False False False False False False \n488 False False False False False False False False False False \n489 False False False False False False False False False False \n490 False False False False False False False False False False \n491 False False False False False False False False False False \n492 False False False False False False False False False False \n493 False False False False False False False False False False \n494 False False False False False False False False False False \n495 False False False False False False False False False False \n496 False False False False False False False False False False \n497 False False False False False False False False False False \n498 False False False False False False False False False False \n499 False False False False False False False False False False \n500 False False False False False False False False False False \n501 False False False False False False False False False False \n502 False False False False False False False False False False \n503 False False False False False False False False False False \n504 False False False False False False False False False False \n505 False False False False False False False False False False \n\n PTRATIO B LSTAT \n0 False False False \n1 False False False \n2 False False False \n3 False False False \n4 False False False \n5 False False False \n6 False False False \n7 False False False \n8 False False False \n9 False False False \n10 False False False \n11 False False False \n12 False False False \n13 False False False \n14 False False False \n15 False False False \n16 False False False \n17 False False False \n18 False True False \n19 False False False \n20 False False False \n21 False False False \n22 False False False \n23 False False False \n24 False False False \n25 False True False \n26 False False False \n27 False True False \n28 False False False \n29 False False False \n.. ... ... ... \n476 False False False \n477 False False False \n478 False False False \n479 False False False \n480 False False False \n481 False False False \n482 False False False \n483 False False False \n484 False False False \n485 False False False \n486 False False False \n487 False False False \n488 False False False \n489 False True False \n490 False True False \n491 False False False \n492 False False False \n493 False False False \n494 False False False \n495 False False False \n496 False False False \n497 False False False \n498 False False False \n499 False False False \n500 False False False \n501 False False False \n502 False False False \n503 False False False \n504 False False False \n505 False False False \n\n[506 rows x 13 columns]\n"
]
],
[
[
"The data point where we have False that means these values are valid whereas True indicates presence of an outlier.",
"_____no_output_____"
]
],
[
[
"# Working with Outliers: Correcting, Removing",
"_____no_output_____"
],
[
"# 1. Z-score",
"_____no_output_____"
]
],
[
[
"boston_df_1 = boston_df[(z < 3).all(axis=1)]\nprint(boston_df_1)",
" CRIM ZN INDUS CHAS NOX RM AGE DIS RAD TAX \\\n0 0.00632 18.0 2.31 0.0 0.538 6.575 65.2 4.0900 1.0 296.0 \n1 0.02731 0.0 7.07 0.0 0.469 6.421 78.9 4.9671 2.0 242.0 \n2 0.02729 0.0 7.07 0.0 0.469 7.185 61.1 4.9671 2.0 242.0 \n3 0.03237 0.0 2.18 0.0 0.458 6.998 45.8 6.0622 3.0 222.0 \n4 0.06905 0.0 2.18 0.0 0.458 7.147 54.2 6.0622 3.0 222.0 \n5 0.02985 0.0 2.18 0.0 0.458 6.430 58.7 6.0622 3.0 222.0 \n6 0.08829 12.5 7.87 0.0 0.524 6.012 66.6 5.5605 5.0 311.0 \n7 0.14455 12.5 7.87 0.0 0.524 6.172 96.1 5.9505 5.0 311.0 \n8 0.21124 12.5 7.87 0.0 0.524 5.631 100.0 6.0821 5.0 311.0 \n9 0.17004 12.5 7.87 0.0 0.524 6.004 85.9 6.5921 5.0 311.0 \n10 0.22489 12.5 7.87 0.0 0.524 6.377 94.3 6.3467 5.0 311.0 \n11 0.11747 12.5 7.87 0.0 0.524 6.009 82.9 6.2267 5.0 311.0 \n12 0.09378 12.5 7.87 0.0 0.524 5.889 39.0 5.4509 5.0 311.0 \n13 0.62976 0.0 8.14 0.0 0.538 5.949 61.8 4.7075 4.0 307.0 \n14 0.63796 0.0 8.14 0.0 0.538 6.096 84.5 4.4619 4.0 307.0 \n15 0.62739 0.0 8.14 0.0 0.538 5.834 56.5 4.4986 4.0 307.0 \n16 1.05393 0.0 8.14 0.0 0.538 5.935 29.3 4.4986 4.0 307.0 \n17 0.78420 0.0 8.14 0.0 0.538 5.990 81.7 4.2579 4.0 307.0 \n18 0.80271 0.0 8.14 0.0 0.538 5.456 36.6 3.7965 4.0 307.0 \n19 0.72580 0.0 8.14 0.0 0.538 5.727 69.5 3.7965 4.0 307.0 \n20 1.25179 0.0 8.14 0.0 0.538 5.570 98.1 3.7979 4.0 307.0 \n21 0.85204 0.0 8.14 0.0 0.538 5.965 89.2 4.0123 4.0 307.0 \n22 1.23247 0.0 8.14 0.0 0.538 6.142 91.7 3.9769 4.0 307.0 \n23 0.98843 0.0 8.14 0.0 0.538 5.813 100.0 4.0952 4.0 307.0 \n24 0.75026 0.0 8.14 0.0 0.538 5.924 94.1 4.3996 4.0 307.0 \n25 0.84054 0.0 8.14 0.0 0.538 5.599 85.7 4.4546 4.0 307.0 \n26 0.67191 0.0 8.14 0.0 0.538 5.813 90.3 4.6820 4.0 307.0 \n27 0.95577 0.0 8.14 0.0 0.538 6.047 88.8 4.4534 4.0 307.0 \n28 0.77299 0.0 8.14 0.0 0.538 6.495 94.4 4.4547 4.0 307.0 \n29 1.00245 0.0 8.14 0.0 0.538 6.674 87.3 4.2390 4.0 307.0 \n.. ... ... ... ... ... ... ... ... ... ... \n476 4.87141 0.0 18.10 0.0 0.614 6.484 93.6 2.3053 24.0 666.0 \n477 15.02340 0.0 18.10 0.0 0.614 5.304 97.3 2.1007 24.0 666.0 \n478 10.23300 0.0 18.10 0.0 0.614 6.185 96.7 2.1705 24.0 666.0 \n479 14.33370 0.0 18.10 0.0 0.614 6.229 88.0 1.9512 24.0 666.0 \n480 5.82401 0.0 18.10 0.0 0.532 6.242 64.7 3.4242 24.0 666.0 \n481 5.70818 0.0 18.10 0.0 0.532 6.750 74.9 3.3317 24.0 666.0 \n482 5.73116 0.0 18.10 0.0 0.532 7.061 77.0 3.4106 24.0 666.0 \n483 2.81838 0.0 18.10 0.0 0.532 5.762 40.3 4.0983 24.0 666.0 \n484 2.37857 0.0 18.10 0.0 0.583 5.871 41.9 3.7240 24.0 666.0 \n485 3.67367 0.0 18.10 0.0 0.583 6.312 51.9 3.9917 24.0 666.0 \n486 5.69175 0.0 18.10 0.0 0.583 6.114 79.8 3.5459 24.0 666.0 \n487 4.83567 0.0 18.10 0.0 0.583 5.905 53.2 3.1523 24.0 666.0 \n488 0.15086 0.0 27.74 0.0 0.609 5.454 92.7 1.8209 4.0 711.0 \n489 0.18337 0.0 27.74 0.0 0.609 5.414 98.3 1.7554 4.0 711.0 \n490 0.20746 0.0 27.74 0.0 0.609 5.093 98.0 1.8226 4.0 711.0 \n491 0.10574 0.0 27.74 0.0 0.609 5.983 98.8 1.8681 4.0 711.0 \n492 0.11132 0.0 27.74 0.0 0.609 5.983 83.5 2.1099 4.0 711.0 \n493 0.17331 0.0 9.69 0.0 0.585 5.707 54.0 2.3817 6.0 391.0 \n494 0.27957 0.0 9.69 0.0 0.585 5.926 42.6 2.3817 6.0 391.0 \n495 0.17899 0.0 9.69 0.0 0.585 5.670 28.8 2.7986 6.0 391.0 \n496 0.28960 0.0 9.69 0.0 0.585 5.390 72.9 2.7986 6.0 391.0 \n497 0.26838 0.0 9.69 0.0 0.585 5.794 70.6 2.8927 6.0 391.0 \n498 0.23912 0.0 9.69 0.0 0.585 6.019 65.3 2.4091 6.0 391.0 \n499 0.17783 0.0 9.69 0.0 0.585 5.569 73.5 2.3999 6.0 391.0 \n500 0.22438 0.0 9.69 0.0 0.585 6.027 79.7 2.4982 6.0 391.0 \n501 0.06263 0.0 11.93 0.0 0.573 6.593 69.1 2.4786 1.0 273.0 \n502 0.04527 0.0 11.93 0.0 0.573 6.120 76.7 2.2875 1.0 273.0 \n503 0.06076 0.0 11.93 0.0 0.573 6.976 91.0 2.1675 1.0 273.0 \n504 0.10959 0.0 11.93 0.0 0.573 6.794 89.3 2.3889 1.0 273.0 \n505 0.04741 0.0 11.93 0.0 0.573 6.030 80.8 2.5050 1.0 273.0 \n\n PTRATIO B LSTAT \n0 15.3 396.90 4.98 \n1 17.8 396.90 9.14 \n2 17.8 392.83 4.03 \n3 18.7 394.63 2.94 \n4 18.7 396.90 5.33 \n5 18.7 394.12 5.21 \n6 15.2 395.60 12.43 \n7 15.2 396.90 19.15 \n8 15.2 386.63 29.93 \n9 15.2 386.71 17.10 \n10 15.2 392.52 20.45 \n11 15.2 396.90 13.27 \n12 15.2 390.50 15.71 \n13 21.0 396.90 8.26 \n14 21.0 380.02 10.26 \n15 21.0 395.62 8.47 \n16 21.0 386.85 6.58 \n17 21.0 386.75 14.67 \n18 21.0 288.99 11.69 \n19 21.0 390.95 11.28 \n20 21.0 376.57 21.02 \n21 21.0 392.53 13.83 \n22 21.0 396.90 18.72 \n23 21.0 394.54 19.88 \n24 21.0 394.33 16.30 \n25 21.0 303.42 16.51 \n26 21.0 376.88 14.81 \n27 21.0 306.38 17.28 \n28 21.0 387.94 12.80 \n29 21.0 380.23 11.98 \n.. ... ... ... \n476 20.2 396.21 18.68 \n477 20.2 349.48 24.91 \n478 20.2 379.70 18.03 \n479 20.2 383.32 13.11 \n480 20.2 396.90 10.74 \n481 20.2 393.07 7.74 \n482 20.2 395.28 7.01 \n483 20.2 392.92 10.42 \n484 20.2 370.73 13.34 \n485 20.2 388.62 10.58 \n486 20.2 392.68 14.98 \n487 20.2 388.22 11.45 \n488 20.1 395.09 18.06 \n489 20.1 344.05 23.97 \n490 20.1 318.43 29.68 \n491 20.1 390.11 18.07 \n492 20.1 396.90 13.35 \n493 19.2 396.90 12.01 \n494 19.2 396.90 13.59 \n495 19.2 393.29 17.60 \n496 19.2 396.90 21.14 \n497 19.2 396.90 14.10 \n498 19.2 396.90 12.92 \n499 19.2 395.77 15.10 \n500 19.2 396.90 14.33 \n501 21.0 391.99 9.67 \n502 21.0 396.90 9.08 \n503 21.0 396.90 5.64 \n504 21.0 393.45 6.48 \n505 21.0 396.90 7.88 \n\n[415 rows x 13 columns]\n"
]
],
[
[
"The above code removed around 90+ rows from the dataset i.e. outliers have been removed.",
"_____no_output_____"
]
],
[
[
"# 2. IQR Score",
"_____no_output_____"
]
],
[
[
"boston_df_out = boston_df[~((boston_df < (Q1 - 1.5 * IQR)) |(boston_df > (Q3 + 1.5 * IQR))).any(axis=1)]\nboston_df_out.shape",
"_____no_output_____"
]
],
[
[
"# Missing value treatment and detection ",
"_____no_output_____"
]
],
[
[
"We would be using the wine dataset here..",
"_____no_output_____"
]
],
[
[
"# Lets find out the total NAN value in the data",
"_____no_output_____"
]
],
[
[
"data.isnull().sum()",
"_____no_output_____"
]
],
[
[
"# Lets drop the null or missing values",
"_____no_output_____"
]
],
[
[
"df.dropna()",
"_____no_output_____"
],
[
"df.info()",
"<class 'pandas.core.frame.DataFrame'>\nRangeIndex: 129971 entries, 0 to 129970\nData columns (total 14 columns):\nUnnamed: 0 129971 non-null int64\ncountry 129908 non-null object\ndescription 129971 non-null object\ndesignation 92506 non-null object\npoints 129971 non-null int64\nprice 120975 non-null float64\nprovince 129908 non-null object\nregion_1 108724 non-null object\nregion_2 50511 non-null object\ntaster_name 103727 non-null object\ntaster_twitter_handle 98758 non-null object\ntitle 129971 non-null object\nvariety 129970 non-null object\nwinery 129971 non-null object\ndtypes: float64(1), int64(2), object(11)\nmemory usage: 13.9+ MB\n"
]
],
[
[
"# Lets fill the missing values with a mean value",
"_____no_output_____"
]
],
[
[
"mean_value=df['price'].mean()\ndf['price']=df['price'].fillna(mean_value) #fill null values ",
"_____no_output_____"
]
],
[
[
"# Lets fill the missing values with a median value",
"_____no_output_____"
]
],
[
[
"median_value=df['price'].median()\ndf['price']=df['price'].fillna(median_value) ",
"_____no_output_____"
]
],
[
[
"# Lets fille the missing values using back fill.",
"_____no_output_____"
]
],
[
[
"df.fillna(method='bfill')",
"_____no_output_____"
]
],
[
[
"# Lets fille the missing values using forward fill.",
"_____no_output_____"
]
],
[
[
"df.fillna(method='ffill')",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"raw",
"markdown",
"code",
"raw",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"raw",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"raw",
"code",
"markdown",
"code",
"raw",
"markdown",
"code",
"raw",
"markdown",
"code",
"raw",
"markdown",
"code",
"raw",
"code",
"raw",
"markdown",
"code",
"raw",
"markdown",
"code",
"raw",
"markdown",
"code",
"markdown",
"raw",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code"
] |
[
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"raw"
],
[
"markdown"
],
[
"code"
],
[
"raw"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"raw"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"raw"
],
[
"code",
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"raw"
],
[
"markdown"
],
[
"code"
],
[
"raw"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"raw"
],
[
"markdown"
],
[
"code"
],
[
"raw"
],
[
"code"
],
[
"raw"
],
[
"markdown"
],
[
"code",
"code"
],
[
"raw"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"raw"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"raw"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
]
] |
4ae9612a0448c95e474e9d8aa25ff03d63a90147
| 4,018 |
ipynb
|
Jupyter Notebook
|
torch/2.Gradients.ipynb
|
rishuatgithub/MLPy
|
603fdc86a1d56c41e8199b94f96a19f35c719586
|
[
"Apache-2.0"
] | null | null | null |
torch/2.Gradients.ipynb
|
rishuatgithub/MLPy
|
603fdc86a1d56c41e8199b94f96a19f35c719586
|
[
"Apache-2.0"
] | 1 |
2022-03-12T00:55:20.000Z
|
2022-03-12T00:55:20.000Z
|
torch/2.Gradients.ipynb
|
rishuatgithub/MLPy
|
603fdc86a1d56c41e8199b94f96a19f35c719586
|
[
"Apache-2.0"
] | 3 |
2021-04-15T08:10:01.000Z
|
2021-11-04T17:57:51.000Z
| 17.318966 | 65 | 0.441264 |
[
[
[
"import torch\nimport numpy as np\nimport matplotlib as plt",
"_____no_output_____"
],
[
"x = torch.tensor(2.0, requires_grad=True)",
"_____no_output_____"
],
[
"x",
"_____no_output_____"
],
[
"y = 2*x**4 + x**3 + 3*x**2 + 5*x + 1",
"_____no_output_____"
],
[
"y",
"_____no_output_____"
],
[
"y.backward() ## calculate the derivative",
"_____no_output_____"
],
[
"x.grad ## print the gradient w.r.t x",
"_____no_output_____"
]
],
[
[
"### Backward Propagation",
"_____no_output_____"
]
],
[
[
"x = torch.tensor([[1.,2,3],[3,2,1]], requires_grad=True)\nprint(x)",
"tensor([[1., 2., 3.],\n [3., 2., 1.]], requires_grad=True)\n"
],
[
"y = 3*x + 2 ## y=3x+2\nprint(y)",
"tensor([[ 5., 8., 11.],\n [11., 8., 5.]], grad_fn=<AddBackward0>)\n"
],
[
"z = 2*y**2 ## x=2y+2\nprint(z)",
"tensor([[ 50., 128., 242.],\n [242., 128., 50.]], grad_fn=<MulBackward0>)\n"
],
[
"out = z.mean()\nprint(out)",
"tensor(140., grad_fn=<MeanBackward0>)\n"
],
[
"out.backward()\nprint(x.grad)",
"tensor([[10., 16., 22.],\n [22., 16., 10.]])\n"
]
]
] |
[
"code",
"markdown",
"code"
] |
[
[
"code",
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code"
]
] |
4ae966b98e73f65c7f5293387bf912f8deba8231
| 645,740 |
ipynb
|
Jupyter Notebook
|
code/CH01/CH01_SEC02.ipynb
|
ksang/data-book-python
|
08b5d3ae76980628887bc1ab2e17d83ddf07b00c
|
[
"MIT"
] | 1 |
2022-01-22T03:45:05.000Z
|
2022-01-22T03:45:05.000Z
|
code/CH01/CH01_SEC02.ipynb
|
ksang/data-book-python
|
08b5d3ae76980628887bc1ab2e17d83ddf07b00c
|
[
"MIT"
] | null | null | null |
code/CH01/CH01_SEC02.ipynb
|
ksang/data-book-python
|
08b5d3ae76980628887bc1ab2e17d83ddf07b00c
|
[
"MIT"
] | null | null | null | 3,627.752809 | 195,012 | 0.962787 |
[
[
[
"from matplotlib.image import imread\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport os\nplt.rcParams['figure.figsize'] = [16, 8]\n\n\nA = imread('dog.jpg')\nX = np.mean(A, -1); # Convert RGB to grayscale\n\nimg = plt.imshow(X)\nimg.set_cmap('gray')\nplt.axis('off')\nplt.show()",
"_____no_output_____"
],
[
"U, S, VT = np.linalg.svd(X,full_matrices=False)\nS = np.diag(S)\n\nj = 0\nfor r in (5, 20, 100):\n # Construct approximate image\n Xapprox = U[:,:r] @ S[0:r,:r] @ VT[:r,:]\n plt.figure(j+1)\n j += 1\n img = plt.imshow(Xapprox)\n img.set_cmap('gray')\n plt.axis('off')\n plt.title('r = ' + str(r))\n plt.show()",
"_____no_output_____"
],
[
"## f_ch01_ex02_2\n\nplt.figure(1)\nplt.semilogy(np.diag(S))\nplt.title('Singular Values')\nplt.show()\n\nplt.figure(2)\nplt.plot(np.cumsum(np.diag(S))/np.sum(np.diag(S)))\nplt.title('Singular Values: Cumulative Sum')\nplt.show()",
"_____no_output_____"
]
]
] |
[
"code"
] |
[
[
"code",
"code",
"code"
]
] |
4ae9720627ed673a4def84c29a0c999bc417d04f
| 40,652 |
ipynb
|
Jupyter Notebook
|
docs/contents/basic/convert.ipynb
|
dprada/molsysmt
|
83f150bfe3cfa7603566a0ed4aed79d9b0c97f5d
|
[
"MIT"
] | null | null | null |
docs/contents/basic/convert.ipynb
|
dprada/molsysmt
|
83f150bfe3cfa7603566a0ed4aed79d9b0c97f5d
|
[
"MIT"
] | null | null | null |
docs/contents/basic/convert.ipynb
|
dprada/molsysmt
|
83f150bfe3cfa7603566a0ed4aed79d9b0c97f5d
|
[
"MIT"
] | null | null | null | 38.314797 | 516 | 0.508437 |
[
[
[
"%load_ext autoreload\n%autoreload 2",
"_____no_output_____"
],
[
"import molsysmt as msm",
"Warning: importing 'simtk.openmm' is deprecated. Import 'openmm' instead.\n"
]
],
[
[
"# Convert\n\nThe meaning of molecular system 'form', in the context of MolSysMT, has been described previously in the section XXX. There is in MolSysMT a method to convert a form into other form: `molsysmt.convert()`. This method is the keystone of this library, the hinge all other methods and tools in MolSysMT rotates on. And in addition, the joining piece connecting the pipes of your work-flow when using different python libraries.\n\nThe method `molsysmt.convert()` requires at least two input arguments: the original pre-existing item in whatever form accepted by MolSysMT (see XXX), and the name of the output form: ",
"_____no_output_____"
]
],
[
[
"molecular_system = msm.convert('pdb_id:1TCD', 'molsysmt.MolSys')",
"/home/diego/projects/molsysmt/molsysmt/native/io/topology/mmtf_MMTFDecoder.py:27: UserWarning: The structure in the PDB has biological assemblies. There are geometrical transformations proposed in the structure. See the following issue in the source code repository: https://github.com/uibcdf/MolSysMT/issues/33\n warnings.warn(warning_message)\n"
]
],
[
[
"The id code `1TCD` from the Protein Data Bank is converted into a native `molsysmt.MolSys` python object. At this point, you probably think that this operation can also be done with the method `molsysmt.load()`. And you are right. Actually, `molsysmt.load()` is nothing but an alias of `molsysmt.convert()`. Although redundant, a loading method was included in MolSysMT just for the sake of intuitive usability. But it could be removed from the library since `molsysmt.convert()` has the same functionality.\n\nThe following cells illustrate some conversions you can do with `molsysmt.convert()`:",
"_____no_output_____"
]
],
[
[
"msm.get_form('1sux.pdb')",
"_____no_output_____"
],
[
"msm.convert('pdb_id:1SUX', '1sux.pdb') # fetching a pdb file to save it locally",
"_____no_output_____"
],
[
"msm.convert('pdb_id:1SUX', '1sux.mmtf') # fetching an mmtf to save it locally",
"_____no_output_____"
],
[
"pdb_file = msm.demo['TcTIM']['1tcd.pdb']\nmolecular_system = msm.convert(pdb_file, 'mdtraj.Trajectory') # loading a pdb file as an mdtraj.Trajectory object",
"_____no_output_____"
],
[
"seq_aa1 = msm.convert(molecular_system, 'string:aminoacids1') # converting an mdtraj.Trajectory into a sequence form",
"_____no_output_____"
]
],
[
[
"## How to convert just a selection",
"_____no_output_____"
],
[
"The conversion can be done over the entiry system or over a part of it. The input argument `selection` works with most of the MolSysMT methods, with `molsysmt.convert()` also. To know more about how to perform selections there is a section on this documentation entitled \"XXX\". By now, lets see some simple selections to see how it operates: ",
"_____no_output_____"
]
],
[
[
"pdb_file = msm.demo['TcTIM']['1tcd.pdb']\nwhole_molecular_system = msm.convert(pdb_file, to_form='openmm.Topology')",
"_____no_output_____"
],
[
"msm.info(whole_molecular_system)",
"_____no_output_____"
],
[
"aa = msm.convert(pdb_file, to_form='string:pdb_text')",
"_____no_output_____"
],
[
"msm.get_form(aa)",
"_____no_output_____"
],
[
"molecular_system = msm.convert(pdb_file, to_form='openmm.Topology',\n selection='molecule_type==\"protein\"')",
"_____no_output_____"
],
[
"msm.info(molecular_system)",
"_____no_output_____"
]
],
[
[
"## How to combine multiple forms into one",
"_____no_output_____"
],
[
"Sometimes the molecular system comes from the combination of more than a form. For example, we can have two files with topology and coordinates to be converted into an only molecular form:",
"_____no_output_____"
]
],
[
[
"prmtop_file = msm.demo['pentalanine']['pentalanine.prmtop']\ninpcrd_file = msm.demo['pentalanine']['pentalanine.inpcrd']\nmolecular_system = msm.convert([prmtop_file, inpcrd_file], to_form='molsysmt.MolSys')",
"_____no_output_____"
],
[
"msm.info(molecular_system)",
"_____no_output_____"
]
],
[
[
"## How to convert a form into multiple ones at once",
"_____no_output_____"
],
[
"In the previous section the way to convert multiple forms into one was illustrated. Lets see now how to produce more than an output form in just a single line:",
"_____no_output_____"
]
],
[
[
"h5_file = msm.demo['pentalanine']['traj.h5']\ntopology, trajectory = msm.convert(h5_file, to_form=['molsysmt.Topology','molsysmt.Trajectory'])",
"/home/diego/Myopt/miniconda3/envs/MolSysMT/lib/python3.7/site-packages/tables/leaf.py:544: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray.\n key = numpy.array(key)\n"
],
[
"msm.info(topology)",
"_____no_output_____"
],
[
"msm.info(trajectory)",
"_____no_output_____"
],
[
"msm.info([topology, trajectory])",
"_____no_output_____"
]
],
[
[
"Lets now combine both forms into one to see their were properly converted:",
"_____no_output_____"
]
],
[
[
"pdb_string = msm.convert([topology, trajectory], to_form='string:pdb_text', frame_indices=0)\nprint(pdb_string)",
"REMARK 1 CREATED WITH OPENMM 7.6 BY MOLSYSMT 0.0.4, 2021-11-03\nHETATM 1 H1 ACE 0 1 7.249 2.812 -0.651 1.00 0.00 H \nHETATM 2 CH3 ACE 0 1 8.184 3.354 -0.797 1.00 0.00 C \nHETATM 3 H2 ACE 0 1 8.246 3.843 -1.769 1.00 0.00 H \nHETATM 4 H3 ACE 0 1 8.879 2.516 -0.838 1.00 0.00 H \nHETATM 5 C ACE 0 1 8.514 4.229 0.378 1.00 0.00 C \nHETATM 6 O ACE 0 1 9.025 3.617 1.320 1.00 0.00 O \nATOM 7 N ALA 0 2 8.131 5.505 0.206 1.00 0.00 N \nATOM 8 H ALA 0 2 7.661 5.747 -0.654 1.00 0.00 H \nATOM 9 CA ALA 0 2 8.375 6.544 1.175 1.00 0.00 C \nATOM 10 HA ALA 0 2 8.686 6.060 2.100 1.00 0.00 H \nATOM 11 CB ALA 0 2 9.619 7.378 0.809 1.00 0.00 C \nATOM 12 HB1 ALA 0 2 9.428 7.802 -0.177 1.00 0.00 H \nATOM 13 HB2 ALA 0 2 9.801 8.233 1.461 1.00 0.00 H \nATOM 14 HB3 ALA 0 2 10.485 6.719 0.764 1.00 0.00 H \nATOM 15 C ALA 0 2 7.175 7.353 1.440 1.00 0.00 C \nATOM 16 O ALA 0 2 6.119 7.117 0.826 1.00 0.00 O \nATOM 17 N ALA 0 3 7.135 8.129 2.492 1.00 0.00 N \nATOM 18 H ALA 0 3 8.027 8.283 2.941 1.00 0.00 H \nATOM 19 CA ALA 0 3 5.868 8.719 3.089 1.00 0.00 C \nATOM 20 HA ALA 0 3 5.013 8.046 3.150 1.00 0.00 H \nATOM 21 CB ALA 0 3 6.162 9.148 4.561 1.00 0.00 C \nATOM 22 HB1 ALA 0 3 6.896 9.952 4.495 1.00 0.00 H \nATOM 23 HB2 ALA 0 3 5.266 9.541 5.040 1.00 0.00 H \nATOM 24 HB3 ALA 0 3 6.518 8.267 5.095 1.00 0.00 H \nATOM 25 C ALA 0 3 5.317 9.947 2.233 1.00 0.00 C \nATOM 26 O ALA 0 3 4.318 9.800 1.564 1.00 0.00 O \nATOM 27 N ALA 0 4 6.187 10.941 2.082 1.00 0.00 N \nATOM 28 H ALA 0 4 7.049 10.754 2.574 1.00 0.00 H \nATOM 29 CA ALA 0 4 6.055 12.242 1.499 1.00 0.00 C \nATOM 30 HA ALA 0 4 5.106 12.365 0.978 1.00 0.00 H \nATOM 31 CB ALA 0 4 6.022 13.257 2.645 1.00 0.00 C \nATOM 32 HB1 ALA 0 4 6.918 13.169 3.259 1.00 0.00 H \nATOM 33 HB2 ALA 0 4 5.848 14.259 2.252 1.00 0.00 H \nATOM 34 HB3 ALA 0 4 5.089 13.129 3.194 1.00 0.00 H \nATOM 35 C ALA 0 4 7.161 12.473 0.426 1.00 0.00 C \nATOM 36 O ALA 0 4 8.281 12.043 0.603 1.00 0.00 O \nATOM 37 N ALA 0 5 6.858 13.029 -0.769 1.00 0.00 N \nATOM 38 H ALA 0 5 5.889 13.209 -0.988 1.00 0.00 H \nATOM 39 CA ALA 0 5 7.845 13.174 -1.773 1.00 0.00 C \nATOM 40 HA ALA 0 5 8.308 12.190 -1.705 1.00 0.00 H \nATOM 41 CB ALA 0 5 7.181 13.435 -3.147 1.00 0.00 C \nATOM 42 HB1 ALA 0 5 6.635 14.377 -3.192 1.00 0.00 H \nATOM 43 HB2 ALA 0 5 7.828 13.567 -4.014 1.00 0.00 H \nATOM 44 HB3 ALA 0 5 6.390 12.728 -3.397 1.00 0.00 H \nATOM 45 C ALA 0 5 8.913 14.302 -1.448 1.00 0.00 C \nATOM 46 O ALA 0 5 8.480 15.471 -1.274 1.00 0.00 O \nATOM 47 N ALA 0 6 10.234 13.998 -1.471 1.00 0.00 N \nATOM 48 H ALA 0 6 10.384 13.037 -1.741 1.00 0.00 H \nATOM 49 CA ALA 0 6 11.193 15.097 -1.604 1.00 0.00 C \nATOM 50 HA ALA 0 6 10.872 15.927 -0.974 1.00 0.00 H \nATOM 51 CB ALA 0 6 12.492 14.621 -0.922 1.00 0.00 C \nATOM 52 HB1 ALA 0 6 12.945 13.842 -1.534 1.00 0.00 H \nATOM 53 HB2 ALA 0 6 13.199 15.425 -0.716 1.00 0.00 H \nATOM 54 HB3 ALA 0 6 12.244 14.328 0.098 1.00 0.00 H \nATOM 55 C ALA 0 6 11.414 15.585 -3.064 1.00 0.00 C \nATOM 56 O ALA 0 6 12.325 15.162 -3.686 1.00 0.00 O \nHETATM 57 N NME 0 7 10.479 16.532 -3.533 1.00 0.00 N \nHETATM 58 H NME 0 7 9.780 16.751 -2.838 1.00 0.00 H \nHETATM 59 C NME 0 7 10.463 17.018 -4.961 1.00 0.00 C \nHETATM 60 H1 NME 0 7 11.460 16.914 -5.389 1.00 0.00 H \nHETATM 61 H2 NME 0 7 9.799 16.360 -5.521 1.00 0.00 H \nHETATM 62 H3 NME 0 7 10.024 18.011 -5.061 1.00 0.00 H \nTER 63 NME 0 7\nCONECT 1 2\nCONECT 2 3 4 1 5\nCONECT 3 2\nCONECT 4 2\nCONECT 5 6 7 2\nCONECT 6 5\nCONECT 7 5\nCONECT 55 57\nCONECT 57 58 55 59\nCONECT 58 57\nCONECT 59 60 61 62 57\nCONECT 60 59\nCONECT 61 59\nCONECT 62 59\nEND\n\n"
]
],
[
[
"## Some examples with files",
"_____no_output_____"
]
],
[
[
"PDB_file = msm.demo['TcTIM']['1tcd.pdb']\nsystem_pdbfixer = msm.convert(PDB_file, to_form='pdbfixer.PDBFixer')\nsystem_parmed = msm.convert(PDB_file, to_form='parmed.Structure')",
"_____no_output_____"
],
[
"MOL2_file = msm.demo['caffeine']['caffeine.mol2']\nsystem_openmm = msm.convert(MOL2_file, to_form='openmm.Modeller')\nsystem_mdtraj = msm.convert(MOL2_file, to_form='mdtraj.Trajectory')",
"_____no_output_____"
],
[
"MMTF_file = msm.demo['TcTIM']['1tcd.mmtf']\nsystem_aminoacids1_seq = msm.convert(MMTF_file, to_form='string:aminoacids1')\nsystem_molsys = msm.convert(MMTF_file)",
"/home/diego/projects/molsysmt/molsysmt/native/io/topology/mmtf_MMTFDecoder.py:27: UserWarning: The structure in the PDB has biological assemblies. There are geometrical transformations proposed in the structure. See the following issue in the source code repository: https://github.com/uibcdf/MolSysMT/issues/33\n warnings.warn(warning_message)\n"
],
[
"print('Form of object system_pdbfixer: ', msm.get_form(system_pdbfixer))\nprint('Form of object system_parmed: ', msm.get_form(system_parmed))\nprint('Form of object system_openmm: ', msm.get_form(system_openmm))\nprint('Form of object system_mdtraj: ', msm.get_form(system_mdtraj))\nprint('Form of object system_aminoacids1_seq: ', msm.get_form(system_aminoacids1_seq))\nprint('Form of object system_molsys: ', msm.get_form(system_molsys))",
"Form of object system_pdbfixer: pdbfixer.PDBFixer\nForm of object system_parmed: parmed.Structure\nForm of object system_openmm: openmm.Modeller\nForm of object system_mdtraj: mdtraj.Trajectory\nForm of object system_aminoacids1_seq: string:aminoacids1\nForm of object system_molsys: molsysmt.MolSys\n"
]
],
[
[
"## Some examples with IDs",
"_____no_output_____"
]
],
[
[
"molecular_system = msm.convert('pdb_id:1SUX', to_form='mdtraj.Trajectory')",
"_____no_output_____"
]
],
[
[
"## Conversions implemented in MolSysMT",
"_____no_output_____"
]
],
[
[
"msm.help.convert(from_form='mdtraj.Trajectory', to_form_type='string')",
"_____no_output_____"
],
[
"msm.help.convert(from_form='mdtraj.Trajectory', to_form_type='file', as_rows='to')",
"_____no_output_____"
],
[
"from_list=['pytraj.Trajectory','mdanalysis.Universe']\nto_list=['mdtraj.Trajectory', 'openmm.Topology']\nmsm.help.convert(from_form=from_list, to_form=to_list)",
"_____no_output_____"
]
]
] |
[
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code"
] |
[
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code"
],
[
"markdown",
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown",
"markdown"
],
[
"code",
"code"
],
[
"markdown",
"markdown"
],
[
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
]
] |
4ae9803ea160405fa08b030de0963014b3503c96
| 366,374 |
ipynb
|
Jupyter Notebook
|
coursera/ml_yandex/course2/course2week2/OverfittingTask/course2_week2.ipynb
|
VadimKirilchuk/education
|
ebddb2fb971ff1f3991e71fcb17ce83b95c4a397
|
[
"Apache-2.0"
] | null | null | null |
coursera/ml_yandex/course2/course2week2/OverfittingTask/course2_week2.ipynb
|
VadimKirilchuk/education
|
ebddb2fb971ff1f3991e71fcb17ce83b95c4a397
|
[
"Apache-2.0"
] | null | null | null |
coursera/ml_yandex/course2/course2week2/OverfittingTask/course2_week2.ipynb
|
VadimKirilchuk/education
|
ebddb2fb971ff1f3991e71fcb17ce83b95c4a397
|
[
"Apache-2.0"
] | null | null | null | 339.235185 | 158,424 | 0.914151 |
[
[
[
"# Практическое задание к уроку 1 (2 неделя).\n## Линейная регрессия: переобучение и регуляризация",
"_____no_output_____"
],
[
"В этом задании мы на примерах увидим, как переобучаются линейные модели, разберем, почему так происходит, и выясним, как диагностировать и контролировать переобучение.\n\nВо всех ячейках, где написан комментарий с инструкциями, нужно написать код, выполняющий эти инструкции. Остальные ячейки с кодом (без комментариев) нужно просто выполнить. Кроме того, в задании требуется отвечать на вопросы; ответы нужно вписывать после выделенного слова \"__Ответ:__\".\n\nНапоминаем, что посмотреть справку любого метода или функции (узнать, какие у нее аргументы и что она делает) можно с помощью комбинации Shift+Tab. Нажатие Tab после имени объекта и точки позволяет посмотреть, какие методы и переменные есть у этого объекта.",
"_____no_output_____"
]
],
[
[
"import pandas as pd\nimport numpy as np\nfrom matplotlib import pyplot as plt\n%matplotlib inline",
"_____no_output_____"
]
],
[
[
"Мы будем работать с датасетом __\"bikes_rent.csv\"__, в котором по дням записаны календарная информация и погодные условия, характеризующие автоматизированные пункты проката велосипедов, а также число прокатов в этот день. Последнее мы будем предсказывать; таким образом, мы будем решать задачу регрессии.",
"_____no_output_____"
],
[
"### Знакомство с данными",
"_____no_output_____"
],
[
"Загрузите датасет с помощью функции __pandas.read_csv__ в переменную __df__. Выведите первые 5 строчек, чтобы убедиться в корректном считывании данных:",
"_____no_output_____"
]
],
[
[
"# (0 баллов)\n# Считайте данные и выведите первые 5 строк\ndf = pd.read_csv(\"bikes_rent.csv\")\ndf.head()",
"_____no_output_____"
]
],
[
[
"Для каждого дня проката известны следующие признаки (как они были указаны в источнике данных):\n* _season_: 1 - весна, 2 - лето, 3 - осень, 4 - зима\n* _yr_: 0 - 2011, 1 - 2012\n* _mnth_: от 1 до 12\n* _holiday_: 0 - нет праздника, 1 - есть праздник\n* _weekday_: от 0 до 6\n* _workingday_: 0 - нерабочий день, 1 - рабочий день\n* _weathersit_: оценка благоприятности погоды от 1 (чистый, ясный день) до 4 (ливень, туман)\n* _temp_: температура в Цельсиях\n* _atemp_: температура по ощущениям в Цельсиях\n* _hum_: влажность\n* _windspeed(mph)_: скорость ветра в милях в час\n* _windspeed(ms)_: скорость ветра в метрах в секунду\n* _cnt_: количество арендованных велосипедов (это целевой признак, его мы будем предсказывать)\n\nИтак, у нас есть вещественные, бинарные и номинальные (порядковые) признаки, и со всеми из них можно работать как с вещественными. С номинальныеми признаками тоже можно работать как с вещественными, потому что на них задан порядок. Давайте посмотрим на графиках, как целевой признак зависит от остальных",
"_____no_output_____"
]
],
[
[
"fig, axes = plt.subplots(nrows=3, ncols=4, figsize=(15, 10))\nfor idx, feature in enumerate(df.columns[:-1]):\n df.plot(feature, \"cnt\", subplots=True, kind=\"scatter\", ax=axes[idx / 4, idx % 4])",
"_____no_output_____"
]
],
[
[
"__Блок 1. Ответьте на вопросы (каждый 0.5 балла):__\n1. Каков характер зависимости числа прокатов от месяца? \n * ответ: на параболу похоже. Т.е. в летние месяцы число прокатов увеличивается (ваш К.О.)\n2. Укажите один или два признака, от которых число прокатов скорее всего зависит линейно\n * ответ: temp, atemp",
"_____no_output_____"
],
[
"Давайте более строго оценим уровень линейной зависимости между признаками и целевой переменной. Хорошей мерой линейной зависимости между двумя векторами является корреляция Пирсона. В pandas ее можно посчитать с помощью двух методов датафрейма: corr и corrwith. Метод df.corr вычисляет матрицу корреляций всех признаков из датафрейма. Методу df.corrwith нужно подать еще один датафрейм в качестве аргумента, и тогда он посчитает попарные корреляции между признаками из df и этого датафрейма.",
"_____no_output_____"
]
],
[
[
"# Код 1.1 (0.5 балла)\n# Посчитайте корреляции всех признаков, кроме последнего, с последним с помощью метода corrwith:\ndf.corrwith(df['cnt'])[:-1]",
"_____no_output_____"
]
],
[
[
"В выборке есть признаки, коррелирующие с целевым, а значит, задачу можно решать линейными методами.",
"_____no_output_____"
],
[
"По графикам видно, что некоторые признаки похожи друг на друга. Поэтому давайте также посчитаем корреляции между вещественными признаками.",
"_____no_output_____"
]
],
[
[
"# Код 1.2 (0.5 балла)\n# Посчитайте попарные корреляции между признаками temp, atemp, hum, windspeed(mph), windspeed(ms) и cnt\n# с помощью метода corr:\ndf[['temp', 'atemp', 'hum', 'windspeed(mph)', 'windspeed(ms)', 'cnt']].corr()",
"_____no_output_____"
]
],
[
[
"На диагоналях, как и полагается, стоят единицы. Однако в матрице имеются еще две пары сильно коррелирующих столбцов: temp и atemp (коррелируют по своей природе) и два windspeed (потому что это просто перевод одних единиц в другие). Далее мы увидим, что этот факт негативно сказывается на обучении линейной модели.",
"_____no_output_____"
],
[
"Напоследок посмотрим средние признаков (метод mean), чтобы оценить масштаб признаков и доли 1 у бинарных признаков.",
"_____no_output_____"
]
],
[
[
"# Код 1.3 (0.5 балла)\n# Выведите средние признаков\ndf.mean()",
"_____no_output_____"
]
],
[
[
"Признаки имеют разный масштаб, значит для дальнейшей работы нам лучше нормировать матрицу объекты-признаки.",
"_____no_output_____"
],
[
"### Проблема первая: коллинеарные признаки",
"_____no_output_____"
],
[
"Итак, в наших данных один признак дублирует другой, и есть еще два очень похожих. Конечно, мы могли бы сразу удалить дубликаты, но давайте посмотрим, как бы происходило обучение модели, если бы мы не заметили эту проблему. \n\nДля начала проведем масштабирование, или стандартизацию признаков: из каждого признака вычтем его среднее и поделим на стандартное отклонение. Это можно сделать с помощью метода scale.\n\nКроме того, нужно перемешать выборку, это потребуется для кросс-валидации.",
"_____no_output_____"
]
],
[
[
"from sklearn.preprocessing import scale\nfrom sklearn.utils import shuffle",
"_____no_output_____"
],
[
"df_shuffled = shuffle(df, random_state=123)\nX = scale(df_shuffled[df_shuffled.columns[:-1]])\ny = df_shuffled[\"cnt\"]",
"_____no_output_____"
]
],
[
[
"Давайте обучим линейную регрессию на наших данных и посмотрим на веса признаков.",
"_____no_output_____"
]
],
[
[
"from sklearn.linear_model import LinearRegression",
"_____no_output_____"
],
[
"# Код 2.1 (1 балл)\n# Создайте объект линейного регрессора, обучите его на всех данных и выведите веса модели \n# (веса хранятся в переменной coef_ класса регрессора).\n# Можно выводить пары (название признака, вес), воспользовавшись функцией zip, встроенной в язык python\n# Названия признаков хранятся в переменной df.columns\nlinear_regressor = LinearRegression()\nlinear_regressor.fit(X, y)\nzip(df.columns, linear_regressor.coef_)",
"_____no_output_____"
]
],
[
[
"Мы видим, что веса при линейно-зависимых признаках по модулю значительно больше, чем при других признаках.",
"_____no_output_____"
],
[
"Чтобы понять, почему так произошло, вспомним аналитическую формулу, по которой вычисляются веса линейной модели в методе наименьших квадратов:\n\n$w = (X^TX)^{-1} X^T y$.\n\nЕсли в X есть коллинеарные (линейно-зависимые) столбцы, матрица $X^TX$ становится вырожденной, и формула перестает быть корректной. Чем более зависимы признаки, тем меньше определитель этой матрицы и тем хуже аппроксимация $Xw \\approx y$. Такая ситуацию называют _проблемой мультиколлинеарности_, вы обсуждали ее на лекции.",
"_____no_output_____"
],
[
"С парой temp-atemp чуть менее коррелирующих переменных такого не произошло, однако на практике всегда стоит внимательно следить за коэффициентами при похожих признаках.",
"_____no_output_____"
],
[
"__Решение__ проблемы мультиколлинеарности состоит в _регуляризации_ линейной модели. К оптимизируемому функционалу прибавляют L1 или L2 норму весов, умноженную на коэффициент регуляризации $\\alpha$. В первом случае метод называется Lasso, а во втором --- Ridge. Подробнее об этом также рассказано в лекции.",
"_____no_output_____"
],
[
"Обучите регрессоры Ridge и Lasso с параметрами по умолчанию и убедитесь, что проблема с весами решилась.",
"_____no_output_____"
]
],
[
[
"from sklearn.linear_model import Lasso, Ridge",
"_____no_output_____"
],
[
"# Код 2.2 (0.5 балла)\n# Обучите линейную модель с L1-регуляризацией и выведите веса\nlasso_regressor = Lasso()\nlasso_regressor.fit(X, y)\nzip(df.columns, lasso_regressor.coef_)",
"_____no_output_____"
],
[
"# Код 2.3 (0.5 балла)\n# Обучите линейную модель с L2-регуляризацией и выведите веса\nridge_regressor = Ridge()\nridge_regressor.fit(X, y)\nzip(df.columns, ridge_regressor.coef_)",
"_____no_output_____"
]
],
[
[
"### Проблема вторая: неинформативные признаки",
"_____no_output_____"
],
[
"В отличие от L2-регуляризации, L1 обнуляет веса при некоторых признаках. Объяснение данному факту дается в одной из лекций курса.\n\nДавайте пронаблюдаем, как меняются веса при увеличении коэффициента регуляризации $\\alpha$ (в лекции коэффициент при регуляризаторе мог быть обозначен другой буквой).",
"_____no_output_____"
]
],
[
[
"# Код 3.1 (1 балл)\nalphas = np.arange(1, 500, 50)\ncoefs_lasso = np.zeros((alphas.shape[0], X.shape[1])) # матрица весов размера (число регрессоров) x (число признаков)\ncoefs_ridge = np.zeros((alphas.shape[0], X.shape[1]))\n# Для каждого значения коэффициента из alphas обучите регрессор Lasso\n# и запишите веса в соответствующую строку матрицы coefs_lasso (вспомните встроенную в python функцию enumerate),\n# а затем обучите Ridge и запишите веса в coefs_ridge.\nfor index, a in enumerate(alphas):\n lasso_regressor = Lasso(alpha=a)\n lasso_regressor.fit(X, y)\n coefs_lasso[index] = lasso_regressor.coef_\n ridge_regressor = Ridge(alpha=a)\n ridge_regressor.fit(X, y)\n coefs_ridge[index] = ridge_regressor.coef_ ",
"_____no_output_____"
]
],
[
[
"Визуализируем динамику весов при увеличении параметра регуляризации:",
"_____no_output_____"
]
],
[
[
"plt.figure(figsize=(8, 5))\nfor coef, feature in zip(coefs_lasso.T, df.columns):\n plt.plot(alphas, coef, label=feature, color=np.random.rand(3))\nplt.legend(loc=\"upper right\", bbox_to_anchor=(1.4, 0.95))\nplt.xlabel(\"alpha\")\nplt.ylabel(\"feature weight\")\nplt.title(\"Lasso\")\n\nplt.figure(figsize=(8, 5))\nfor coef, feature in zip(coefs_ridge.T, df.columns):\n plt.plot(alphas, coef, label=feature, color=np.random.rand(3))\nplt.legend(loc=\"upper right\", bbox_to_anchor=(1.4, 0.95))\nplt.xlabel(\"alpha\")\nplt.ylabel(\"feature weight\")\nplt.title(\"Ridge\")",
"_____no_output_____"
]
],
[
[
"Ответы на следующие вопросы можно давать, глядя на графики или выводя коэффициенты на печать.\n\n__Блок 2. Ответьте на вопросы (каждый 0.25 балла)__:\n1. Какой регуляризатор (Ridge или Lasso) агрессивнее уменьшает веса при одном и том же alpha?\n * Ответ: Lasso\n1. Что произойдет с весами Lasso, если alpha сделать очень большим? Поясните, почему так происходит.\n * Ответ: веса уйдут в 0, потому что используется норма L1 (сумма модулей)\n1. Можно ли утверждать, что Lasso исключает один из признаков windspeed при любом значении alpha > 0? А Ridge? Ситается, что регуляризатор исключает признак, если коэффициент при нем < 1e-3.\n * Ответ: Да. Нет \n1. Какой из регуляризаторов подойдет для отбора неинформативных признаков?\n * Ответ: Lasso",
"_____no_output_____"
],
[
"Далее будем работать с Lasso.\n\nИтак, мы видим, что при изменении alpha модель по-разному подбирает коэффициенты признаков. Нам нужно выбрать наилучшее alpha. ",
"_____no_output_____"
],
[
"Для этого, во-первых, нам нужна метрика качества. Будем использовать в качестве метрики сам оптимизируемый функционал метода наименьших квадратов, то есть Mean Square Error.\n\nВо-вторых, нужно понять, на каких данных эту метрику считать. Нельзя выбирать alpha по значению MSE на обучающей выборке, потому что тогда мы не сможем оценить, как модель будет делать предсказания на новых для нее данных. Если мы выберем одно разбиение выборки на обучающую и тестовую (это называется holdout), то настроимся на конкретные \"новые\" данные, и вновь можем переобучиться. Поэтому будем делать несколько разбиений выборки, на каждом пробовать разные значения alpha, а затем усреднять MSE. Удобнее всего делать такие разбиения кросс-валидацией, то есть разделить выборку на K частей, или блоков, и каждый раз брать одну из них как тестовую, а из оставшихся блоков составлять обучающую выборку. ",
"_____no_output_____"
],
[
"Делать кросс-валидацию для регрессии в sklearn совсем просто: для этого есть специальный регрессор, __LassoCV__, который берет на вход список из alpha и для каждого из них вычисляет MSE на кросс-валидации. После обучения (если оставить параметр cv=3 по умолчанию) регрессор будет содержать переменную __mse\\_path\\___, матрицу размера len(alpha) x k, k = 3 (число блоков в кросс-валидации), содержащую значения MSE на тесте для соответствующих запусков. Кроме того, в переменной alpha\\_ будет храниться выбранное значение параметра регуляризации, а в coef\\_, традиционно, обученные веса, соответствующие этому alpha_.\n\nОбратите внимание, что регрессор может менять порядок, в котором он проходит по alphas; для сопоставления с матрицей MSE лучше использовать переменную регрессора alphas_.",
"_____no_output_____"
]
],
[
[
"from sklearn.linear_model import LassoCV",
"_____no_output_____"
],
[
"# Код 3.2 (1 балл)\n# Обучите регрессор LassoCV на всех параметрах регуляризации из alpha\n# Постройте график _усредненного_ по строкам MSE в зависимости от alpha. \n# Выведите выбранное alpha, а также пары \"признак-коэффициент\" для обученного вектора коэффициентов\nalphas = np.arange(1, 100, 5)\nlassoCV_regressor = LassoCV(alphas=alphas)\nlassoCV_regressor.fit(X, y)\n\nimport numpy as np\nplt.plot(lassoCV_regressor.alphas_, np.mean(lassoCV_regressor.mse_path_, axis=1))\nplt.xlabel(\"alpha\")\nplt.ylabel(\"MSE\")\nplt.title(\"Cross-validation\") \n\nprint 'alpha = ' + str(lassoCV_regressor.alpha_)\nzip(df.columns, lassoCV_regressor.coef_)",
"alpha = 6\n"
]
],
[
[
"Итак, мы выбрали некоторый параметр регуляризации. Давайте посмотрим, какие бы мы выбирали alpha, если бы делили выборку только один раз на обучающую и тестовую, то есть рассмотрим траектории MSE, соответствующие отдельным блокам выборки.",
"_____no_output_____"
]
],
[
[
"# Код 3.3 (1 балл)\n# Выведите значения alpha, соответствующие минимумам MSE на каждом разбиении (то есть по столбцам).\n# На трех отдельных графиках визуализируйте столбцы .mse_path_\ni = 0\nfor a in lassoCV_regressor.alphas_:\n for k in [0, 1, 2]:\n if (lassoCV_regressor.mse_path_[i, k] == np.min(lassoCV_regressor.mse_path_[:, k])):\n print 'k = ' + str (k+1) + ', alpha = ' + str(a)\n \n plt.plot(lassoCV_regressor.alphas_, lassoCV_regressor.mse_path_[:, k])\n plt.xlabel(\"alpha\")\n plt.ylabel(\"MSE\")\n plt.show()\n i += 1\n",
"k = 1, alpha = 41\n"
]
],
[
[
"На каждом разбиении оптимальное значение alpha свое, и ему соответствует большое MSE на других разбиениях. Получается, что мы настраиваемся на конкретные обучающие и контрольные выборки. При выборе alpha на кросс-валидации мы выбираем нечто \"среднее\", что будет давать приемлемое значение метрики на разных разбиениях выборки. ",
"_____no_output_____"
],
[
"Наконец, как принято в анализе данных, давайте проинтерпретируем результат.",
"_____no_output_____"
],
[
"__Блок 3. Ответьте на вопросы (каждый 0.5 балла):__\n1. В последней обученной модели выберите 4 признака с наибольшими (положительными) коэфициентами (и выпишите их), посмотрите на визуализации зависимостей cnt от этих признаков, которые мы рисовали в блоке \"Знакомство с данными\". Видна ли возрастающая линейная зависимость cnt от этих признаков по графикам? Логично ли утверждать (из здравого смысла), что чем больше значение этих признаков, тем больше людей захотят взять велосипеды? \n * Ответ: yr, season, atemp, temp. Логично, что при увеличении температуры воздуха количество арендованных велосипедов увеличивается. С признаками сезон и год не все так однозначно. Из того, что в 2012 число аренды больше, чем в 2011, не следует, что в 2013 их будет больше, чем в 2012. То же и с сезоном. Или я где-то накосячила и неправильно выбрала признаки :(\n1. Выберите 3 признака с наибольшими по модулю отрицательными коэффициентами (и выпишите их), посмотрите на соответствующие визуализации. Видна ли убывающая линейная зависимость? Логично ли утверждать, что чем больше величина этих признаков, тем меньше людей захотят взять велосипеды?\n * Ответ: weathersit, windspeed(mph), hum. Все эти признаки - оценка благоприятности, сила ветра, влажность характеризуют неблагоприятную погоду, чем они выше, тем хуже подходят метеоусловия для катания. Поэтому логично, что количество арендованных велосипедов падает с их увеличением. \n1. Выпишите признаки с коэффициентами, близкими к нулю (< 1e-3). Как вы думаете, почему модель исключила их из модели (вновь посмотрите на графики)? Верно ли, что они никак не влияют на спрос на велосипеды?\n * Ответ: windspeed(ms) т.к. дублирует windspeed(mph). По сути это один признак, он влияет на спрос, но дубль нужно убрать, чтобы не было переоценки влияния.",
"_____no_output_____"
],
[
"### Заключение\nИтак, мы посмотрели, как можно следить за адекватностью линейной модели, как отбирать признаки и как грамотно, по возможности не настраиваясь на какую-то конкретную порцию данных, подбирать коэффициент регуляризации. \n\nСтоит отметить, что с помощью кросс-валидации удобно подбирать лишь небольшое число параметров (1, 2, максимум 3), потому что для каждой допустимой их комбинации нам приходится несколько раз обучать модель, а это времязатратный процесс, особенно если нужно обучаться на больших объемах данных.",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown"
] |
[
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown",
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown",
"markdown",
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown",
"markdown",
"markdown",
"markdown",
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown",
"markdown",
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown",
"markdown",
"markdown"
]
] |
4ae983d3302dcb0e53b0e14ea158f01ba4109349
| 8,727 |
ipynb
|
Jupyter Notebook
|
TicTacToe-AlpahZero/alphazero-TicTacToe-advanced.ipynb
|
linked0/deep-rl
|
87af436c91963d78823b6e3f034f2787548c0713
|
[
"MIT"
] | 1 |
2022-03-31T23:38:37.000Z
|
2022-03-31T23:38:37.000Z
|
TicTacToe-AlpahZero/alphazero-TicTacToe-advanced.ipynb
|
linked0/deep-rl
|
87af436c91963d78823b6e3f034f2787548c0713
|
[
"MIT"
] | 19 |
2020-01-28T22:28:01.000Z
|
2022-03-11T23:32:18.000Z
|
TicTacToe-AlpahZero/alphazero-TicTacToe-advanced.ipynb
|
linked0/deep-rl
|
87af436c91963d78823b6e3f034f2787548c0713
|
[
"MIT"
] | 5 |
2018-12-20T22:33:38.000Z
|
2020-06-25T15:51:59.000Z
| 26.207207 | 144 | 0.488484 |
[
[
[
"# Initialize a game",
"_____no_output_____"
]
],
[
[
"from ConnectN import ConnectN\n\ngame_setting = {'size':(6,6), 'N':4, 'pie_rule':True}\ngame = ConnectN(**game_setting)\n",
"_____no_output_____"
],
[
"% matplotlib notebook\n\nfrom Play import Play\n\n\ngameplay=Play(ConnectN(**game_setting), \n player1=None, \n player2=None)\n",
"_____no_output_____"
]
],
[
[
"# Define our policy\n\nPlease go ahead and define your own policy! See if you can train it under 1000 games and with only 1000 steps of exploration in each move.",
"_____no_output_____"
]
],
[
[
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom math import *\nimport numpy as np\n\nfrom ConnectN import ConnectN\ngame_setting = {'size':(6,6), 'N':4}\ngame = ConnectN(**game_setting)\n\nclass Policy(nn.Module):\n\n def __init__(self, game):\n super(Policy, self).__init__()\n\n # input = 6x6 board\n # convert to 5x5x8\n self.conv1 = nn.Conv2d(1, 16, kernel_size=2, stride=1, bias=False)\n # 5x5x16 to 3x3x32\n self.conv2 = nn.Conv2d(16, 32, kernel_size=3, stride=1, bias=False)\n\n self.size=3*3*32\n \n # the part for actions\n self.fc_action1 = nn.Linear(self.size, self.size//4)\n self.fc_action2 = nn.Linear(self.size//4, 36)\n \n # the part for the value function\n self.fc_value1 = nn.Linear(self.size, self.size//6)\n self.fc_value2 = nn.Linear(self.size//6, 1)\n self.tanh_value = nn.Tanh()\n \n def forward(self, x):\n\n y = F.leaky_relu(self.conv1(x))\n y = F.leaky_relu(self.conv2(y))\n y = y.view(-1, self.size)\n \n # action head\n a = self.fc_action2(F.leaky_relu(self.fc_action1(y)))\n \n avail = (torch.abs(x.squeeze())!=1).type(torch.FloatTensor)\n avail = avail.view(-1, 36)\n maxa = torch.max(a)\n exp = avail*torch.exp(a-maxa)\n prob = exp/torch.sum(exp)\n \n # value head\n value = self.tanh_value(self.fc_value2(F.leaky_relu( self.fc_value1(y) )))\n return prob.view(6,6), value\n\npolicy = Policy(game)\n",
"_____no_output_____"
]
],
[
[
"# Define a MCTS player for Play",
"_____no_output_____"
]
],
[
[
"import MCTS\n\nfrom copy import copy\n\ndef Policy_Player_MCTS(game):\n mytree = MCTS.Node(copy(game))\n for _ in range(1000):\n mytree.explore(policy)\n \n mytreenext, (v, nn_v, p, nn_p) = mytree.next(temperature=0.1)\n \n return mytreenext.game.last_move\n\nimport random\n\ndef Random_Player(game):\n return random.choice(game.available_moves()) \n",
"_____no_output_____"
]
],
[
[
"# Play a game against a random policy",
"_____no_output_____"
]
],
[
[
"% matplotlib notebook\n\nfrom Play import Play\n\n\ngameplay=Play(ConnectN(**game_setting), \n player1=Policy_Player_MCTS, \n player2=None)\n",
"_____no_output_____"
]
],
[
[
"# Training",
"_____no_output_____"
]
],
[
[
"# initialize our alphazero agent and optimizer\nimport torch.optim as optim\n\ngame=ConnectN(**game_setting)\npolicy = Policy(game)\noptimizer = optim.Adam(policy.parameters(), lr=.01, weight_decay=1.e-5)\n\n! pip install progressbar",
"_____no_output_____"
]
],
[
[
"Beware, training is **VERY VERY** slow!!",
"_____no_output_____"
]
],
[
[
"# train our agent\n\nfrom collections import deque\nimport MCTS\n\n# try a higher number\nepisodes = 2000\n\nimport progressbar as pb\nwidget = ['training loop: ', pb.Percentage(), ' ', \n pb.Bar(), ' ', pb.ETA() ]\ntimer = pb.ProgressBar(widgets=widget, maxval=episodes).start()\n\noutcomes = []\npolicy_loss = []\n\nNmax = 1000\n\nfor e in range(episodes):\n\n mytree = MCTS.Node(game)\n logterm = []\n vterm = []\n \n while mytree.outcome is None:\n for _ in range(Nmax):\n mytree.explore(policy)\n if mytree.N >= Nmax:\n break\n \n current_player = mytree.game.player\n mytree, (v, nn_v, p, nn_p) = mytree.next()\n mytree.detach_mother()\n \n loglist = torch.log(nn_p)*p\n constant = torch.where(p>0, p*torch.log(p),torch.tensor(0.))\n logterm.append(-torch.sum(loglist-constant))\n\n vterm.append(nn_v*current_player)\n \n # we compute the \"policy_loss\" for computing gradient\n outcome = mytree.outcome\n outcomes.append(outcome)\n \n loss = torch.sum( (torch.stack(vterm)-outcome)**2 + torch.stack(logterm) )\n optimizer.zero_grad()\n loss.backward()\n policy_loss.append(float(loss))\n\n optimizer.step()\n \n if e%10==0:\n print(\"game: \",e+1, \", mean loss: {:3.2f}\".format(np.mean(policy_loss[-20:])),\n \", recent outcomes: \", outcomes[-10:])\n \n if e%500==0:\n torch.save(policy,'6-6-4-pie-{:d}.mypolicy'.format(e))\n del loss\n \n timer.update(e+1)\n \ntimer.finish()\n\n\n\n",
"_____no_output_____"
]
],
[
[
"# setup environment to pit your AI against the challenge policy '6-6-4-pie.policy'",
"_____no_output_____"
]
],
[
[
"challenge_policy = torch.load('6-6-4-pie.policy')\n\ndef Challenge_Player_MCTS(game):\n mytree = MCTS.Node(copy(game))\n for _ in range(1000):\n mytree.explore(challenge_policy)\n \n mytreenext, (v, nn_v, p, nn_p) = mytree.next(temperature=0.1)\n \n return mytreenext.game.last_move\n\n",
"_____no_output_____"
]
],
[
[
"# Let the game begin!",
"_____no_output_____"
]
],
[
[
"% matplotlib notebook\ngameplay=Play(ConnectN(**game_setting), \n player2=Policy_Player_MCTS, \n player1=Challenge_Player_MCTS)",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code"
] |
[
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
]
] |
4ae98532f5ee8385d6585bac02dfcfbee180a806
| 51,383 |
ipynb
|
Jupyter Notebook
|
Assignment8/Interpolation.ipynb
|
cywilk/Capstone-Physics
|
846d6994869b740e20e22c7193cd5e7e51fc24a1
|
[
"MIT"
] | null | null | null |
Assignment8/Interpolation.ipynb
|
cywilk/Capstone-Physics
|
846d6994869b740e20e22c7193cd5e7e51fc24a1
|
[
"MIT"
] | null | null | null |
Assignment8/Interpolation.ipynb
|
cywilk/Capstone-Physics
|
846d6994869b740e20e22c7193cd5e7e51fc24a1
|
[
"MIT"
] | null | null | null | 114.438753 | 9,864 | 0.860752 |
[
[
[
"# Interpolation",
"_____no_output_____"
]
],
[
[
"import numpy as np\nimport matplotlib.pyplot as plt",
"_____no_output_____"
]
],
[
[
"### Linear Interpolation",
"_____no_output_____"
],
[
"Suppose we are given a function $f(x)$ at just two points, $x=a$ and $x=b$, and you want to know the function at another point in between. The simplest way to find an estimate of this value is using linear interpolation. Linear interpolation assumes the function follows a straight line between two points. The slope of the straight line approximate is:\n$$ m = \\frac{f(b) - f(a)}{b - a} $$\n\nThen the value $f(x)$ can be approximated by:\n$$ f(x) \\approx \\frac{f(b) - f(a)}{b-a} (x-a) + f(a) $$",
"_____no_output_____"
],
[
"#### Step 1: Define a linear function\n\nCreate a linear function $f(x) = ax + b$. Linear interpolation will yield an accurate answer for a a linear function. This is how we will test our linear interpolation.",
"_____no_output_____"
]
],
[
[
"def my_function(x):\n # TO DO: Create a linear function\n return (3*x + 2)",
"_____no_output_____"
]
],
[
[
"#### Step 2: Implement the linear interpolation\nUsing the equations given above, implement the linear interpolation function",
"_____no_output_____"
]
],
[
[
"def linear_interpolation(x, a, fa, b, fb):\n \"\"\"\n Fits a line to points (a, f(a)) and (b, f(b)) and returns an \n approximation for f(x) for some value x between a and b from \n the equation of the line.\n Parameters:\n x (float): the point of interest between a and b\n a (float): known x value\n fa (float): known f(a) value\n b (float): known x value (b > a)\n fb (float): known f(b) value\n Returns:\n (float): an approximation of f(x) using linear interpolation\n \"\"\"\n # To Do: Implement the linear interpolation function\n slope = (fb - fa) / (b - a)\n return (slope * (x - a)) + fa",
"_____no_output_____"
]
],
[
[
"#### Step 3: Test your linear interpolation\nUsing the linear function you created and your linear interpolation function, write at least three assert statements.",
"_____no_output_____"
]
],
[
[
"# To DO: Create at least three assert statements using my_function and linear_interpolation\nassert(abs(linear_interpolation(4, 0, 2, 6, 20) - my_function(4)) < 0.01)\nassert(abs(linear_interpolation(0, 1, 5, -2, -4) - my_function(0)) < 0.01)\nassert(abs(linear_interpolation(-3, -10, -28, 5, 17) - my_function(-3)) < 0.01)",
"_____no_output_____"
]
],
[
[
"#### Step 4: Visualization your results\nPlot your function. Using a scatter plot, plot at least three x, y points generated using your linear_interpolation function.",
"_____no_output_____"
]
],
[
[
"# To Do: Plot your function with at least three interpolated values\nx = [-5, 12, 17, 22, 23, 30]\ny = [linear_interpolation(x[i], -6, -16, 40, 122) for i in range(len(x))]\nplt.scatter(x, y)\nplt.show()",
"_____no_output_____"
]
],
[
[
"### 2nd Order Lagrangian Interpolation",
"_____no_output_____"
],
[
"If we have more than two points, a better way to get an estimate of \"in between\" points is using a Lagrangian Interpolation. Lagrangian Interpolation fits a nth order polynomial to a number of points. Higher order polynomials often introduce unnecessary \"wiggles\" that introduce error. Using many low-order polynomials often generate a better estimate. For this example, let's use a quadratic (i.e. a 2nd order polynomial). \n\n$$f(x) = \\frac{(x-b)(x-c)}{(a - b)(a-c)}f(a) + \\frac{(x-a)(x-c)}{(b-a)(b-c)}f(b) + \\frac{(x - a)(x-b)}{(c - a)(c - b)} f(c) $$",
"_____no_output_____"
],
[
"#### Step 1: Define a quadratic function\n\nCreate a quadratic function $f(x) = ax^2 + bx + c$. 2nd Order Lagrangian Interpolation will yield an accurate answer for a 2nd order polynomial (i.e. a quadratic). This is how we will test our interpolation.",
"_____no_output_____"
]
],
[
[
"def my_function2(x):\n #To Do: Create a quadratic function\n return x*x - 4*x + 4",
"_____no_output_____"
]
],
[
[
"#### Step 2: Implement the 2nd Order Lagrangian Interpolation Function\nUsing the equations given above, implement the 2nd order lagrangian interpolation function",
"_____no_output_____"
]
],
[
[
"def lagrangian_interpolation(x, a, fa, b, fb, c, fc):\n \"\"\"\n Fits a quadratic to points (a, f(a)), (b, f(b)), and (c, f(c)) and returns an \n approximation for f(x) for some value x between a and c from the \n equation of a quadratic.\n Parameters:\n x (float): the point of interest between a and b\n a (float): known x value\n fa (float): known f(a) value\n b (float): known x value (b > a)\n fb (float): known f(b) value\n c (float): known x value (c > b)\n fc (float): known f(c) value\n Returns:\n (float): an approximation of f(x) using linear interpolation\n \"\"\"\n term1 = ((x - b) * (x - c) * fa) / ((a - b) * (a - c))\n term2 = ((x - a) * (x - c) * fb) / ((b - a) * (b - c))\n term3 = ((x - a) * (x - b) * fc) / ((c - a) * (c - b))\n return term1 + term2 + term3",
"_____no_output_____"
]
],
[
[
"#### Step 3: Test your results",
"_____no_output_____"
],
[
"Using the quadratic function you created and your 2nd order lagrangian interpolation function, write at least three assert statements.",
"_____no_output_____"
]
],
[
[
"# To Do: Write at least three assert statements\nassert(abs(lagrangian_interpolation(-4, -6, 64, 0, 4, 8, 36) - my_function2(-4)) < 0.01)\nassert(abs(lagrangian_interpolation(2, -6, 64, 8, 36, 40, 1444) - my_function2(2)) < 0.01)\nassert(abs(lagrangian_interpolation(-3, -6, 64, 0, 4, 8, 36) - my_function2(-3)) < 0.01)",
"_____no_output_____"
]
],
[
[
"#### Step 4: Visualize your results\nPlot your function and using a scatter plot, plot at least three x, y points generated from your lagrangian_interpolation function.",
"_____no_output_____"
]
],
[
[
"# To Do: Plot your function with interpolated values\nx = [-16, -12, -7, 3, 16, 25, 30]\ny = [lagrangian_interpolation(x[i], -6, 64, 40, 1444, 41, 1521) for i in range(len(x))]\nplt.scatter(x, y)\nplt.show()",
"_____no_output_____"
]
],
[
[
"### Application",
"_____no_output_____"
],
[
"Also contained in this file is a text file called `Partial_Data.txt`. This contains sparse data. In this application section we're going to import the data and approximate the curve using linear and 2nd order lagranging interpolation.",
"_____no_output_____"
],
[
"#### Step 1: Import the data\nTake a look at the file and see what data it contains. I suggest using `np.loadtxt` to import this data. Using the argument `unpack = True` will allow you to easily assign each column of data to an individual variable. For more information on the `loadtxt` function and its allowed arguments, see: https://numpy.org/doc/stable/reference/generated/numpy.loadtxt.html",
"_____no_output_____"
]
],
[
[
"# To Do: Import the data \nxvalues, yvalues = np.loadtxt(\"./Partial_Data.txt\", unpack = True)\n# To Do: Scatter plot the data\nplt.scatter(xvalues, yvalues)\nplt.show()",
"_____no_output_____"
]
],
[
[
"#### Step 2: Linear Interpolation\nUsing your linear interpolation function above, iterate through the sparse data and generate interpolated value.\n\nHere's one method to get you started:\n\nStarting at the 2nd data point, interate through the data, using the current value (let this value be $b$) and the previous data point (let this be $a$ where $b$ > $a$). Interpolate 100 points between the values of ($a, b$) and plot these values. Move onto the next data point and repeat. ",
"_____no_output_____"
]
],
[
[
"# To Do: Generate and plot interpolated data\nxscatter = []\nyscatter = []\n\nfor i in range(1, len(xvalues)):\n b = xvalues[i]\n a = xvalues[i-1]\n x = a\n for j in range(1, 101):\n x += ((b-a)/100)\n fx = linear_interpolation(x, a, yvalues[i-1], b, yvalues[i])\n xscatter.append(x)\n yscatter.append(fx)\n\nplt.scatter(xscatter, yscatter)\nplt.show()",
"_____no_output_____"
]
],
[
[
"#### Step 3: 2nd Order Lagrangian Interpolation\nUsing your 2nd Order Lagrangian Interpolation function above, iterate through the sparse data and generate interpolated value.\n\nHere's one method to get you started:\n\nStarting at the 3rd data point, interate through the data, using the current value (let this value be $c$) and the previous two (let these be $a$ and $b$ where $b$ > $a$). Interpolate 100 points between the values of ($a, b$) and plot these values. Move onto the next data point and repeat. ",
"_____no_output_____"
]
],
[
[
"# To Do: Generate and plot interpolated data\nxscatter2 = []\nyscatter2 = []\n\nfor i in range(2, len(xvalues)):\n c = xvalues[i]\n b = xvalues[i-1]\n a = xvalues[i-2]\n x = a\n for j in range(1, 101):\n x += ((b-a)/100)\n fx = lagrangian_interpolation(x, a, yvalues[i-2], b, yvalues[i-1], c, yvalues[i])\n xscatter2.append(x)\n yscatter2.append(fx)\n\nplt.scatter(xscatter2, yscatter2)\nplt.show()",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code"
] |
[
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
]
] |
4ae9862159d45152642a1a2b9091d85c515291ef
| 26,456 |
ipynb
|
Jupyter Notebook
|
MLCourse/TopPages.ipynb
|
jashburn8020/ml-course
|
c360f84ea43fcd550120e98189076f30e85084cb
|
[
"Apache-2.0"
] | 3 |
2021-02-25T17:33:56.000Z
|
2021-09-02T07:11:31.000Z
|
MLCourse/TopPages.ipynb
|
jashburn8020/ml-course
|
c360f84ea43fcd550120e98189076f30e85084cb
|
[
"Apache-2.0"
] | null | null | null |
MLCourse/TopPages.ipynb
|
jashburn8020/ml-course
|
c360f84ea43fcd550120e98189076f30e85084cb
|
[
"Apache-2.0"
] | null | null | null | 44.689189 | 1,576 | 0.560818 |
[
[
[
"# Cleaning Your Data",
"_____no_output_____"
],
[
"Let's take a web access log, and figure out the most-viewed pages on a website from it! Sounds easy, right?\n\nLet's set up a regex that lets us parse an Apache access log line:",
"_____no_output_____"
]
],
[
[
"import re\n\nformat_pat= re.compile(\n r\"(?P<host>[\\d\\.]+)\\s\"\n r\"(?P<identity>\\S*)\\s\"\n r\"(?P<user>\\S*)\\s\"\n r\"\\[(?P<time>.*?)\\]\\s\"\n r'\"(?P<request>.*?)\"\\s'\n r\"(?P<status>\\d+)\\s\"\n r\"(?P<bytes>\\S*)\\s\"\n r'\"(?P<referer>.*?)\"\\s'\n r'\"(?P<user_agent>.*?)\"\\s*'\n)\n",
"_____no_output_____"
]
],
[
[
"Here's the path to the log file I'm analyzing:",
"_____no_output_____"
]
],
[
[
"logPath = \"access_log.txt\"",
"_____no_output_____"
]
],
[
[
"Now we'll whip up a little script to extract the URL in each access, and use a dictionary to count up the number of times each one appears. Then we'll sort it and print out the top 20 pages. What could go wrong?",
"_____no_output_____"
]
],
[
[
"URLCounts = {}\n\nwith open(logPath, \"r\") as f:\n for line in (l.rstrip() for l in f):\n match= format_pat.match(line)\n if match:\n access = match.groupdict()\n request = access['request']\n (action, URL, protocol) = request.split()\n if URL in URLCounts:\n URLCounts[URL] = URLCounts[URL] + 1\n else:\n URLCounts[URL] = 1\n\nresults = sorted(URLCounts, key=lambda i: int(URLCounts[i]), reverse=True)\n\nfor result in results[:20]:\n print(result + \": \" + str(URLCounts[result]))",
"_____no_output_____"
]
],
[
[
"Hm. The 'request' part of the line is supposed to look something like this:\n\nGET /blog/ HTTP/1.1\n\nThere should be an HTTP action, the URL, and the protocol. But it seems that's not always happening. Let's print out requests that don't contain three items:",
"_____no_output_____"
]
],
[
[
"URLCounts = {}\n\nwith open(logPath, \"r\") as f:\n for line in (l.rstrip() for l in f):\n match= format_pat.match(line)\n if match:\n access = match.groupdict()\n request = access['request']\n fields = request.split()\n if (len(fields) != 3):\n print(fields)\n",
"['_\\\\xb0ZP\\\\x07tR\\\\xe5']\n[]\n[]\n[]\n[]\n[]\n[]\n[]\n[]\n[]\n[]\n"
]
],
[
[
"Huh. In addition to empty fields, there's one that just contains garbage. Well, let's modify our script to check for that case:",
"_____no_output_____"
]
],
[
[
"URLCounts = {}\n\nwith open(logPath, \"r\") as f:\n for line in (l.rstrip() for l in f):\n match= format_pat.match(line)\n if match:\n access = match.groupdict()\n request = access['request']\n fields = request.split()\n if (len(fields) == 3):\n URL = fields[1]\n if URL in URLCounts:\n URLCounts[URL] = URLCounts[URL] + 1\n else:\n URLCounts[URL] = 1\n\nresults = sorted(URLCounts, key=lambda i: int(URLCounts[i]), reverse=True)\n\nfor result in results[:20]:\n print(result + \": \" + str(URLCounts[result]))",
"/xmlrpc.php: 68494\n/wp-login.php: 1923\n/: 440\n/blog/: 138\n/robots.txt: 123\n/sitemap_index.xml: 118\n/post-sitemap.xml: 118\n/page-sitemap.xml: 117\n/category-sitemap.xml: 117\n/orlando-headlines/: 95\n/san-jose-headlines/: 85\nhttp://51.254.206.142/httptest.php: 81\n/comics-2/: 76\n/travel/: 74\n/entertainment/: 72\n/business/: 70\n/national/: 70\n/national-headlines/: 70\n/world/: 70\n/weather/: 70\n"
]
],
[
[
"It worked! But, the results don't really make sense. What we really want is pages accessed by real humans looking for news from our little news site. What the heck is xmlrpc.php? A look at the log itself turns up a lot of entries like this:\n\n46.166.139.20 - - [05/Dec/2015:05:19:35 +0000] \"POST /xmlrpc.php HTTP/1.0\" 200 370 \"-\" \"Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)\"\n\nI'm not entirely sure what the script does, but it points out that we're not just processing GET actions. We don't want POSTS, so let's filter those out:",
"_____no_output_____"
]
],
[
[
"URLCounts = {}\n\nwith open(logPath, \"r\") as f:\n for line in (l.rstrip() for l in f):\n match= format_pat.match(line)\n if match:\n access = match.groupdict()\n request = access['request']\n fields = request.split()\n if (len(fields) == 3):\n (action, URL, protocol) = fields\n if (action == 'GET'):\n if URL in URLCounts:\n URLCounts[URL] = URLCounts[URL] + 1\n else:\n URLCounts[URL] = 1\n\nresults = sorted(URLCounts, key=lambda i: int(URLCounts[i]), reverse=True)\n\nfor result in results[:20]:\n print(result + \": \" + str(URLCounts[result]))",
"/: 434\n/blog/: 138\n/robots.txt: 123\n/sitemap_index.xml: 118\n/post-sitemap.xml: 118\n/page-sitemap.xml: 117\n/category-sitemap.xml: 117\n/orlando-headlines/: 95\n/san-jose-headlines/: 85\nhttp://51.254.206.142/httptest.php: 81\n/comics-2/: 76\n/travel/: 74\n/entertainment/: 72\n/business/: 70\n/national/: 70\n/national-headlines/: 70\n/world/: 70\n/weather/: 70\n/about/: 69\n/defense-sticking-head-sand/: 69\n"
]
],
[
[
"That's starting to look better. But, this is a news site - are people really reading the little blog on it instead of news pages? That doesn't make sense. Let's look at a typical /blog/ entry in the log:\n\n54.165.199.171 - - [05/Dec/2015:09:32:05 +0000] \"GET /blog/ HTTP/1.0\" 200 31670 \"-\" \"-\"\n\nHm. Why is the user agent blank? Seems like some sort of malicious scraper or something. Let's figure out what user agents we are dealing with:",
"_____no_output_____"
]
],
[
[
"UserAgents = {}\n\nwith open(logPath, \"r\") as f:\n for line in (l.rstrip() for l in f):\n match= format_pat.match(line)\n if match:\n access = match.groupdict()\n agent = access['user_agent']\n if agent in UserAgents:\n UserAgents[agent] = UserAgents[agent] + 1\n else:\n UserAgents[agent] = 1\n\nresults = sorted(UserAgents, key=lambda i: int(UserAgents[i]), reverse=True)\n\nfor result in results:\n print(result + \": \" + str(UserAgents[result]))",
"Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0): 68484\n-: 4035\nMozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0): 1724\nW3 Total Cache/0.9.4.1: 468\nMozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html): 278\nMozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html): 248\nMozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36: 158\nMozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0: 144\nMozilla/5.0 (iPad; CPU OS 8_4 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12H143 Safari/600.1.4: 120\nMozilla/5.0 (Linux; Android 5.1.1; SM-G900T Build/LMY47X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.76 Mobile Safari/537.36: 47\nMozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm): 43\nMozilla/5.0 (compatible; MJ12bot/v1.4.5; http://www.majestic12.co.uk/bot.php?+): 41\nOpera/9.80 (Windows NT 6.0) Presto/2.12.388 Version/12.14: 40\nMozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots): 27\nRuby: 15\nMozilla/5.0 (Linux; Android 5.1.1; SM-G900T Build/LMY47X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.76 Mobile Safari/537.36: 15\nMozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36: 13\nMozilla/5.0 (compatible; AhrefsBot/5.0; +http://ahrefs.com/robot/): 11\nMozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20100101 Firefox/6.0.2: 11\nMobileSafari/600.1.4 CFNetwork/711.4.6 Darwin/14.0.0: 10\nMozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36: 9\nMozilla/5.0 (compatible; YandexImages/3.0; +http://yandex.com/bots): 9\nMozilla/5.0 (compatible; linkdexbot/2.0; +http://www.linkdex.com/bots/): 7\nMozilla/5.0 (iPhone; CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12F70 Safari/600.1.4 (compatible; Googlebot/2.1; +http://www.google.com/bot.html): 6\nMozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp): 6\nMozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.28) Gecko/20120306 Firefox/3.6.28 (.NET CLR 3.5.30729): 4\nMozilla/5.0 zgrab/0.x: 4\nMozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.66 Safari/537.36: 4\nMozilla/5.0 (compatible; SeznamBot/3.2; +http://fulltext.sblog.cz/): 4\nMozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1): 4\nMozilla/5.0: 3\nMozilla/5.0 (Windows NT 6.1; rv:34.0) Gecko/20100101 Firefox/34.0: 3\nOpera/9.80 (Windows NT 5.1; U; ru) Presto/2.9.168 Version/11.50: 3\nMozilla/5.0 (compatible; spbot/4.4.2; +http://OpenLinkProfiler.org/bot ): 3\nMozilla/4.0 (compatible: FDSE robot): 3\nMozilla/4.0 (compatible; MSIE 9.0; Windows NT 6.1; 2Pac; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022): 3\nMozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0: 3\nMozilla/5.0 (Windows NT 6.2; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0: 2\nMozilla/5.0 (Windows NT 5.1; rv:36.0) Gecko/20100101 Firefox/36.0: 2\nMozilla/5.0 (Windows NT 6.1; rv:28.0) Gecko/20100101 Firefox/28.0: 2\nMozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/5.0: 2\nMozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36: 2\nMozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36: 2\nGooglebot-Image/1.0: 2\nnetEstate NE Crawler (+http://www.website-datenbank.de/): 2\nMozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0: 2\nMozilla/5.0 (X11; U; FreeBSD x86_64; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16: 2\nMozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36: 2\nOpera/9.80 (Windows NT 6.1); U) Presto/2.10.289 Version/12.02: 2\nMozilla/5.0 (compatible; MSIE 9.0; Windows NT 5.1; Trident/5.0; .NET CLR 2.0.50727; .NET CLR 3.5.30729): 2\nMozilla/5.0 (Windows NT 6.2; rv:24.0) Gecko/20100101 Firefox/24.0: 2\nMozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/5.0; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E): 2\nMozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0: 2\nMozilla/5.0 (Windows NT 5.1; rv:28.0) Gecko/20100101 Firefox/28.0: 2\nMozilla/5.0 (Windows NT 6.0; rv:29.0) Gecko/20120101 Firefox/29.0: 2\nMozilla/5.0 (Windows NT 6.0; rv:31.0) Gecko/20100101 Firefox/31.0: 2\nMozilla/5.0 (Windows NT 6.2; rv:31.0) Gecko/20100101 Firefox/31.0: 2\nMozilla/4.0 (compatible; Netcraft Web Server Survey): 2\nMozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; MAGWJS; rv:11.0) like Gecko: 1\nMozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36: 1\nMozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.9.0.2) Gecko/20121223 Ubuntu/9.25 (jaunty) Firefox/3.8: 1\nMozilla/5.0 (Windows NT 10.0; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0: 1\nMozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2251.0 Safari/537.36: 1\nOpera/9.80 (Windows NT 6.2; WOW64); U) Presto/2.12.388 Version/12.14: 1\nMozilla/5.0 (Windows NT 6.1; rv:33.0) Gecko/20100101 Firefox/33.0: 1\nMozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.0.13) Gecko/2009073022 Firefox/3.0.13 (.NET CLR 3.5.30729): 1\nScrapy/1.0.3 (+http://scrapy.org): 1\nMozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows 95) Opera 7.03 [de]: 1\nTelesphoreo: 1\nMozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Firefox/31.0: 1\nMozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36: 1\nMozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3.1.1) Gecko/20101203 Firefox/3.6.12 (.NET CLR 3.5.30309): 1\nMozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36 Scanning for research (researchscan.comsys.rwth-aachen.de): 1\nMozilla/5.0 (Windows NT 6.1; rv:22.0) Gecko/20130405 Firefox/22.0: 1\nMozilla/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:0.9.4) Gecko/20011019 Netscape6/6.2: 1\nMozilla/5.0 (Windows NT 5.1; rv:32.0) Gecko/20100101 Firefox/31.0: 1\nfacebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php): 1\nMozilla/3.0 (compatible; Indy Library): 1\nMozilla/5.0 (X11; Ubuntu; Linux i686; rv:42.0) Gecko/20100101 Firefox/42.0: 1\nMozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20100101 Firefox/5.0: 1\nMozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.59.10 (KHTML, like Gecko) Version/5.1.9 Safari/534.59.10: 1\nMozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko: 1\nNokiaE5-00/SymbianOS/9.1 Series60/3.0 3gpp-gba: 1\nMozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36: 1\nMozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36: 1\n"
]
],
[
[
"Yikes! In addition to '-', there are also a million different web robots accessing the site and polluting my data. Filtering out all of them is really hard, but getting rid of the ones significantly polluting my data in this case should be a matter of getting rid of '-', anything containing \"bot\" or \"spider\", and W3 Total Cache.",
"_____no_output_____"
]
],
[
[
"URLCounts = {}\n\nwith open(logPath, \"r\") as f:\n for line in (l.rstrip() for l in f):\n match= format_pat.match(line)\n if match:\n access = match.groupdict()\n agent = access['user_agent']\n if (not('bot' in agent or 'spider' in agent or \n 'Bot' in agent or 'Spider' in agent or\n 'W3 Total Cache' in agent or agent =='-')):\n request = access['request']\n fields = request.split()\n if (len(fields) == 3):\n (action, URL, protocol) = fields\n if (action == 'GET'):\n if URL in URLCounts:\n URLCounts[URL] = URLCounts[URL] + 1\n else:\n URLCounts[URL] = 1\n\nresults = sorted(URLCounts, key=lambda i: int(URLCounts[i]), reverse=True)\n\nfor result in results[:20]:\n print(result + \": \" + str(URLCounts[result]))",
"/: 77\n/orlando-headlines/: 36\n/?page_id=34248: 28\n/wp-content/cache/minify/000000/M9AvyUjVzUstLy7PLErVz8lMKkosqtTPKtYvTi7KLCgpBgA.js: 27\n/wp-content/cache/minify/000000/M9bPKixNLarUy00szs8D0Zl5AA.js: 27\n/wp-content/cache/minify/000000/lY7dDoIwDIVfiG0KxkfxfnbdKO4HuxICTy-it8Zw15PzfSftzPCckJem-x4qUWArqBPl5mygZLEgyhdOaoxToGyGaiALiOfUnIz0qDLOdSZGE-nOlpc3kopDzrSyavVVt_veb5qSDVhjsQ6dHh_B_eE_z2pYIGJ7iBWKeEio_eT9UQe4xHhDll27mGRryVu_pRc.js: 27\n/wp-content/cache/minify/000000/fY45DoAwDAQ_FMvkRQgFA5ZyWLajiN9zNHR0O83MRkyt-pIctqYFJPedKyYzfHg2PzOFiENAzaD07AxcpKmTolORvDjZt8KEfhBUGjZYCf8Fb0fvA1TXCw.css: 25\n/?author=1: 21\n/wp-content/cache/minify/000000/hcrRCYAwDAXAhXyEjiQ1YKAh4SVSx3cE7_uG7ASr4M9qg3kGWyk1adklK84LHtRj_My6Y0Pfqcz-AA.js: 20\n/wp-content/uploads/2014/11/nhn1.png: 19\n/wp-includes/js/wp-emoji-release.min.js?ver=4.3.1: 17\n/wp-content/cache/minify/000000/BcGBCQAgCATAiUSaKYSERPk3avzuht4SkBJnt4tHJdqgnPBqKldesTcN1R8.js: 17\n/wp-login.php: 16\n/comics-2/: 12\n/world/: 12\n/favicon.ico: 10\n/wp-content/uploads/2014/11/violentcrime.jpg: 6\n/robots.txt: 6\n/wp-content/uploads/2014/11/garfield.jpg: 6\n/wp-content/uploads/2014/11/babyblues.jpg: 6\n"
]
],
[
[
"Now, our new problem is that we're getting a bunch of hits on things that aren't web pages. We're not interested in those, so let's filter out any URL that doesn't end in / (all of the pages on my site are accessed in that manner - again this is applying knowledge about my data to the analysis!)",
"_____no_output_____"
]
],
[
[
"URLCounts = {}\n\nwith open(logPath, \"r\") as f:\n for line in (l.rstrip() for l in f):\n match= format_pat.match(line)\n if match:\n access = match.groupdict()\n agent = access['user_agent']\n if (not('bot' in agent or 'spider' in agent or \n 'Bot' in agent or 'Spider' in agent or\n 'W3 Total Cache' in agent or agent =='-')):\n request = access['request']\n fields = request.split()\n if (len(fields) == 3):\n (action, URL, protocol) = fields\n if (URL.endswith(\"/\")):\n if (action == 'GET'):\n if URL in URLCounts:\n URLCounts[URL] = URLCounts[URL] + 1\n else:\n URLCounts[URL] = 1\n\nresults = sorted(URLCounts, key=lambda i: int(URLCounts[i]), reverse=True)\n\nfor result in results[:20]:\n print(result + \": \" + str(URLCounts[result]))",
"/: 77\n/orlando-headlines/: 36\n/comics-2/: 12\n/world/: 12\n/weather/: 4\n/australia/: 4\n/about/: 4\n/national-headlines/: 3\n/feed/: 2\n/sample-page/feed/: 2\n/science/: 2\n/technology/: 2\n/entertainment/: 1\n/san-jose-headlines/: 1\n/business/: 1\n/travel/feed/: 1\n"
]
],
[
[
"This is starting to look more believable! But if you were to dig even deeper, you'd find that the /feed/ pages are suspect, and some robots are still slipping through. However, it is accurate to say that Orlando news, world news, and comics are the most popular pages accessed by a real human on this day.\n\nThe moral of the story is - know your data! And always question and scrutinize your results before making decisions based on them. If your business makes a bad decision because you provided an analysis of bad source data, you could get into real trouble.\n\nBe sure the decisions you make while cleaning your data are justifiable too - don't strip out data just because it doesn't support the results you want!",
"_____no_output_____"
],
[
"## Activity",
"_____no_output_____"
],
[
"These results still aren't perfect; URL's that include \"feed\" aren't actually pages viewed by humans. Modify this code further to strip out URL's that include \"/feed\". Even better, extract some log entries for these pages and understand where these views are coming from.",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown"
] |
[
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown",
"markdown"
]
] |
4ae98c1f2870b2fbab2eb1fcb8607b14ac635a37
| 34,046 |
ipynb
|
Jupyter Notebook
|
data/cordis/fp7_clean.ipynb
|
meloncholy/my_eu
|
109d3662be34a5357b658fca76213e68cf034177
|
[
"Apache-2.0",
"CC-BY-4.0"
] | 10 |
2018-10-30T08:47:14.000Z
|
2021-05-19T21:08:28.000Z
|
data/cordis/fp7_clean.ipynb
|
meloncholy/my_eu
|
109d3662be34a5357b658fca76213e68cf034177
|
[
"Apache-2.0",
"CC-BY-4.0"
] | 6 |
2018-12-08T22:01:10.000Z
|
2022-02-17T17:58:31.000Z
|
data/cordis/fp7_clean.ipynb
|
meloncholy/my_eu
|
109d3662be34a5357b658fca76213e68cf034177
|
[
"Apache-2.0",
"CC-BY-4.0"
] | 7 |
2018-11-24T16:09:16.000Z
|
2021-05-22T10:34:44.000Z
| 24.528818 | 256 | 0.574076 |
[
[
[
"# CORDIS FP7",
"_____no_output_____"
]
],
[
[
"import json\nimport re\nimport urllib\n\nfrom titlecase import titlecase\nimport pandas as pd\n\npd.set_option('display.max_columns', 50)",
"_____no_output_____"
]
],
[
[
"## Read in Data",
"_____no_output_____"
]
],
[
[
"all_projects = pd.read_excel('input/fp7/cordis-fp7projects.xlsx')\nall_projects.shape",
"_____no_output_____"
],
[
"all_organizations = pd.read_excel('input/fp7/cordis-fp7organizations.xlsx')\nall_organizations.shape",
"_____no_output_____"
],
[
"all_briefs = pd.read_excel('input/fp7/cordis-fp7briefs.xlsx')\nall_briefs.shape",
"_____no_output_____"
]
],
[
[
"## Count Organisations and Countries\n\nIt is useful to know the total number of organisations and the number of countries involved, to deal with cases where the contribution of each organisation is unknown.",
"_____no_output_____"
]
],
[
[
"all_organizations[['projectRcn', 'id', 'country']].count()",
"_____no_output_____"
],
[
"[\n all_organizations.country.isna().sum(),\n (all_organizations.country[~all_organizations.country.isna()] != \n all_organizations.country[~all_organizations.country.isna()].str.strip()).sum(),\n (all_organizations.country[~all_organizations.country.isna()] != \n all_organizations.country[~all_organizations.country.isna()].str.upper()).sum(),\n]",
"_____no_output_____"
],
[
"project_num_organizations = all_organizations.groupby('projectRcn').\\\n id.nunique().reset_index().rename(columns={'id': 'num_organizations'})\nproject_num_organizations.shape",
"_____no_output_____"
],
[
"project_num_countries = all_organizations.groupby('projectRcn').\\\n country.nunique().reset_index().rename(columns={'country': 'num_countries'})\nproject_num_countries.shape",
"_____no_output_____"
],
[
"project_num_organizations_and_countries = pd.merge(\n project_num_countries, project_num_organizations,\n on='projectRcn', validate='1:1'\n)\nproject_num_organizations_and_countries.shape",
"_____no_output_____"
],
[
"project_num_organizations_and_countries.head()",
"_____no_output_____"
]
],
[
[
"## Restrict to UK\n\nWe are only interested in projects and organizations where the coordinator or at least one participant institution is in the UK.",
"_____no_output_____"
]
],
[
[
"uk_organizations = all_organizations[all_organizations.country == 'UK']\nuk_organizations.shape",
"_____no_output_____"
],
[
"uk_organizations.head()",
"_____no_output_____"
],
[
"uk_projects = all_projects[all_projects.id.isin(uk_organizations.projectID)]\nuk_projects.shape",
"_____no_output_____"
],
[
"uk_projects.head()",
"_____no_output_____"
],
[
"uk_briefs = all_briefs[all_briefs.projectRcn.isin(uk_projects.rcn)]\nuk_briefs.shape",
"_____no_output_____"
],
[
"uk_briefs.head()",
"_____no_output_____"
]
],
[
[
"## Examples\n\n### Coordinator outside UK\n\nThe UK has two participant institutions. It appears that `projects.ecMaxContribution` is the sum of all `organizations.ecContribution`s for all coordinator and participant institutions.",
"_____no_output_____"
]
],
[
[
"uk_projects[uk_projects.rcn == 101244]",
"_____no_output_____"
],
[
"uk_organizations[uk_organizations.projectRcn == 101244]",
"_____no_output_____"
],
[
"all_organizations[all_organizations.projectRcn == 101244].ecContribution.max()",
"_____no_output_____"
],
[
"all_organizations[all_organizations.projectRcn == 101244].ecContribution.sum()",
"_____no_output_____"
],
[
"all_briefs[all_briefs.projectRcn == 101244]",
"_____no_output_____"
]
],
[
[
"### Coordinator in UK\n\nThis one is also interesting in that it seems to have a lot of duplicate records that don't have titles, for some reason. We will need to filter those out.",
"_____no_output_____"
]
],
[
[
"uk_projects[uk_projects.rcn == 99464]",
"_____no_output_____"
],
[
"uk_organizations[uk_organizations.projectRcn == 99464]",
"_____no_output_____"
],
[
"uk_organizations[uk_organizations.projectRcn == 99464].ecContribution.unique().sum()",
"_____no_output_____"
],
[
"all_briefs[all_briefs.projectRcn == 99464]",
"_____no_output_____"
]
],
[
[
"## Duplicate Projects\n\nIt looks like it's safe to just drop projects without titles; those seem to be the only duplicates.",
"_____no_output_____"
]
],
[
[
"[uk_projects.rcn.nunique(), uk_projects.id.nunique(), uk_projects.shape]",
"_____no_output_____"
],
[
"uk_projects[uk_projects.duplicated('rcn', keep=False)]",
"_____no_output_____"
],
[
"uk_projects[pd.isnull(uk_projects.title)]",
"_____no_output_____"
],
[
"clean_projects = uk_projects[~pd.isnull(uk_projects.title)].copy()\n# Could include coordinator and participants... would need some extra cleaning.\nclean_projects.drop([\n 'id', 'programme', 'topics', 'frameworkProgramme', 'call',\n 'fundingScheme', 'coordinator', 'participants', 'subjects'\n], axis=1, inplace=True)\nclean_projects.rename(columns={\n 'startDate': 'start_date',\n 'endDate': 'end_date',\n 'projectUrl': 'project_url',\n 'totalCost': 'total_cost_eur',\n 'ecMaxContribution': 'max_contribution_eur',\n 'coordinatorCountry': 'coordinator_country',\n 'participantCountries': 'participant_countries'\n}, inplace=True)\nclean_projects.shape",
"_____no_output_____"
],
[
"clean_projects.describe()",
"_____no_output_____"
],
[
"clean_projects.head()",
"_____no_output_____"
]
],
[
[
"## Check Project Columns",
"_____no_output_____"
]
],
[
[
"clean_projects.count()",
"_____no_output_____"
]
],
[
[
"### Acronym\n\nJust missing one.",
"_____no_output_____"
]
],
[
[
"clean_projects[clean_projects.acronym.isna()]",
"_____no_output_____"
]
],
[
[
"### Status\n\nSome projects are listed as cancelled. It's not clear what this means exactly. Spot checks reveal that some of them apparently received at least partial funding and delivered some results, so it does not seem appropriate to remove them altogether.\n\n- https://cordis.europa.eu/result/rcn/237795_en.html (TORTELLEX)\n- https://cordis.europa.eu/result/rcn/196663_en.html (YSCHILLER)\n- https://cordis.europa.eu/project/rcn/188111_en.html (MICARTREGEN) - no results",
"_____no_output_____"
]
],
[
[
"clean_projects.status.value_counts()",
"_____no_output_____"
],
[
"clean_projects[clean_projects.status == 'CAN'].head()",
"_____no_output_____"
]
],
[
[
"### Title",
"_____no_output_____"
]
],
[
[
"(clean_projects.title.str.strip() != clean_projects.title).sum()",
"_____no_output_____"
]
],
[
[
"### Start and End Dates\n\nSome are missing. Discard for now. There is some overlap with the cancelled projects, but it is not exact.",
"_____no_output_____"
]
],
[
[
"(clean_projects.start_date.isna() | clean_projects.end_date.isna()).sum()",
"_____no_output_____"
],
[
"((clean_projects.status == 'CAN') & (clean_projects.start_date.isna() | clean_projects.end_date.isna())).sum()",
"_____no_output_____"
],
[
"((clean_projects.status != 'CAN') & (clean_projects.start_date.isna() | clean_projects.end_date.isna())).sum()",
"_____no_output_____"
],
[
"clean_projects = clean_projects[\n ~clean_projects.start_date.isna() | ~clean_projects.end_date.isna()\n]\nclean_projects.shape",
"_____no_output_____"
],
[
"(clean_projects.start_date > clean_projects.end_date).sum()",
"_____no_output_____"
]
],
[
[
"### Project URL\n\nLooks pretty clean.",
"_____no_output_____"
]
],
[
[
"(~clean_projects.project_url.isna()).sum()",
"_____no_output_____"
],
[
"def is_valid_url(url):\n result = urllib.parse.urlparse(str(url))\n return bool((result.scheme == 'http' or result.scheme == 'https') and result.netloc)\n\nproject_url_bad = ~clean_projects.project_url.isna() & ~clean_projects.project_url.apply(is_valid_url)\nproject_url_bad.sum()",
"_____no_output_____"
],
[
"clean_projects[project_url_bad]",
"_____no_output_____"
],
[
"clean_projects.loc[project_url_bad, 'project_url'] = 'http://' + clean_projects.loc[project_url_bad, 'project_url']",
"_____no_output_____"
],
[
"(~clean_projects.project_url.isna() & ~clean_projects.project_url.apply(is_valid_url)).sum()",
"_____no_output_____"
]
],
[
[
"### Objective",
"_____no_output_____"
]
],
[
[
"(clean_projects.objective.str.strip() != clean_projects.objective).sum()",
"_____no_output_____"
],
[
"clean_projects.objective = clean_projects.objective.str.strip()",
"_____no_output_____"
]
],
[
[
"### Total Cost and EC Max Contribution",
"_____no_output_____"
]
],
[
[
"clean_projects.total_cost_eur.describe()",
"_____no_output_____"
],
[
"clean_projects.max_contribution_eur.describe()",
"_____no_output_____"
],
[
"(clean_projects.max_contribution_eur > clean_projects.total_cost_eur).sum()",
"_____no_output_____"
]
],
[
[
"## Clean Up Organizations\n\nI notice several issues:\n\n- Some are missing IDs (but do have postcodes)\n- Some are missing postcodes\n- Some postcodes are clearly typo'd (digit substitutions, etc);\n- Some postcodes have been terminated (searched for them with google)\n\nThere are only 2993 unique organization IDs, so this is probably the result of a join.\n\nFor now, drop all organizations that don't have both an ID and a valid postcode. (It does look possible to match names to find IDs, and many without postcodes still have addresses, which we could geocode.)\n\nWould be interesting to try this: https://codereview.stackexchange.com/questions/117801/uk-postcode-validation-and-format-correction-tool",
"_____no_output_____"
]
],
[
[
"[\n uk_organizations.shape,\n uk_organizations.id.notna().sum(),\n uk_organizations.id.isna().sum(),\n uk_organizations.id[uk_organizations.id.notna()].nunique(),\n uk_organizations.postCode.isna().sum(),\n uk_organizations.postCode[uk_organizations.postCode.notna()].nunique()\n]",
"_____no_output_____"
],
[
"organizations = uk_organizations[uk_organizations.id.notna() & uk_organizations.postCode.notna()].copy()\norganizations.id = organizations.id.astype('int64')\norganizations.postCode = organizations.postCode.astype('str')\n[\n organizations.shape,\n organizations.id.nunique(),\n organizations.postCode.nunique()\n]",
"_____no_output_____"
],
[
"ukpostcodes = pd.read_csv('../postcodes/input/ukpostcodes.csv.gz')\nukpostcodes.shape",
"_____no_output_____"
],
[
"organizations.postCode.isin(ukpostcodes.postcode).sum()",
"_____no_output_____"
],
[
"organizations['cleanPostcode'] = organizations.postCode.\\\n str.upper().\\\n str.strip().\\\n str.replace(r'[^A-Z0-9]', '').\\\n str.replace(r'^(\\S+)([0-9][A-Z]{2})$', r'\\1 \\2')",
"_____no_output_____"
],
[
"organizations.cleanPostcode.isin(ukpostcodes.postcode).sum()",
"_____no_output_____"
],
[
"organizations.cleanPostcode[~organizations.cleanPostcode.isin(ukpostcodes.postcode)].unique()",
"_____no_output_____"
],
[
"organizations = organizations[organizations.cleanPostcode.isin(ukpostcodes.postcode)]\norganizations.shape",
"_____no_output_____"
],
[
"clean_projects = clean_projects[clean_projects.rcn.isin(organizations.projectRcn)]\nclean_projects.shape",
"_____no_output_____"
]
],
[
[
"## Clean Up Duplicate Organizations\n\nI think there is also a join on the contacts, because we get multiple rows for some project-organization pairs. The main thing is that we want the `ecContribution` to be consistent. Otherwise, any row will do.",
"_____no_output_____"
]
],
[
[
"organizations.sort_values(['projectRcn', 'id']).\\\n groupby(['projectRcn', 'id']).\\\n filter(lambda x: x.shape[0] > 1)",
"_____no_output_____"
],
[
"organizations.groupby(['projectRcn', 'id']).\\\n filter(lambda x: x.ecContribution.nunique() > 1).shape",
"_____no_output_____"
],
[
"clean_organizations = organizations.groupby(['projectRcn', 'id']).first()\nclean_organizations.reset_index(inplace=True)\nclean_organizations.drop([\n 'projectID', 'projectAcronym', 'shortName', 'activityType', 'endOfParticipation',\n 'country', 'street', 'city', 'postCode',\n 'contactType', 'contactTitle', 'contactFirstNames', 'contactLastNames',\n 'contactFunction', 'contactTelephoneNumber', 'contactFaxNumber', 'contactEmail'\n], axis=1, inplace=True)\nclean_organizations.rename({\n 'projectRcn': 'project_rcn',\n 'id': 'organization_id',\n 'ecContribution': 'contribution_eur',\n 'organizationUrl': 'organization_url',\n 'cleanPostcode': 'postcode'\n}, axis=1, inplace=True)\nclean_organizations.name = clean_organizations.name.apply(titlecase)\nclean_organizations.shape",
"_____no_output_____"
],
[
"clean_organizations.head()",
"_____no_output_____"
]
],
[
[
"## Check Organisations",
"_____no_output_____"
]
],
[
[
"clean_organizations.count()",
"_____no_output_____"
]
],
[
[
"### Role",
"_____no_output_____"
]
],
[
[
"clean_organizations.role.value_counts()",
"_____no_output_____"
]
],
[
[
"### Name",
"_____no_output_____"
]
],
[
[
"(clean_organizations.name.str.strip() != clean_organizations.name).sum()",
"_____no_output_____"
]
],
[
[
"### Contribution EUR\n\nMissing for some organisations.",
"_____no_output_____"
]
],
[
[
"clean_organizations.contribution_eur.describe()",
"_____no_output_____"
],
[
"clean_organizations.contribution_eur.isna().sum()",
"_____no_output_____"
]
],
[
[
"### Organisation URL\n\nMostly clean. Found a couple with a `;` delimiting two URLs, neither of which resolved, so we can get rid of those.",
"_____no_output_____"
]
],
[
[
"(~clean_organizations.organization_url.isna()).sum()",
"_____no_output_____"
],
[
"organization_url_bad = ~clean_organizations.organization_url.isna() & \\\n ~clean_organizations.organization_url.apply(is_valid_url)\norganization_url_bad.sum()",
"_____no_output_____"
],
[
"clean_organizations.loc[organization_url_bad, 'organization_url'] = \\\n 'http://' + clean_organizations.loc[organization_url_bad, 'organization_url']",
"_____no_output_____"
],
[
"organization_url_bad = ~clean_organizations.organization_url.isna() & \\\n ~clean_organizations.organization_url.apply(is_valid_url)\norganization_url_bad.sum()",
"_____no_output_____"
],
[
"clean_organizations[\n ~clean_organizations.organization_url.isna() & \\\n clean_organizations.organization_url.str.match('http.*http')].organization_url.unique()",
"_____no_output_____"
],
[
"clean_organizations.loc[\n ~clean_organizations.organization_url.isna() & \\\n clean_organizations.organization_url.str.match('http.*http'), 'organization_url'] = float('nan')",
"_____no_output_____"
]
],
[
[
"## Briefs\n\nMight as well merge these into the projects where we have them. We have a few duplicates to take care of.",
"_____no_output_____"
]
],
[
[
"clean_briefs = uk_briefs[\n uk_briefs.projectRcn.isin(clean_projects.rcn) &\\\n (uk_briefs.title.notna() | uk_briefs.teaser.notna() | uk_briefs.article.notna())\n].copy()\nclean_briefs.shape",
"_____no_output_____"
],
[
"clean_briefs[clean_briefs.projectRcn.duplicated(keep=False)]",
"_____no_output_____"
],
[
"clean_briefs = clean_briefs.sort_values('lastUpdateDate')\nclean_briefs = clean_briefs[~clean_briefs.projectRcn.duplicated(keep='last')]\nclean_briefs.shape",
"_____no_output_____"
],
[
"clean_briefs.drop([\n 'rcn', 'language', 'lastUpdateDate', 'country', 'projectAcronym',\n 'programme', 'topics', 'relatedReportRcn'\n], axis=1, inplace=True)\nclean_briefs.rename({\n 'projectRcn': 'rcn',\n 'title': 'brief_title',\n 'relatedReportTitle': 'related_report_title',\n 'imageUri': 'image_path'\n}, axis=1, inplace=True)\nclean_briefs.head()",
"_____no_output_____"
],
[
"clean_projects_with_briefs = pd.merge(\n clean_projects, clean_briefs, on='rcn', how='left', validate='1:1'\n)\nclean_projects_with_briefs.head()",
"_____no_output_____"
]
],
[
[
"## Checks",
"_____no_output_____"
]
],
[
[
"clean_organizations[clean_organizations.project_rcn == 101244]",
"_____no_output_____"
],
[
"clean_projects_with_briefs[clean_projects_with_briefs.rcn == 101244]",
"_____no_output_____"
],
[
"clean_organizations[clean_organizations.project_rcn == 99464]",
"_____no_output_____"
],
[
"clean_projects_with_briefs[clean_projects_with_briefs.rcn == 99464]",
"_____no_output_____"
],
[
"project_organizations = pd.merge(\n clean_projects_with_briefs, clean_organizations,\n left_on='rcn', right_on='project_rcn', validate='1:m')\nproject_organizations.drop(['project_rcn'], axis=1, inplace=True)\nproject_organizations.shape",
"_____no_output_____"
],
[
"project_organizations.head()",
"_____no_output_____"
],
[
"uk_contributions = project_organizations.groupby('rcn').aggregate({'contribution_eur': sum})\nuk_contributions.reset_index(inplace=True)\nuk_contributions.head()",
"_____no_output_____"
],
[
"project_uk_contributions = pd.merge(\n clean_projects_with_briefs,\n uk_contributions,\n on='rcn', validate='1:1')\nproject_uk_contributions.head()",
"_____no_output_____"
],
[
"project_uk_contributions[project_uk_contributions.contribution_eur > project_uk_contributions.max_contribution_eur + 0.1].shape",
"_____no_output_____"
],
[
"project_organization_uk_contributions = pd.merge(\n project_uk_contributions, clean_organizations,\n left_on='rcn', right_on='project_rcn', validate='1:m'\n)\nproject_organization_uk_contributions = pd.merge(\n project_organization_uk_contributions, ukpostcodes, on='postcode', validate='m:1'\n)\nproject_organization_uk_contributions.shape",
"_____no_output_____"
],
[
"project_organization_uk_contributions.head()",
"_____no_output_____"
],
[
"(project_uk_contributions.contribution_eur < 1000).value_counts()",
"_____no_output_____"
]
],
[
[
"### Add Numbers of Organisations and Countries\n\nAdd these back on and do a sanity check against the `participant_countries` field. They mostly match up, except for a few relatively small discrepancies. ",
"_____no_output_____"
]
],
[
[
"clean_projects_with_briefs.shape",
"_____no_output_____"
],
[
"clean_projects_with_briefs = pd.merge(\n clean_projects_with_briefs, project_num_organizations_and_countries,\n left_on='rcn', right_on='projectRcn', validate='1:1')\nclean_projects_with_briefs.drop('projectRcn', axis=1, inplace=True)\nclean_projects_with_briefs.shape",
"_____no_output_____"
],
[
"clean_projects_with_briefs.head()",
"_____no_output_____"
],
[
"[\n clean_projects_with_briefs.num_countries.isna().sum(),\n clean_projects_with_briefs.coordinator_country.isna().sum(),\n clean_projects_with_briefs.participant_countries.isna().sum()\n]",
"_____no_output_____"
],
[
"def check_num_countries():\n ccs = clean_projects_with_briefs.coordinator_country\n pcs = clean_projects_with_briefs.participant_countries\n ncs = clean_projects_with_briefs.num_countries\n pcs_isna = pcs.isna()\n \n coordinator_mismatch = clean_projects_with_briefs[pcs_isna][ncs[pcs_isna] != 1].copy()\n coordinator_mismatch['check'] = 1\n \n cs = ccs[~pcs_isna] + ';' + pcs[~pcs_isna]\n check_ncs = cs.apply(lambda x: len(set(x.split(';'))))\n \n participant_mismatch = clean_projects_with_briefs[~pcs_isna][ncs[~pcs_isna] != check_ncs].copy()\n participant_mismatch['check'] = check_ncs\n \n return pd.concat([coordinator_mismatch, participant_mismatch])\\\n [['rcn', 'coordinator_country', 'participant_countries', 'num_countries', 'check', 'num_organizations']]\ncheck_num_countries()",
"_____no_output_____"
],
[
"all_organizations.country[all_organizations.projectRcn == 100467].unique()",
"_____no_output_____"
],
[
"all_organizations.country[all_organizations.projectRcn == 203681].unique()",
"_____no_output_____"
],
[
"all_organizations.country[all_organizations.projectRcn == 90982].unique()",
"_____no_output_____"
]
],
[
[
"I suspect a problem with handling of `NA`; that is a valid code (Namibia), but maybe in some cases it is being used for Not Available.",
"_____no_output_____"
],
[
"### Convert to GBP",
"_____no_output_____"
]
],
[
[
"eur_gbp = pd.read_pickle('../exchange_rates/output/exchange_rates.pkl.gz')\neur_gbp.tail()",
"_____no_output_____"
],
[
"def find_average_eur_gbp_rate(row):\n # create timeseries from start to end\n days = pd.date_range(row.start_date, row.end_date, closed='left')\n daily = pd.DataFrame({\n 'month_start': days,\n 'weight': 1.0 / days.shape[0]\n })\n monthly = daily.resample('MS', on='month_start').sum()\n monthly = pd.merge(monthly, eur_gbp, on='month_start', validate='1:1')\n return (monthly.weight * monthly.rate).sum()\n\nclean_projects_with_briefs['eur_gbp'] = \\\n clean_projects_with_briefs.apply(\n find_average_eur_gbp_rate, axis=1, result_type='reduce')",
"_____no_output_____"
],
[
"clean_projects_with_briefs.head()",
"_____no_output_____"
]
],
[
[
"## Save Data",
"_____no_output_____"
]
],
[
[
"clean_projects_with_briefs.to_pickle('output/fp7_projects.pkl.gz')",
"_____no_output_____"
],
[
"clean_organizations.to_pickle('output/fp7_organizations.pkl.gz')",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code"
] |
[
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown",
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code"
]
] |
4ae98f48da980edf68dcbeb0df5678ef99aec627
| 192,945 |
ipynb
|
Jupyter Notebook
|
src/4_plotting/plotting.ipynb
|
akxen/wholesale-price-targeting-via-rep
|
dd47ddbbc69fd09f17ebd09396299faeb5c90c31
|
[
"MIT"
] | null | null | null |
src/4_plotting/plotting.ipynb
|
akxen/wholesale-price-targeting-via-rep
|
dd47ddbbc69fd09f17ebd09396299faeb5c90c31
|
[
"MIT"
] | null | null | null |
src/4_plotting/plotting.ipynb
|
akxen/wholesale-price-targeting-via-rep
|
dd47ddbbc69fd09f17ebd09396299faeb5c90c31
|
[
"MIT"
] | null | null | null | 225.666667 | 38,342 | 0.891098 |
[
[
[
"# Plotting\n\nFigures to plot:\n1. Merit order plots showing:\n 1. how emissions intensive plant move down the merit order as the permit price increases (subplot a), and the net liability faced by different generators if dispatched (subplot b);\n 2. short-run marginal costs of generators under a REP scheme and a carbon tax.\n \n2. Plot showing baselines that target average wholesale prices for different price targets over different permit price scenarios (subplot a). Plot showing scheme revenue arising from different baseline permit price combinations (subplot b). Plot showing final average wholesale prices (subplot c).\n\n3. BAU targeting baseline and scheme revenue over a range of permit prices\n\n4. Average emissions intensity as a function of permit price\n\n5. Average regional prices under a BAU average wholesale price targeting REP scheme (subplot a), and a carbon tax (subplot b) for different permit prices.\n\n## Import packages",
"_____no_output_____"
]
],
[
[
"import os\nimport pickle\nimport numpy as np\nimport pandas as pd\n\nimport matplotlib\nimport matplotlib.cm as cm\nimport matplotlib.pyplot as plt\nimport matplotlib.patches as patches\nfrom matplotlib.collections import PatchCollection\nfrom matplotlib.ticker import AutoMinorLocator, MultipleLocator, FormatStrFormatter, FixedLocator, LinearLocator\nfrom mpl_toolkits.axes_grid1 import make_axes_locatable",
"_____no_output_____"
]
],
[
[
"Set text options for plots",
"_____no_output_____"
]
],
[
[
"matplotlib.rcParams['font.family'] = ['sans-serif']\nmatplotlib.rcParams['font.serif'] = ['Helvetica']\nplt.rc('text', usetex=True)",
"_____no_output_____"
]
],
[
[
"## Declare paths to files",
"_____no_output_____"
]
],
[
[
"# Identifier used to update paths depending on the number of scenarios investigated\nnumber_of_scenarios = '100_scenarios'\n\n# Core data directory\ndata_dir = os.path.join(os.path.curdir, os.path.pardir, os.path.pardir, 'data')\n\n# Operating scenario data\noperating_scenarios_dir = os.path.join(os.path.curdir, os.path.pardir, '1_create_scenarios')\n\n# Model output directory\nparameter_selector_dir = os.path.join(os.path.curdir, os.path.pardir, '2_parameter_selector', 'output', number_of_scenarios)\n\n# Processed results directory\nprocessed_results_dir = os.path.join(os.path.curdir, os.path.pardir, '3_process_results', 'output', number_of_scenarios)\n\n# Output directory\noutput_dir = os.path.join(os.path.curdir, 'output', number_of_scenarios)",
"_____no_output_____"
]
],
[
[
"## Import data",
"_____no_output_____"
]
],
[
[
"# Model parameters\n# ----------------\n# Generator data\nwith open(os.path.join(parameter_selector_dir, 'df_g.pickle'), 'rb') as f:\n df_g = pickle.load(f)\n \n# Node data\nwith open(os.path.join(parameter_selector_dir, 'df_n.pickle'), 'rb') as f:\n df_n = pickle.load(f)\n \n# Scenario data\nwith open(os.path.join(parameter_selector_dir, 'df_scenarios.pickle'), 'rb') as f:\n df_scenarios = pickle.load(f)\n\n \n# Processed results\n# -----------------\n# BAU average price\nwith open(os.path.join(processed_results_dir, 'mppdc_bau_average_price.pickle'), 'rb') as f:\n mppdc_bau_average_price = pickle.load(f) \n \n# Average system emissions intensities for different permit prices\nwith open(os.path.join(processed_results_dir, 'df_average_emissions_intensities.pickle'), 'rb') as f:\n df_average_emissions_intensities = pickle.load(f)\n \n# Price targeting baselines for different permit prices\nwith open(os.path.join(processed_results_dir, 'df_baseline_vs_permit_price.pickle'), 'rb') as f:\n df_baseline_vs_permit_price = pickle.load(f)\n \n# Scheme revenue corresponding to different price targets\nwith open(os.path.join(processed_results_dir, 'df_baseline_vs_revenue.pickle'), 'rb') as f:\n df_baseline_vs_revenue = pickle.load(f)\n \n# Average regional and national wholesale electricity prices under a REP scheme\nwith open(os.path.join(processed_results_dir, 'df_rep_average_prices.pickle'), 'rb') as f:\n df_rep_average_prices = pickle.load(f)\n \n# Average regional and national wholesale electricity prices under a carbon tax\nwith open(os.path.join(processed_results_dir, 'df_carbon_tax_average_prices.pickle'), 'rb') as f:\n df_carbon_tax_average_prices = pickle.load(f)",
"_____no_output_____"
]
],
[
[
"Conversion factor used to format figure size.",
"_____no_output_____"
]
],
[
[
"# Millimeters to inches\nmmi = 0.0393701",
"_____no_output_____"
]
],
[
[
"### Merit order plots\nRepresent generators as rectangles. The length of a rectangle corresponds to a generator's capacity relative total installed capacity. Arrange these rectangles (generators) in order of increasing short-run marginal cost (SRMC), creating a merit order of generation. The colour and shade of each rectangle can be used to denote different generator properties e.g. emissions intensity, SRMC, or net liability faced under an output-based rebating scheme. Repeat this procedure for different permit price scenarios. Note that different permit prices will change the relative costs of generators, shifting their position in the merit order.",
"_____no_output_____"
]
],
[
[
"def plot_merit_order():\n \"Shows how merit order is affected w.r.t emissions intensities, SRMCs, and net liability under a REP scheme\"\n\n # Only consider fossil units\n df_gp = df_g[df_g['FUEL_CAT']=='Fossil'].copy()\n\n # Permit prices\n permit_prices = range(2, 71, 2)\n\n # Number of rectanlges\n n = len(permit_prices)\n\n # Gap as a fraction of rectangle height\n gap_fraction = 1 / 10\n\n # Rectangle height\n rectangle_height = 1 / (gap_fraction * (n - 1) + n)\n\n # Gap between rectangles\n y_gap = rectangle_height * gap_fraction\n\n # Initial y offset\n y_offset = 0\n\n # Container for rectangle patches\n rectangles = []\n\n # Container for colours corresponding to patches\n colours_emissions_intensity = []\n colours_net_liability = []\n colours_srmc_rep = []\n colours_srmc_carbon_tax = []\n\n # Construct rectangles to plot for each permit price scenario\n for permit_price in permit_prices:\n\n # Baseline corresponding to BAU price targeting scenario\n baseline = df_baseline_vs_permit_price.loc[permit_price, 1]\n\n # Net liability faced by generator under REP scheme\n df_gp['NET_LIABILITY'] = (df_gp['EMISSIONS'] - baseline) * permit_price\n\n # Compute updated SRMC and sort from least cost to most expensive (merit order)\n df_gp['SRMC_REP'] = df_gp['SRMC_2016-17'] + df_gp['NET_LIABILITY']\n df_gp.sort_values('SRMC_REP', inplace=True)\n\n # Carbon tax SRMCs (baseline = 0 for all permit price scenarios)\n df_gp['SRMC_TAX'] = df_gp['SRMC_2016-17'] + (df_gp['EMISSIONS'] * permit_price)\n\n # Normalising registered capacities\n df_gp['REG_CAP_NORM'] = (df_gp['REG_CAP'] / df_gp['REG_CAP'].sum())\n\n x_offset = 0\n\n # Plotting rectangles\n for index, row in df_gp.iterrows():\n rectangles.append(patches.Rectangle((x_offset, y_offset), row['REG_CAP_NORM'], rectangle_height))\n\n # Colour for emissions intensity plot\n colours_emissions_intensity.append(row['EMISSIONS'])\n\n # Colour for net liability under REP scheme for each generator\n colours_net_liability.append(row['NET_LIABILITY'])\n\n # Colour for net generator SRMCs under REP scheme\n colours_srmc_rep.append(row['SRMC_REP'])\n\n # Colour for SRMCs under carbon tax\n colours_srmc_carbon_tax.append(row['SRMC_TAX'])\n\n # Offset for placement of next rectangle\n x_offset += row['REG_CAP_NORM']\n y_offset += rectangle_height + y_gap\n\n # Merit order emissions intensity patches\n patches_emissions_intensity = PatchCollection(rectangles, cmap='Reds')\n patches_emissions_intensity.set_array(np.array(colours_emissions_intensity))\n\n # Net liability under REP scheme patches\n patches_net_liability = PatchCollection(rectangles, cmap='bwr')\n patches_net_liability.set_array(np.array(colours_net_liability))\n\n # SRMCs under REP scheme patches\n patches_srmc_rep = PatchCollection(rectangles, cmap='Reds')\n patches_srmc_rep.set_array(np.array(colours_srmc_rep))\n\n # SRMCs under carbon tax patches\n patches_srmc_carbon_tax = PatchCollection(rectangles, cmap='Reds')\n patches_srmc_carbon_tax.set_array(np.array(colours_srmc_carbon_tax))\n\n\n # Format tick positions\n # ---------------------\n # y-ticks\n # -------\n # Minor ticks\n yminorticks = []\n for counter, permit_price in enumerate(permit_prices):\n if counter == 0:\n position = rectangle_height / 2\n else:\n position = yminorticks[-1] + y_gap + rectangle_height\n yminorticks.append(position)\n yminorlocator = FixedLocator(yminorticks)\n\n # Major ticks\n ymajorticks = []\n for counter in range(0, 7):\n if counter == 0:\n position = (4.5 * rectangle_height) + (4 * y_gap)\n else:\n position = ymajorticks[-1] + (5 * rectangle_height) + (5 * y_gap)\n ymajorticks.append(position)\n ymajorlocator = FixedLocator(ymajorticks)\n\n # x-ticks\n # -------\n # Minor locator\n xminorlocator = LinearLocator(21)\n\n # Major locator\n xmajorlocator = LinearLocator(6)\n\n\n # Emissions intensity and net liability figure\n # --------------------------------------------\n plt.clf()\n\n # Initialise figure\n fig1 = plt.figure()\n\n # Axes on which to construct plots\n ax1 = plt.axes([0.065, 0.185, 0.40, .79])\n ax2 = plt.axes([0.57, 0.185, 0.40, .79])\n\n # Add emissions intensity patches\n ax1.add_collection(patches_emissions_intensity)\n\n # Add net liability patches\n patches_net_liability.set_clim([-35, 35])\n ax2.add_collection(patches_net_liability)\n\n # Add colour bars with labels\n cbar1 = fig1.colorbar(patches_emissions_intensity, ax=ax1, pad=0.015, aspect=30)\n cbar1.set_label('Emissions intensity (tCO${_2}$/MWh)', fontsize=8, fontname='Helvetica')\n\n cbar2 = fig1.colorbar(patches_net_liability, ax=ax2, pad=0.015, aspect=30)\n cbar2.set_label('Net liability (\\$/MWh)', fontsize=8, fontname='Helvetica')\n\n # Label axes\n ax1.set_ylabel('Permit price (\\$/tCO$_{2}$)', fontsize=9, fontname='Helvetica')\n ax1.set_xlabel('Normalised cumulative capacity\\n(a)', fontsize=9, fontname='Helvetica')\n\n ax2.set_ylabel('Permit price (\\$/tCO$_{2}$)', fontsize=9, fontname='Helvetica')\n ax2.set_xlabel('Normalised cumulative capacity\\n(a)', fontsize=9, fontname='Helvetica')\n\n\n # Format ticks\n # ------------\n # y-axis\n ax1.yaxis.set_minor_locator(yminorlocator)\n ax1.yaxis.set_major_locator(ymajorlocator)\n ax2.yaxis.set_minor_locator(yminorlocator)\n ax2.yaxis.set_major_locator(ymajorlocator)\n\n # y-tick labels\n ax1.yaxis.set_ticklabels(['10', '20', '30', '40', '50', '60', '70'])\n ax2.yaxis.set_ticklabels(['10', '20', '30', '40', '50', '60', '70'])\n\n # x-axis\n ax1.xaxis.set_minor_locator(xminorlocator)\n ax1.xaxis.set_major_locator(xmajorlocator)\n ax2.xaxis.set_minor_locator(xminorlocator)\n ax2.xaxis.set_major_locator(xmajorlocator)\n\n # Format figure size\n width = 180 * mmi\n height = 75 * mmi\n fig1.set_size_inches(width, height)\n \n # Save figure\n fig1.savefig(os.path.join(output_dir, 'figures', 'emissions_liability_merit_order.pdf'))\n\n\n # SRMCs under REP and carbon tax\n # ------------------------------\n # Initialise figure\n fig2 = plt.figure()\n\n # Axes on which to construct plots\n ax3 = plt.axes([0.065, 0.185, 0.40, .79])\n ax4 = plt.axes([0.57, 0.185, 0.40, .79])\n\n # Add REP SRMCs\n patches_srmc_rep.set_clim([25, 200])\n ax3.add_collection(patches_srmc_rep)\n\n # Add carbon tax net liability\n patches_srmc_carbon_tax.set_clim([25, 200])\n ax4.add_collection(patches_srmc_carbon_tax)\n\n # Add colour bars with labels\n cbar3 = fig2.colorbar(patches_srmc_rep, ax=ax3, pad=0.015, aspect=30)\n cbar3.set_label('SRMC (\\$/MWh)', fontsize=8, fontname='Helvetica')\n\n cbar4 = fig2.colorbar(patches_srmc_carbon_tax, ax=ax4, pad=0.015, aspect=30)\n cbar4.set_label('SRMC (\\$/MWh)', fontsize=8, fontname='Helvetica')\n\n # Label axes\n ax3.set_ylabel('Permit price (\\$/tCO$_{2}$)', fontsize=9, fontname='Helvetica')\n ax3.set_xlabel('Normalised cumulative capacity\\n(a)', fontsize=9, fontname='Helvetica')\n\n ax4.set_ylabel('Permit price (\\$/tCO$_{2}$)', fontsize=9, fontname='Helvetica')\n ax4.set_xlabel('Normalised cumulative capacity\\n(a)', fontsize=9, fontname='Helvetica')\n\n\n # Format ticks\n # ------------\n # y-axis\n ax3.yaxis.set_minor_locator(yminorlocator)\n ax3.yaxis.set_major_locator(ymajorlocator)\n ax4.yaxis.set_minor_locator(yminorlocator)\n ax4.yaxis.set_major_locator(ymajorlocator)\n\n # y-tick labels\n ax3.yaxis.set_ticklabels(['10', '20', '30', '40', '50', '60', '70'])\n ax4.yaxis.set_ticklabels(['10', '20', '30', '40', '50', '60', '70'])\n\n # x-axis\n ax3.xaxis.set_minor_locator(xminorlocator)\n ax3.xaxis.set_major_locator(xmajorlocator)\n ax4.xaxis.set_minor_locator(xminorlocator)\n ax4.xaxis.set_major_locator(xmajorlocator)\n\n # Format figure size\n width = 180 * mmi\n height = 75 * mmi\n fig2.set_size_inches(width, height)\n\n # Save figure\n fig2.savefig(os.path.join(output_dir, 'figures', 'srmc_merit_order.pdf'))\n\n plt.show()\n \n# Create figure\nplot_merit_order()",
"_____no_output_____"
]
],
[
[
"### Price targeting baselines and corresponding scheme revenue\nPlot emissions intensity baselines, scheme revenue, and average wholesale price outcomes for each permit price and wholesale price targeting scenario.",
"_____no_output_____"
]
],
[
[
"def plot_price_targeting_baselines_and_scheme_revenue():\n \"Plot baselines that target given wholesale prices and scheme revenue that corresponds to these scenarios\"\n\n # Initialise figure \n plt.clf()\n fig = plt.figure()\n\n # Axes on which to construct plots\n# ax1 = plt.axes([0.08, 0.175, 0.41, 0.77])\n# ax2 = plt.axes([0.585, 0.175, 0.41, 0.77])\n \n ax1 = plt.axes([0.07, 0.21, 0.25, 0.72])\n ax2 = plt.axes([0.40, 0.21, 0.25, 0.72])\n ax3 = plt.axes([0.74, 0.21, 0.25, 0.72])\n\n # Price targets\n price_target_colours = {0.8: '#b50e43', 0.9: '#af92cc', 1: '#45a564', 1.1: '#a59845', 1.2: '#f27b2b'}\n\n \n # Price targeting baselines\n # -------------------------\n for col in df_baseline_vs_permit_price.columns:\n ax1.plot(df_baseline_vs_permit_price[col], '-x', markersize=1.5, linewidth=0.9, label=col, color=price_target_colours[col])\n\n # Label axes\n ax1.set_ylabel('Emissions intensity baseline\\nrelative to BAU', fontsize=9)\n ax1.set_xlabel('Permit price (\\$/tCO${_2}$)\\n(a)', fontsize=9)\n\n # Format ticks\n ax1.xaxis.set_major_locator(MultipleLocator(10))\n ax1.xaxis.set_minor_locator(MultipleLocator(2))\n ax1.yaxis.set_minor_locator(MultipleLocator(0.1))\n\n \n # Scheme revenue\n # --------------\n for col in df_baseline_vs_revenue.columns:\n ax2.plot(df_baseline_vs_revenue[col], '-x', markersize=1.5, linewidth=0.9, label=col, color=price_target_colours[col])\n\n # Label axes\n ax2.set_xlabel('Permit price (\\$/tCO${_2}$)\\n(b)', fontsize=9)\n ax2.set_ylabel('Scheme revenue (\\$/h)', labelpad=0, fontsize=9)\n\n # Format axes\n ax2.ticklabel_format(axis='y', useMathText=True, style='sci', scilimits=(1, 5))\n ax2.xaxis.set_major_locator(MultipleLocator(10))\n ax2.xaxis.set_minor_locator(MultipleLocator(2))\n ax2.yaxis.set_minor_locator(MultipleLocator(20000))\n \n \n # Average prices\n # --------------\n # Final average price under different REP scenarios \n df_final_prices = df_rep_average_prices.reset_index().pivot(index='FIXED_TAU', columns='TARGET_PRICE_BAU_MULTIPLE', values='NATIONAL').div(mppdc_bau_average_price)\n \n for col in df_final_prices.columns:\n ax3.plot(df_final_prices[col], '-x', markersize=1.5, linewidth=0.9, label=col, color=price_target_colours[col])\n \n # Label axes\n ax3.set_xlabel('Permit price (\\$/tCO${_2}$)\\n(c)', fontsize=9)\n ax3.set_ylabel('Average price\\nrelative to BAU', labelpad=0, fontsize=9)\n \n # Format ticks\n ax3.xaxis.set_major_locator(MultipleLocator(10))\n ax3.xaxis.set_minor_locator(MultipleLocator(2))\n ax3.yaxis.set_minor_locator(MultipleLocator(0.02))\n\n # Create legend\n legend = ax2.legend(title='Price target\\nrelative to BAU', ncol=1, loc='upper center', bbox_to_anchor=(-0.61, 1.01), fontsize=9)\n legend.get_title().set_fontsize('9')\n\n # Format figure size\n fig = ax2.get_figure()\n width = 180 * mmi\n height = 70 * mmi\n fig.set_size_inches(width, height)\n\n # Save figure\n fig.savefig(os.path.join(output_dir, 'figures', 'baseline_revenue_price_subplot.pdf'))\n plt.show()\n\n# Create plot\nplot_price_targeting_baselines_and_scheme_revenue()",
"_____no_output_____"
]
],
[
[
"Plot the BAU price targeting scenario. Overlay scheme revenue.",
"_____no_output_____"
]
],
[
[
"def plot_bau_price_target_and_baseline():\n \"Plot baseline that targets BAU prices and scheme revenue on same figure\"\n \n # Initialise figure\n plt.clf()\n fig, ax1 = plt.subplots()\n ax2 = ax1.twinx()\n \n # Plot emission intensity baseline and scheme revenue\n df_bau_baseline_revenue = df_baseline_vs_permit_price[1].to_frame().rename(columns={1: 'baseline'}).join(df_baseline_vs_revenue[1].to_frame().rename(columns={1: 'revenue'}), how='left')\n df_bau_baseline_revenue['baseline'].plot(ax=ax1, color='#dd4949', markersize=1.5, linewidth=1, marker='o', linestyle='-')\n df_bau_baseline_revenue['revenue'].plot(ax=ax2, color='#4a63e0', markersize=1.5, linewidth=1, marker='o', linestyle='-')\n\n # Format axes labels\n ax1.set_xlabel('Permit price (\\$/tCO$_{2}$)', fontsize=9)\n ax1.set_ylabel('Emissions intensity baseline\\nrelative to BAU', fontsize=9)\n ax2.set_ylabel('Scheme revenue (\\$/h)', fontsize=9)\n\n # Format ticks\n ax1.minorticks_on()\n ax2.minorticks_on()\n ax2.xaxis.set_major_locator(MultipleLocator(10))\n ax2.xaxis.set_minor_locator(MultipleLocator(2))\n ax2.ticklabel_format(axis='y', useMathText=True, style='sci', scilimits=(0, 1))\n\n # Format legend\n h1, l1 = ax1.get_legend_handles_labels()\n h2, l2 = ax2.get_legend_handles_labels()\n l1 = ['Baseline']\n l2 = ['Revenue']\n ax1.legend(h1+h2, l1+l2, loc=0, bbox_to_anchor=(0.405, .25), fontsize=8)\n\n # Format figure size\n width = 85 * mmi\n height = 65 * mmi\n fig.subplots_adjust(left=0.22, bottom=0.16, right=0.8, top=.93)\n fig.set_size_inches(width, height)\n\n # Save figure\n fig.savefig(os.path.join(output_dir, 'figures', 'bau_price_target_baseline_and_revenue.pdf'))\n plt.show()\n\n# Create figure\nplot_bau_price_target_and_baseline()",
"_____no_output_____"
]
],
[
[
"### System emissions intensity as a function of permit price\nPlot system emissions intensity as a function of permit price.",
"_____no_output_____"
]
],
[
[
"def plot_permit_price_vs_emissions_intensity():\n \"Plot average emissions intensity as a function of permit price\"\n \n # Initialise figure\n plt.clf()\n fig, ax = plt.subplots()\n\n # Plot figure\n df_average_emissions_intensities.div(df_average_emissions_intensities.iloc[0]).plot(linestyle='-', marker='x', markersize=2, linewidth=0.8, color='#c11111', ax=ax)\n\n # Format axis labels\n ax.set_xlabel('Permit price (\\$/tCO${_2}$)', fontsize=9)\n ax.set_ylabel('Emissions intensity\\nrelative to BAU', fontsize=9)\n\n # Format ticks\n ax.xaxis.set_major_locator(MultipleLocator(10))\n ax.xaxis.set_minor_locator(MultipleLocator(2))\n ax.yaxis.set_minor_locator(MultipleLocator(0.005))\n\n # Format figure size\n width = 85 * mmi\n height = width / 1.2\n fig.subplots_adjust(left=0.2, bottom=0.14, right=.98, top=0.98)\n fig.set_size_inches(width, height)\n \n # Save figure\n fig.savefig(os.path.join(output_dir, 'figures', 'permit_price_vs_emissions_intensity_normalised.pdf'))\n plt.show()\n \n# Create figure\nplot_permit_price_vs_emissions_intensity()",
"_____no_output_____"
]
],
[
[
"### Regional prices under REP scheme and carbon tax\nShow regional impacts of the policy and compare with a carbon tax where rebates are not give to generators.",
"_____no_output_____"
]
],
[
[
"def plot_regional_prices_rep_and_tax():\n \"Plot average regional prices under REP and carbon tax scenarios\"\n \n # Initialise figure\n plt.clf()\n fig = plt.figure()\n ax1 = plt.axes([0.068, 0.18, 0.41, 0.8])\n ax2 = plt.axes([0.58, 0.18, 0.41, 0.8])\n\n # Regional prices under REP scheme\n df_rep_prices = df_rep_average_prices.loc[(slice(None), 1), :]\n df_rep_prices.index = df_rep_prices.index.droplevel(1)\n df_rep_prices.drop('NATIONAL', axis=1).plot(marker='o', linestyle='-', markersize=1.5, linewidth=1, cmap='tab10', ax=ax1)\n\n # Format labels\n ax1.set_xlabel('Permit price (\\$/tCO${_2}$)\\n(a)', fontsize=9)\n ax1.set_ylabel('Average wholesale price (\\$/MWh)', fontsize=9) \n\n # Format axes\n ax1.minorticks_on()\n ax1.xaxis.set_minor_locator(MultipleLocator(2))\n ax1.xaxis.set_major_locator(MultipleLocator(10))\n\n # Add legend\n legend1 = ax1.legend()\n legend1.remove()\n\n # Plot prices under a carbon tax (baseline=0)\n df_carbon_tax_prices = df_carbon_tax_average_prices.copy()\n df_carbon_tax_prices.index = df_carbon_tax_prices.index.droplevel(1)\n \n # Rename columns - remove '1' at end of NEM region name\n new_column_names = {i: i.split('_')[-1].replace('1','') for i in df_carbon_tax_prices.columns}\n df_carbon_tax_prices = df_carbon_tax_prices.rename(columns=new_column_names)\n \n df_carbon_tax_prices.drop('NATIONAL', axis=1).plot(marker='o', linestyle='-', markersize=1.5, linewidth=1, cmap='tab10', ax=ax2)\n\n # Format axes labels\n ax2.set_ylabel('Average wholesale price (\\$/MWh)', fontsize=9)\n ax2.set_xlabel('Permit price (\\$/tCO${_2}$)\\n(b)', fontsize=9)\n\n # Format ticks\n ax2.minorticks_on()\n ax2.xaxis.set_minor_locator(MultipleLocator(2))\n ax2.xaxis.set_major_locator(MultipleLocator(10))\n\n # Create legend\n legend2 = ax2.legend(ncol=2, loc='upper center', bbox_to_anchor=(0.708, 0.28), fontsize=9)\n\n # Format figure size\n width = 180 * mmi\n height = 80 * mmi\n fig.set_size_inches(width, height)\n\n # Save figure\n fig.savefig(os.path.join(output_dir, 'figures', 'regional_wholesale_prices.pdf'))\n plt.show()\n \n# Create figure\nplot_regional_prices_rep_and_tax()",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code"
] |
[
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
]
] |
4ae99047d4e10dccd96f235262aba92d738d95a0
| 509,022 |
ipynb
|
Jupyter Notebook
|
Hotel Booking.ipynb
|
honglinggoh/Write-a-Data-Science-Blog-Post
|
7041710466162d27b744231ea4032ce234148726
|
[
"CNRI-Python"
] | null | null | null |
Hotel Booking.ipynb
|
honglinggoh/Write-a-Data-Science-Blog-Post
|
7041710466162d27b744231ea4032ce234148726
|
[
"CNRI-Python"
] | null | null | null |
Hotel Booking.ipynb
|
honglinggoh/Write-a-Data-Science-Blog-Post
|
7041710466162d27b744231ea4032ce234148726
|
[
"CNRI-Python"
] | null | null | null | 193.030717 | 115,044 | 0.865487 |
[
[
[
"# Dataset Downloaded from Kaggle : https://www.kaggle.com/jessemostipak/hotel-booking-demand",
"_____no_output_____"
],
[
"3 Questions that may help the hotel to improve their business by reducing cancellation rate:\n1. What is the cancellation rate over the years for different hotel categories?\n2. Are we able to predict booking cancellation? \n3. For those booking at risk for cancellation, what can the hotel do to mitigate the risk?",
"_____no_output_____"
]
],
[
[
"# import the needed library to load the hotel booking data downloaded from Kaggle.\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n%matplotlib inline\n\ndf = pd.read_csv('./Dataset/hotel_bookings.csv')\ndf.head()",
"_____no_output_____"
]
],
[
[
"# Basic Data Analysis\n\nFirst, let's look at the data set to see any missing value or any further data process required.",
"_____no_output_____"
]
],
[
[
"# looks at the data summary - seems like OK\ndf.describe()",
"_____no_output_____"
],
[
"# now looks at which columns with missing values\ndfMissingValue = pd.DataFrame(df.isnull().mean(), columns=['MissingMean'])\ndfMissingValue[dfMissingValue.MissingMean >0]",
"_____no_output_____"
],
[
"# There are about 112593 records, ~95% of total data set missing Company value.\ndfNullAgComp = df[(df.company.isnull())]\ndfNullAgComp.shape",
"_____no_output_____"
],
[
"# There are about 16340 records, ~14% of total data set missing Agent value.\ndfNullAgAgent = df[(df.agent.isnull())]\ndfNullAgAgent.shape",
"_____no_output_____"
],
[
"# There are about 9760 records, ~8% of total data set missing Company & Agent value.\ndfNullAgComp = df[(df.company.isnull()) & (df.agent.isnull())]\ndfNullAgComp.shape",
"_____no_output_____"
],
[
"#Evaluate what are the unique values for both Company and Agent\ndf.company.sort_values(ascending=True).unique()",
"_____no_output_____"
],
[
"df.agent.sort_values(ascending=True).unique()",
"_____no_output_____"
],
[
"# Next let's review column of Child\ndfNullChildren = df[(df.children.isnull())]\ndfNullChildren.shape\n\ndfNullChildren",
"_____no_output_____"
],
[
"# Next let's review column of Country\ndfNullCountry = df[(df.country.isnull())]\ndfNullCountry.shape\n\n# check what are the unique values for country\ndf.country.sort_values(ascending=True).unique()\n\n# analyze is there any pattern of data combinations when country is NaN. Nothing obvious observed based on the data summary\ndfNullCountry.describe()",
"_____no_output_____"
],
[
"# With the above, it is safe to replace NaN value with: \n# i. 0 for Company and Agent columns to represent the respective booking was not file neither by Company or Agent\n# ii. 0 for Children\n# iii. OTH for Country\n\ndfProcess = df\ndfProcess.company.fillna(value=0, inplace=True)\ndfProcess.agent.fillna(value=0, inplace=True)\ndfProcess.children.fillna(value=0, inplace=True)\ndfProcess.country.fillna(value='OTH', inplace=True)\n\ndfMissingValue = pd.DataFrame(dfProcess.isnull().mean(), columns=['MissingMean'])\ndfMissingValue[dfMissingValue.MissingMean >0]",
"_____no_output_____"
]
],
[
[
"# Now let's start to answer the 3 business questions posted earlier:\n\n# Question 1. What is the cancellation rate over the years for different hotel categories?",
"_____no_output_____"
]
],
[
[
"# First, let's analyze the cancellation rate over the years for different hotel types.\nHotelCancellationTransactions = pd.DataFrame(df.groupby(['reservation_status','arrival_date_year','hotel']).count()['arrival_date_week_number'].unstack())\nHotelCancellationTransactions",
"_____no_output_____"
],
[
"HotelCancellationTransactions.plot(kind='bar', stacked=True)",
"_____no_output_____"
],
[
"dfHotelRSBreakdown = pd.DataFrame(columns = ['Hotel', 'Year', 'PcCanceled', 'PcCheckOut', 'PcNoShow'])\nfor hotelType in df['hotel'].unique():\n for rsYear in df.loc[df['hotel']==hotelType]['arrival_date_year'].unique():\n dfSubset = df.loc[(df['hotel']==hotelType) & (df['arrival_date_year']==rsYear)] \n TotalTrans = dfSubset.shape[0]\n PcCanceled = dfSubset.loc[dfSubset['reservation_status']=='Canceled'].shape[0]\n PcCheckOut = dfSubset.loc[dfSubset['reservation_status']=='Check-Out'].shape[0]\n PcNoShow = dfSubset.loc[dfSubset['reservation_status']=='No-Show'].shape[0]\n newRow = pd.Series([hotelType, rsYear, round(PcCanceled/TotalTrans, 2), round(PcCheckOut/TotalTrans,2), round(PcNoShow/TotalTrans,2)], index=dfHotelRSBreakdown.columns)\n dfHotelRSBreakdown = dfHotelRSBreakdown.append(newRow, ignore_index=True)\n\ndfHotelRSBreakdown",
"_____no_output_____"
]
],
[
[
"# Analysis - Cancellation rate over the years for different hotel categories:\n1. Observed that City Hotel had a higher # of transactions in total compared to Resolt Hotel cross 2015-2017. \n2. At the same time, City Hotel had higher # of cancellations as well as cancellation rate compared to Resort Hotel cross the 3 years period. \n3. Cancellation rate for City Hotel reduced slightly 2016 compared to 2015 but increased in 2017. On the other hand, Cancellation rate for Resort Hotel increased over years. \n4. To answer the subsequent questions, we will focus only for City Hotel using Year 2017 data set.",
"_____no_output_____"
],
[
"# Question 2. Are we able to predict booking cancellation? (Targetted: City Hotel) ",
"_____no_output_____"
]
],
[
[
"# Let's analyze cancellation data for City Hotel in Year 2017\ndfCity2017 = dfProcess[(dfProcess.hotel =='City Hotel') & (dfProcess.arrival_date_year ==2017)]\ndfCity2017.shape",
"_____no_output_____"
],
[
"dfCity2017[dfCity2017.reservation_status == 'No-Show'].deposit_type.unique()",
"_____no_output_____"
]
],
[
[
"# 2.1 Analysis by Country",
"_____no_output_____"
]
],
[
[
"# Define function to plot pie chart\ndef PiePlot(dfValues, dfLabels) :\n # pie plot\n plt.pie(dfValues, labels=dfLabels, autopct='%1.1f%%', shadow=True)\n plt.show()",
"_____no_output_____"
],
[
"# Country distribution for all transactions \ndfCountry = pd.DataFrame(dfCity2017.groupby(['country']).count()['hotel'])\ndfCountry.rename(columns={'hotel':'Number of Bookings'}, inplace=True)\ndfCountry.sort_values(by='Number of Bookings', ascending=False, inplace=True)\n#dfCountry.head()\ndfCountry[\"Booking Rate %\"] = round(dfCountry[\"Number of Bookings\"]/dfCity2017.shape[0],3)\ndfCountry[\"Country\"] = dfCountry.index\n#dfCountry[\"Booking Rate %\"].sum()\n\n# pie plot\nPiePlot(dfCountry[\"Number of Bookings\"], dfCountry[\"Country\"])",
"_____no_output_____"
],
[
"# Next lets see the cancellation by country\n\ndfCancelCountry = pd.DataFrame(dfCity2017[dfCity2017.is_canceled ==1].groupby(['country']).count()['hotel'])\ndfCancelCountry.rename(columns={'hotel':'Number of Cancel Bookings'}, inplace=True)\ndfCancelCountry.sort_values(by='Number of Cancel Bookings', ascending=False, inplace=True)\ndfCancelCountry[\"Booking Cancel Rate %\"] = round(dfCancelCountry[\"Number of Cancel Bookings\"]/dfCity2017.shape[0],3)\ndfCancelCountry[\"Country Cancel\"] = dfCancelCountry.index\ndfCancelCountry[\"Booking Cancel Rate %\"].sum()\n\n# pie plot\nPiePlot(dfCancelCountry[\"Number of Cancel Bookings\"], dfCancelCountry[\"Country Cancel\"])\n",
"_____no_output_____"
]
],
[
[
"# Analysis by Country Summary:\n1. The hotels seems to be located in Europe as top countries with high # of total and cancellation transactions are from Europe Region. With further analysis over internet, it is confirmed that the hotels are located in Portugal.\n2. Local guests from Portugal has the highest cancellation rate among others, ~48% over total transactions.\n3. We might want to consider festive seasons & holidays in Europe in general as well as Portugal in specific for subsequent data analysis.\n",
"_____no_output_____"
],
[
"# 2.2 Analysis by Month",
"_____no_output_____"
]
],
[
[
"months = [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \n \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"]",
"_____no_output_____"
]
],
[
[
"# 2.2.1 Let's first look at City Hotel monthly cancellation trend for 2015-2017",
"_____no_output_____"
]
],
[
[
"dfCompare = pd.DataFrame()\nfor yr in [2016,2015,2017]:\n dfHotel = dfProcess[(dfProcess.hotel =='City Hotel') & (dfProcess.arrival_date_year == yr)]\n\n # Monthly distribution for Cancelled transactions \n dfCancelTrnx = pd.DataFrame(dfHotel[dfHotel.is_canceled ==1].groupby(['arrival_date_month']).count()['hotel'])\n colCancelYear = 'Cancel{}'.format(yr)\n dfCancelTrnx.rename(columns={'hotel':colCancelYear}, inplace=True)\n dfCancelTrnx[\"Month\"] = pd.Categorical(dfCancelTrnx.index, categories=months, ordered=True)\n dfCancelTrnx.sort_values('Month', inplace=True)\n dfCancelTrnx.reindex()\n \n if (dfCompare.shape[0] == 0):\n dfCompare = dfCancelTrnx\n else:\n dfCompare[colCancelYear] = dfCancelTrnx[colCancelYear]\n\ndfCompare[['Cancel2015','Cancel2016','Cancel2017']].plot(kind='line', figsize=[15,7])\n ",
"_____no_output_____"
]
],
[
[
"# Analysis - City Hotel monthly cancellation for 2015-2017\n1. We want to understand is there any seasonal elements or features changes over the years that we need to consider when predicting City Hotel's booking cancellation.\n2. From the chart above, \n i. there are significant differences of bookings cancellation # and trend from Sept-Dec comparing 2015 & 2016 as well as Jan-Feb, Apr-Aug for 2016 & 2017.\n ii. Similar patterns of cancellation trend observed from July-Sept for 2015 & 2016. Same goes to Feb-Apr for 2016 & 2017.\n iii. We might want to understand more any special events or any festive seasons/holidays for the months with significant changes in cancellation trend as well as high volume # of transactions.\n",
"_____no_output_____"
],
[
"# 2.2.2 Next let's look at City Hotel monthly bookings for 2017",
"_____no_output_____"
]
],
[
[
"# Monthly distribution for all transactions \ndfMonth = pd.DataFrame(dfCity2017.groupby(['arrival_date_month']).count()['hotel'])\ndfMonth.rename(columns={'hotel':'Number of Bookings'}, inplace=True)\ndfMonth['Month'] = pd.Categorical(dfMonth.index, categories=months, ordered=True)\ndfMonth.sort_values('Month', inplace=True)\ndfMonth.reindex()\n\n# Merge with Number of Cancel Bookings 2017 calculated earlier\ndfMonth['Number of Cancel Bookings'] = dfCancelTrnx.Cancel2017\ndfMonth[\"Cancel Bookings %\"] = round(dfMonth[\"Number of Cancel Bookings\"]/dfMonth[\"Number of Bookings\"],3)\ndfMonth.sort_values('Month', inplace=True)\n\n# create figure and axis objects with subplots()\nfig,ax = plt.subplots(1,2, figsize=(15,5))\n\n# First Plot the graph of total books vs cancel bookings to see any similar trend\ndfMonth[['Number of Bookings','Number of Cancel Bookings']].plot(kind='line', ax=ax[0])\n\ndfMonth[['Cancel Bookings %']].plot(kind='line', ax=ax[1])\nax2=ax[1].twinx()\ndfMonth[['Number of Cancel Bookings']].plot(kind='line', ax=ax2, color=\"red\")\n",
"_____no_output_____"
],
[
"dfMonth",
"_____no_output_____"
]
],
[
[
"# Analysis - City Hotel monthly bookings for 2017\n1. Similar trend for # of total bookings vs # of cancel bookings throughout the various month.\n2. Cancellation rate is relatively high, ranging from ~36%-49%. It is higher in the month of Apr-June.",
"_____no_output_____"
],
[
"# 2.3 Feature Extractions",
"_____no_output_____"
],
[
"# 2.3.1 Feature Correlations",
"_____no_output_____"
]
],
[
[
"cancel_corr = dfCity2017.corr()[\"is_canceled\"]\ncancel_corr.abs().sort_values(ascending=False)[1:]",
"_____no_output_____"
]
],
[
[
"# Analysis - Feature Correlations\n1. It only take into consideration numerical features in the Correlation analysis above.\n2. It shows that total_of_special_requests, lead_time, booking_changes, required_car_parking_spaces & is_repeated_guest are the top 5 important features, high correlated with is_canceled. \n3. However, based on previous analysis, \n i. the cancellation rate is higher when the total bookings increased. April to June are the highest among all. It is not showing up in the feature correlations above due to categorical type.\n ii. Country should be another categorical feature that to consider when predicting cancellation. However let's evaluate more in the later part of this analysis. Ex: for those bookings coming from \"PRT\"",
"_____no_output_____"
],
[
"# 2.3.2 Feature Extractions & Modelling",
"_____no_output_____"
]
],
[
[
"# Let's manually select which features to include and exclude for the model prediction\n# Features to exclude:\n# 1. arrival_date_year & hotel (since we only focus on City Hotel based on transactions in 2017)\n# 2. reservation_status - since it is the same with is_cancelled that we want to predict\n# 3. reservation_status_date - since we have the other date part features captured for those start with arrival.....\n\nnumericalFeatures = [\"lead_time\",\"arrival_date_week_number\",\"arrival_date_day_of_month\",\n \"stays_in_weekend_nights\",\"stays_in_week_nights\",\"adults\",\"children\",\n \"babies\",\"is_repeated_guest\", \"previous_cancellations\",\n \"previous_bookings_not_canceled\",\"booking_changes\",\"agent\",\"company\",\"days_in_waiting_list\",\n \"adr\",\"required_car_parking_spaces\",\"total_of_special_requests\"]\n\ncategoricalFeatures = [\"arrival_date_month\",\"meal\",\"market_segment\",\n \"distribution_channel\",\"reserved_room_type\",\"assigned_room_type\",\"deposit_type\",\"customer_type\"]\n\n# Split Features & Prediction Label\nrawFeatures = numericalFeatures + categoricalFeatures\nX = dfCity2017.drop([\"is_canceled\"], axis=1)[rawFeatures]\ny = dfCity2017[\"is_canceled\"]\n\n# One-hot encoding for numerical data\nX = pd.get_dummies(X)",
"_____no_output_____"
],
[
"from sklearn.model_selection import train_test_split\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)\n\n# Import the classifier from sklearn\n#from sklearn.tree import DecisionTreeClassifier\nfrom sklearn.ensemble import RandomForestClassifier\n\n# Train the Model\n#model = DecisionTreeClassifier()\nmodel = RandomForestClassifier()\nmodel.fit(X_train, y_train)\n\n# Making predictions\ny_train_pred = model.predict(X_train)\ny_test_pred = model.predict(X_test)\n",
"_____no_output_____"
]
],
[
[
"# 2.3.3 Feature Importance Evaluation",
"_____no_output_____"
]
],
[
[
"featureImportances = model.feature_importances_\nstd = np.std([tree.feature_importances_ for tree in model.estimators_],\n axis=0)\nindices = np.argsort(featureImportances)[::-1]\n\n# Print the feature ranking\nprint(\"Feature ranking:\")\n\nzipped = zip(X_train.columns, featureImportances)\nzipped = sorted(zipped, key = lambda t: t[1], reverse=True)\n \nfor feat, importance in zipped:\n print('feature: {f}, importance: {i}'.format(f=feat, i=importance))\n \n# Plot the impurity-based feature importances of the forest\nplt.figure(figsize=(20,7))\nplt.title(\"Feature importances\")\nplt.bar(range(X_train.shape[1]), featureImportances[indices],\n color=\"r\", yerr=std[indices], align=\"center\")\nplt.xticks(range(X_train.shape[1]), indices)\nplt.xlim([-1, X_train.shape[1]])\nplt.show()",
"Feature ranking:\nfeature: lead_time, importance: 0.161927793447434\nfeature: adr, importance: 0.09440160148933822\nfeature: deposit_type_No Deposit, importance: 0.08300757690820859\nfeature: arrival_date_day_of_month, importance: 0.08216458907743528\nfeature: total_of_special_requests, importance: 0.0714855728299964\nfeature: arrival_date_week_number, importance: 0.05770094733802425\nfeature: deposit_type_Non Refund, importance: 0.0551637831295069\nfeature: stays_in_week_nights, importance: 0.0525263280925813\nfeature: agent, importance: 0.04652715385313381\nfeature: stays_in_weekend_nights, importance: 0.03384827637987326\nfeature: booking_changes, importance: 0.02387459240849102\nfeature: market_segment_Groups, importance: 0.01962527226342341\nfeature: adults, importance: 0.018982179188072355\nfeature: customer_type_Transient, importance: 0.018795834961057772\nfeature: customer_type_Transient-Party, importance: 0.014963060155360535\nfeature: market_segment_Online TA, importance: 0.013022191651405288\nfeature: meal_BB, importance: 0.008404139352716444\nfeature: distribution_channel_TA/TO, importance: 0.008365925288343113\nfeature: children, importance: 0.007573447026621055\nfeature: assigned_room_type_A, importance: 0.00749683304563429\nfeature: required_car_parking_spaces, importance: 0.006677293216628461\nfeature: market_segment_Offline TA/TO, importance: 0.006648392000979728\nfeature: arrival_date_month_May, importance: 0.006502243214875025\nfeature: arrival_date_month_July, importance: 0.006287808400366784\nfeature: arrival_date_month_June, importance: 0.00626471095350922\nfeature: meal_SC, importance: 0.005780375112384117\nfeature: assigned_room_type_D, importance: 0.005742799531884517\nfeature: arrival_date_month_April, importance: 0.005693552092122898\nfeature: reserved_room_type_A, importance: 0.005669529456234429\nfeature: distribution_channel_Direct, importance: 0.005601712876816632\nfeature: arrival_date_month_March, importance: 0.005392354936161619\nfeature: arrival_date_month_August, importance: 0.005387718020129653\nfeature: meal_HB, importance: 0.0050993861093878825\nfeature: market_segment_Direct, importance: 0.0048559088362442986\nfeature: arrival_date_month_February, importance: 0.00458978283627004\nfeature: reserved_room_type_D, importance: 0.004300167290878238\nfeature: arrival_date_month_January, importance: 0.003788314532051721\nfeature: company, importance: 0.0034286531650581957\nfeature: assigned_room_type_B, importance: 0.0023403093427743042\nfeature: assigned_room_type_E, importance: 0.002284796887347264\nfeature: previous_bookings_not_canceled, importance: 0.002000706122711405\nfeature: assigned_room_type_F, importance: 0.001926259332056932\nfeature: reserved_room_type_E, importance: 0.0019184352326019906\nfeature: reserved_room_type_F, importance: 0.0015818493658133204\nfeature: is_repeated_guest, importance: 0.0013746408330913224\nfeature: reserved_room_type_B, importance: 0.001206109698255117\nfeature: assigned_room_type_G, importance: 0.0011760568466007224\nfeature: distribution_channel_Corporate, importance: 0.0009007827458705475\nfeature: reserved_room_type_G, importance: 0.0007972220180198293\nfeature: previous_cancellations, importance: 0.0007149554331237747\nfeature: market_segment_Corporate, importance: 0.0007070886602612821\nfeature: babies, importance: 0.0006782063054300253\nfeature: assigned_room_type_K, importance: 0.0005183876859583295\nfeature: distribution_channel_GDS, importance: 0.00039393152886968056\nfeature: market_segment_Aviation, importance: 0.00035184559694745717\nfeature: assigned_room_type_C, importance: 0.0002780634522571834\nfeature: market_segment_Complementary, importance: 0.00026231842362135993\nfeature: customer_type_Group, importance: 0.0002270344445203411\nfeature: customer_type_Contract, importance: 0.0002250371174835702\nfeature: days_in_waiting_list, importance: 0.0001824043062857762\nfeature: deposit_type_Refundable, importance: 0.00014972727774091628\nfeature: assigned_room_type_P, importance: 0.00014066471405531006\nfeature: reserved_room_type_P, importance: 9.494718379091185e-05\nfeature: meal_FB, importance: 3.593236973485545e-07\nfeature: reserved_room_type_C, importance: 5.965217320831974e-08\n"
]
],
[
[
"# 2.3.4 Model Accuracy Precision & Recall",
"_____no_output_____"
]
],
[
[
"# Calculate the accuracy\nfrom sklearn.metrics import accuracy_score\ntrain_accuracy = accuracy_score(y_train, y_train_pred)\ntest_accuracy = accuracy_score(y_test, y_test_pred)\nprint(\"\\nModel Scoring:\")\nprint('The training accuracy is', train_accuracy)\nprint('The test accuracy is', test_accuracy)\n\nfrom sklearn.metrics import confusion_matrix, f1_score, precision_score, recall_score\nprint(\"F1 Score: \", f1_score(y_test, y_test_pred, average=\"macro\"))\nprint(\"Precision Score: \", precision_score(y_test, y_test_pred, average=\"macro\"))\nprint(\"Recall: \", recall_score(y_test, y_test_pred, average=\"macro\")) \n\nfrom sklearn.metrics import plot_confusion_matrix\nprint(\"\\nConfusion Matrix:\")\npredictLabels = ['Not Cancelled', 'Cancelled']\nplot_confusion_matrix(model, X_test, y_test, cmap=plt.cm.Blues, display_labels=predictLabels) \nplt.show()\n",
"\nModel Scoring:\nThe training accuracy is 0.992456602744706\nThe test accuracy is 0.8356961105052708\nF1 Score: 0.8294614490507555\nPrecision Score: 0.8381427497658138\nRecall: 0.8251900171541391\n\nConfusion Matrix:\n"
]
],
[
[
"# Analysis : Are we able to predict booking cancellation? (Targetted: City Hotel) \n1. Based on the City Hotel Year 2017 dataset, we used the RandomForestClassifier model to help predict whether a booking will be cancelled or not by any chance.\n2. The model seems to be able to predict 82% correctly based on the historical data whether the booking will be cancel or not.\n3. Below are the top 13 features with high impact on the booking cancellation possibility.\n lead_time, deposit_type, adr, arrival_date_day_of_month, arrival_date_week_number, total_of_special_requests, \n stays_in_week_nights, agent, stays_in_weekend_nights, market_segment_Groups, booking_changes, adults, \n customer_type\n4. With the above, the hotel can use the information gained to help form a targetted plan to reduce the booking cancellation rate as well as improve the hotel business.",
"_____no_output_____"
],
[
"# Question 3. For those booking at risk for cancellation, what can the hotel do to mitigate the risk?",
"_____no_output_____"
],
[
"# 3.1 - Let's analyze how is the data distribution for Top 6 Features when the booking is cancelled.",
"_____no_output_____"
]
],
[
[
"# Create a subset of data for cancellation data in 2017 for City Hotel\ndfCity2017Cancel = dfCity2017[(dfCity2017.is_canceled == 1)]",
"_____no_output_____"
],
[
"#Feature #1 - Lead Time - Number of days that elapsed between the entering date of the booking into the PMS and the arrival date\ndfCity2017Cancel.groupby(['lead_time']).count()['hotel'].plot(kind='line', figsize=[30,7])",
"_____no_output_____"
],
[
"#Feature #2 - Deposit Type\n# - No Deposit – no deposit was made; \n# - Non Refund – a deposit was made in the value of the total stay cost; \n# - Refundable – a deposit was made with a value under the total cost of stay.\ndfCity2017Cancel.groupby(['deposit_type']).count()['hotel'].plot(kind='bar')\ndfCity2017Cancel.groupby(['deposit_type']).count()['hotel']",
"_____no_output_____"
],
[
"#Feature #4 & #5 - Month & Week of arrival date.. we can analyze by Month only and skip the Week since Week is fall within the month. \n\n# We can refer to early same analysis done on 2.2.2",
"_____no_output_____"
],
[
"#Feature #6 - Total of special requests - Number of special requests made by the customer (e.g. twin bed or high floor)\ndfCity2017Cancel.groupby(['total_of_special_requests']).count()['hotel'].plot(kind='bar')\ndfCity2017Cancel.groupby(['total_of_special_requests']).count()['hotel']\n",
"_____no_output_____"
]
],
[
[
"# Analysis : For those booking at risk for cancellation, what can the hotel do to mitigate the risk?\n\n1. Based on the subset of importance featues that selected for analysis, there is high cancellation rate when lead time < 100 days, followed by 100-200 days range and it started to reduce after 200 days.\n2. For those bookings without Deposit, the cancellation rate is 2x of Non Refundale.\n3. Spring time (Mar-June) in Europe are the busiest month for City Hotel. Those months also having ~40-50% cancellation rate.\n4. Majority of the cancellation requests have minimal to zero special requests.\n5. Based on the above analysis, it doesn't seems to give us a good comprehensive information yet to understand more solidly & collectively what else we can do to mitigate the booking cancelation risk effectively. Hence, it is highly recommended to deep dive further to other features and more data sets to gain more insights.\n6. Being that said, below are a few recommendations to consider:\n i. During the month of Mar-July, for those bookings with lead time < 100 days, \n - can send greeting emails to the customers to remind them on the upcoming hotel stay \n - by offering customers with certain level of loyalty tier a higher floor stay\n - providing additional room rate discount if customers willing to switch to Deposit - Non Refundable option.\n\n \n \n",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown"
] |
[
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown",
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code",
"code"
],
[
"markdown",
"markdown",
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown",
"markdown"
],
[
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
]
] |
4ae995df9819d7567bcd0cf317b78ea60d545399
| 62,939 |
ipynb
|
Jupyter Notebook
|
endodiff/old_files/test_sc_structLMM_endodiff.ipynb
|
annacuomo/CellRegMap_analyses
|
942dac12c376675a1fd06de872e82b4b038d1c31
|
[
"Apache-2.0"
] | null | null | null |
endodiff/old_files/test_sc_structLMM_endodiff.ipynb
|
annacuomo/CellRegMap_analyses
|
942dac12c376675a1fd06de872e82b4b038d1c31
|
[
"Apache-2.0"
] | null | null | null |
endodiff/old_files/test_sc_structLMM_endodiff.ipynb
|
annacuomo/CellRegMap_analyses
|
942dac12c376675a1fd06de872e82b4b038d1c31
|
[
"Apache-2.0"
] | null | null | null | 46.176816 | 6,375 | 0.519582 |
[
[
[
"import numpy as np\nfrom numpy import ones\nfrom numpy_sugar import ddot\nimport os\nimport sys\nimport pandas as pd\nfrom pandas_plink import read_plink1_bin\nfrom numpy.linalg import cholesky\nfrom numpy_sugar.linalg import economic_svd\nimport xarray as xr\nfrom struct_lmm2 import StructLMM2\nfrom limix.qc import quantile_gaussianize",
"_____no_output_____"
],
[
"# in the actual script this will be provided as an argument\nchrom = 22",
"_____no_output_____"
],
[
"input_files_dir = \"/hps/nobackup/stegle/users/acuomo/all_scripts/struct_LMM2/sc_endodiff/new/input_files/\"",
"_____no_output_____"
],
[
"## this file will map cells to donors, it will also only including donors we have single cell data (a subset of all of HipSci donors)\nsample_mapping_file = input_files_dir+\"sample_mapping_file.csv\"\nsample_mapping = pd.read_csv(sample_mapping_file, dtype={\"genotype_individual_id\": str, \"phenotype_sample_id\": str})\nsample_mapping.head()",
"_____no_output_____"
],
[
"## extract unique individuals\ndonors = sample_mapping[\"genotype_individual_id\"].unique()\ndonors.sort()\nprint(\"Number of unique donors: {}\".format(len(donors)))",
"Number of unique donors: 126\n"
],
[
"## read in genotype file (plink format)\nplink_file = \"/hps/nobackup/hipsci/scratch/genotypes/imputed/2017-03-27/Full_Filtered_SNPs_Plink/hipsci.wec.gtarray.HumanCoreExome.imputed_phased.20170327.genotypes.norm.renamed.bed\"\nG = read_plink1_bin(plink_file)",
"Mapping files: 100%|██████████| 3/3 [05:53<00:00, 117.77s/it]\n"
],
[
"## read in GRM kinship matrix\nkinship_file = \"/hps/nobackup/hipsci/scratch/genotypes/imputed/2017-03-27/Full_Filtered_SNPs_Plink-F/hipsci.wec.gtarray.HumanCoreExome.imputed_phased.20170327.genotypes.norm.renamed.kinship\"\nK = pd.read_csv(kinship_file, sep=\"\\t\", index_col=0)\nassert all(K.columns == K.index)\nK = xr.DataArray(K.values, dims=[\"sample_0\", \"sample_1\"], coords={\"sample_0\": K.columns, \"sample_1\": K.index})\nK = K.sortby(\"sample_0\").sortby(\"sample_1\")\ndonors = sorted(set(list(K.sample_0.values)).intersection(donors))\nprint(\"Number of donors after kinship intersection: {}\".format(len(donors)))",
"Number of donors after kinship intersection: 125\n"
],
[
"## subset to relevant donors (from sample mapping file)\nK = K.sel(sample_0=donors, sample_1=donors)\nassert all(K.sample_0 == donors)\nassert all(K.sample_1 == donors)",
"_____no_output_____"
],
[
"## and decompose such that K = L @ L.T\nL_kinship = cholesky(K.values)\nL_kinship = xr.DataArray(L_kinship, dims=[\"sample\", \"col\"], coords={\"sample\": K.sample_0.values})\nassert all(L_kinship.sample.values == K.sample_0.values)\ndel K",
"_____no_output_____"
],
[
"# number of samples (cells)\nprint(\"Sample mapping number of rows BEFORE intersection: {}\".format(sample_mapping.shape[0]))\nsample_mapping = sample_mapping[sample_mapping[\"genotype_individual_id\"].isin(donors)]\nprint(\"Sample mapping number of rows AFTER intersection: {}\".format(sample_mapping.shape[0]))",
"Sample mapping number of rows BEFORE intersection: 34256\nSample mapping number of rows AFTER intersection: 33964\n"
],
[
"# expand from donors to cells\nL_expanded = L_kinship.sel(sample=sample_mapping[\"genotype_individual_id\"].values)\nassert all(L_expanded.sample.values == sample_mapping[\"genotype_individual_id\"].values)",
"_____no_output_____"
],
[
"# environments\n# cells by PCs (20)\nE_file = input_files_dir+\"20PCs.csv\" \nE = pd.read_csv(E_file, index_col = 0)\nE = xr.DataArray(E.values, dims=[\"cell\", \"pc\"], coords={\"cell\": E.index.values, \"pc\": E.columns.values})\nE = E.sel(cell=sample_mapping[\"phenotype_sample_id\"].values)\nassert all(E.cell.values == sample_mapping[\"phenotype_sample_id\"].values)",
"_____no_output_____"
],
[
"# subselect to only SNPs on right chromosome\nG_sel = G.where(G.chrom == str(chrom), drop=True)",
"_____no_output_____"
],
[
"G_sel",
"_____no_output_____"
],
[
"# select down to relevant individuals\nG_exp = G_sel.sel(sample=sample_mapping[\"genotype_individual_id\"].values)\nassert all(L_expanded.sample.values == G_exp.sample.values)",
"/nfs/software/stegle/users/acuomo/conda-envs/struct-lmm2/lib/python3.8/site-packages/xarray/core/indexing.py:1369: PerformanceWarning: Slicing with an out-of-order index is generating 2383 times more chunks\n return self.array[key]\n/nfs/software/stegle/users/acuomo/conda-envs/struct-lmm2/lib/python3.8/site-packages/xarray/core/indexing.py:1369: PerformanceWarning: Slicing is producing a large chunk. To accept the large\nchunk and silence this warning, set the option\n >>> with dask.config.set(**{'array.slicing.split_large_chunks': False}):\n ... array[indexer]\n\nTo avoid creating the large chunks, set the option\n >>> with dask.config.set(**{'array.slicing.split_large_chunks': True}):\n ... array[indexer]\n return self.array[key]\n"
],
[
"# get eigendecomposition of EEt\n[U, S, _] = economic_svd(E)\nus = U * S\n# get decomposition of K*EEt\nLs = [ddot(us[:,i], L_expanded) for i in range(us.shape[1])]",
"_____no_output_____"
],
[
"Ls[1].shape",
"_____no_output_____"
],
[
"# Phenotype (genes X cells)\nphenotype_file = input_files_dir+\"phenotype.csv.pkl\"\nphenotype = pd.read_pickle(phenotype_file)\nphenotype.head()",
"_____no_output_____"
],
[
"print(\"Phenotype shape BEFORE selection: {}\".format(phenotype.shape))\nphenotype = xr.DataArray(phenotype.values, dims=[\"trait\", \"cell\"], coords={\"trait\": phenotype.index.values, \"cell\": phenotype.columns.values})\nphenotype = phenotype.sel(cell=sample_mapping[\"phenotype_sample_id\"].values)\nprint(\"Phenotype shape AFTER selection: {}\".format(phenotype.shape))\nassert all(phenotype.cell.values == sample_mapping[\"phenotype_sample_id\"].values)",
"Phenotype shape BEFORE selection: (11231, 34256)\nPhenotype shape AFTER selection: (11231, 33964)\n"
],
[
"# Filter on specific gene-SNP pairs\n# eQTL from endodiff (ips+mesendo+defendo)\nendo_eqtl_file = input_files_dir+\"endodiff_eqtl_allconditions_FDR10pct.csv\"\nendo_eqtl = pd.read_csv(endo_eqtl_file, index_col = False)\nendo_eqtl.head()",
"_____no_output_____"
],
[
"endo_eqtl[\"chrom\"] = [int(i[:i.find(\"_\")]) for i in endo_eqtl[\"snp_id\"]]\ngenes = endo_eqtl[endo_eqtl['chrom']==int(chrom)]['feature'].unique()\n# genes",
"_____no_output_____"
],
[
"len(genes)",
"_____no_output_____"
],
[
"# Set up model\nn_samples = phenotype.shape[1]\nM = ones((n_samples, 1))",
"_____no_output_____"
],
[
"# Pick one gene as example\ni=0\ntrait_name = genes[i]\ntrait_name",
"_____no_output_____"
],
[
"# select SNPs for a given gene\nleads = endo_eqtl[endo_eqtl['feature']==trait_name]['snp_id'].unique()\nG_tmp = G_exp[:,G_exp['snp'].isin(leads)]\nprint(\"Running for gene {}\".format(trait_name))",
"Running for gene ENSG00000100058_CRYBB2P1\n"
],
[
"# quantile normalise y, E\ny = phenotype.sel(trait=trait_name)\ny = quantile_gaussianize(y)\nE = quantile_gaussianize(E)",
"_____no_output_____"
],
[
"# null model\nslmm2 = StructLMM2(y.values, M, E, Ls)",
"_____no_output_____"
],
[
"# run interaction test for the SNPs\npvals = slmm2.scan_interaction(G_tmp)[0]",
"100%|██████████| 2/2 [09:26<00:00, 283.28s/it]\n"
],
[
"pv = pd.DataFrame({\"chrom\":G_tmp.chrom.values,\n \"pv\":pvals,\n \"variant\":G_tmp.snp.values})\npv.head()\n# pv.to_csv(outfilename, sep='\\t')",
"_____no_output_____"
]
]
] |
[
"code"
] |
[
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
]
] |
4ae997129736b8f7923e9eb48ba274d14509caf1
| 98,342 |
ipynb
|
Jupyter Notebook
|
notebooks/find correct image types.ipynb
|
Team-MIND/dataset_integration
|
cc3955d1b0968ba265dff0d09ba03a30bd128774
|
[
"BSD-4-Clause-UC"
] | null | null | null |
notebooks/find correct image types.ipynb
|
Team-MIND/dataset_integration
|
cc3955d1b0968ba265dff0d09ba03a30bd128774
|
[
"BSD-4-Clause-UC"
] | null | null | null |
notebooks/find correct image types.ipynb
|
Team-MIND/dataset_integration
|
cc3955d1b0968ba265dff0d09ba03a30bd128774
|
[
"BSD-4-Clause-UC"
] | null | null | null | 42.664642 | 141 | 0.446808 |
[
[
[
"import matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\nimport os\npd.set_option('display.max_colwidth', 1000)\npd.set_option('display.max_rows', 500)\n\nfrom sklearn import svm\nimport re\nfrom shutil import copyfile\nimport matplotlib.pyplot as plt\nimport pydicom\nfrom tqdm import tqdm\nimport nibabel as nib\nimport dicom2nifti",
"_____no_output_____"
],
[
"# define text files and path\n\n#### CHANGE FOR SPECIFIC DOWNLOAD PACKAGE ####\n\n# for 2274:\npath = '../../physcosis/Package_1187332/'\n\n\n## for 2126:\n# path = '../../physcosis/Package_1187335/'\n\n\n# should be standard\ntest_file = 'panss01.txt'\nsubject_file = 'ndar_subject01.txt'\nimage_file = 'image03.txt'",
"_____no_output_____"
],
[
"image03 = pd.read_csv(os.path.join(path, image_file), delimiter = '\\t')\nprint(image03.shape)",
"(9395, 51)\n"
],
[
"# image03[image03['image_description'] == 'ADNI Double_TSE SENSE']\n# image03",
"_____no_output_____"
],
[
"data_dir = os.path.join(path, 'image03')\n\n#### CHANGE BASED ON WHAT 'image_file' COLUMN LOOKS LIKE IN image03 (corrects the file path to be on local machine) ####\n\n# for 2274:\nregex ='s3://NDAR_.*/submission_.[0-9]*/'\n\n\nrows_with_bad_path = []\nfor index, row in image03.iterrows():\n image_path = re.sub(regex, '', row['image_file'])\n full_path = os.path.join(data_dir, image_path)\n# print(full_path)\n if not os.path.exists(full_path):\n print(image_path, index, row['image_file'])\n rows_with_bad_path.append(index)\nrows_with_bad_path",
"Data file (image, behavioral, anatomical, etc) 0 Data file (image, behavioral, anatomical, etc)\n"
],
[
"# drops rows based on rows with bad path and replaces old paths with local paths\n\nimage03 = image03.drop(rows_with_bad_path)\nl = []\n\nfor index, row in image03.iterrows():\n image_path = re.sub(regex, '', row['image_file'])\n full_path = os.path.join(data_dir, image_path)\n l.append(full_path)\nimage03['image_file'] = l\n",
"_____no_output_____"
],
[
"\n# shows the different types of images available for the data package\npivot_table = image03.pivot_table(columns = ['image_description'], aggfunc = 'size')\npivot_table",
"_____no_output_____"
],
[
"len(image03['image_description'].unique())",
"_____no_output_____"
],
[
"test_dir = os.path.join(data_dir, 'TEST')\n\nif not os.path.exists(test_dir):\n os.mkdir(test_dir)\ntest_dir",
"_____no_output_____"
],
[
"image03 = image03.drop_duplicates(subset = ['image_description'], keep='first')\nimage03.shape",
"_____no_output_____"
],
[
"for i,row in image03.iterrows():\n file_name = row['image_file'].split('/')[-1]\n \n folder = os.path.join(test_dir, file_name.split('.')[0])\n if not os.path.exists(folder):\n os.system('mkdir ' + folder)\n os.system('unzip ' + row['image_file'] + ' -d ' + folder)\n print('Unziped and moved ', file_name)",
"Unziped and moved S1551MJW-1-10.zip\nUnziped and moved S3715XQE-1-7.zip\nUnziped and moved S5565YKS-1-16.zip\nUnziped and moved S7657KXI-1-4.zip\nUnziped and moved S4164MBS-1-3.zip\nUnziped and moved S6705CRG-1-5.zip\nUnziped and moved S1549PLY-1-5.zip\nUnziped and moved S6705CRG-1-3.zip\nUnziped and moved S1549PLY-1-3.zip\nUnziped and moved S1549PLY-1-4.zip\nUnziped and moved S9263VVF-1-5.zip\nUnziped and moved S7765ICN-1-1.zip\nUnziped and moved S7765ICN-1-2.zip\nUnziped and moved S7765ICN-1-4.zip\nUnziped and moved S7765ICN-1-5.zip\nUnziped and moved S7765ICN-1-6.zip\nUnziped and moved S7696EHV-1-6.zip\nUnziped and moved S6506IPR-1-4.zip\nUnziped and moved S6506IPR-1-5.zip\nUnziped and moved S3185NLP-1-7.zip\nUnziped and moved S0502LWN-1-2.zip\nUnziped and moved S9860SVG-1-3.zip\nUnziped and moved S4673PTE-1-6.zip\nUnziped and moved S3772DPX-1-6.zip\nUnziped and moved S3772DPX-1-11.zip\nUnziped and moved S4524DRI-1-21.zip\nUnziped and moved S9061TUS-1-6.zip\nUnziped and moved S9136QRM-1-15.zip\nUnziped and moved S3099JKN-1-10.zip\nUnziped and moved S9646QSR-1-17.zip\nUnziped and moved S7889OYU-1-11.zip\nUnziped and moved S9080BQA-1-12.zip\nUnziped and moved S9080BQA-1-13.zip\nUnziped and moved S9080BQA-1-14.zip\nUnziped and moved S6032SGU-1-7.zip\nUnziped and moved S6032SGU-1-8.zip\nUnziped and moved S6032SGU-1-9.zip\nUnziped and moved S9161HEP-1-7.zip\nUnziped and moved S9161HEP-1-8.zip\nUnziped and moved S9061TUS-1-7.zip\nUnziped and moved S9061TUS-1-8.zip\nUnziped and moved S4524DRI-1-25.zip\nUnziped and moved S3627ENF-1-17.zip\nUnziped and moved S3627ENF-1-18.zip\nUnziped and moved S3627ENF-1-19.zip\nUnziped and moved S5968WLY-1-12.zip\nUnziped and moved S4234UPP-1-21.zip\nUnziped and moved S2991DPY-1-3.zip\nUnziped and moved S6770QOR-1-4.zip\nUnziped and moved S0483IXU-1-1.zip\nUnziped and moved S0483IXU-1-9.zip\nUnziped and moved S0483IXU-1-10.zip\nUnziped and moved S0483IXU-1-11.zip\nUnziped and moved S0483IXU-1-12.zip\nUnziped and moved S1830LYA-1-3.zip\nUnziped and moved S8162MMI-1-8.zip\nUnziped and moved S8162MMI-1-9.zip\nUnziped and moved S2147OET-1-11.zip\nUnziped and moved S4051NAD-1-3.zip\nUnziped and moved S4051NAD-1-11.zip\nUnziped and moved S0483IXU-1-4.zip\nUnziped and moved S0483IXU-1-5.zip\nUnziped and moved S0483IXU-1-8.zip\nUnziped and moved S8827HHF-1-6.zip\nUnziped and moved S4303SMC-1-13.zip\nUnziped and moved S2707LVO-1-9.zip\nUnziped and moved S2707LVO-1-10.zip\nUnziped and moved S4693KFE-1-3.zip\nUnziped and moved S4229VAB-1-2.zip\nUnziped and moved S9061TUS-1-5.zip\nUnziped and moved S3177QQP-1-16.zip\nUnziped and moved S3500OTV-1-4.zip\nUnziped and moved S0783EEY-1-5.zip\nUnziped and moved S8339DPJ-1-3.zip\nUnziped and moved S2911XGM-1-2.zip\nUnziped and moved S6572CVP-1-2.zip\n"
],
[
"new_path = []\nfor i,row in image03.iterrows():\n folder = row['image_file'].split('/')[-1].split('.')[0]\n p = os.path.join(test_dir, folder)\n nifti = os.path.join(p, '{}.nii'.format(folder))\n if not os.path.exists(nifti):\n print('Converting ', folder, ' from dicom to niftii.')\n try:\n dicom2nifti.dicom_series_to_nifti(p, nifti, reorient_nifti=True)\n new_path.append(nifti)\n except: \n new_path.append('FAILED')\n print(folder, ' Failed.')\n \n else: \n new_path.append(nifti)\n \n",
"Converting S1551MJW-1-10 from dicom to niftii.\nS1551MJW-1-10 Failed.\nConverting S3715XQE-1-7 from dicom to niftii.\nS3715XQE-1-7 Failed.\nConverting S5565YKS-1-16 from dicom to niftii.\nConverting S7657KXI-1-4 from dicom to niftii.\nS7657KXI-1-4 Failed.\nConverting S4164MBS-1-3 from dicom to niftii.\nS4164MBS-1-3 Failed.\nConverting S6705CRG-1-5 from dicom to niftii.\nS6705CRG-1-5 Failed.\nConverting S1549PLY-1-5 from dicom to niftii.\nS1549PLY-1-5 Failed.\nConverting S6705CRG-1-3 from dicom to niftii.\nS6705CRG-1-3 Failed.\nConverting S1549PLY-1-3 from dicom to niftii.\nS1549PLY-1-3 Failed.\nConverting S1549PLY-1-4 from dicom to niftii.\nS1549PLY-1-4 Failed.\nConverting S9263VVF-1-5 from dicom to niftii.\nS9263VVF-1-5 Failed.\nConverting S7765ICN-1-1 from dicom to niftii.\n"
],
[
"image03['newpath'] = new_path",
"_____no_output_____"
],
[
"image03 = image03[image03.newpath != 'FAILED']",
"_____no_output_____"
],
[
"image03 = image03.reset_index()\nimage03",
"_____no_output_____"
],
[
"index = 18\npath = image03.iloc[index]['newpath']\nprint(image03.iloc[index]['image_description'])\nimg = nib.load(path)\nimg = img.get_fdata()\nimg.shape",
"ep2d_diff_convert_Allegra_B-SNIP_ADC\n"
],
[
"img_t1 = img[:,:,:]\nimport imageio",
"_____no_output_____"
],
[
"# img_t1 = img[:,:,:,0]\nnum_img = len(list(range(0,img_t1.shape[2],1)))\nfig = plt.figure(figsize=(10, 2), dpi=100)\nimages = []\nfor i,p in enumerate(range(0,img_t1.shape[2],1)):\n images.append(img_t1[:,:,p])\n \nimageio.mimsave('./movie.gif', images)\n\n \n \n \n \n# ax1 = fig.add_subplot(1,num_img,i+1)\n# plt.imshow(img_t1[p,:,:], cmap = 'gray')\n \n# num_img = len(list(range(0,img.shape[1],40)))\n# fig = plt.figure(figsize=(20, 2), dpi=100)\n# for i,p in enumerate(range(0,img.shape[0],40)):\n# ax1 = fig.add_subplot(1,num_img,i+1)\n# plt.imshow(img_t1[:,p,:], cmap = 'gray')\n \n# num_img = len(list(range(0,img.shape[2],10)))\n# fig = plt.figure(figsize=(20, 2), dpi=100)\n# for i,p in enumerate(range(0,img.shape[0],10)):\n# ax1 = fig.add_subplot(1,num_img,i+1)\n# plt.imshow(img_t1[:,:,p], cmap = 'gray')",
"Lossy conversion from float64 to uint8. Range [0.0, 3628.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3718.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3533.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3536.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3773.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3650.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3448.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3633.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3205.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3552.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3081.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3475.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3228.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3312.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 4002.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3889.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3441.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3824.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3582.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3518.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3456.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3327.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3501.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3387.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3401.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3421.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3442.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3528.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3187.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3171.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3120.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3341.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3382.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3305.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3409.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3348.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3415.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3312.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3199.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 2962.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 2975.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 3434.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 2987.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 2500.0]. Convert image to uint8 prior to saving to suppress this warning.\nLossy conversion from float64 to uint8. Range [0.0, 1864.0]. Convert image to uint8 prior to saving to suppress this warning.\n"
],
[
"image03['image_description']",
"_____no_output_____"
]
]
] |
[
"code"
] |
[
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
]
] |
4ae9a29eafb9ad423e1522112e244914c2502ce9
| 113,068 |
ipynb
|
Jupyter Notebook
|
WESAD_project.ipynb
|
guillaume-azarias/Time-Series-Forecasting
|
932fcd3c08ff43d17695d0d1505466fa7e86f364
|
[
"MIT"
] | null | null | null |
WESAD_project.ipynb
|
guillaume-azarias/Time-Series-Forecasting
|
932fcd3c08ff43d17695d0d1505466fa7e86f364
|
[
"MIT"
] | null | null | null |
WESAD_project.ipynb
|
guillaume-azarias/Time-Series-Forecasting
|
932fcd3c08ff43d17695d0d1505466fa7e86f364
|
[
"MIT"
] | null | null | null | 39.029341 | 1,319 | 0.449411 |
[
[
[
"# Anomaly detection using Facebook Prophet:\n\n**Medical background:**\n\nIn the last decades, the miniaturization of wearable sensors and development of data transmission technologies have allowed to collect medically relevant data called digital biomarkers. This data is revolutionising our modern Medicine by offering new perspectives to better understand the human physiology and the possibility to better identify, even predict disease progression.\nYet, the data collected by wearable sensors is, for technical reasons heterogeneous and cannot be directly translated into a meaningful clinical status. The relevance of proper data analysis is extremely critical as a wrong data analysis may lead to miss critical disease progression steps or lead to the wrong diagnostic. Therefore, the overall goal of this project is to integrate patients’ sensor data into one or several outcome measures which meaningfully recapitulate the clinical status of the patient.\n\n[Stress](https://en.wikipedia.org/wiki/Stress_(biology)) is a natural and physiological response to threat, challenge or physical and psychological barrier. In humans, the two major systems leading responding to stress are the autonomic nervous system and hypothalamic-pituitary-adrenal axis. The sympathetic nervous system, the stress-related part of the autonomic nervous system aims to distribute the energy to the most relevant body parts, to react to the stressor by fighting or escaping for instance. The hypothalamic-pituitary-adrenal axis regulates metabolic, psychological and immunological functions.\nThe adrenaline alters the following: motion rate, electrocardiogram (ECG), electrodermal activity (EDA), electromyogram (EMG), respiration and body temperature.\n\n**Goal of the script:**\n\nHere, we aim leverage the power of artificial intelligence to reach a medical insight. Specifically, we want to detect the stress-induced biological changes from the wearable device measure with the highest sensiticity.\n\n**Motivations to use a forecasting method to detect activity:**\n\nPrevious works demonstrated the ability to related self-labeled stress status to sensor data acquired by wearable sensors.\nHere we try a different approach assuming that physiological rythms are altered by stress. We are investigating if a time series forecasting method coupled with anomaly detection provides a more sensitive methods to detect stress-related changes.\n\n**Data format**\n\nThe reader may read the original source of data here:\n- [UCI website](https://archive.ics.uci.edu/ml/datasets/WESAD+%28Wearable+Stress+and+Affect+Detection%29) (check the website shown below) to download the WESAD dataset \n- [wesad_readme file](wesad_readme.pdf) and [wesad poster](WESAD poster.pdf), both located together with the WESAD dataset\n\n**Structure of the code**\n\n 1 - Read the data\n 2 - Data preparation: segmentation per task, quality control\n 3 - Prediction of sensor data in the absence of change of stress status\n 4 - Detection of anomaly in the sensor's data, indicating a change in the stress status\n 4 - Cross-validation and boot-strapping assess the robustness of each candidate model and generate estimates of variability to facilitate model selection\n\n**Credit**\n\n- The data extraction part was modified from a script written by [aganjag](https://github.com/jaganjag) and is available [here](https://github.com/jaganjag/stress_affect_detection/blob/master/prototype.ipynb)\n- The implementation of Prophet for Time Series Forecasting was based on this [tutorial](https://medium.com/analytics-vidhya/time-series-forecast-anomaly-detection-with-facebook-prophet-558136be4b8d) written by Paul Lo. It makes use of the open-source project [Prophet](https://facebook.github.io/prophet/), a forecasting procedure implemented in R and Python, based on the paper of [Taylor and Letham, 2017](https://peerj.com/preprints/3190/).\n\n> Questions:\n> Contact Guillaume Azarias at [email protected]",
"_____no_output_____"
]
],
[
[
"from IPython.display import IFrame\nIFrame('https://archive.ics.uci.edu/ml/datasets/WESAD+%28Wearable+Stress+and+Affect+Detection%29', width=800, height=450)",
"_____no_output_____"
]
],
[
[
"## Import the relevant library",
"_____no_output_____"
]
],
[
[
"import os\nimport pickle\nimport numpy as np\nimport seaborn as sns\nsns.set()\nimport pandas as pd\n\nimport matplotlib.pyplot as plt\nfrom matplotlib.dates import DateFormatter\n\nimport datetime\nfrom datetime import timedelta\nimport qgrid\n\n# Note that the interactive plot may not work in Jupyter lab, but only in Jupyter Notebook (conflict of javascripts)\n%matplotlib widget ",
"_____no_output_____"
],
[
"import fbprophet\nfrom fbprophet import Prophet\nfrom fbprophet.diagnostics import cross_validation, performance_metrics\nfrom fbprophet.plot import plot_cross_validation_metric",
"_____no_output_____"
],
[
"fbprophet.__version__",
"_____no_output_____"
],
[
"from sklearn.model_selection import ParameterGrid\nimport itertools\nfrom random import sample",
"_____no_output_____"
],
[
"# Import the functions from the helper.py\nfrom helper import load_ds, df_dev_formater, find_index, df_generator, prophet_fit, prophet_plot, get_outliers, prophet, GridSearch_Prophet",
"_____no_output_____"
]
],
[
[
"## Read the WESAD data\n\nThe dimensions of the dataset depend on both the device and parameters:\n\n| Device | Location|Parameter|Acq. frequency|Number of dimensions|Data points (S5)| Duration (S5)|\n|:---------------|:-------:|:-------:|:------------:|:------------------:|:--------------:|:------------:|\n|**RespiBAN Pro**|chest | ACC |700Hz |**3** |4496100 |6'423sec |\n| | | ECG |\" |1 | | |\n| | | EDA |\" |1 | | |\n| | | EMG |\" |1 | | |\n| | | RESP |\" |1 | | |\n| | | TEMP |\" |1 | | |\n| | | | | | | |\n|**Empatica E4** |wrist | ACC |32Hz |**3** |200256 |6'258sec |\n| | | BVP |64Hz |1 |400512 | |\n| | | EDA |4Hz |1 |25032 | |\n| | | TEMP |4Hz |1 |25032 | |\n\n*Note that ACC is a matrix of 3 dimensions for the 3 spatial dimensions.*\n\n*'ECG', 'EDA', 'EMG', 'Resp', 'Temp' have each 1 dimension.*",
"_____no_output_____"
]
],
[
[
"freq = np.array([4, 700, 700, 700, 700, 700, 700, 32, 64, 4, 4, 700])\nfreq_df = pd.Series(freq, index= ['working_freq', 'ACC_chest', 'ECG_chest', 'EDA_chest', 'EMG_chest', 'Resp_chest', 'Temp_chest', 'ACC_wrist', 'BVP_wrist', 'EDA_wrist', 'TEMP_wrist', 'label'])\nfreq_df",
"_____no_output_____"
],
[
"# Define the working frequency, eg the frequency to adjust all data\nworking_freq = str(int(1000/freq_df.loc['working_freq'])) + 'L'\nworking_freq",
"_____no_output_____"
]
],
[
[
"*Note:* The class read_data_of_one_subject was originally written by [aganjag](https://github.com/jaganjag/stress_affect_detection/blob/master/prototype.ipynb).",
"_____no_output_____"
]
],
[
[
"# obj_data[subject] = read_data_one_subject(data_set_path, subject)\nclass read_data_of_one_subject:\n \"\"\"Read data from WESAD dataset\"\"\"\n def __init__(self, path, subject):\n self.keys = ['label', 'subject', 'signal']\n self.signal_keys = ['wrist', 'chest']\n self.chest_sensor_keys = ['ACC', 'ECG', 'EDA', 'EMG', 'Resp', 'Temp']\n self.wrist_sensor_keys = ['ACC', 'BVP', 'EDA', 'TEMP']\n os.chdir(path) # Change the current working directory to path\n os.chdir(subject) # Change the current working directory to path. Why not using data_set_path ?\n with open(subject + '.pkl', 'rb') as file: # with will automatically close the file after the nested block of code\n data = pickle.load(file, encoding='latin1')\n self.data = data\n\n def get_labels(self):\n return self.data[self.keys[0]]\n\n def get_wrist_data(self):\n \"\"\"\"\"\"\n #label = self.data[self.keys[0]]\n assert subject == self.data[self.keys[1]], 'WARNING: Mixing up the data from different persons'\n signal = self.data[self.keys[2]]\n wrist_data = signal[self.signal_keys[0]]\n #wrist_ACC = wrist_data[self.wrist_sensor_keys[0]]\n #wrist_ECG = wrist_data[self.wrist_sensor_keys[1]]\n return wrist_data\n\n def get_chest_data(self):\n \"\"\"\"\"\"\n assert subject == self.data[self.keys[1]], 'WARNING: Mixing up the data from different persons'\n signal = self.data[self.keys[2]]\n chest_data = signal[self.signal_keys[1]]\n return chest_data",
"_____no_output_____"
],
[
"data_set_path = \"../../Data/WESAD\"\nsubject = 'S5'",
"_____no_output_____"
],
[
"obj_data = {}\nobj_data[subject] = read_data_of_one_subject(data_set_path, subject)",
"_____no_output_____"
]
],
[
[
"*Workplan:*\n\n**A) Exploratory data analysis**\n\n 1) Discard for now the ACC data. Preliminary results on other parameters may guide the ways to investigate the accelerometer data\n 2) Get the study protocol\n 3) Use rolling.mean() to synchronise the data at the same frequency\n 4) Synchronise data\n 5) Include label data if possible\n 6) Plot data\n 7) Segmentation per task\n 8) Quality control \n\n**B) Perform time series forecasting**\n\n 1) ADCF test\n 2) Prophet\n 3) ARIMA",
"_____no_output_____"
],
[
"## Get the study protocol\n*From the wesad_readme.pdf:*\n\nThe order of the different conditions is defined on the second line in SX_quest.csv. Please refer to [1] for further details on each of the conditions (see Section 3.3 there). Please ignore the elements “bRead”, “fRead”, and “sRead”: these are not relevant for this dataset.\nThe time interval of each condition is defined as start and end time, see the lines 3 and 4 in SX_quest.csv. Time is given in the format [minutes.seconds]. Time is counted from the start of the RespiBAN device’s start of recording.",
"_____no_output_____"
],
[
"### Study protocol from the _quest.csv file",
"_____no_output_____"
]
],
[
[
"print(os.getcwd())",
"/Users/guillaume/Documents/Projects/Data/WESAD/S5\n"
],
[
"SX_quest_filename = os.getcwd() + '/' + subject + '_quest.csv'\nprint(SX_quest_filename)\n# bp_data = pd.read_csv(\"/Users/guillaume/Documents/Projects/Data/WESAD/S2/S2_quest.csv\", header=1, delimiter=';')\nstudy_protocol_raw = pd.read_csv(SX_quest_filename, delimiter=';')\n# study_protocol_raw.head()",
"/Users/guillaume/Documents/Projects/Data/WESAD/S5/S5_quest.csv\n"
],
[
"# Create a table with the interval of every steps\nstudy_protocol = study_protocol_raw.iloc[1:3, 1:6]\nstudy_protocol = study_protocol.transpose().astype(float)\nstudy_protocol.columns = ['start', 'end']\nstudy_protocol['task'] = study_protocol_raw.iloc[0, 1:6].transpose()\nstudy_protocol = study_protocol.reset_index(drop=True)\nstudy_protocol\n# study_protocol.dtypes",
"_____no_output_____"
],
[
"# Create a dataframe with the time formatted as datetime\n# Note that the frequency chosen was 4Hz to match the lowest frequency of acquisition (250ms)\ntotal_duration = study_protocol.end.max()\ndata = pd.DataFrame()\nbegin_df = datetime.datetime(2020, 1, 1) # For reading convenience\nend_df = begin_df + timedelta(minutes=int(total_duration)) + timedelta(seconds=total_duration-int(total_duration))\ndata['time'] = pd.date_range(start=begin_df, end=end_df, freq=working_freq).to_pydatetime().tolist()\ndata['task'] = np.nan\n# data",
"_____no_output_____"
],
[
"# Annotate the task in the data['task']\nfor row in range(study_protocol.shape[0]):\n # Datetime index of the beginning of the task\n begin_state = study_protocol.iloc[row, 0]\n begin = begin_df + timedelta(minutes=int(begin_state)) + timedelta(seconds=begin_state-int(begin_state))\n\n # Datetime index of the end of the task\n end_state = study_protocol.iloc[row, 1]\n end = begin_df + timedelta(minutes=int(end_state)) + timedelta(seconds=end_state-int(end_state))\n\n # Fill the task column according to the begin and end of task\n data.loc[(data['time'] >= begin) & (data['time'] <= end), 'task'] = study_protocol.iloc[row, 2]\n\n# Show data\nqgrid_widget = qgrid.show_grid(data, show_toolbar=True)\nqgrid.show_grid(data)",
"_____no_output_____"
]
],
[
[
"### Graphical representation of the study protocol",
"_____no_output_____"
]
],
[
[
"# Attribute an arbitrary value to a task for graphical display of the study protocol\ndata_graph = data\ndata_graph['arbitrary_index'] = np.zeros\n\ndata_graph.loc[data_graph['task'] == 'Base', 'arbitrary_index'] = 1\ndata_graph.loc[data_graph['task'] == 'Fun', 'arbitrary_index'] = 3\ndata_graph.loc[data_graph['task'] == 'Medi 1', 'arbitrary_index'] = 4\ndata_graph.loc[data_graph['task'] == 'TSST', 'arbitrary_index'] = 2\ndata_graph.loc[data_graph['task'] == 'Medi 2', 'arbitrary_index'] = 4\n\ndata_graph['arbitrary_index'] = pd.to_numeric(data_graph['arbitrary_index'], errors='coerce')\n\n# # Show data\n# qgrid_widget = qgrid.show_grid(data_graph, show_toolbar=True)\n# qgrid.show_grid(data_graph)",
"_____no_output_____"
],
[
"# Plot\nfig_sp, ax = plt.subplots(figsize=(8, 4))\n\nplt.plot('time', 'arbitrary_index', data=data_graph, color='darkblue', marker='o',linestyle='dashed', linewidth=0.5, markersize=2)\nplt.gcf().autofmt_xdate()\nmyFmt = DateFormatter(\"%H:%M\")\nax.xaxis.set_major_formatter(myFmt)\nplt.xlabel('Time elapsed (hh:mm)', fontsize=15)\nplt.ylim(0,6)\nplt.ylabel('Arbitrary index', fontsize=15)\nname = 'Study protocol for the subject ' + subject\nplt.title(name, fontsize=20)\n\n# Graph annotation\nfor row in range(study_protocol.shape[0]):\n # Datetime index of the beginning of the task\n begin_state = study_protocol.iloc[row, 0]\n begin = begin_df + timedelta(minutes=int(begin_state)) + timedelta(seconds=begin_state-int(begin_state))\n\n # Datetime index of the end of the task\n end_state = study_protocol.iloc[row, 1]\n end = begin_df + timedelta(minutes=int(end_state)) + timedelta(seconds=end_state-int(end_state))\n\n # Draw a rectangle and annotate the graph\n ax.axvspan(begin, end, facecolor='b', alpha=0.2)\n text_location = begin+((end-begin)/2)*1/2\n ax.annotate(study_protocol.iloc[row, 2], xy=(begin, 5), xytext=(text_location, 5.5), fontsize=10)\n\nplt.show()",
"_____no_output_____"
]
],
[
[
"## Get the results of the self-assesment",
"_____no_output_____"
]
],
[
[
"study_protocol_raw\n# Show data\n# qgrid_widget = qgrid.show_grid(study_protocol_raw, show_toolbar=True)\n# qgrid.show_grid(study_protocol_raw)",
"_____no_output_____"
]
],
[
[
"**The order of result of the self-assessment is listed below:**\n- line 0: Condition\n- lines 1-2: Start and end of the condition\n- line 3: *NaN line for data separation*\n- lines 4-8: PANAS result with the 26 different feeling in columns (columns 1-27), and scores (1 = Not at all, 2 = A little bit, 3 = Somewhat, 4 = Very much, 5 = Extremely) for the conditions: Base (line 4) Fun (line 5) Medi 1 (line 6) TSST (line 7) and Medi 2 (line 8). *Note that there are 2 more features for the Stress condition only.*\n- line 9: *NaN line for data separation*\n- lines 10-14: STAI result with the 6 different feelings in columns and scores (1 = Not at all, 2 = Somewhat, 3 = Moderately so, 4 = Very much so) for the conditions: Base (line 10) Fun (line 11) Medi 1 (line 12) TSST (line 13) and Medi 2 (line 14). \n- line 15: *NaN line for data separation*\n- lines 16-20: SAM (Self-Assessment Manikins) results with the 2 different feelings (valence and arousal) in columns for the conditions: Base (line 16) Fun (line 17) Medi 1 (line 18) TSST (line 19) and Medi 2 (line 20).\n- line 21: *NaN line for data separation*\n- lines 22: SSSQ result with the 6 different feeling and scores (1 = Not at all, 2 = A little bit, 3 = Somewhat, 4 = Very much, 5 = Extremely) for the stress condition only.\n\n*TO DO*: pool, transpose and normalise data. Verify SSSQ information",
"_____no_output_____"
]
],
[
[
"self_assessment = pd.DataFrame()\nself_assessment = study_protocol_raw.iloc[0, 1:5].T\n\n# Base results\nself_assessment.iloc[0, 1:27] = study_protocol_raw.iloc[4, 1:27]\nself_assessment",
"_____no_output_____"
]
],
[
[
"## Get the wrist data and adjust to the working frequency (4Hz)\n\n| Device | Location|Parameter|Acq. frequency|Number of dimensions|Data points (S5)| Duration (S5)|\n|:---------------|:-------:|:-------:|:------------:|:------------------:|:--------------:|:------------:|\n|**Empatica E4** |wrist | ACC |32Hz |**3** |200256 |6'258sec |\n| | | BVP |64Hz |1 |400512 | |\n| | | EDA |4Hz |1 |25032 | |\n| | | TEMP |4Hz |1 |25032 | |",
"_____no_output_____"
]
],
[
[
"freq_df",
"_____no_output_____"
],
[
"wrist_data_dict = obj_data[subject].get_wrist_data()",
"_____no_output_____"
],
[
"# Extraction of numbers of data\nwrist_dict_length = {key: len(value) for key, value in wrist_data_dict.items()}\nprint('Original numbers of data per parameter: ' + str(wrist_dict_length))\nwrist_ser_length = pd.Series(wrist_dict_length)\ndf_wrist = pd.DataFrame()\n\n# Adjust all data to the same frequence\nfor wrist_param, param_length in wrist_ser_length.items():\n # Generate the frequence in microseconds (U) from the acquisition frequency\n freq = str(int(1000000/freq_df.loc[wrist_param + '_wrist'])) + 'U'\n # Generate temporary dataset \n index = pd.date_range(start='1/1/2020', periods=param_length, freq=freq)\n df_temp_raw = pd.DataFrame(wrist_data_dict[wrist_param], index=index)\n if wrist_param == 'ACC':\n df_temp_raw.columns = ['ACC_wrist_x', 'ACC_wrist_y', 'ACC_wrist_z']\n else:\n df_temp_raw.columns = [wrist_param + '_wrist']\n # Resampling\n df_temp = df_temp_raw.resample(working_freq).pad()\n # Append the wrist data\n if df_wrist.shape[1]==0:\n df_wrist = df_temp\n else:\n df_wrist = pd.concat([df_wrist, df_temp], axis=1)\n\nprint('Resampled data adjusted to ' + str(freq_df['working_freq']) + 'Hz in the pandas DataFrame df_wrist:')\ndf_wrist",
"Original numbers of data per parameter: {'ACC': 200256, 'BVP': 400512, 'EDA': 25032, 'TEMP': 25032}\nResampled data adjusted to 4Hz in the pandas DataFrame df_wrist:\n"
]
],
[
[
"## Chest data from the .pkl file adjusted to 4Hz\n\n| Device | Location|Parameter|Acq. frequency|Number of dimensions|Data points (S5)| Duration (S5)|\n|:---------------|:-------:|:-------:|:------------:|:------------------:|:--------------:|:------------:|\n|**RespiBAN Pro**|chest | ACC |700Hz |**3** |4496100 |6'423sec |\n| | | ECG |\" |1 | | |\n| | | EDA |\" |1 | | |\n| | | EMG |\" |1 | | |\n| | | RESP |\" |1 | | |\n| | | TEMP |\" |1 | | |",
"_____no_output_____"
]
],
[
[
"chest_data_dict = obj_data[subject].get_chest_data()",
"_____no_output_____"
],
[
"# Extraction of numbers of data\nchest_dict_length = {key: len(value) for key, value in chest_data_dict.items()}\nprint('Original numbers of data per parameter: ' + str(chest_dict_length))\nchest_ser_length = pd.Series(chest_dict_length)\ndf_chest = pd.DataFrame()\n\n# Adjust all data to the same frequence\nfor chest_param, param_length in chest_ser_length.items():\n # Generate the frequence in microseconds (U) from the acquisition frequency\n freq = str(int(1000000/freq_df.loc[chest_param + '_chest'])) + 'U'\n # Generate temporary dataset \n index = pd.date_range(start='1/1/2020', periods=param_length, freq=freq)\n df_temp_raw = pd.DataFrame(chest_data_dict[chest_param], index=index)\n if chest_param == 'ACC':\n df_temp_raw.columns = ['ACC_chest_x', 'ACC_chest_y', 'ACC_chest_z']\n else:\n df_temp_raw.columns = [chest_param + '_chest']\n # Resampling\n df_temp = df_temp_raw.resample(working_freq).pad()\n # Append the chest data\n if df_chest.shape[1]==0:\n df_chest = df_temp\n else:\n df_chest = pd.concat([df_chest, df_temp], axis=1)\n\nprint('Resampled data adjusted to ' + str(freq_df['working_freq']) + 'Hz in the pandas DataFrame df_chest:')\ndf_chest",
"Original numbers of data per parameter: {'ACC': 4380600, 'ECG': 4380600, 'EMG': 4380600, 'EDA': 4380600, 'Temp': 4380600, 'Resp': 4380600}\nResampled data adjusted to 4Hz in the pandas DataFrame df_chest:\n"
]
],
[
[
"## Get the label data\n\n‘label’: ID of the respective study protocol condition, sampled at 700 Hz.\nThe following IDs are provided:\n - 0 = not defined / transient\n - 1 = baseline\n - 2 = stress\n - 3 = amusement\n - 4 = meditation\n - 5/6/7 = should be ignored in this dataset",
"_____no_output_____"
]
],
[
[
"labels = {}\nlabels[subject] = obj_data[subject].get_labels()\nlabels_dict = obj_data[subject].get_labels()",
"_____no_output_____"
],
[
"freq = str(int(1000000/freq_df.loc['label'])) + 'U' # U means microseconds\nindex = pd.date_range(start='1/1/2020', periods=len(labels_dict), freq=freq)\ndf_label = pd.DataFrame(labels_dict, index=index)\ndf_label = df_label.resample(working_freq).pad()\ndf_label['time'] = df_label.index\ndf_label.columns = ['label', 'time']\n# Ignore 5/6/7\ndf_label.loc[df_label['label'] > 4, 'label'] = 0\ndf_label",
"_____no_output_____"
],
[
"# Plot\nfig_sp, ax = plt.subplots(figsize=(8, 4))\n\nplt.plot('time', 'label', data=df_label, color='darkblue', marker='o',linestyle='dashed', linewidth=0.5, markersize=2)\nplt.gcf().autofmt_xdate()\nmyFmt = DateFormatter(\"%H:%M\")\nax.xaxis.set_major_formatter(myFmt)\nplt.xlabel('Time elapsed (hh:mm)', fontsize=15)\nplt.ylim(0,6)\nplt.ylabel('Label', fontsize=15)\nname = 'Label data for the subject ' + subject\nplt.title(name, fontsize=20)\n\n# Graph annotation\nfor row in range(study_protocol.shape[0]):\n # Datetime index of the beginning of the task\n begin_state = study_protocol.iloc[row, 0]\n begin = begin_df + timedelta(minutes=int(begin_state)) + timedelta(seconds=begin_state-int(begin_state))\n\n # Datetime index of the end of the task\n end_state = study_protocol.iloc[row, 1]\n end = begin_df + timedelta(minutes=int(end_state)) + timedelta(seconds=end_state-int(end_state))\n\n # Draw a rectangle and annotate the graph\n ax.axvspan(begin, end, facecolor='b', alpha=0.2)\n text_location = begin+((end-begin)/2)*1/2\n ax.annotate(study_protocol.iloc[row, 2], xy=(begin, 5), xytext=(text_location, 5.5), fontsize=10)\n\nplt.show()",
"_____no_output_____"
]
],
[
[
"# There is a lag between the data extracted from the _quest.csv file and the synchronized data:\n - Check if there is any synchronisation data in the pkl file\n - Look how to properly merge the datasets that don't have the same dimensions !",
"_____no_output_____"
]
],
[
[
"def extract_one(chest_data_dict, idx, l_condition=0):\n ecg_data = chest_data_dict[\"ECG\"][idx].flatten()\n ecg_features = extract_mean_std_features(ecg_data, label=l_condition)\n #print(ecg_features.shape)\n\n eda_data = chest_data_dict[\"EDA\"][idx].flatten()\n eda_features = extract_mean_std_features(eda_data, label=l_condition)\n #print(eda_features.shape)\n\n emg_data = chest_data_dict[\"EMG\"][idx].flatten()\n emg_features = extract_mean_std_features(emg_data, label=l_condition)\n #print(emg_features.shape)\n\n temp_data = chest_data_dict[\"Temp\"][idx].flatten()\n temp_features = extract_mean_std_features(temp_data, label=l_condition)\n #print(temp_features.shape)\n\n baseline_data = np.hstack((eda_features, temp_features, ecg_features, emg_features))\n #print(len(baseline_data))\n label_array = np.full(len(baseline_data), l_condition)\n #print(label_array.shape)\n #print(baseline_data.shape)\n baseline_data = np.column_stack((baseline_data, label_array))\n #print(baseline_data.shape)\n return baseline_data",
"_____no_output_____"
],
[
"def execute():\n# data_set_path = \"/media/jac/New Volume/Datasets/WESAD\"\n data_set_path = \"../../../Data/WESAD\"\n file_path = \"ecg.txt\"\n subject = 'S3' # Why defining subject here since it is defined 6 lines later in a loop ?\n obj_data = {}\n labels = {}\n all_data = {}\n subs = [2, 3, 4, 5, 6]\n for i in subs:\n subject = 'S' + str(i)\n print(\"Reading data\", subject)\n obj_data[subject] = read_data_one_subject(data_set_path, subject)\n labels[subject] = obj_data[subject].get_labels()\n\n wrist_data_dict = obj_data[subject].get_wrist_data()\n wrist_dict_length = {key: len(value) for key, value in wrist_data_dict.items()}\n\n chest_data_dict = obj_data[subject].get_chest_data()\n chest_dict_length = {key: len(value) for key, value in chest_data_dict.items()}\n print(chest_dict_length)\n chest_data = np.concatenate((chest_data_dict['ACC'], chest_data_dict['ECG'], chest_data_dict['EDA'],\n chest_data_dict['EMG'], chest_data_dict['Resp'], chest_data_dict['Temp']), axis=1)\n # Get labels\n\n\n # 'ACC' : 3, 'ECG' 1: , 'EDA' : 1, 'EMG': 1, 'RESP': 1, 'Temp': 1 ===> Total dimensions : 8\n # No. of Labels ==> 8 ; 0 = not defined / transient, 1 = baseline, 2 = stress, 3 = amusement,\n # 4 = meditation, 5/6/7 = should be ignored in this dataset\n\n # Do for each subject\n baseline = np.asarray([idx for idx, val in enumerate(labels[subject]) if val == 1])\n # print(\"Baseline:\", chest_data_dict['ECG'][baseline].shape)\n # print(baseline.shape)\n\n stress = np.asarray([idx for idx, val in enumerate(labels[subject]) if val == 2])\n # print(stress.shape)\n\n amusement = np.asarray([idx for idx, val in enumerate(labels[subject]) if val == 3])\n # print(amusement.shape)\n\n baseline_data = extract_one(chest_data_dict, baseline, l_condition=1)\n stress_data = extract_one(chest_data_dict, stress, l_condition=2)\n amusement_data = extract_one(chest_data_dict, amusement, l_condition=3)\n\n full_data = np.vstack((baseline_data, stress_data, amusement_data))\n print(\"One subject data\", full_data.shape)\n all_data[subject] = full_data\n\n i = 0\n for k, v in all_data.items():\n if i == 0:\n data = all_data[k]\n i += 1\n print(all_data[k].shape)\n data = np.vstack((data, all_data[k]))\n\n print(data.shape)\n return data",
"_____no_output_____"
],
[
"# \"\"\"\necg, eda = chest_data_dict['ECG'], chest_data_dict['EDA']\nx = [i for i in range(len(baseline))]\nfor one in baseline:\n x = [i for i in range(99)]\n plt.plot(x, ecg[one:100])\n break\n# \"\"\"\n\nx = [i for i in range(10000)]\nplt.plot(x, chest_data_dict['ECG'][:10000])\nplt.show()\n\n# BASELINE\n\n [ecg_features[k] for k in ecg_features.keys()])\n\necg = nk.ecg_process(ecg=ecg_data, rsp=chest_data_dict['Resp'][baseline].flatten(), sampling_rate=700)\nprint(os.getcwd())\n\n# \"\"\"\nrecur_print\nprint(type(ecg))\nprint(ecg.keys())\nfor k in ecg.keys():\n print(k)\n for i in ecg[k].keys():\n print(i)\n \nresp = nk.eda_process(eda=chest_data_dict['EDA'][baseline].flatten(), sampling_rate=700)\nresp = nk.rsp_process(chest_data_dict['Resp'][baseline].flatten(), sampling_rate=700)\nfor k in resp.keys():\n print(k)\n for i in resp[k].keys():\n print(i)\n \n# For baseline, compute mean, std, for each 700 samples. (1 second values)\nfile_path = os.getcwd()\nwith open(file_path, \"w\") as file:\n #file.write(str(ecg['df']))\n file.write(str(ecg['ECG']['HRV']['RR_Intervals']))\n file.write(\"...\")\n file.write(str(ecg['RSP']))\n #file.write(\"RESP................\")\n #file.write(str(resp['RSP']))\n #file.write(str(resp['df']))\n #print(type(ecg['ECG']['HRV']['RR_Intervals']))\n #file.write(str(ecg['ECG']['Cardiac_Cycles']))\n #print(type(ecg['ECG']['Cardiac_Cycles']))\n #file.write(ecg['ECG']['Cardiac_Cycles'].to_csv())\n \n \n# Plot the processed dataframe, normalizing all variables for viewing purpose\n# \"\"\"\n# \"\"\"\nbio = nk.bio_process(ecg=chest_data_dict[\"ECG\"][baseline].flatten(), rsp=chest_data_dict['Resp'][baseline].flatten(), eda=chest_data_dict[\"EDA\"][baseline].flatten(), sampling_rate=700)\nnk.z_score(bio[\"df\"]).plot()\nprint(bio[\"ECG\"].keys())\nprint(bio[\"EDA\"].keys())\nprint(bio[\"RSP\"].keys())\n#ECG\nprint(bio[\"ECG\"][\"HRV\"])\nprint(bio[\"ECG\"][\"R_Peaks\"])\n#EDA\nprint(bio[\"EDA\"][\"SCR_Peaks_Amplitudes\"])\nprint(bio[\"EDA\"][\"SCR_Onsets\"])\n#RSP\nprint(bio[\"RSP\"][\"Cycles_Onsets\"])\nprint(bio[\"RSP\"][\"Cycles_Length\"])\n# \"\"\"\nprint(\"Read data file\")\n#Flow: Read data for all subjects -> Extract features (Preprocessing) -> Train the model",
"_____no_output_____"
],
[
"data_set_path = \"../../../Data/WESAD\"\nsubject = 'S4'",
"_____no_output_____"
],
[
"obj_data = {}\nobj_data[subject] = read_data_of_one_subject(data_set_path, subject)",
"_____no_output_____"
],
[
"chest_data_dict = obj_data[subject].get_chest_data()\nchest_dict_length = {key: len(value) for key, value in chest_data_dict.items()}\nprint(chest_dict_length)",
"_____no_output_____"
],
[
"# Get labels\nlabels = obj_data[subject].get_labels()\nbaseline = np.asarray([idx for idx,val in enumerate(labels) if val == 1])\n#print(baseline)\n\nprint(\"Baseline:\", chest_data_dict['ECG'][baseline].shape)",
"_____no_output_____"
],
[
"labels.shape",
"_____no_output_____"
],
[
"from sklearn.externals import joblib",
"_____no_output_____"
],
[
"bio = nk.bio_process(ecg=chest_data_dict[\"ECG\"][baseline].flatten(), rsp=chest_data_dict['Resp'][baseline].flatten(), eda=chest_data_dict[\"EDA\"][baseline].flatten(), sampling_rate=700)\nnk.z_score(bio[\"df\"]).plot()\n\"\"\"print(bio[\"ECG\"].keys())\nprint(bio[\"EDA\"].keys())\nprint(bio[\"RSP\"].keys())\n\n#ECG\nprint(bio[\"ECG\"][\"HRV\"])\nprint(bio[\"ECG\"][\"R_Peaks\"])\n\n#EDA\nprint(bio[\"EDA\"][\"SCR_Peaks_Amplitudes\"])\nprint(bio[\"EDA\"][\"SCR_Onsets\"])\n\n#RSP\nprint(bio[\"RSP\"][\"Cycles_Onsets\"])\nprint(bio[\"RSP\"][\"Cycles_Length\"])\n\"\"\"",
"_____no_output_____"
]
],
[
[
"### Try to display the dataframe with qgrid:\n\nCheck the [quantopian link](https://github.com/quantopian/qgrid).\n\n```python\nimport qgrid\nqgrid_widget = qgrid_widget.show_grid(df, show_toolbar=True)\nqgrid_widget\n```",
"_____no_output_____"
],
[
"# Descriptive statistics in Time Series Modelling\nhttps://towardsdatascience.com/descriptive-statistics-in-time-series-modelling-db6ec569c0b8\n\nStationarity\nA time series is said to be stationary if it doesn’t increase or decrease with time linearly or exponentially(no trends), and if it doesn’t show any kind of repeating patterns(no seasonality). Mathematically, this is described as having constant mean and constant variance over time. Along, with variance, the autocovariance should also not be a function of time. If you have forgotten what mean and variance are: mean is the average of the data and variance is the average squared distance from the mean.\n\nSometimes, it’s even difficult to interpret the rolling mean visually so we take the help of statistical tests to identify this, one such being Augmented Dickey Fuller Test. ADCF Test is implemented using statsmodels in python which performs a classic null hypothesis test and returns a p-value.\nInterpretation of null hypothesis test: If p-value is less than 0.05 (p-value: low), we reject the null hypothesis and assume that the data is stationary. But if the p-value is more than 0.05 (p-value: high), then we fail to reject the null hypothesis and determine the data to be non-stationary.",
"_____no_output_____"
],
[
"## 1.2 Random Forest Classifier (from jaganjag Github)\n\n*Not sure if it would be relevant but keeping the code for completeness of the repo*",
"_____no_output_____"
]
],
[
[
"from read_data import *\nfrom sklearn.ensemble import RandomForestClassifier\nfrom sklearn.datasets import make_classification\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.mixture import GaussianMixture\n\nif __name__ == '__main__':\n data = execute()\n print(data.shape)\n X = data[:, :16] # 16 features\n y = data[:, 16]\n print(X.shape)\n print(y.shape)\n print(y)\n train_features, test_features, train_labels, test_labels = train_test_split(X, y,\n test_size=0.25)\n print('Training Features Shape:', train_features.shape)\n print('Training Labels Shape:', train_labels.shape)\n print('Testing Features Shape:', test_features.shape)\n print('Testing Labels Shape:', test_labels.shape)\n\n clf = RandomForestClassifier(n_estimators=100, max_depth=5, oob_score=True)\n clf.fit(X, y)\n print(clf.feature_importances_)\n # print(clf.oob_decision_function_)\n print(clf.oob_score_)\n predictions = clf.predict(test_features)\n errors = abs(predictions - test_labels)\n print(\"M A E: \", np.mean(errors))\n print(np.count_nonzero(errors), len(test_labels))\n print(\"Accuracy:\", np.count_nonzero(errors)/len(test_labels))",
"_____no_output_____"
],
[
"from sklearn.ensemble import RandomForestClassifier\nfrom sklearn.datasets import make_classification\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.mixture import GaussianMixture\n\nimport numpy as np\n\nX, y = make_classification(n_samples=10000, n_features=6,\n n_informative=3, n_redundant=0,\n random_state=0, shuffle=True)\n\nprint(X.shape) # 10000x6\nprint(y.shape) # 10000\n\n# TODO: Feature extraction using sliding window\n\ntrain_features, test_features, train_labels, test_labels = train_test_split(X, y,\n test_size=0.25, random_state=42)\n# TODO: K-fold cross validation\n\nprint('Training Features Shape:', train_features.shape)\nprint('Training Labels Shape:', train_labels.shape)\nprint('Testing Features Shape:', test_features.shape)\nprint('Testing Labels Shape:', test_labels.shape)\n\nclf = RandomForestClassifier(n_estimators=100, max_depth=3, oob_score=True\n )\n\nclf.fit(X, y)\n\nprint(clf.feature_importances_)\n#print(clf.oob_decision_function_)\nprint(clf.oob_score_)\n\npredictions = clf.predict(test_features)\nerrors = abs(predictions - test_labels)\nprint(\"M A E: \", round(np.mean(errors), 2))\n\n\n# Visualization\nfeature_list = [1, 2, 3, 4, 5, 6]\nfrom sklearn.tree import export_graphviz\nimport pydot\n# Pull out one tree from the forest\ntree = clf.estimators_[5]\n# Export the image to a dot file\nexport_graphviz(tree, out_file='tree.dot', feature_names=feature_list, rounded=True, precision=1)\n# Use dot file to create a graph\n(graph, ) = pydot.graph_from_dot_file('tree.dot')\n# Write graph to a png file\n#graph.write_png('tree_.png')\n\n# TODO: Confusion matrix, Accuracy\n\n\n# GMM\n\ngmm = GaussianMixture(n_components=3, covariance_type='full')\ngmm.fit(X, y)",
"_____no_output_____"
]
],
[
[
"## Function to downsample the dataset, run a GridSearch, sort the best model according to the mean average percentage error\n\n* Downsampling of dataset: Pick 10 days in a device-specific dataset and will run the GridSearch. Allow to run the algorithm on all device-specific dataframes.\n* GridSearch trying Prophet with different training periods (8, 10 or 12 training days). This was the most critical parameter affecting the mean average percentage error (mape).\n* Sort the Prophet model according to the mape. Save the best model with graph and a dataframe containing the prediction and actual data.",
"_____no_output_____"
]
],
[
[
"n_samples = 10 # Limit to 10 predictions per device.\npred_duration = 12 # 12-day prediction\n\nfor dev_nb in range(1,52):\n device_nb = str('{:02d}'.format(dev_nb))\n # Load the device-specific dataframe.\n assert isinstance(device_nb, str) and len(device_nb)==2 and sum(d.isdigit() for d in device_nb)==2, 'WARNING: device_nb must be a string of 2-digits!'\n assert int(device_nb)>=1 and int(device_nb)<=51, 'This device does not belong to the dataframe'\n device, df_dev = load_ds(device_nb)\n # Convert the variable device from a np.array to a string\n regex = re.compile('[^A-Za-z0-9]')\n device = regex.sub('', str(device))\n \n # Create a dataframe with the dates to use\n dates = pd.DataFrame(columns={'date_minus_12',\n 'date_minus_10',\n 'date_minus_8',\n 'date_predict'})\n dates = dates[['date_minus_12', 'date_minus_10', 'date_minus_8', 'date_predict']]\n # List of unique dates in the dataframe\n dates['date_minus_12'] = df_dev['ds'].unique().strftime('%Y-%m-%d')\n dates = dates.drop_duplicates(subset=['date_minus_12'])\n dates = dates.reset_index(drop=True)\n # Fill the other columns and drop the 12 last columns\n dates['date_minus_10'] = dates.iloc[2:, 0].reset_index(drop=True)\n dates['date_minus_8'] = dates.iloc[4:, 0].reset_index(drop=True)\n dates['date_predict'] = dates.iloc[12:, 0].reset_index(drop=True)\n dates = dates[:-pred_duration] # Drop the 12 last rows\n \n # Keep only the dates with at least 12 training days\n dates['Do_It'] = 'Do not'\n dates['dm_12_c'] = np.nan\n \n for r in range(dates.shape[0]):\n # Calculate the date_predict - pred_duration\n date_predict = dates.iloc[r, 3]\n date_predict = datetime.strptime(date_predict, \"%Y-%m-%d\")\n\n date_minus_12_check = date_predict + timedelta(days=-pred_duration)\n date_minus_12_check = datetime.strftime(date_minus_12_check, \"%Y-%m-%d\")\n \n # Tag the date_predict that have at least 12 training days\n if date_minus_12_check in dates.date_predict.values or r<=11:\n dates.iloc[r, 4] = 'yes'\n\n dates = dates[dates.Do_It == 'yes']\n dates.drop(['Do_It', 'dm_12_c'], axis=1)\n \n # Downsampling\n if dates.shape[0]>n_samples:\n dates = dates.sample(n=n_samples, replace=False)\n\n # GridSearch over the (down-sampled) dataset:\n start_time = time.time()\n mape_table_full = pd.DataFrame()\n \n for r in range(dates.shape[0]):\n # Parameters of the Grid\n prophet_grid = {'df_dev' : [df_dev],\n 'device' : [device],\n 'parameter' : ['co2'],\n 'begin' : dates.iloc[r, :3].tolist(),\n 'end' : [dates.iloc[r, 3]],\n 'sampling_period_min' : [1],\n 'graph' : [1],\n 'predict_day' : [1],\n 'interval_width' : [0.6],\n 'changepoint_prior_scale' : [0.01, 0.005], # list(np.arange(0.01,30,1).tolist()),\n 'daily_fo' : [3],\n # 'holidays_prior_scale' : list((1000,100,10,1,0.1)),\n }\n\n # Run GridSearch_Prophet\n mape_table = GridSearch_Prophet(list(ParameterGrid(prophet_grid)), metric='mape')\n mape_table_full = mape_table_full.append(mape_table)\n\n end_time = time.time()\n dur_min = int((end_time - start_time)/60)\n \n print('Time elapsed: '+ str(dur_min) + \" minutes.\")\n\n # Save the best model\n print('Saving the best model')\n \n best_model = {'df_dev' : [df_dev],\n 'device' : [mape_table.iloc[0, 0]],\n 'parameter' : [mape_table.iloc[0, 1]],\n 'begin' : [mape_table.iloc[0, 2]],\n 'end' : [mape_table.iloc[0, 3]],\n 'sampling_period_min' : [mape_table.iloc[0, 4]],\n 'graph' : [1],\n 'predict_day' : [1],\n 'interval_width' : [mape_table.iloc[0, 5]],\n 'changepoint_prior_scale' : [mape_table.iloc[0, 7]], # list(np.arange(0.01,30,1).tolist()),\n 'daily_fo' : [mape_table.iloc[0, 6]],\n# 'holidays_prior_scale' : list((1000,100,10,1,0.1)),\n }\n\n # Run GridSearch_Prophet on the best model\n mape_table = GridSearch_Prophet(list(ParameterGrid(best_model)), metric='mape')\n\n end_time = time.time()\n dur_min = int((end_time - start_time)/60)\n print('Full analysis completed in '+ str(dur_min) + ' minutes.')\n\n # Save the full table of mape_table\n # Store the complete mape_table if this is the last prediction\n folder_name = '/Users/guillaume/Documents/DS2020/Caru/caru/data/processed/'\n mape_table_name = folder_name + re.sub(\"[']\", '', str(mape_table.iloc[0, 0])) + '_mape_table_full.csv'\n mape_table_full.to_csv(mape_table_name)",
"_____no_output_____"
]
],
[
[
"# GridSearch over dataset:\n\nstart_time = time.time()\n\n# Parameters\nprophet_grid = {'df_dev' : [df_dev],\n 'device' : [device],\n 'parameter' : ['co2'],\n 'begin' : ['2019-03-20', '2019-03-22'],\n 'end' : ['2019-04-01'],\n 'sampling_period_min' : [1],\n 'graph' : [1],\n 'predict_day' : [1],\n 'interval_width' : [0.6],\n 'changepoint_prior_scale' : [0.01], # list(np.arange(0.01,30,1).tolist()),\n 'daily_fo' : [3, 6, 9],\n# 'holidays_prior_scale' : list((1000,100,10,1,0.1)),\n }\n\n# Run GridSearch_Prophet\nmape_table = GridSearch_Prophet(list(ParameterGrid(prophet_grid)), metric='mape')\n\n\nend_time = time.time()\ndur_min = int((end_time - start_time)/60)\n\nprint('GridSearch finished '+ str(dur_min) + \" minutes.\")\nprint('Saving the best model')\n\nbest_model = {'df_dev' : [df_dev],\n 'device' : [mape_table.iloc[0, 0]],\n 'parameter' : [mape_table.iloc[0, 1]],\n 'begin' : [mape_table.iloc[0, 2]],\n 'end' : [mape_table.iloc[0, 3]],\n 'sampling_period_min' : [mape_table.iloc[0, 4]],\n 'graph' : [1],\n 'predict_day' : [1],\n 'interval_width' : [mape_table.iloc[0, 5]],\n 'changepoint_prior_scale' : [mape_table.iloc[0, 7]], # list(np.arange(0.01,30,1).tolist()),\n 'daily_fo' : [mape_table.iloc[0, 6]],\n# 'holidays_prior_scale' : list((1000,100,10,1,0.1)),\n }\n\n# Run GridSearch_Prophet on the p\nmape_table = GridSearch_Prophet(list(ParameterGrid(best_model)), metric='mape')\n\nend_time = time.time()\ndur_min = int((end_time - start_time)/60)\nprint('Best model saved in '+ str(dur_min) + ' minutes.')",
"_____no_output_____"
]
],
[
[
"Shortcuts:\n - Move cell down: .\n - Move cell up: /",
"_____no_output_____"
]
]
] |
[
"markdown",
"raw",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"raw",
"markdown"
] |
[
[
"markdown"
],
[
"raw"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown",
"markdown",
"markdown"
],
[
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown",
"markdown",
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"raw"
],
[
"markdown"
]
] |
4ae9aabe5acec7157fc51aa56670409f88a36efe
| 13,743 |
ipynb
|
Jupyter Notebook
|
phase_query_search_proximity_query_search/Information Retrieval - Biword Indexing.ipynb
|
Raghuram-Veeramallu/information_retrieval
|
efd8698b73e8a099c4d9f37757acb425473f844a
|
[
"MIT"
] | null | null | null |
phase_query_search_proximity_query_search/Information Retrieval - Biword Indexing.ipynb
|
Raghuram-Veeramallu/information_retrieval
|
efd8698b73e8a099c4d9f37757acb425473f844a
|
[
"MIT"
] | null | null | null |
phase_query_search_proximity_query_search/Information Retrieval - Biword Indexing.ipynb
|
Raghuram-Veeramallu/information_retrieval
|
efd8698b73e8a099c4d9f37757acb425473f844a
|
[
"MIT"
] | null | null | null | 26.685437 | 116 | 0.48461 |
[
[
[
"import re\nimport nltk\nfrom nltk.corpus import stopwords\nfrom nltk.tokenize import word_tokenize\nimport spacy\nfrom nltk.tokenize.toktok import ToktokTokenizer\nimport en_core_web_sm\nfrom pattern.en import suggest\nimport pandas as pd",
"_____no_output_____"
],
[
"#nltk.download('stopwords')\n#nltk.download('punkt')\nnlp = spacy.load('en_core_web_sm', parse=True, tag=True, entity=True)\ntokenizer = ToktokTokenizer()",
"_____no_output_____"
],
[
"#file = open(\"A Boy's Will - Robert Frost/1.txt\", \"r\")",
"_____no_output_____"
],
[
"#txt = file.read()",
"_____no_output_____"
],
[
"#list_new = init_process(txt)",
"_____no_output_____"
],
[
"DOCS_SIZE = 50",
"_____no_output_____"
],
[
"stop_words = set(stopwords.words('english'))",
"_____no_output_____"
],
[
"def init_process(txt):\n no_new = re.sub('\\n', ' ', txt)\n no_spl = re.sub('ñ', ' ', no_new)\n first_parse = re.sub(r'[^\\w]', ' ', no_spl)\n return first_parse",
"_____no_output_____"
],
[
"def stemming(text):\n ps = nltk.porter.PorterStemmer()\n text = ' '.join([ps.stem(word) for word in text.split()])\n return text",
"_____no_output_____"
],
[
"def lemmatize_text(text):\n text = nlp(text)\n text = ' '.join([word.lemma_ if word.lemma_ != '-PRON-' else word.text for word in text])\n return text",
"_____no_output_____"
],
[
"def reduce_lengthening(text):\n pattern = re.compile(r\"(.)\\1{2,}\")\n return pattern.sub(r\"\\1\\1\", text)",
"_____no_output_____"
],
[
"def correct_spelling(w):\n word_wlf = reduce_lengthening(w)\n correct_word = suggest(word_wlf)\n return correct_word[0][0]",
"_____no_output_____"
],
[
"def spelling_correction(words):\n correct = [correct_spelling(w) for w in words]\n return correct",
"_____no_output_____"
],
[
"def remove_stopwords(text, is_lower_case=False):\n tokens = tokenizer.tokenize(text)\n tokens = [token.strip() for token in tokens]\n if is_lower_case:\n filtered_tokens = [token for token in tokens if token not in stop_words]\n else:\n filtered_tokens = [token for token in tokens if token.lower() not in stop_words]\n #filtered_text = ' '.join(filtered_tokens) \n return filtered_tokens",
"_____no_output_____"
],
[
"def normalise(file_name):\n file = open(file_name, \"r\")\n read_txt = file.read()\n list_new = init_process(read_txt)\n stemmed = stemming(list_new)\n lemma = lemmatize_text(stemmed)\n new_words = remove_stopwords(lemma)\n final = spelling_correction(new_words)\n return final",
"_____no_output_____"
],
[
"def refine_text():\n for i in range(1,51):\n new_text_file = str(i)+\".txt\"\n file_name = \"poems/\"+new_text_file\n refined_list = normalise(file_name)\n refined_text = ' '.join(refined_list)\n text_file = open((\"refined/\"+new_text_file), \"w\")\n text_file.write(refined_text)\n text_file.close()\n return",
"_____no_output_____"
],
[
"#refine_text() # Dont refine everytime",
"_____no_output_____"
],
[
"# dictionary = {}\n# for i in range(1,51):\n# file_name = (\"refined/\"+str(i)+\".txt\")\n# text = open(file_name, \"r\").read()\n# tokens = tokenizer.tokenize(text)\n# for t in tokens:\n# if t in dictionary:\n# dictionary.get(t).append(i)\n# dictionary[t] = list(set(dictionary.get(t)))\n# else:\n# dictionary[t] = [i]",
"_____no_output_____"
],
[
"dictionary = {}\ndef biwordindexing():\n for i in range(1,51):\n file_name = (\"refined/\"+str(i)+\".txt\")\n text = open(file_name, \"r\").read()\n tokens = tokenizer.tokenize(text)\n for j in range(0,len(tokens)-1):\n t = tokens[j]+\" \"+tokens[j+1]\n if t in dictionary:\n dictionary.get(t).append(i)\n dictionary[t] = list(set(dictionary.get(t)))\n else:\n dictionary[t] = [i]\nbiwordindexing()",
"_____no_output_____"
],
[
"# dictionary = {}\n# for i in range(1, (DOCSIZE+1)):\n# file_name = (\"refined/\"+str(i)+\".txt\")\n# text = open(file_name, \"r\").read()\n# tokens = tokenizer.tokenize(text)\n# for t in tokens:\n# if t in dictionary:\n# dictionary.get(t).append(i)\n# dictionary[t] = list(set(dictionary.get(t)))\n# else:\n# dictionary[t] = [i]",
"_____no_output_____"
],
[
"# Dont do everytime\n# text_file = open(\"inverted_list.csv\", \"w\")\n# text_file.write(\"Words, Inverted Index \\n\")\n# for item in dictionary.keys():\n# join_items = \", \".join(str(d) for d in dictionary.get(item))\n# text = item+\", \"+str(join_items)\n# text_file.write(text+\" \\n\")\n# text_file.close()",
"_____no_output_____"
],
[
"def and_intersect(list1, list2):\n mer_list = []\n i = 0\n j = 0\n while (i<len(list1) and j<len(list2)):\n if (list1[i] == list2[j]):\n mer_list.append(list1[i])\n i = i+1\n j = j+1\n else:\n if (list1[i] > list2[j]):\n j = j+1\n else:\n i = i+1\n return mer_list",
"_____no_output_____"
],
[
"def or_intersect(list1, list2):\n mer_list = []\n i = 0\n j = 0\n while (i<len(list1) and j<len(list2)):\n if (list1[i] == list2[j]):\n mer_list.append(list1[i])\n i = i+1\n j = j+1\n else:\n if (list1[i] > list2[j]):\n mer_list.append(list2[j])\n j = j+1\n else:\n mer_list.append(list1[i])\n i = i+1\n return mer_list",
"_____no_output_____"
],
[
"def not_list(list1):\n not_list = []\n for i in range(1, (DOCS_SIZE + 1)):\n if i in list1:\n pass\n else:\n not_list.append(i)\n return not_list",
"_____no_output_____"
],
[
"def perform_binary_operations(word1, word2):\n list_1 = dictionary.get(word1)\n list_2 = dictionary.get(word2)\n lists_and = and_intersect(list_1, list_2)\n lists_or = or_intersect(list_1, list_2)\n list1_not = not_list(list_1)\n list2_not = not_list(list_2)\n text_file = open(word1+\"_\"+word2+\"_operation.csv\", \"w\")\n text_file.write(\"Words, Inverted Index \\n\")\n join_items = \", \".join(str(d) for d in list_1)\n text = word1+\", \"+str(join_items)\n text_file.write(text+\" \\n\")\n join_items = \", \".join(str(d) for d in list_2)\n text = word2+\", \"+str(join_items)\n text_file.write(text+\" \\n\")\n join_items = \", \".join(str(d) for d in lists_and)\n text = word1+\" AND \"+word2+\", \"+str(join_items)\n text_file.write(text+\" \\n\")\n join_items = \", \".join(str(d) for d in lists_or)\n text = word1+\" OR \"+word2+\", \"+str(join_items)\n text_file.write(text+\" \\n\")\n join_items = \", \".join(str(d) for d in list1_not)\n text = \"NOT \"+word1+\", \"+str(join_items)\n text_file.write(text+\" \\n\")\n join_items = \", \".join(str(d) for d in list2_not)\n text = \"NOT \"+word2+\", \"+str(join_items)\n text_file.write(text+\" \\n\")\n text_file.close()",
"_____no_output_____"
],
[
"perform_binary_operations(\"know\", \"far\")",
"_____no_output_____"
],
[
"def multiple_and(list1):\n and_list = and_intersect(list1[0], list1[1])\n for i in range(2, len(list1)):\n and_list = and_intersect(list1[i], and_list)\n return and_list",
"_____no_output_____"
],
[
"def multiple_or(list1):\n or_list = or_intersect(list1[0], list1[1])\n for i in range(2, len(list1)):\n or_list = or_intersect(list1[i], or_list)\n return or_list",
"_____no_output_____"
],
[
"new_list = [dictionary.get('come'), dictionary.get('leave'), dictionary.get('know'), dictionary.get('far')]\nmultiple_and(new_list)",
"_____no_output_____"
],
[
"### Code to make inverted index - not working\n# import InvertedIndex\n# import InvertedIndexQuery\n\n# i = InvertedIndex.Index()\n\n# filename = '1.txt'\n# file_to_index = open(filename).read() \n# document_key = filename\n\n# # index the document, using document_key as the document's\n# # id.\n# i.index(file_to_index, document_key)\n\n# filename = '2.txt'\n# file_to_index = open(filename).read()\n# document_key = filename\n\n# i.index(file_to_index, document_key)\n\n# search_results = InvertedIndexQuery.query('Python and spam', i)\n# search_results.sort()\n\n# cnt = 0\n# for document in search_results:\n# cnt = cnt + 1\n# print ('%d) %s'.format(cnt, document[1])) ",
"_____no_output_____"
],
[
"dictionary.get(\"vanish adobe\")",
"_____no_output_____"
]
]
] |
[
"code"
] |
[
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
]
] |
4ae9ac75174212344213e6378eb06aa224b93744
| 36,255 |
ipynb
|
Jupyter Notebook
|
advanced_feature_engineering/mean_encoding_example.ipynb
|
alikhanlab/data_science_project_approach
|
8b505bce2802003a4e949842b8ddcd2a544a2c92
|
[
"MIT"
] | null | null | null |
advanced_feature_engineering/mean_encoding_example.ipynb
|
alikhanlab/data_science_project_approach
|
8b505bce2802003a4e949842b8ddcd2a544a2c92
|
[
"MIT"
] | null | null | null |
advanced_feature_engineering/mean_encoding_example.ipynb
|
alikhanlab/data_science_project_approach
|
8b505bce2802003a4e949842b8ddcd2a544a2c92
|
[
"MIT"
] | null | null | null | 42.552817 | 11,728 | 0.660268 |
[
[
[
"Version 1.1.0",
"_____no_output_____"
],
[
"# Mean encodings",
"_____no_output_____"
],
[
"In this programming assignment you will be working with `1C` dataset from the final competition. You are asked to encode `item_id` in 4 different ways:\n\n 1) Via KFold scheme; \n 2) Via Leave-one-out scheme;\n 3) Via smoothing scheme;\n 4) Via expanding mean scheme.\n\n**You will need to submit** the correlation coefficient between resulting encoding and target variable up to 4 decimal places.\n\n### General tips\n\n* Fill NANs in the encoding with `0.3343`.\n* Some encoding schemes depend on sorting order, so in order to avoid confusion, please use the following code snippet to construct the data frame. This snippet also implements mean encoding without regularization.",
"_____no_output_____"
]
],
[
[
"import pandas as pd\nimport numpy as np\nfrom itertools import product\nfrom grader import Grader\n\n%matplotlib inline",
"_____no_output_____"
]
],
[
[
"# Read data",
"_____no_output_____"
]
],
[
[
"sales = pd.read_csv('../readonly/final_project_data/sales_train.csv.gz')",
"_____no_output_____"
],
[
"sales.head()",
"_____no_output_____"
]
],
[
[
"# Aggregate data",
"_____no_output_____"
],
[
"Since the competition task is to make a monthly prediction, we need to aggregate the data to montly level before doing any encodings. The following code-cell serves just that purpose.",
"_____no_output_____"
]
],
[
[
"index_cols = ['shop_id', 'item_id', 'date_block_num']\n\n# For every month we create a grid from all shops/items combinations from that month\ngrid = [] \nfor block_num in sales['date_block_num'].unique():\n cur_shops = sales[sales['date_block_num']==block_num]['shop_id'].unique()\n cur_items = sales[sales['date_block_num']==block_num]['item_id'].unique()\n grid.append(np.array(list(product(*[cur_shops, cur_items, [block_num]])),dtype='int32'))\n\n#turn the grid into pandas dataframe\ngrid = pd.DataFrame(np.vstack(grid), columns = index_cols,dtype=np.int32)\n\n#get aggregated values for (shop_id, item_id, month)\ngb = sales.groupby(index_cols,as_index=False).agg({'item_cnt_day':{'target':'sum'}})\n\n#fix column names\ngb.columns = [col[0] if col[-1]=='' else col[-1] for col in gb.columns.values]\n#join aggregated data to the grid\nall_data = pd.merge(grid,gb,how='left',on=index_cols).fillna(0)\n#sort the data\nall_data.sort_values(['date_block_num','shop_id','item_id'],inplace=True)",
"/opt/conda/lib/python3.6/site-packages/pandas/core/groupby.py:4036: FutureWarning: using a dict with renaming is deprecated and will be removed in a future version\n return super(DataFrameGroupBy, self).aggregate(arg, *args, **kwargs)\n"
],
[
"all_data.head()",
"_____no_output_____"
]
],
[
[
"# Mean encodings without regularization",
"_____no_output_____"
],
[
"After we did the techinical work, we are ready to actually *mean encode* the desired `item_id` variable. \n\nHere are two ways to implement mean encoding features *without* any regularization. You can use this code as a starting point to implement regularized techniques. ",
"_____no_output_____"
],
[
"#### Method 1",
"_____no_output_____"
]
],
[
[
"# Calculate a mapping: {item_id: target_mean}\nitem_id_target_mean = all_data.groupby('item_id').target.mean()\n\n# In our non-regularized case we just *map* the computed means to the `item_id`'s\nall_data['item_target_enc'] = all_data['item_id'].map(item_id_target_mean)\n\n# Fill NaNs\nall_data['item_target_enc'].fillna(0.3343, inplace=True) \n\n# Print correlation\nencoded_feature = all_data['item_target_enc'].values\nprint(np.corrcoef(all_data['target'].values, encoded_feature)[0][1])",
"0.483038698862\n"
]
],
[
[
"#### Method 2",
"_____no_output_____"
]
],
[
[
"'''\n Differently to `.target.mean()` function `transform` \n will return a dataframe with an index like in `all_data`.\n Basically this single line of code is equivalent to the first two lines from of Method 1.\n'''\nall_data['item_target_enc'] = all_data.groupby('item_id')['target'].transform('mean')\n\n# Fill NaNs\nall_data['item_target_enc'].fillna(0.3343, inplace=True) \n\n# Print correlation\nencoded_feature = all_data['item_target_enc'].values\nprint(np.corrcoef(all_data['target'].values, encoded_feature)[0][1])",
"0.483038698862\n"
]
],
[
[
"See the printed value? It is the correlation coefficient between the target variable and your new encoded feature. You need to **compute correlation coefficient** between the encodings, that you will implement and **submit those to coursera**.",
"_____no_output_____"
]
],
[
[
"grader = Grader()",
"_____no_output_____"
]
],
[
[
"# 1. KFold scheme",
"_____no_output_____"
],
[
"Explained starting at 41 sec of [Regularization video](https://www.coursera.org/learn/competitive-data-science/lecture/LGYQ2/regularization).",
"_____no_output_____"
],
[
"**Now it's your turn to write the code!** \n\nYou may use 'Regularization' video as a reference for all further tasks.\n\nFirst, implement KFold scheme with five folds. Use KFold(5) from sklearn.model_selection. \n\n1. Split your data in 5 folds with `sklearn.model_selection.KFold` with `shuffle=False` argument.\n2. Iterate through folds: use all but the current fold to calculate mean target for each level `item_id`, and fill the current fold.\n\n * See the **Method 1** from the example implementation. In particular learn what `map` and pd.Series.map functions do. They are pretty handy in many situations.",
"_____no_output_____"
]
],
[
[
"print(all_data['item_id'].unique())\nprint('num of unique values: {}'.format(len(all_data['item_id'].unique())))\nprint('num of samples: {:,}'.format(all_data.shape[0]))",
"[ 19 27 28 ..., 22005 22006 22158]\nnum of unique values: 21807\nnum of samples: 10,913,850\n"
],
[
"type(all_data.groupby('item_id')['target'].mean())",
"_____no_output_____"
]
],
[
[
"### Plot mean values upon `item_id`",
"_____no_output_____"
]
],
[
[
"all_data.groupby('item_id')['target'].mean().plot()",
"_____no_output_____"
],
[
"# YOUR CODE GOES HERE\nfrom sklearn.model_selection import KFold\n\nkf = KFold(n_splits=5, shuffle=False)\n\nfor index_train, index_valid in kf.split(all_data):\n X_tr, X_val = all_data.iloc[index_train], all_data.iloc[index_valid]\n \n # target coding of valid dataset depends on train dataset\n X_tr_group = X_tr.groupby('item_id')['target'] \n X_val['item_target_enc'] = X_val['item_id'].map(X_tr_group.mean())\n \n # copy target encoding back to all_data\n all_data.iloc[index_valid] = X_val\n \n\nall_data['item_target_enc'].fillna(0.3343, inplace=True) \nencoded_feature = all_data['item_target_enc'].values\n \n\n# You will need to compute correlation like that\ncorr = np.corrcoef(all_data['target'].values, encoded_feature)[0][1]\nprint(corr)\ngrader.submit_tag('KFold_scheme', corr)",
"/opt/conda/lib/python3.6/site-packages/ipykernel_launcher.py:11: SettingWithCopyWarning: \nA value is trying to be set on a copy of a slice from a DataFrame.\nTry using .loc[row_indexer,col_indexer] = value instead\n\nSee the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy\n # This is added back by InteractiveShellApp.init_path()\n"
]
],
[
[
"# 2. Leave-one-out scheme",
"_____no_output_____"
],
[
"Now, implement leave-one-out scheme. Note that if you just simply set the number of folds to the number of samples and run the code from the **KFold scheme**, you will probably wait for a very long time. \n\nTo implement a faster version, note, that to calculate mean target value using all the objects but one *given object*, you can:\n\n1. Calculate sum of the target values using all the objects.\n2. Then subtract the target of the *given object* and divide the resulting value by `n_objects - 1`. \n\nNote that you do not need to perform `1.` for every object. And `2.` can be implemented without any `for` loop.\n\nIt is the most convenient to use `.transform` function as in **Method 2**.",
"_____no_output_____"
]
],
[
[
"%%time\n# YOUR CODE GOES HERE\n\n# Calculate sum of the target values using all the objects.\ntarget_sum = all_data.groupby('item_id')['target'].transform('sum')\n\n# Then subtract the target of the given object and divide the resulting value by n_objects - 1.\nn_objects = all_data.groupby('item_id')['target'].transform('count')\n\nall_data['item_target_enc'] = (target_sum - all_data['target']) / (n_objects - 1)\nall_data['item_target_enc'].fillna(0.3343, inplace=True)\nencoded_feature = all_data['item_target_enc'].values\n\n\ncorr = np.corrcoef(all_data['target'].values, encoded_feature)[0][1]\nprint(corr)\ngrader.submit_tag('Leave-one-out_scheme', corr)\nprint()",
"0.480384831129\nCurrent answer for task Leave-one-out_scheme is: 0.480384831129\n\nCPU times: user 1.3 s, sys: 905 ms, total: 2.2 s\nWall time: 4.41 s\n"
]
],
[
[
"# 3. Smoothing",
"_____no_output_____"
],
[
"Explained starting at 4:03 of [Regularization video](https://www.coursera.org/learn/competitive-data-science/lecture/LGYQ2/regularization).",
"_____no_output_____"
],
[
"Next, implement smoothing scheme with $\\alpha = 100$. Use the formula from the first slide in the video and $0.3343$ as `globalmean`. Note that `nrows` is the number of objects that belong to a certain category (not the number of rows in the dataset).",
"_____no_output_____"
]
],
[
[
"%%time\n\n# YOUR CODE GOES HERE\nalpha = 100\n\nitem_id_target_mean = all_data.groupby('item_id')['target'].transform('mean')\nn_objects = all_data.groupby('item_id')['target'].transform('count')\n\nall_data['item_target_enc'] = (item_id_target_mean * n_objects + 0.3343*alpha) / (n_objects + alpha)\n\nall_data['item_target_enc'].fillna(0.3343, inplace=True) \nencoded_feature = all_data['item_target_enc'].values\n\n\ncorr = np.corrcoef(all_data['target'].values, encoded_feature)[0][1]\nprint(corr)\ngrader.submit_tag('Smoothing_scheme', corr)\nprint()",
"0.48181987971\nCurrent answer for task Smoothing_scheme is: 0.48181987971\n\nCPU times: user 1.36 s, sys: 869 ms, total: 2.23 s\nWall time: 4.5 s\n"
]
],
[
[
"# 4. Expanding mean scheme",
"_____no_output_____"
],
[
"Explained starting at 5:50 of [Regularization video](https://www.coursera.org/learn/competitive-data-science/lecture/LGYQ2/regularization).",
"_____no_output_____"
],
[
"Finally, implement the *expanding mean* scheme. It is basically already implemented for you in the video, but you can challenge yourself and try to implement it yourself. You will need [`cumsum`](https://pandas.pydata.org/pandas-docs/stable/generated/pandas.core.groupby.DataFrameGroupBy.cumsum.html) and [`cumcount`](https://pandas.pydata.org/pandas-docs/stable/generated/pandas.core.groupby.GroupBy.cumcount.html) functions from pandas.",
"_____no_output_____"
]
],
[
[
"print('shape of cumulative sum: {:,}'.format(all_data.groupby('item_id')['target'].cumsum().shape[0]))",
"shape of cumulative sum: 10,913,850\n"
],
[
"# YOUR CODE GOES HERE\ncumsum = all_data.groupby('item_id')['target'].cumsum() - all_data['target']\ncumcnt = all_data.groupby('item_id').cumcount()\n\nall_data['item_target_enc'] = cumsum / cumcnt\nall_data['item_target_enc'].fillna(0.3343, inplace=True) \nencoded_feature = all_data['item_target_enc'].values\n\ncorr = np.corrcoef(all_data['target'].values, encoded_feature)[0][1]\nprint(corr)\ngrader.submit_tag('Expanding_mean_scheme', corr)",
"0.502524521108\nCurrent answer for task Expanding_mean_scheme is: 0.502524521108\n"
]
],
[
[
"## Authorization & Submission\nTo submit assignment parts to Cousera platform, please, enter your e-mail and token into variables below. You can generate token on this programming assignment page. Note: Token expires 30 minutes after generation.",
"_____no_output_____"
]
],
[
[
"STUDENT_EMAIL = '[email protected]' # EMAIL HERE\nSTUDENT_TOKEN = 'EC3Bgq6dNzp8q92S' # TOKEN HERE\ngrader.status()",
"You want to submit these numbers:\nTask KFold_scheme: 0.41645907128\nTask Leave-one-out_scheme: 0.480384831129\nTask Smoothing_scheme: 0.48181987971\nTask Expanding_mean_scheme: 0.502524521108\n"
],
[
"grader.submit(STUDENT_EMAIL, STUDENT_TOKEN)",
"Submitted to Coursera platform. See results on assignment page!\n"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code"
] |
[
[
"markdown",
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown",
"markdown"
],
[
"code",
"code"
],
[
"markdown",
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown",
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown",
"markdown",
"markdown"
],
[
"code"
],
[
"markdown",
"markdown",
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code",
"code"
]
] |
4ae9ad56dbbb20ab4e0badadc70f78595218909c
| 137,702 |
ipynb
|
Jupyter Notebook
|
Implementations/FY21/ACC_GTFS_accessibility_analysis_Cap_Haitien_Haiti/Step2_build_merge_gtfs_graphs_adv_snap.ipynb
|
worldbank/GOST_PublicGoods
|
119e1f6a4baf7aaffecd732e5f59882be23424d5
|
[
"MIT"
] | 40 |
2018-03-13T13:47:36.000Z
|
2022-02-17T13:17:32.000Z
|
Implementations/FY21/ACC_GTFS_accessibility_analysis_Cap_Haitien_Haiti/Step2_build_merge_gtfs_graphs_adv_snap.ipynb
|
worldbank/GOST_PublicGoods
|
119e1f6a4baf7aaffecd732e5f59882be23424d5
|
[
"MIT"
] | 11 |
2018-07-30T20:17:13.000Z
|
2020-08-13T20:30:20.000Z
|
Implementations/FY21/ACC_GTFS_accessibility_analysis_Cap_Haitien_Haiti/Step2_build_merge_gtfs_graphs_adv_snap.ipynb
|
worldbank/GOST_PublicGoods
|
119e1f6a4baf7aaffecd732e5f59882be23424d5
|
[
"MIT"
] | 14 |
2018-08-14T07:47:56.000Z
|
2021-11-23T11:07:56.000Z
| 79.321429 | 39,928 | 0.726329 |
[
[
[
"# Step 2: Building GTFS graphs and merging it with a walking graph\nWe heavily follow Kuan Butts's Calculating Betweenness Centrality with GTFS blog post: https://gist.github.com/kuanb/c54d0ae7ee353cac3d56371d3491cf56\n\n### The peartree (https://github.com/kuanb/peartree) source code was modified. Until code is merged you should use code from this fork: https://github.com/d3netxer/peartree",
"_____no_output_____"
]
],
[
[
"%load_ext autoreload\n%autoreload 2",
"The autoreload extension is already loaded. To reload it, use:\n %reload_ext autoreload\n"
],
[
"import matplotlib.pyplot as plt\n%matplotlib inline",
"_____no_output_____"
],
[
"import osmnx as ox\nimport pandas as pd\nimport geopandas as gpd\nimport networkx as nx\nimport numpy as np\nfrom shapely.geometry import Point",
"_____no_output_____"
],
[
"import partridge as ptg",
"_____no_output_____"
],
[
"import os, sys",
"_____no_output_____"
],
[
"sys.path.append(r\"C:\\repos\\peartree\")\nimport peartree as pt",
"_____no_output_____"
],
[
"print(pt.__file__)",
"C:\\repos\\peartree\\peartree\\__init__.py\n"
],
[
"path = r'input_folder/cap_haitien_gtfs.zip'",
"_____no_output_____"
]
],
[
[
"### Build a graph from service_0001\nservice_0001 is on the weekends, so below we are choosing a data that lands on a weekend",
"_____no_output_____"
]
],
[
[
"# from: http://simplistic.me/playing-with-gtfs.html\nimport datetime\n\nservice_ids_by_date = ptg.read_service_ids_by_date(path)\nservice_ids = service_ids_by_date[datetime.date(2019, 6, 29)]\n\nprint(f\"service_ids is {service_ids}\")\n\n# view lets you filter before you load the feed. For example, below you are filtering by the service_ids\nfeed_0001 = ptg.load_feed(path, view={\n 'trips.txt': {\n 'service_id': service_ids,\n },\n})",
"service_ids is frozenset({'service_0001'})\n"
],
[
"feed_0001.calendar",
"_____no_output_____"
]
],
[
[
"### give all trips a direction of 0\nPearTree wants directions assigned",
"_____no_output_____"
]
],
[
[
"feed_0001.trips['direction_id'] = 0",
"_____no_output_____"
]
],
[
[
"### Preview the GTFS network",
"_____no_output_____"
]
],
[
[
"# Set a target time period to summarize impedance\nstart = 0 # 0:00 \nend = 24*60*60 # 24:00 \n\n# Converts feed subset into a directed\n# network multigraph\nG = pt.load_feed_as_graph(feed_0001, start, end, add_trips_per_edge=True)",
"_____no_output_____"
],
[
"fig, ax = ox.plot_graph(G,\n figsize=(12,12),\n show=False,\n close=False,\n node_color='#8aedfc',\n node_size=5,\n edge_color='#e2dede',\n edge_alpha=0.25,\n bgcolor='black')",
"C:\\Users\\war-machine\\Anaconda2\\envs\\gostnets2\\lib\\site-packages\\pyproj\\crs\\crs.py:53: FutureWarning: '+init=<authority>:<code>' syntax is deprecated. '<authority>:<code>' is the preferred initialization method. When making the change, be mindful of axis order changes: https://pyproj4.github.io/pyproj/stable/gotchas.html#axis-order-changes-in-proj-6\n return _prepare_from_string(\" \".join(pjargs))\n"
],
[
"# PearTree prepends the stop ids with a code the is different each time it loads a graph\nlist(G.edges)",
"_____no_output_____"
],
[
"#list(G.edges(data='True'))",
"_____no_output_____"
],
[
"len(G.nodes)",
"_____no_output_____"
]
],
[
[
"### Inspect edge data, and you should see the length attribute, which is the time in seconds needs to traverse an edge. The trips attribute represents how many trips cross that edge.",
"_____no_output_____"
]
],
[
[
"for edge in list(G.edges):\n print(G.get_edge_data(edge[0],edge[1]))",
"{0: {'length': 2119.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 1462.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 74.0, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 122.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 706.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 1213.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 648.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 1257.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 2657.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 1736.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 90.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 40.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 64.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 26.5, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 94.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 66.25, 'trips': 4, 'mode': 'transit'}}\n{0: {'length': 345.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 108.5, 'trips': 4, 'mode': 'transit'}}\n{0: {'length': 137.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 424.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 40.5, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 41.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 152.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 34.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 80.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 69.5, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 76.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 57.5, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 44.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 32.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 648.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 48.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 222.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 125.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 61.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 16.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 242.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 99.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 65.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 196.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 102.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 89.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 20.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 309.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 228.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 78.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 83.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 489.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 42.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 91.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 80.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 74.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 172.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 60.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 34.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 33.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 338.5, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 222.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 44.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 78.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 494.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 32.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 611.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 161.0, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 268.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 145.33333333333334, 'trips': 3, 'mode': 'transit'}}\n{0: {'length': 136.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 536.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 37.333333333333336, 'trips': 3, 'mode': 'transit'}}\n{0: {'length': 65.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 168.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 852.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 72.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 59.5, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 53.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 170.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 358.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 38.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 188.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 55.0, 'trips': 3, 'mode': 'transit'}}\n{0: {'length': 154.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 107.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 61.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 235.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 22.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 26.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 128.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 39.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 42.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 33.5, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 86.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 76.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 43.0, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 522.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 41.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 120.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 150.0, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 21.0, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 64.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 36.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 218.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 618.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 66.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 53.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 309.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 73.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 66.5, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 546.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 100.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 85.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 269.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 153.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 24.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 98.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 51.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 142.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 302.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 35.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 186.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 347.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 69.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 157.0, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 78.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 44.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 20.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 102.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 121.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 129.0, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 42.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 52.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 1027.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 39.0, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 24.0, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 252.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 135.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 82.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 30.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 22.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 96.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 57.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 29.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 126.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 28.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 41.0, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 76.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 627.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 57.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 89.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 177.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 88.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 88.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 987.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 214.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 65.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 72.0, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 465.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 292.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 32.5, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 84.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 63.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 46.5, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 355.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 122.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 113.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 36.0, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 1085.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 213.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 40.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 100.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 72.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 78.0, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 67.0, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 378.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 39.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 66.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 37.5, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 565.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 575.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 51.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 8.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 138.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 86.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 100.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 147.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 64.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 50.666666666666664, 'trips': 3, 'mode': 'transit'}}\n{0: {'length': 92.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 112.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 87.5, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 12.0, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 112.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 34.5, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 391.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 45.5, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 55.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 138.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 199.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 57.333333333333336, 'trips': 3, 'mode': 'transit'}}\n{0: {'length': 29.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 177.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 210.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 105.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 47.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 39.0, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 66.0, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 58.0, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 34.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 156.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 218.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 39.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 220.5, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 436.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 34.5, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 94.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 449.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 98.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 14.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 44.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 137.0, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 46.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 89.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 18.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 76.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 34.0, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 98.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 45.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 142.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 125.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 604.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 29.5, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 45.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 63.0, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 137.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 177.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 150.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 172.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 99.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 15.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 145.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 44.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 69.5, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 115.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 73.0, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 346.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 22.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 2905.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 197.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 34.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 123.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 422.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 103.0, 'trips': 3, 'mode': 'transit'}}\n{0: {'length': 67.33333333333333, 'trips': 3, 'mode': 'transit'}}\n{0: {'length': 38.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 120.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 91.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 138.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 116.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 60.333333333333336, 'trips': 3, 'mode': 'transit'}}\n{0: {'length': 104.0, 'trips': 3, 'mode': 'transit'}}\n{0: {'length': 73.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 1155.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 126.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 71.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 71.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 179.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 61.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 298.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 402.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 16.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 243.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 100.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 76.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 83.0, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 215.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 806.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 94.5, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 56.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 34.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 106.5, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 277.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 167.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 285.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 104.0, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 17.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 94.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 561.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 117.33333333333333, 'trips': 3, 'mode': 'transit'}}\n{0: {'length': 103.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 75.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 310.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 257.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 1801.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 487.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 14.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 30.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 49.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 70.0, 'trips': 3, 'mode': 'transit'}}\n{0: {'length': 84.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 194.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 48.0, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 86.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 426.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 732.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 52.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 46.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 597.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 850.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 60.5, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 38.0, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 54.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 249.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 65.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 198.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 79.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 275.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 35.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 364.0, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 152.0, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 49.0, 'trips': 3, 'mode': 'transit'}}\n{0: {'length': 70.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 370.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 104.0, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 198.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 70.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 811.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 54.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 86.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 24.0, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 11.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 83.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 116.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 20.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 257.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 80.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 122.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 122.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 247.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 66.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 52.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 41.0, 'trips': 2, 'mode': 'transit'}}\n{0: {'length': 88.0, 'trips': 1, 'mode': 'transit'}}\n{0: {'length': 213.0, 'trips': 1, 'mode': 'transit'}}\n"
]
],
[
[
"### get feed 2",
"_____no_output_____"
]
],
[
[
"service_ids_by_date = ptg.read_service_ids_by_date(path)\nservice_ids = service_ids_by_date[datetime.date(2019,8,6)]\n\nprint(f\"service_ids is {service_ids}\")\n\n# view lets you filter before you load the feed. For example, below you are filtering by the service_ids\nfeed_0002 = ptg.load_feed(path, view={\n 'trips.txt': {\n 'service_id': service_ids,\n },\n})",
"service_ids is frozenset({'service_0002'})\n"
]
],
[
[
"### Inspect graph as a shapefile\nUsed for testing",
"_____no_output_____"
]
],
[
[
"# Get reference to GOSTNets\n#sys.path.append(r'C:\\repos\\GOSTnets')\n#import GOSTnets as gn",
"_____no_output_____"
],
[
"#gn.save(G,\"gtfs_export_cap_haitien_service0001\",r\"temp\")\n#gn.save(G,\"gtfs_export_cap_haitien_service0002\",r\"temp\")\n# Also these saved edges will be used in the optional PostProcessing notebook to compare differences between the two graphs",
"_____no_output_____"
]
],
[
[
"note: On inspection the edges have a length field. This length field is the average traversal time per edge based on the GTFS data in seconds.",
"_____no_output_____"
],
[
"## Merge a walk network\nfollowing this blog post: http://kuanbutts.com/2018/12/24/peartree-with-walk-network/",
"_____no_output_____"
]
],
[
[
"# load existing walk/ferry graph from step 1\n\nG = nx.read_gpickle(r\"temp\\cap_haitien_walk_w_ferries_via_osmnx_origins_adv_snap.pickle\")\n#G = nx.read_gpickle(r\"temp\\cap_haitien_walk_w_ferries_via_osmnx_salted.pickle\")",
"_____no_output_____"
],
[
"print(nx.info(G))",
"Name: \nType: MultiDiGraph\nNumber of nodes: 267226\nNumber of edges: 542728\nAverage in degree: 2.0310\nAverage out degree: 2.0310\n"
],
[
"list(G.edges(data=True))[:10]",
"_____no_output_____"
]
],
[
[
"### Assign traversal times in seconds to edges\nSince peartree represents edge length (that is the impedance value associated with the edge) in seconds; we will need to convert the edge values that are in meters into seconds:",
"_____no_output_____"
]
],
[
[
"walk_speed = 3.5 #km per hour; about 3 miles per hour\nferry_speed = 15\n\n# Make a copy of the graph in case we make a mistake\nG_adj = G.copy()\n\n# Iterate through and convert lengths to seconds\nfor from_node, to_node, edge in G_adj.edges(data=True):\n orig_len = edge['length']\n \n # Note that this is a MultiDiGraph so there could\n # be multiple indices here, I naively assume this is not the case\n G_adj[from_node][to_node][0]['orig_length'] = orig_len\n \n try:\n # if ferry\n if 'ferry' in G_adj[from_node][to_node][0]:\n ferry_var = G_adj[from_node][to_node][0]['ferry']\n # if ferry does not have nan as a value\n # if it is a string then it will produce an error and go to the except statement\n# print('print ferry_var')\n# print(ferry_var)\n# print(type(ferry_var))\n# print(np.isnan(ferry_var))\n if not np.isnan(ferry_var):\n print(G_adj[from_node][to_node][0]['ferry'])\n print(G_adj[from_node][to_node][0])\n\n # Conversion of walk speed and into seconds from meters\n kmph = (orig_len / 1000) / ferry_speed\n in_seconds = kmph * 60 * 60\n G_adj[from_node][to_node][0]['length'] = in_seconds\n\n # And state the mode, too\n G_adj[from_node][to_node][0]['mode'] = 'ferry'\n else:\n # Conversion of walk speed and into seconds from meters\n kmph = (orig_len / 1000) / walk_speed\n in_seconds = kmph * 60 * 60\n G_adj[from_node][to_node][0]['length'] = in_seconds\n\n # And state the mode, too\n G_adj[from_node][to_node][0]['mode'] = 'walk'\n except:\n # Conversion of walk speed and into seconds from meters\n kmph = (orig_len / 1000) / walk_speed\n in_seconds = kmph * 60 * 60\n G_adj[from_node][to_node][0]['length'] = in_seconds\n \n # And state the mode, too\n G_adj[from_node][to_node][0]['mode'] = 'walk'",
"_____no_output_____"
],
[
"G_adj.nodes[330530920]",
"_____no_output_____"
],
[
"G_adj.nodes[6770195160]",
"_____no_output_____"
],
[
"# So this should be easy - just go through all nodes\n# and make them have a 0 cost to board\nfor i, node in G_adj.nodes(data=True):\n G_adj.nodes[i]['boarding_cost'] = 0",
"_____no_output_____"
],
[
"# testing\nlist(G_adj.edges(data=True))[1]",
"_____no_output_____"
]
],
[
[
"### save the graph again to be used for the isochrones notebook",
"_____no_output_____"
]
],
[
[
"sys.path.append(r'C:\\repos\\GOSTnets')\nimport GOSTnets as gn",
"_____no_output_____"
],
[
"gn.save(G,\"cap_haitien_walk_w_ferries_via_osmnx_w_time_adv_snap\",r\"temp\")",
"_____no_output_____"
]
],
[
[
"## Loading the feeds as graphs with the walking graph as the existing graph\nNow that the two graphs have the same internal structures, we can load the walk network onto the transit network with the following peartree helper method.",
"_____no_output_____"
]
],
[
[
"# Now that we have a formatted walk network\n# it should be easy to reload the peartree graph\n# and stack it on the walk network\nstart = 0 # 0:00 \nend = 24*60*60 # 24:00 \n\nfeeds = {'service0001':feed_0001,'service0002':feed_0002}\n#feeds = {'service0002':feed_0002}\nfor feed in feeds.items():\n G_adj_copy = G_adj.copy()\n # Note this will be a little slow - an optimization here would be\n # to have coalesced the walk network\n %time G = pt.load_feed_as_graph(feed[1], start, end, existing_graph=G_adj_copy, impute_walk_transfers=True, add_trips_per_edge=True)\n \n # compatible with NetworkX 2.4\n list_of_subgraphs = list(G.subgraph(c).copy() for c in nx.weakly_connected_components(G))\n max_graph = None\n max_edges = 0\n for i in list_of_subgraphs:\n if i.number_of_edges() > max_edges:\n max_edges = i.number_of_edges()\n max_graph = i\n\n # set your graph equal to the largest sub-graph\n G = max_graph\n \n # save again and inspect\n gn.save(G,f\"gtfs_export_cap_haitien_merged_impute_walk_adv_snap_{feed[0]}\",r\"temp\")\n #gn.save(G,f\"gtfs_export_cap_haitien_merged_impute_walk_salted_{feed[0]}\",r\"temp\")",
"Wall time: 32.7 s\nWall time: 30.8 s\n"
]
],
[
[
"## Visualize the last merged feed in the loop",
"_____no_output_____"
]
],
[
[
"G.graph['crs'] = 'epsg:4326'\nG.graph",
"_____no_output_____"
],
[
"G.nodes[6770195160]",
"_____no_output_____"
],
[
"fig, ax = ox.plot_graph(G,\n figsize=(12,12),\n show=False,\n close=False,\n node_color='#8aedfc',\n node_size=5,\n edge_color='#e2dede',\n edge_alpha=0.25,\n bgcolor='black')",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code"
] |
[
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown",
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
]
] |
4ae9afa63e4f1156bf2edb6e0b74d3c782881130
| 145,506 |
ipynb
|
Jupyter Notebook
|
04_02_auto_ml_2.ipynb
|
mengwangk/FortuneNet
|
953596551673f5c67e3508513d2c3714d9c52826
|
[
"MIT"
] | 1 |
2021-08-07T12:49:13.000Z
|
2021-08-07T12:49:13.000Z
|
04_02_auto_ml_2.ipynb
|
mengwangk/FortuneNet
|
953596551673f5c67e3508513d2c3714d9c52826
|
[
"MIT"
] | null | null | null |
04_02_auto_ml_2.ipynb
|
mengwangk/FortuneNet
|
953596551673f5c67e3508513d2c3714d9c52826
|
[
"MIT"
] | 1 |
2021-08-07T12:49:12.000Z
|
2021-08-07T12:49:12.000Z
| 92.561069 | 68,392 | 0.764463 |
[
[
[
"<a href=\"https://colab.research.google.com/github/mengwangk/dl-projects/blob/master/04_02_auto_ml_2.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>",
"_____no_output_____"
],
[
"# Automated ML",
"_____no_output_____"
]
],
[
[
"COLAB = True",
"_____no_output_____"
],
[
"if COLAB:\n !sudo apt-get install git-lfs && git lfs install\n !rm -rf dl-projects\n !git clone https://github.com/mengwangk/dl-projects\n #!cd dl-projects && ls -l --block-size=M",
"Reading package lists... Done\nBuilding dependency tree \nReading state information... Done\nThe following package was automatically installed and is no longer required:\n libnvidia-common-430\nUse 'sudo apt autoremove' to remove it.\nThe following NEW packages will be installed:\n git-lfs\n0 upgraded, 1 newly installed, 0 to remove and 7 not upgraded.\nNeed to get 2,129 kB of archives.\nAfter this operation, 7,662 kB of additional disk space will be used.\nGet:1 http://archive.ubuntu.com/ubuntu bionic/universe amd64 git-lfs amd64 2.3.4-1 [2,129 kB]\nFetched 2,129 kB in 1s (2,212 kB/s)\ndebconf: unable to initialize frontend: Dialog\ndebconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76, <> line 1.)\ndebconf: falling back to frontend: Readline\ndebconf: unable to initialize frontend: Readline\ndebconf: (This frontend requires a controlling tty.)\ndebconf: falling back to frontend: Teletype\ndpkg-preconfigure: unable to re-open stdin: \nSelecting previously unselected package git-lfs.\n(Reading database ... 145674 files and directories currently installed.)\nPreparing to unpack .../git-lfs_2.3.4-1_amd64.deb ...\nUnpacking git-lfs (2.3.4-1) ...\nSetting up git-lfs (2.3.4-1) ...\nProcessing triggers for man-db (2.8.3-2ubuntu0.1) ...\nError: Failed to call git rev-parse --git-dir --show-toplevel: \"fatal: not a git repository (or any of the parent directories): .git\\n\"\nGit LFS initialized.\nCloning into 'dl-projects'...\nremote: Enumerating objects: 45, done.\u001b[K\nremote: Counting objects: 100% (45/45), done.\u001b[K\nremote: Compressing objects: 100% (40/40), done.\u001b[K\nremote: Total 672 (delta 23), reused 9 (delta 3), pack-reused 627\u001b[K\nReceiving objects: 100% (672/672), 66.98 MiB | 33.69 MiB/s, done.\nResolving deltas: 100% (377/377), done.\n"
],
[
"if COLAB:\n !cp dl-projects/utils* .\n !cp dl-projects/preprocess* .",
"_____no_output_____"
],
[
"%reload_ext autoreload\n%autoreload 2\n\n%matplotlib inline",
"_____no_output_____"
],
[
"import numpy as np\nimport pandas as pd\nimport seaborn as sns\nimport matplotlib.pyplot as plt\nimport scipy.stats as ss\nimport math \nimport matplotlib\n\nfrom scipy import stats\nfrom collections import Counter\nfrom pathlib import Path\n\nplt.style.use('fivethirtyeight')\n\nsns.set(style=\"ticks\")\n\n# Automated feature engineering\nimport featuretools as ft\n\n# Machine learning\nfrom sklearn.pipeline import Pipeline\nfrom sklearn.preprocessing import Imputer, MinMaxScaler, StandardScaler\nfrom sklearn.impute import SimpleImputer\nfrom sklearn.metrics import precision_score, recall_score, f1_score, roc_auc_score, precision_recall_curve, roc_curve\nfrom sklearn.model_selection import train_test_split, cross_val_score\nfrom sklearn.ensemble import RandomForestClassifier\n\nfrom IPython.display import display\n\nfrom utils import *\nfrom preprocess import *\n\n# The Answer to the Ultimate Question of Life, the Universe, and Everything.\nnp.random.seed(42)",
"_____no_output_____"
],
[
"%aimport",
"Modules to reload:\nall-except-skipped\n\nModules to skip:\n\n"
]
],
[
[
"## Preparation",
"_____no_output_____"
]
],
[
[
"if COLAB:\n from google.colab import drive\n drive.mount('/content/gdrive')\n GDRIVE_DATASET_FOLDER = Path('gdrive/My Drive/datasets/')",
"Go to this URL in a browser: https://accounts.google.com/o/oauth2/auth?client_id=947318989803-6bn6qk8qdgf4n4g3pfee6491hc0brc4i.apps.googleusercontent.com&redirect_uri=urn%3aietf%3awg%3aoauth%3a2.0%3aoob&response_type=code&scope=email%20https%3a%2f%2fwww.googleapis.com%2fauth%2fdocs.test%20https%3a%2f%2fwww.googleapis.com%2fauth%2fdrive%20https%3a%2f%2fwww.googleapis.com%2fauth%2fdrive.photos.readonly%20https%3a%2f%2fwww.googleapis.com%2fauth%2fpeopleapi.readonly\n\nEnter your authorization code:\n··········\nMounted at /content/gdrive\n"
],
[
"if COLAB:\n DATASET_PATH = GDRIVE_DATASET_FOLDER\n ORIGIN_DATASET_PATH = Path('dl-projects/datasets')\nelse:\n DATASET_PATH = Path(\"datasets\")\n ORIGIN_DATASET_PATH = Path('datasets')\n\nDATASET = DATASET_PATH/\"feature_matrix.csv\"\nORIGIN_DATASET = ORIGIN_DATASET_PATH/'4D.zip'\n\nif COLAB:\n !ls -l gdrive/\"My Drive\"/datasets/ --block-size=M\n !ls -l dl-projects/datasets --block-size=M",
"total 317M\n-rw------- 1 root root 141M Dec 27 08:27 feature_matrix.csv\n-rw------- 1 root root 176M Dec 27 08:28 feature_matrix.pkl\ntotal 1M\n-rw-r--r-- 1 root root 1M Dec 29 05:35 4D.txt\n-rw-r--r-- 1 root root 1M Dec 29 05:35 4D.zip\n"
],
[
"data = pd.read_csv(DATASET, header=0, sep=',', quotechar='\"', parse_dates=['time'])\norigin_data = format_tabular(ORIGIN_DATASET)",
"_____no_output_____"
],
[
"data.info()",
"<class 'pandas.core.frame.DataFrame'>\nRangeIndex: 699972 entries, 0 to 699971\nData columns (total 53 columns):\nNumberId 699972 non-null int64\ntime 699972 non-null datetime64[ns]\nSUM(Results.DrawNo) 699972 non-null int64\nSUM(Results.LuckyNo) 699972 non-null int64\nSUM(Results.TotalStrike) 699972 non-null int64\nSTD(Results.DrawNo) 699575 non-null float64\nSTD(Results.LuckyNo) 699575 non-null float64\nSTD(Results.TotalStrike) 699575 non-null float64\nMAX(Results.DrawNo) 699972 non-null int64\nMAX(Results.LuckyNo) 699972 non-null int64\nMAX(Results.TotalStrike) 699972 non-null int64\nSKEW(Results.DrawNo) 696365 non-null float64\nSKEW(Results.LuckyNo) 696365 non-null float64\nSKEW(Results.TotalStrike) 696365 non-null float64\nMIN(Results.DrawNo) 699972 non-null int64\nMIN(Results.LuckyNo) 699972 non-null int64\nMIN(Results.TotalStrike) 699972 non-null int64\nMEAN(Results.DrawNo) 699972 non-null float64\nMEAN(Results.LuckyNo) 699972 non-null int64\nMEAN(Results.TotalStrike) 699972 non-null int64\nCOUNT(Results) 699972 non-null int64\nNUM_UNIQUE(Results.PrizeType) 699972 non-null int64\nDAY(first_Results_time) 699972 non-null int64\nYEAR(first_Results_time) 699972 non-null int64\nMONTH(first_Results_time) 699972 non-null int64\nWEEKDAY(first_Results_time) 699972 non-null int64\nTotalStrike 699972 non-null float64\nLabel 699972 non-null int64\nMODE(Results.PrizeType)_1stPrizeNo 699972 non-null int64\nMODE(Results.PrizeType)_2ndPrizeNo 699972 non-null int64\nMODE(Results.PrizeType)_3rdPrizeNo 699972 non-null int64\nMODE(Results.PrizeType)_ConsolationNo1 699972 non-null int64\nMODE(Results.PrizeType)_ConsolationNo10 699972 non-null int64\nMODE(Results.PrizeType)_ConsolationNo2 699972 non-null int64\nMODE(Results.PrizeType)_ConsolationNo3 699972 non-null int64\nMODE(Results.PrizeType)_ConsolationNo4 699972 non-null int64\nMODE(Results.PrizeType)_ConsolationNo5 699972 non-null int64\nMODE(Results.PrizeType)_ConsolationNo6 699972 non-null int64\nMODE(Results.PrizeType)_ConsolationNo7 699972 non-null int64\nMODE(Results.PrizeType)_ConsolationNo8 699972 non-null int64\nMODE(Results.PrizeType)_ConsolationNo9 699972 non-null int64\nMODE(Results.PrizeType)_SpecialNo1 699972 non-null int64\nMODE(Results.PrizeType)_SpecialNo10 699972 non-null int64\nMODE(Results.PrizeType)_SpecialNo2 699972 non-null int64\nMODE(Results.PrizeType)_SpecialNo3 699972 non-null int64\nMODE(Results.PrizeType)_SpecialNo4 699972 non-null int64\nMODE(Results.PrizeType)_SpecialNo5 699972 non-null int64\nMODE(Results.PrizeType)_SpecialNo6 699972 non-null int64\nMODE(Results.PrizeType)_SpecialNo7 699972 non-null int64\nMODE(Results.PrizeType)_SpecialNo8 699972 non-null int64\nMODE(Results.PrizeType)_SpecialNo9 699972 non-null int64\nmonth 699972 non-null int64\nyear 699972 non-null int64\ndtypes: datetime64[ns](1), float64(8), int64(44)\nmemory usage: 283.0 MB\n"
]
],
[
[
"## Preliminary Modeling",
"_____no_output_____"
]
],
[
[
"feature_matrix = data",
"_____no_output_____"
],
[
"feature_matrix.columns",
"_____no_output_____"
],
[
"feature_matrix.head(4).T",
"_____no_output_____"
],
[
"origin_data[origin_data['LuckyNo']==0].head(10)",
"_____no_output_____"
],
[
"# feature_matrix.drop(columns=['MODE(Results.PrizeType)_1stPrizeNo',\n# 'MODE(Results.PrizeType)_2ndPrizeNo',\n# 'MODE(Results.PrizeType)_3rdPrizeNo',\n# 'MODE(Results.PrizeType)_ConsolationNo1',\n# 'MODE(Results.PrizeType)_ConsolationNo10',\n# 'MODE(Results.PrizeType)_ConsolationNo2',\n# 'MODE(Results.PrizeType)_ConsolationNo3',\n# 'MODE(Results.PrizeType)_ConsolationNo4',\n# 'MODE(Results.PrizeType)_ConsolationNo5',\n# 'MODE(Results.PrizeType)_ConsolationNo6',\n# 'MODE(Results.PrizeType)_ConsolationNo7',\n# 'MODE(Results.PrizeType)_ConsolationNo8',\n# 'MODE(Results.PrizeType)_ConsolationNo9',\n# 'MODE(Results.PrizeType)_SpecialNo1',\n# 'MODE(Results.PrizeType)_SpecialNo10',\n# 'MODE(Results.PrizeType)_SpecialNo2',\n# 'MODE(Results.PrizeType)_SpecialNo3',\n# 'MODE(Results.PrizeType)_SpecialNo4',\n# 'MODE(Results.PrizeType)_SpecialNo5',\n# 'MODE(Results.PrizeType)_SpecialNo6',\n# 'MODE(Results.PrizeType)_SpecialNo7',\n# 'MODE(Results.PrizeType)_SpecialNo8',\n# 'MODE(Results.PrizeType)_SpecialNo9'], inplace=True)",
"_____no_output_____"
],
[
"feature_matrix.groupby('time')['COUNT(Results)'].mean().plot()\nplt.title('Average Monthly Count of Results')\nplt.ylabel('Strike Per Number')",
"_____no_output_____"
]
],
[
[
"## Correlations",
"_____no_output_____"
]
],
[
[
"feature_matrix.shape",
"_____no_output_____"
],
[
"corrs = feature_matrix.corr().sort_values('TotalStrike')\ncorrs['TotalStrike'].head()",
"_____no_output_____"
],
[
"corrs['TotalStrike'].dropna().tail()",
"_____no_output_____"
]
],
[
[
"### Random Forest",
"_____no_output_____"
]
],
[
[
"model = RandomForestClassifier(n_estimators = 1000, \n random_state = 50,\n n_jobs = -1)",
"_____no_output_____"
],
[
"def predict_dt(dt, feature_matrix, return_probs = False):\n\n feature_matrix['date'] = feature_matrix['time']\n\n # Subset labels\n test_labels = feature_matrix.loc[feature_matrix['date'] == dt, 'Label']\n train_labels = feature_matrix.loc[feature_matrix['date'] < dt, 'Label']\n\n print(f\"Size of test labels {len(test_labels)}\")\n print(f\"Size of train labels {len(train_labels)}\")\n \n # Features\n X_train = feature_matrix[feature_matrix['date'] < dt].drop(columns = ['NumberId', 'time',\n 'date', 'Label', 'TotalStrike', 'month', 'year'])\n X_test = feature_matrix[feature_matrix['date'] == dt].drop(columns = ['NumberId', 'time',\n 'date', 'Label', 'TotalStrike', 'month', 'year'])\n print(f\"Size of X train {len(X_train)}\")\n print(f\"Size of X test {len(X_test)}\")\n \n\n feature_names = list(X_train.columns)\n \n # Impute and scale features\n pipeline = Pipeline([('imputer', SimpleImputer(strategy = 'median')), \n ('scaler', MinMaxScaler())])\n\n # Fit and transform training data\n X_train = pipeline.fit_transform(X_train)\n X_test = pipeline.transform(X_test)\n \n # Labels\n y_train = np.array(train_labels).reshape((-1, ))\n y_test = np.array(test_labels).reshape((-1, ))\n \n print('Training on {} observations.'.format(len(X_train)))\n print('Testing on {} observations.\\n'.format(len(X_test)))\n \n # Train \n model.fit(X_train, y_train)\n \n # Make predictions\n predictions = model.predict(X_test)\n probs = model.predict_proba(X_test)[:, 1]\n \n # Calculate metrics\n p = precision_score(y_test, predictions)\n r = recall_score(y_test, predictions)\n f = f1_score(y_test, predictions)\n auc = roc_auc_score(y_test, probs)\n \n print(f'Precision: {round(p, 5)}')\n print(f'Recall: {round(r, 5)}')\n print(f'F1 Score: {round(f, 5)}')\n print(f'ROC AUC: {round(auc, 5)}')\n \n # Feature importances\n fi = pd.DataFrame({'feature': feature_names, 'importance': model.feature_importances_})\n \n if return_probs:\n return fi, probs\n \n return fi\n ",
"_____no_output_____"
],
[
"# All the months\nlen(feature_matrix['time'].unique()), feature_matrix['time'].unique()",
"_____no_output_____"
],
[
"june_2019 = predict_dt(pd.datetime(2019,6,1), feature_matrix)",
"Size of test labels 10000\nSize of train labels 649972\nSize of X train 649972\nSize of X test 10000\nTraining on 649972 observations.\nTesting on 10000 observations.\n\nPrecision: 0.09119\nRecall: 0.08631\nF1 Score: 0.08869\nROC AUC: 0.53105\n"
],
[
"from utils import plot_feature_importances\n\nnorm_june_fi = plot_feature_importances(june_2019)",
"_____no_output_____"
]
],
[
[
"## Comparison to Baseline",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown"
] |
[
[
"markdown",
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
]
] |
4ae9baf8037ccc4cb29b7a07a2d937bcf85d9d17
| 105,926 |
ipynb
|
Jupyter Notebook
|
Notebooks/Obsolete_Maybe/print_compact_transitivity_tables.ipynb
|
alreich/qualreas
|
e1f94fe79a9043cfc6ae83e04ff03aaa608f373f
|
[
"MIT"
] | 11 |
2021-03-07T12:20:59.000Z
|
2021-12-02T06:15:17.000Z
|
Notebooks/Obsolete_Maybe/print_compact_transitivity_tables.ipynb
|
alreich/qualreas
|
e1f94fe79a9043cfc6ae83e04ff03aaa608f373f
|
[
"MIT"
] | null | null | null |
Notebooks/Obsolete_Maybe/print_compact_transitivity_tables.ipynb
|
alreich/qualreas
|
e1f94fe79a9043cfc6ae83e04ff03aaa608f373f
|
[
"MIT"
] | 3 |
2021-11-22T08:50:50.000Z
|
2022-01-18T09:18:38.000Z
| 38.476571 | 136 | 0.229339 |
[
[
[
"# Print Compact Transitivity Tables",
"_____no_output_____"
]
],
[
[
"import qualreas as qr\nimport os\nimport json",
"_____no_output_____"
],
[
"path = os.path.join(os.getenv('PYPROJ'), 'qualreas')",
"_____no_output_____"
]
],
[
[
"## Algebras from Original Files",
"_____no_output_____"
]
],
[
[
"alg = qr.Algebra(os.path.join(path, \"Algebras/LinearIntervalAlgebra.json\"))\nalgX = qr.Algebra(os.path.join(path, \"Algebras/ExtendedLinearIntervalAlgebra.json\"))\nalgR = qr.Algebra(os.path.join(path, \"Algebras/RightBranchingIntervalAlgebra.json\"))\nalgL = qr.Algebra(os.path.join(path, \"Algebras/LeftBranchingIntervalAlgebra.json\"))\n\nrcc8 = qr.Algebra(os.path.join(path, \"Algebras/RCC8Algebra.json\"))\n\nptalg = qr.Algebra(os.path.join(path, \"Algebras/LinearPointAlgebra.json\"))\nptalgR = qr.Algebra(os.path.join(path, \"Algebras/RightBranchingPointAlgebra.json\"))\nptalgL = qr.Algebra(os.path.join(path, \"Algebras/LeftBranchingPointAlgebra.json\"))",
"_____no_output_____"
]
],
[
[
"## Algebras from Compact Files",
"_____no_output_____"
]
],
[
[
"alg = qr.Algebra(os.path.join(path, \"Algebras/Misc/Linear_Interval_Algebra.json\"))",
"_____no_output_____"
],
[
"alg.summary()\nalg.check_composition_identity()\nalg.is_associative()",
" Algebra Name: Linear_Interval_Algebra\n Description: Allen's algebra of proper time intervals (w/ new trans table format)\n Equality Rels: E\n Relations:\n NAME (SYMBOL) CONVERSE (ABBREV) REFLEXIVE SYMMETRIC TRANSITIVE DOMAIN RANGE\n Before ( B) After ( BI) False False True PInt PInt\n After ( BI) Before ( B) False False True PInt PInt\n During ( D) Contains ( DI) False False True PInt PInt\n Contains ( DI) During ( D) False False True PInt PInt\n Equals ( E) Equals ( E) True True True PInt PInt\n Finishes ( F) Finished-by ( FI) False False True PInt PInt\n Finished-by ( FI) Finishes ( F) False False True PInt PInt\n Meets ( M) Met-By ( MI) False False False PInt PInt\n Met-By ( MI) Meets ( M) False False False PInt PInt\n Overlaps ( O) Overlapped-By ( OI) False False False PInt PInt\n Overlapped-By ( OI) Overlaps ( O) False False False PInt PInt\n Starts ( S) Started-By ( SI) False False True PInt PInt\n Started-By ( SI) Starts ( S) False False True PInt PInt\n\nDomain & Range Abbreviations:\n Pt = Point\n PInt = Proper Interval\nTEST SUMMARY: 2197 OK, 0 Skipped, 0 Failed (2197 Total)\n"
],
[
"algX = qr.Algebra(os.path.join(path, \"Algebras/Misc/Extended_Linear_Interval_Algebra.json\"))",
"_____no_output_____"
],
[
"algX.summary()\nalgX.check_composition_identity()\nalgX.is_associative()",
" Algebra Name: Extended_Linear_Interval_Algebra\n Description: Extension of Allen's algebra to include points and intervals\n Equality Rels: E|PE\n Relations:\n NAME (SYMBOL) CONVERSE (ABBREV) REFLEXIVE SYMMETRIC TRANSITIVE DOMAIN RANGE\n Before ( B) After ( BI) False False True Pt|PInt Pt|PInt\n After ( BI) Before ( B) False False True Pt|PInt Pt|PInt\n During ( D) Contains ( DI) False False True Pt|PInt PInt\n Contains ( DI) During ( D) False False True PInt Pt|PInt\n Equals ( E) Equals ( E) True True True PInt PInt\n Finishes ( F) Finished-by ( FI) False False True PInt PInt\n Finished-by ( FI) Finishes ( F) False False True PInt PInt\n Meets ( M) Met-By ( MI) False False False PInt PInt\n Met-By ( MI) Meets ( M) False False False PInt PInt\n Overlaps ( O) Overlapped-By ( OI) False False False PInt PInt\n Overlapped-By ( OI) Overlaps ( O) False False False PInt PInt\n Point-Equals ( PE) Point-Equals ( PE) True True True Pt Pt\n Point-Finishes ( PF) Point-Finished-By (PFI) False False False Pt PInt\n Point-Finished-By (PFI) Point-Finishes ( PF) False False False PInt Pt\n Point-Starts ( PS) Point-Started-By (PSI) False False False Pt PInt\n Point-Started-By (PSI) Point-Starts ( PS) False False False PInt Pt\n Starts ( S) Started-By ( SI) False False True PInt PInt\n Started-By ( SI) Starts ( S) False False True PInt PInt\n\nDomain & Range Abbreviations:\n Pt = Point\n PInt = Proper Interval\nTEST SUMMARY: 3609 OK, 2223 Skipped, 0 Failed (5832 Total)\n"
],
[
"algR = qr.Algebra(os.path.join(path, \"Algebras/Misc/Right_Branching_Interval_Algebra.json\"))",
"_____no_output_____"
],
[
"algR.summary()\nalgR.check_composition_identity()\nalgR.is_associative()",
" Algebra Name: Right_Branching_Interval_Algebra\n Description: Reich's right-branching extension to Allen's time interval algebra (see TIME-94 paper)\n Equality Rels: E|PE\n Relations:\n NAME (SYMBOL) CONVERSE (ABBREV) REFLEXIVE SYMMETRIC TRANSITIVE DOMAIN RANGE\n Before ( B) After ( BI) False False True Pt|PInt Pt|PInt\n After ( BI) Before ( B) False False True Pt|PInt Pt|PInt\n During ( D) Contains ( DI) False False True Pt|PInt PInt\n Contains ( DI) During ( D) False False True PInt Pt|PInt\n Equals ( E) Equals ( E) True True True PInt PInt\n Finishes ( F) Finished-by ( FI) False False True PInt PInt\n Finished-by ( FI) Finishes ( F) False False True PInt PInt\n Meets ( M) Met-By ( MI) False False False PInt PInt\n Met-By ( MI) Meets ( M) False False False PInt PInt\n Overlaps ( O) Overlapped-By ( OI) False False False PInt PInt\n Overlapped-By ( OI) Overlaps ( O) False False False PInt PInt\n Point-Equals ( PE) Point-Equals ( PE) True True True Pt Pt\n Point-Finishes ( PF) Point-Finished-By (PFI) False False False Pt PInt\n Point-Finished-By (PFI) Point-Finishes ( PF) False False False PInt Pt\n Point-Starts ( PS) Point-Started-By (PSI) False False False Pt PInt\n Point-Started-By (PSI) Point-Starts ( PS) False False False PInt Pt\n Right-Before ( RB) Right-After (RBI) False False True PInt Pt|PInt\n Right-After (RBI) Right-Before ( RB) False False True Pt|PInt PInt\n Right-Overlaps ( RO) Right-Overlapped-By (ROI) False False False PInt PInt\nRight-Overlapped-By (ROI) Right-Overlaps ( RO) False False False PInt PInt\n Right-Starts ( RS) Right-Starts ( RS) False False False PInt PInt\n Right-Incomparable ( R~) Right-Incomparable ( R~) False True False Pt|PInt Pt|PInt\n Starts ( S) Started-By ( SI) False False True PInt PInt\n Started-By ( SI) Starts ( S) False False True PInt PInt\n\nDomain & Range Abbreviations:\n Pt = Point\n PInt = Proper Interval\nTEST SUMMARY: 9772 OK, 4052 Skipped, 0 Failed (13824 Total)\n"
],
[
"algL = qr.Algebra(os.path.join(path, \"Algebras/Misc/Left_Branching_Interval_Algebra.json\"))",
"_____no_output_____"
],
[
"algL.summary()\nalgL.check_composition_identity()\nalgL.is_associative()",
" Algebra Name: Left_Branching_Interval_Algebra\n Description: Reich's left-branching extension to Allen's time interval algebra (see TIME-94 paper)\n Equality Rels: E|PE\n Relations:\n NAME (SYMBOL) CONVERSE (ABBREV) REFLEXIVE SYMMETRIC TRANSITIVE DOMAIN RANGE\n Before ( B) After ( BI) False False True Pt|PInt Pt|PInt\n After ( BI) Before ( B) False False True Pt|PInt Pt|PInt\n During ( D) Contains ( DI) False False True Pt|PInt PInt\n Contains ( DI) During ( D) False False True PInt Pt|PInt\n Equals ( E) Equals ( E) True True True PInt PInt\n Finishes ( F) Finished-by ( FI) False False True PInt PInt\n Finished-by ( FI) Finishes ( F) False False True PInt PInt\n Left-Before ( LB) Left-After (LBI) False False True Pt|PInt PInt\n Left-After (LBI) Left-Before ( LB) False False True PInt Pt|PInt\n Left-Finishes ( LF) Left-Finishes ( LF) False False False PInt PInt\n Left-Overlaps ( LO) Left-Overlapped-By (LOI) False False False PInt PInt\n Left-Overlapped-By (LOI) Left-Overlaps ( LO) False False False PInt PInt\n Left-Incomparable ( L~) Left-Incomparable ( L~) False True False Pt|PInt Pt|PInt\n Meets ( M) Met-By ( MI) False False False PInt PInt\n Met-By ( MI) Meets ( M) False False False PInt PInt\n Overlaps ( O) Overlapped-By ( OI) False False False PInt PInt\n Overlapped-By ( OI) Overlaps ( O) False False False PInt PInt\n Point-Equals ( PE) Point-Equals ( PE) True True True Pt Pt\n Point-Finishes ( PF) Point-Finished-By (PFI) False False False Pt PInt\n Point-Finished-By (PFI) Point-Finishes ( PF) False False False PInt Pt\n Point-Starts ( PS) Point-Started-By (PSI) False False False Pt PInt\n Point-Started-By (PSI) Point-Starts ( PS) False False False PInt Pt\n Starts ( S) Started-By ( SI) False False True PInt PInt\n Started-By ( SI) Starts ( S) False False True PInt PInt\n\nDomain & Range Abbreviations:\n Pt = Point\n PInt = Proper Interval\nTEST SUMMARY: 9772 OK, 4052 Skipped, 0 Failed (13824 Total)\n"
],
[
"rcc8 = qr.Algebra(os.path.join(path, \"Algebras/Misc/RCC8_Algebra.json\"))",
"_____no_output_____"
],
[
"rcc8.summary()\nrcc8.check_composition_identity()\nrcc8.is_associative()",
" Algebra Name: RCC8_Algebra\n Description: Region Connection Calculus 8 Algebra\n Equality Rels: EQ\n Relations:\n NAME (SYMBOL) CONVERSE (ABBREV) REFLEXIVE SYMMETRIC TRANSITIVE DOMAIN RANGE\n Disconnected ( DC) Disconnected ( DC) False True False Reg Reg\nExternallyConnected ( EC) ExternallyConnected ( EC) False True False Reg Reg\n Equal ( EQ) Equal ( EQ) True True True Reg Reg\nNonTangentialProperPart (NTPP) NonTangentialProperPartInverse (NTPPI) False False True Reg Reg\nNonTangentialProperPartInverse (NTPPI) NonTangentialProperPart (NTPP) False False True Reg Reg\nPartiallyOverlapping ( PO) PartiallyOverlapping ( PO) False True False Reg Reg\nTangentialProperPart (TPP) TangentialProperPartInverse (TPPI) False False False Reg Reg\nTangentialProperPartInverse (TPPI) TangentialProperPart (TPP) False False False Reg Reg\n\nDomain & Range Abbreviations:\n Pt = Point\n PInt = Proper Interval\nTEST SUMMARY: 512 OK, 0 Skipped, 0 Failed (512 Total)\n"
],
[
"ptalg = qr.Algebra(os.path.join(path, \"Algebras/Misc/Linear_Point_Algebra.json\"))",
"_____no_output_____"
],
[
"ptalg.summary()\nptalg.check_composition_identity()\nptalg.is_associative()",
" Algebra Name: Linear_Point_Algebra\n Description: Linear Point Algebra\n Equality Rels: =\n Relations:\n NAME (SYMBOL) CONVERSE (ABBREV) REFLEXIVE SYMMETRIC TRANSITIVE DOMAIN RANGE\n LessThan ( <) GreaterThan ( >) False False True Pt Pt\n Equals ( =) Equals ( =) True True True Pt Pt\n GreaterThan ( >) LessThan ( <) False False True Pt Pt\n\nDomain & Range Abbreviations:\n Pt = Point\n PInt = Proper Interval\nTEST SUMMARY: 27 OK, 0 Skipped, 0 Failed (27 Total)\n"
],
[
"ptalgR = qr.Algebra(os.path.join(path, \"Algebras/Misc/Right_Branching_Point_Algebra.json\"))",
"_____no_output_____"
],
[
"ptalgR.summary()\nptalgR.check_composition_identity()\nptalgR.is_associative()",
" Algebra Name: Right_Branching_Point_Algebra\n Description: Right-Branching Point Algebra\n Equality Rels: =\n Relations:\n NAME (SYMBOL) CONVERSE (ABBREV) REFLEXIVE SYMMETRIC TRANSITIVE DOMAIN RANGE\n LessThan ( <) GreaterThan ( >) False False True Pt Pt\n Equals ( =) Equals ( =) True True True Pt Pt\n GreaterThan ( >) LessThan ( <) False False True Pt Pt\n Incomparable ( r~) Incomparable ( r~) False True False Pt Pt\n\nDomain & Range Abbreviations:\n Pt = Point\n PInt = Proper Interval\nTEST SUMMARY: 64 OK, 0 Skipped, 0 Failed (64 Total)\n"
],
[
"ptalgL = qr.Algebra(os.path.join(path, \"Algebras/Misc/Left_Branching_Point_Algebra.json\"))",
"_____no_output_____"
],
[
"ptalgL.summary()\nptalgL.check_composition_identity()\nptalgL.is_associative()",
" Algebra Name: Left_Branching_Point_Algebra\n Description: Left-Branching Point Algebra\n Equality Rels: =\n Relations:\n NAME (SYMBOL) CONVERSE (ABBREV) REFLEXIVE SYMMETRIC TRANSITIVE DOMAIN RANGE\n LessThan ( <) GreaterThan ( >) False False True Pt Pt\n Equals ( =) Equals ( =) True True True Pt Pt\n GreaterThan ( >) LessThan ( <) False False True Pt Pt\n Incomparable ( l~) Incomparable ( l~) False True False Pt Pt\n\nDomain & Range Abbreviations:\n Pt = Point\n PInt = Proper Interval\nTEST SUMMARY: 64 OK, 0 Skipped, 0 Failed (64 Total)\n"
]
],
[
[
"## Print Compact Tables",
"_____no_output_____"
],
[
"The following function definition was added, as a method, to the definition of an Algebra.",
"_____no_output_____"
]
],
[
[
"def print_compact_transitivity_table(alg):\n num_elements = len(alg.elements)\n print(\" \\\"TransTable\\\": {\")\n outer_count = num_elements # Used to avoid printing last comma in outer list\n for rel1 in alg.transitivity_table:\n outer_count -= 1\n print(f\" \\\"{rel1}\\\": {{\")\n inner_count = num_elements # Used to avoid printing last comma in inner list\n for rel2 in alg.transitivity_table[rel1]:\n inner_count -= 1\n if inner_count > 0:\n print(f\" \\\"{rel2}\\\": \\\"{alg.transitivity_table[rel1][rel2]}\\\",\")\n else:\n print(f\" \\\"{rel2}\\\": \\\"{alg.transitivity_table[rel1][rel2]}\\\"\")\n if outer_count > 0:\n print(f\" }},\")\n else:\n print(f\" }}\")\n print(\" }\")",
"_____no_output_____"
]
],
[
[
"### Linear Point Algebra",
"_____no_output_____"
]
],
[
[
"print_compact_transitivity_table(ptalg)",
" \"TransTable\": {\n \"<\": {\n \"<\": \"<\",\n \"=\": \"<\",\n \">\": \"<|=|>\"\n },\n \"=\": {\n \"<\": \"<\",\n \"=\": \"=\",\n \">\": \">\"\n },\n \">\": {\n \"<\": \"<|=|>\",\n \"=\": \">\",\n \">\": \">\"\n }\n }\n"
]
],
[
[
"### Right-Branching Point Algebra",
"_____no_output_____"
]
],
[
[
"print_compact_transitivity_table(ptalgR)",
" \"TransTable\": {\n \"<\": {\n \"<\": \"<\",\n \"=\": \"<\",\n \">\": \"<|=|>\",\n \"r~\": \"<|r~\"\n },\n \"=\": {\n \"<\": \"<\",\n \"=\": \"=\",\n \">\": \">\",\n \"r~\": \"r~\"\n },\n \">\": {\n \"<\": \"<|=|>|r~\",\n \"=\": \">\",\n \">\": \">\",\n \"r~\": \"r~\"\n },\n \"r~\": {\n \"<\": \"r~\",\n \"=\": \"r~\",\n \">\": \">|r~\",\n \"r~\": \"<|=|>|r~\"\n }\n }\n"
]
],
[
[
"### Left-Branching Point Algebra",
"_____no_output_____"
]
],
[
[
"print_compact_transitivity_table(ptalgL)",
" \"TransTable\": {\n \"<\": {\n \"<\": \"<\",\n \"=\": \"<\",\n \">\": \"<|=|>|l~\",\n \"l~\": \"l~\"\n },\n \"=\": {\n \"<\": \"<\",\n \"=\": \"=\",\n \">\": \">\",\n \"l~\": \"l~\"\n },\n \">\": {\n \"<\": \"<|=|>\",\n \"=\": \">\",\n \">\": \">\",\n \"l~\": \">|l~\"\n },\n \"l~\": {\n \"<\": \"<|l~\",\n \"=\": \"l~\",\n \">\": \"l~\",\n \"l~\": \"<|=|>|l~\"\n }\n }\n"
]
],
[
[
"### Linear Interval Algebra",
"_____no_output_____"
]
],
[
[
"print_compact_transitivity_table(alg)",
" \"TransTable\": {\n \"B\": {\n \"B\": \"B\",\n \"BI\": \"B|BI|D|DI|E|F|FI|M|MI|O|OI|S|SI\",\n \"D\": \"B|D|M|O|S\",\n \"DI\": \"B\",\n \"E\": \"B\",\n \"F\": \"B|D|M|O|S\",\n \"FI\": \"B\",\n \"M\": \"B\",\n \"MI\": \"B|D|M|O|S\",\n \"O\": \"B\",\n \"OI\": \"B|D|M|O|S\",\n \"S\": \"B\",\n \"SI\": \"B\"\n },\n \"BI\": {\n \"B\": \"B|BI|D|DI|E|F|FI|M|MI|O|OI|S|SI\",\n \"BI\": \"BI\",\n \"D\": \"BI|D|F|MI|OI\",\n \"DI\": \"BI\",\n \"E\": \"BI\",\n \"F\": \"BI\",\n \"FI\": \"BI\",\n \"M\": \"BI|D|F|MI|OI\",\n \"MI\": \"BI\",\n \"O\": \"BI|D|F|MI|OI\",\n \"OI\": \"BI\",\n \"S\": \"BI|D|F|MI|OI\",\n \"SI\": \"BI\"\n },\n \"D\": {\n \"B\": \"B\",\n \"BI\": \"BI\",\n \"D\": \"D\",\n \"DI\": \"B|BI|D|DI|E|F|FI|M|MI|O|OI|S|SI\",\n \"E\": \"D\",\n \"F\": \"D\",\n \"FI\": \"B|D|M|O|S\",\n \"M\": \"B\",\n \"MI\": \"BI\",\n \"O\": \"B|D|M|O|S\",\n \"OI\": \"BI|D|F|MI|OI\",\n \"S\": \"D\",\n \"SI\": \"BI|D|F|MI|OI\"\n },\n \"DI\": {\n \"B\": \"B|DI|FI|M|O\",\n \"BI\": \"BI|DI|MI|OI|SI\",\n \"D\": \"D|DI|E|F|FI|O|OI|S|SI\",\n \"DI\": \"DI\",\n \"E\": \"DI\",\n \"F\": \"DI|OI|SI\",\n \"FI\": \"DI\",\n \"M\": \"DI|FI|O\",\n \"MI\": \"DI|OI|SI\",\n \"O\": \"DI|FI|O\",\n \"OI\": \"DI|OI|SI\",\n \"S\": \"DI|FI|O\",\n \"SI\": \"DI\"\n },\n \"E\": {\n \"B\": \"B\",\n \"BI\": \"BI\",\n \"D\": \"D\",\n \"DI\": \"DI\",\n \"E\": \"E\",\n \"F\": \"F\",\n \"FI\": \"FI\",\n \"M\": \"M\",\n \"MI\": \"MI\",\n \"O\": \"O\",\n \"OI\": \"OI\",\n \"S\": \"S\",\n \"SI\": \"SI\"\n },\n \"F\": {\n \"B\": \"B\",\n \"BI\": \"BI\",\n \"D\": \"D\",\n \"DI\": \"BI|DI|MI|OI|SI\",\n \"E\": \"F\",\n \"F\": \"F\",\n \"FI\": \"E|F|FI\",\n \"M\": \"M\",\n \"MI\": \"BI\",\n \"O\": \"D|O|S\",\n \"OI\": \"BI|MI|OI\",\n \"S\": \"D\",\n \"SI\": \"BI|MI|OI\"\n },\n \"FI\": {\n \"B\": \"B\",\n \"BI\": \"BI|DI|MI|OI|SI\",\n \"D\": \"D|O|S\",\n \"DI\": \"DI\",\n \"E\": \"FI\",\n \"F\": \"E|F|FI\",\n \"FI\": \"FI\",\n \"M\": \"M\",\n \"MI\": \"DI|OI|SI\",\n \"O\": \"O\",\n \"OI\": \"DI|OI|SI\",\n \"S\": \"O\",\n \"SI\": \"DI\"\n },\n \"M\": {\n \"B\": \"B\",\n \"BI\": \"BI|DI|MI|OI|SI\",\n \"D\": \"D|O|S\",\n \"DI\": \"B\",\n \"E\": \"M\",\n \"F\": \"D|O|S\",\n \"FI\": \"B\",\n \"M\": \"B\",\n \"MI\": \"E|F|FI\",\n \"O\": \"B\",\n \"OI\": \"D|O|S\",\n \"S\": \"M\",\n \"SI\": \"M\"\n },\n \"MI\": {\n \"B\": \"B|DI|FI|M|O\",\n \"BI\": \"BI\",\n \"D\": \"D|F|OI\",\n \"DI\": \"BI\",\n \"E\": \"MI\",\n \"F\": \"MI\",\n \"FI\": \"MI\",\n \"M\": \"E|S|SI\",\n \"MI\": \"BI\",\n \"O\": \"D|F|OI\",\n \"OI\": \"BI\",\n \"S\": \"D|F|OI\",\n \"SI\": \"BI\"\n },\n \"O\": {\n \"B\": \"B\",\n \"BI\": \"BI|DI|MI|OI|SI\",\n \"D\": \"D|O|S\",\n \"DI\": \"B|DI|FI|M|O\",\n \"E\": \"O\",\n \"F\": \"D|O|S\",\n \"FI\": \"B|M|O\",\n \"M\": \"B\",\n \"MI\": \"DI|OI|SI\",\n \"O\": \"B|M|O\",\n \"OI\": \"D|DI|E|F|FI|O|OI|S|SI\",\n \"S\": \"O\",\n \"SI\": \"DI|FI|O\"\n },\n \"OI\": {\n \"B\": \"B|DI|FI|M|O\",\n \"BI\": \"BI\",\n \"D\": \"D|F|OI\",\n \"DI\": \"BI|DI|MI|OI|SI\",\n \"E\": \"OI\",\n \"F\": \"OI\",\n \"FI\": \"DI|OI|SI\",\n \"M\": \"DI|FI|O\",\n \"MI\": \"BI\",\n \"O\": \"D|DI|E|F|FI|O|OI|S|SI\",\n \"OI\": \"BI|MI|OI\",\n \"S\": \"D|F|OI\",\n \"SI\": \"BI|MI|OI\"\n },\n \"S\": {\n \"B\": \"B\",\n \"BI\": \"BI\",\n \"D\": \"D\",\n \"DI\": \"B|DI|FI|M|O\",\n \"E\": \"S\",\n \"F\": \"D\",\n \"FI\": \"B|M|O\",\n \"M\": \"B\",\n \"MI\": \"MI\",\n \"O\": \"B|M|O\",\n \"OI\": \"D|F|OI\",\n \"S\": \"S\",\n \"SI\": \"E|S|SI\"\n },\n \"SI\": {\n \"B\": \"B|DI|FI|M|O\",\n \"BI\": \"BI\",\n \"D\": \"D|F|OI\",\n \"DI\": \"DI\",\n \"E\": \"SI\",\n \"F\": \"OI\",\n \"FI\": \"DI\",\n \"M\": \"DI|FI|O\",\n \"MI\": \"MI\",\n \"O\": \"DI|FI|O\",\n \"OI\": \"OI\",\n \"S\": \"E|S|SI\",\n \"SI\": \"SI\"\n }\n }\n"
]
],
[
[
"### Extended Linear Interval Algebra",
"_____no_output_____"
]
],
[
[
"print_compact_transitivity_table(algX)",
" \"TransTable\": {\n \"B\": {\n \"B\": \"B\",\n \"BI\": \"B|BI|D|DI|E|F|FI|M|MI|O|OI|PE|PF|PFI|PS|PSI|S|SI\",\n \"D\": \"B|D|M|O|PS|S\",\n \"DI\": \"B\",\n \"E\": \"B\",\n \"F\": \"B|D|M|O|PS|S\",\n \"FI\": \"B\",\n \"M\": \"B\",\n \"MI\": \"B|D|M|O|PS|S\",\n \"O\": \"B\",\n \"OI\": \"B|D|M|O|PS|S\",\n \"PE\": \"B\",\n \"PF\": \"B|D|M|O|PS|S\",\n \"PFI\": \"B\",\n \"PS\": \"B\",\n \"PSI\": \"B\",\n \"S\": \"B\",\n \"SI\": \"B\"\n },\n \"BI\": {\n \"B\": \"B|BI|D|DI|E|F|FI|M|MI|O|OI|PE|PF|PFI|PS|PSI|S|SI\",\n \"BI\": \"BI\",\n \"D\": \"BI|D|F|MI|OI|PF\",\n \"DI\": \"BI\",\n \"E\": \"BI\",\n \"F\": \"BI\",\n \"FI\": \"BI\",\n \"M\": \"BI|D|F|MI|OI|PF\",\n \"MI\": \"BI\",\n \"O\": \"BI|D|F|MI|OI|PF\",\n \"OI\": \"BI\",\n \"PE\": \"BI\",\n \"PF\": \"BI\",\n \"PFI\": \"BI\",\n \"PS\": \"BI|D|F|MI|OI|PF\",\n \"PSI\": \"BI\",\n \"S\": \"BI|D|F|MI|OI|PF\",\n \"SI\": \"BI\"\n },\n \"D\": {\n \"B\": \"B\",\n \"BI\": \"BI\",\n \"D\": \"D\",\n \"DI\": \"B|BI|D|DI|E|F|FI|M|MI|O|OI|PE|PF|PFI|PS|PSI|S|SI\",\n \"E\": \"D\",\n \"F\": \"D\",\n \"FI\": \"B|D|M|O|PS|S\",\n \"M\": \"B\",\n \"MI\": \"BI\",\n \"O\": \"B|D|M|O|PS|S\",\n \"OI\": \"BI|D|F|MI|OI|PF\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"B\",\n \"PS\": \"\",\n \"PSI\": \"BI\",\n \"S\": \"D\",\n \"SI\": \"BI|D|F|MI|OI|PF\"\n },\n \"DI\": {\n \"B\": \"B|DI|FI|M|O|PFI\",\n \"BI\": \"BI|DI|MI|OI|PSI|SI\",\n \"D\": \"D|DI|E|F|FI|O|OI|S|SI\",\n \"DI\": \"DI\",\n \"E\": \"DI\",\n \"F\": \"DI|OI|SI\",\n \"FI\": \"DI\",\n \"M\": \"DI|FI|O\",\n \"MI\": \"DI|OI|SI\",\n \"O\": \"DI|FI|O\",\n \"OI\": \"DI|OI|SI\",\n \"PE\": \"DI\",\n \"PF\": \"DI|OI|SI\",\n \"PFI\": \"DI\",\n \"PS\": \"DI|FI|O\",\n \"PSI\": \"DI\",\n \"S\": \"DI|FI|O\",\n \"SI\": \"DI\"\n },\n \"E\": {\n \"B\": \"B\",\n \"BI\": \"BI\",\n \"D\": \"D\",\n \"DI\": \"DI\",\n \"E\": \"E\",\n \"F\": \"F\",\n \"FI\": \"FI\",\n \"M\": \"M\",\n \"MI\": \"MI\",\n \"O\": \"O\",\n \"OI\": \"OI\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"PFI\",\n \"PS\": \"\",\n \"PSI\": \"PSI\",\n \"S\": \"S\",\n \"SI\": \"SI\"\n },\n \"F\": {\n \"B\": \"B\",\n \"BI\": \"BI\",\n \"D\": \"D\",\n \"DI\": \"BI|DI|MI|OI|PSI|SI\",\n \"E\": \"F\",\n \"F\": \"F\",\n \"FI\": \"E|F|FI\",\n \"M\": \"M\",\n \"MI\": \"BI\",\n \"O\": \"D|O|S\",\n \"OI\": \"BI|MI|OI\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"PFI\",\n \"PS\": \"\",\n \"PSI\": \"BI\",\n \"S\": \"D\",\n \"SI\": \"BI|MI|OI\"\n },\n \"FI\": {\n \"B\": \"B\",\n \"BI\": \"BI|DI|MI|OI|PSI|SI\",\n \"D\": \"D|O|S\",\n \"DI\": \"DI\",\n \"E\": \"FI\",\n \"F\": \"E|F|FI\",\n \"FI\": \"FI\",\n \"M\": \"M\",\n \"MI\": \"DI|OI|SI\",\n \"O\": \"O\",\n \"OI\": \"DI|OI|SI\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"PFI\",\n \"PS\": \"\",\n \"PSI\": \"DI\",\n \"S\": \"O\",\n \"SI\": \"DI\"\n },\n \"M\": {\n \"B\": \"B\",\n \"BI\": \"BI|DI|MI|OI|PSI|SI\",\n \"D\": \"D|O|S\",\n \"DI\": \"B\",\n \"E\": \"M\",\n \"F\": \"D|O|S\",\n \"FI\": \"B\",\n \"M\": \"B\",\n \"MI\": \"E|F|FI\",\n \"O\": \"B\",\n \"OI\": \"D|O|S\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"B\",\n \"PS\": \"\",\n \"PSI\": \"PFI\",\n \"S\": \"M\",\n \"SI\": \"M\"\n },\n \"MI\": {\n \"B\": \"B|DI|FI|M|O|PFI\",\n \"BI\": \"BI\",\n \"D\": \"D|F|OI\",\n \"DI\": \"BI\",\n \"E\": \"MI\",\n \"F\": \"MI\",\n \"FI\": \"MI\",\n \"M\": \"E|S|SI\",\n \"MI\": \"BI\",\n \"O\": \"D|F|OI\",\n \"OI\": \"BI\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"PSI\",\n \"PS\": \"\",\n \"PSI\": \"BI\",\n \"S\": \"D|F|OI\",\n \"SI\": \"BI\"\n },\n \"O\": {\n \"B\": \"B\",\n \"BI\": \"BI|DI|MI|OI|PSI|SI\",\n \"D\": \"D|O|S\",\n \"DI\": \"B|DI|FI|M|O|PFI\",\n \"E\": \"O\",\n \"F\": \"D|O|S\",\n \"FI\": \"B|M|O\",\n \"M\": \"B\",\n \"MI\": \"DI|OI|SI\",\n \"O\": \"B|M|O\",\n \"OI\": \"D|DI|E|F|FI|O|OI|S|SI\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"B\",\n \"PS\": \"\",\n \"PSI\": \"DI\",\n \"S\": \"O\",\n \"SI\": \"DI|FI|O\"\n },\n \"OI\": {\n \"B\": \"B|DI|FI|M|O|PFI\",\n \"BI\": \"BI\",\n \"D\": \"D|F|OI\",\n \"DI\": \"BI|DI|MI|OI|PSI|SI\",\n \"E\": \"OI\",\n \"F\": \"OI\",\n \"FI\": \"DI|OI|SI\",\n \"M\": \"DI|FI|O\",\n \"MI\": \"BI\",\n \"O\": \"D|DI|E|F|FI|O|OI|S|SI\",\n \"OI\": \"BI|MI|OI\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"DI\",\n \"PS\": \"\",\n \"PSI\": \"BI\",\n \"S\": \"D|F|OI\",\n \"SI\": \"BI|MI|OI\"\n },\n \"PE\": {\n \"B\": \"B\",\n \"BI\": \"BI\",\n \"D\": \"D\",\n \"DI\": \"\",\n \"E\": \"\",\n \"F\": \"\",\n \"FI\": \"\",\n \"M\": \"\",\n \"MI\": \"\",\n \"O\": \"\",\n \"OI\": \"\",\n \"PE\": \"PE\",\n \"PF\": \"PF\",\n \"PFI\": \"\",\n \"PS\": \"PS\",\n \"PSI\": \"\",\n \"S\": \"\",\n \"SI\": \"\"\n },\n \"PF\": {\n \"B\": \"B\",\n \"BI\": \"BI\",\n \"D\": \"D\",\n \"DI\": \"BI\",\n \"E\": \"PF\",\n \"F\": \"PF\",\n \"FI\": \"PF\",\n \"M\": \"PS\",\n \"MI\": \"BI\",\n \"O\": \"D\",\n \"OI\": \"BI\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"PE\",\n \"PS\": \"\",\n \"PSI\": \"BI\",\n \"S\": \"D\",\n \"SI\": \"BI\"\n },\n \"PFI\": {\n \"B\": \"B\",\n \"BI\": \"BI|DI|MI|OI|PSI|SI\",\n \"D\": \"D|O|S\",\n \"DI\": \"\",\n \"E\": \"\",\n \"F\": \"\",\n \"FI\": \"\",\n \"M\": \"\",\n \"MI\": \"\",\n \"O\": \"\",\n \"OI\": \"\",\n \"PE\": \"PFI\",\n \"PF\": \"E|F|FI\",\n \"PFI\": \"\",\n \"PS\": \"M\",\n \"PSI\": \"\",\n \"S\": \"\",\n \"SI\": \"\"\n },\n \"PS\": {\n \"B\": \"B\",\n \"BI\": \"BI\",\n \"D\": \"D\",\n \"DI\": \"B\",\n \"E\": \"PS\",\n \"F\": \"D\",\n \"FI\": \"B\",\n \"M\": \"B\",\n \"MI\": \"PF\",\n \"O\": \"B\",\n \"OI\": \"D\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"B\",\n \"PS\": \"\",\n \"PSI\": \"PE\",\n \"S\": \"PS\",\n \"SI\": \"PS\"\n },\n \"PSI\": {\n \"B\": \"B|DI|FI|M|O|PFI\",\n \"BI\": \"BI\",\n \"D\": \"D|F|OI\",\n \"DI\": \"\",\n \"E\": \"\",\n \"F\": \"\",\n \"FI\": \"\",\n \"M\": \"\",\n \"MI\": \"\",\n \"O\": \"\",\n \"OI\": \"\",\n \"PE\": \"PSI\",\n \"PF\": \"MI\",\n \"PFI\": \"\",\n \"PS\": \"E|S|SI\",\n \"PSI\": \"\",\n \"S\": \"\",\n \"SI\": \"\"\n },\n \"S\": {\n \"B\": \"B\",\n \"BI\": \"BI\",\n \"D\": \"D\",\n \"DI\": \"B|DI|FI|M|O|PFI\",\n \"E\": \"S\",\n \"F\": \"D\",\n \"FI\": \"B|M|O\",\n \"M\": \"B\",\n \"MI\": \"MI\",\n \"O\": \"B|M|O\",\n \"OI\": \"D|F|OI\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"B\",\n \"PS\": \"\",\n \"PSI\": \"PSI\",\n \"S\": \"S\",\n \"SI\": \"E|S|SI\"\n },\n \"SI\": {\n \"B\": \"B|DI|FI|M|O|PFI\",\n \"BI\": \"BI\",\n \"D\": \"D|F|OI\",\n \"DI\": \"DI\",\n \"E\": \"SI\",\n \"F\": \"OI\",\n \"FI\": \"DI\",\n \"M\": \"DI|FI|O\",\n \"MI\": \"MI\",\n \"O\": \"DI|FI|O\",\n \"OI\": \"OI\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"DI\",\n \"PS\": \"\",\n \"PSI\": \"PSI\",\n \"S\": \"E|S|SI\",\n \"SI\": \"SI\"\n }\n }\n"
]
],
[
[
"### Right-Branching Linear Interval Algebra",
"_____no_output_____"
]
],
[
[
"print_compact_transitivity_table(algR)",
" \"TransTable\": {\n \"B\": {\n \"B\": \"B\",\n \"BI\": \"B|BI|D|DI|E|F|FI|M|MI|O|OI|PE|PF|PFI|PS|PSI|S|SI\",\n \"D\": \"B|D|M|O|PS|S\",\n \"DI\": \"B\",\n \"E\": \"B\",\n \"F\": \"B|D|M|O|PS|S\",\n \"FI\": \"B\",\n \"M\": \"B\",\n \"MI\": \"B|D|M|O|PS|S\",\n \"O\": \"B\",\n \"OI\": \"B|D|M|O|PS|S\",\n \"PE\": \"B\",\n \"PF\": \"B|D|M|O|PS|S\",\n \"PFI\": \"B\",\n \"PS\": \"B\",\n \"PSI\": \"B\",\n \"RB\": \"B\",\n \"RBI\": \"B|D|M|O|PS|RBI|RO|ROI|RS|S\",\n \"RO\": \"B\",\n \"ROI\": \"B|D|M|O|PS|S\",\n \"RS\": \"B\",\n \"R~\": \"B|RB|R~\",\n \"S\": \"B\",\n \"SI\": \"B\"\n },\n \"BI\": {\n \"B\": \"B|BI|D|DI|E|F|FI|M|MI|O|OI|PE|PF|PFI|PS|PSI|RB|RBI|RO|ROI|RS|R~|S|SI\",\n \"BI\": \"BI\",\n \"D\": \"BI|D|F|MI|OI|PF|RBI|ROI\",\n \"DI\": \"BI\",\n \"E\": \"BI\",\n \"F\": \"BI\",\n \"FI\": \"BI\",\n \"M\": \"BI|D|F|MI|OI|PF|RBI|ROI\",\n \"MI\": \"BI\",\n \"O\": \"BI|D|F|MI|OI|PF|RBI|ROI\",\n \"OI\": \"BI\",\n \"PE\": \"BI\",\n \"PF\": \"BI\",\n \"PFI\": \"BI\",\n \"PS\": \"BI|D|F|MI|OI|PF|RBI|ROI\",\n \"PSI\": \"BI\",\n \"RB\": \"R~\",\n \"RBI\": \"RBI\",\n \"RO\": \"RBI\",\n \"ROI\": \"RBI\",\n \"RS\": \"RBI\",\n \"R~\": \"R~\",\n \"S\": \"BI|D|F|MI|OI|PF|RBI|ROI\",\n \"SI\": \"BI\"\n },\n \"D\": {\n \"B\": \"B\",\n \"BI\": \"BI\",\n \"D\": \"D\",\n \"DI\": \"B|BI|D|DI|E|F|FI|M|MI|O|OI|PE|PF|PFI|PS|PSI|S|SI\",\n \"E\": \"D\",\n \"F\": \"D\",\n \"FI\": \"B|D|M|O|PS|S\",\n \"M\": \"B\",\n \"MI\": \"BI\",\n \"O\": \"B|D|M|O|PS|S\",\n \"OI\": \"BI|D|F|MI|OI|PF\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"B\",\n \"PS\": \"\",\n \"PSI\": \"BI\",\n \"RB\": \"B|RB|R~\",\n \"RBI\": \"RBI\",\n \"RO\": \"B|D|M|O|PS|RBI|RO|ROI|RS|S\",\n \"ROI\": \"D|RBI|ROI\",\n \"RS\": \"D|RBI|ROI\",\n \"R~\": \"R~\",\n \"S\": \"D\",\n \"SI\": \"BI|D|F|MI|OI|PF\"\n },\n \"DI\": {\n \"B\": \"B|DI|FI|M|O|PFI|RB|RO\",\n \"BI\": \"BI|DI|MI|OI|PSI|SI\",\n \"D\": \"D|DI|E|F|FI|O|OI|RO|ROI|RS|S|SI\",\n \"DI\": \"DI\",\n \"E\": \"DI\",\n \"F\": \"DI|OI|SI\",\n \"FI\": \"DI\",\n \"M\": \"DI|FI|O|RO\",\n \"MI\": \"DI|OI|SI\",\n \"O\": \"DI|FI|O|RO\",\n \"OI\": \"DI|OI|SI\",\n \"PE\": \"DI\",\n \"PF\": \"DI|OI|SI\",\n \"PFI\": \"DI\",\n \"PS\": \"DI|FI|O|RO\",\n \"PSI\": \"DI\",\n \"RB\": \"RB\",\n \"RBI\": \"RBI|RO|ROI|RS\",\n \"RO\": \"RO\",\n \"ROI\": \"RO|ROI|RS\",\n \"RS\": \"RO\",\n \"R~\": \"RB|R~\",\n \"S\": \"DI|FI|O|RO\",\n \"SI\": \"DI\"\n },\n \"E\": {\n \"B\": \"B\",\n \"BI\": \"BI\",\n \"D\": \"D\",\n \"DI\": \"DI\",\n \"E\": \"E\",\n \"F\": \"F\",\n \"FI\": \"FI\",\n \"M\": \"M\",\n \"MI\": \"MI\",\n \"O\": \"O\",\n \"OI\": \"OI\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"PFI\",\n \"PS\": \"\",\n \"PSI\": \"PSI\",\n \"RB\": \"RB\",\n \"RBI\": \"RBI\",\n \"RO\": \"RO\",\n \"ROI\": \"ROI\",\n \"RS\": \"RS\",\n \"R~\": \"R~\",\n \"S\": \"S\",\n \"SI\": \"SI\"\n },\n \"F\": {\n \"B\": \"B\",\n \"BI\": \"BI\",\n \"D\": \"D\",\n \"DI\": \"BI|DI|MI|OI|PSI|SI\",\n \"E\": \"F\",\n \"F\": \"F\",\n \"FI\": \"E|F|FI\",\n \"M\": \"M\",\n \"MI\": \"BI\",\n \"O\": \"D|O|S\",\n \"OI\": \"BI|MI|OI\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"PFI\",\n \"PS\": \"\",\n \"PSI\": \"BI\",\n \"RB\": \"RB|R~\",\n \"RBI\": \"RBI\",\n \"RO\": \"RBI|RO|ROI|RS\",\n \"ROI\": \"RBI|ROI\",\n \"RS\": \"RBI|ROI\",\n \"R~\": \"R~\",\n \"S\": \"D\",\n \"SI\": \"BI|MI|OI\"\n },\n \"FI\": {\n \"B\": \"B\",\n \"BI\": \"BI|DI|MI|OI|PSI|SI\",\n \"D\": \"D|O|S\",\n \"DI\": \"DI\",\n \"E\": \"FI\",\n \"F\": \"E|F|FI\",\n \"FI\": \"FI\",\n \"M\": \"M\",\n \"MI\": \"DI|OI|SI\",\n \"O\": \"O\",\n \"OI\": \"DI|OI|SI\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"PFI\",\n \"PS\": \"\",\n \"PSI\": \"DI\",\n \"RB\": \"RB\",\n \"RBI\": \"RBI|RO|ROI|RS\",\n \"RO\": \"RO\",\n \"ROI\": \"RO|ROI|RS\",\n \"RS\": \"RO\",\n \"R~\": \"RB|R~\",\n \"S\": \"O\",\n \"SI\": \"DI\"\n },\n \"M\": {\n \"B\": \"B\",\n \"BI\": \"BI|DI|MI|OI|PSI|SI\",\n \"D\": \"D|O|S\",\n \"DI\": \"B\",\n \"E\": \"M\",\n \"F\": \"D|O|S\",\n \"FI\": \"B\",\n \"M\": \"B\",\n \"MI\": \"E|F|FI\",\n \"O\": \"B\",\n \"OI\": \"D|O|S\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"B\",\n \"PS\": \"\",\n \"PSI\": \"PFI\",\n \"RB\": \"B\",\n \"RBI\": \"RBI|RO|ROI|RS\",\n \"RO\": \"B\",\n \"ROI\": \"D|O|S\",\n \"RS\": \"M\",\n \"R~\": \"RB|R~\",\n \"S\": \"M\",\n \"SI\": \"M\"\n },\n \"MI\": {\n \"B\": \"B|DI|FI|M|O|PFI|RB|RO\",\n \"BI\": \"BI\",\n \"D\": \"D|F|OI|ROI\",\n \"DI\": \"BI\",\n \"E\": \"MI\",\n \"F\": \"MI\",\n \"FI\": \"MI\",\n \"M\": \"E|RS|S|SI\",\n \"MI\": \"BI\",\n \"O\": \"D|F|OI|ROI\",\n \"OI\": \"BI\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"PSI\",\n \"PS\": \"\",\n \"PSI\": \"BI\",\n \"RB\": \"R~\",\n \"RBI\": \"RBI\",\n \"RO\": \"RBI\",\n \"ROI\": \"RBI\",\n \"RS\": \"RBI\",\n \"R~\": \"R~\",\n \"S\": \"D|F|OI|ROI\",\n \"SI\": \"BI\"\n },\n \"O\": {\n \"B\": \"B\",\n \"BI\": \"BI|DI|MI|OI|PSI|SI\",\n \"D\": \"D|O|S\",\n \"DI\": \"B|DI|FI|M|O|PFI\",\n \"E\": \"O\",\n \"F\": \"D|O|S\",\n \"FI\": \"B|M|O\",\n \"M\": \"B\",\n \"MI\": \"DI|OI|SI\",\n \"O\": \"B|M|O\",\n \"OI\": \"D|DI|E|F|FI|O|OI|S|SI\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"B\",\n \"PS\": \"\",\n \"PSI\": \"DI\",\n \"RB\": \"B|RB\",\n \"RBI\": \"RBI|RO|ROI|RS\",\n \"RO\": \"B|M|O|RO\",\n \"ROI\": \"D|O|RO|ROI|RS|S\",\n \"RS\": \"O|RO\",\n \"R~\": \"RB|R~\",\n \"S\": \"O\",\n \"SI\": \"DI|FI|O\"\n },\n \"OI\": {\n \"B\": \"B|DI|FI|M|O|PFI|RB|RO\",\n \"BI\": \"BI\",\n \"D\": \"D|F|OI|ROI\",\n \"DI\": \"BI|DI|MI|OI|PSI|SI\",\n \"E\": \"OI\",\n \"F\": \"OI\",\n \"FI\": \"DI|OI|SI\",\n \"M\": \"DI|FI|O|RO\",\n \"MI\": \"BI\",\n \"O\": \"D|DI|E|F|FI|O|OI|RO|ROI|RS|S|SI\",\n \"OI\": \"BI|MI|OI\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"DI\",\n \"PS\": \"\",\n \"PSI\": \"BI\",\n \"RB\": \"RB|R~\",\n \"RBI\": \"RBI\",\n \"RO\": \"RBI|RO|ROI|RS\",\n \"ROI\": \"RBI|ROI\",\n \"RS\": \"RBI|ROI\",\n \"R~\": \"R~\",\n \"S\": \"D|F|OI|ROI\",\n \"SI\": \"BI|MI|OI\"\n },\n \"PE\": {\n \"B\": \"B\",\n \"BI\": \"BI\",\n \"D\": \"D\",\n \"DI\": \"\",\n \"E\": \"\",\n \"F\": \"\",\n \"FI\": \"\",\n \"M\": \"\",\n \"MI\": \"\",\n \"O\": \"\",\n \"OI\": \"\",\n \"PE\": \"PE\",\n \"PF\": \"PF\",\n \"PFI\": \"\",\n \"PS\": \"PS\",\n \"PSI\": \"\",\n \"RB\": \"\",\n \"RBI\": \"RBI\",\n \"RO\": \"\",\n \"ROI\": \"\",\n \"RS\": \"\",\n \"R~\": \"R~\",\n \"S\": \"\",\n \"SI\": \"\"\n },\n \"PF\": {\n \"B\": \"B\",\n \"BI\": \"BI\",\n \"D\": \"D\",\n \"DI\": \"BI\",\n \"E\": \"PF\",\n \"F\": \"PF\",\n \"FI\": \"PF\",\n \"M\": \"PS\",\n \"MI\": \"BI\",\n \"O\": \"D\",\n \"OI\": \"BI\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"PE\",\n \"PS\": \"\",\n \"PSI\": \"BI\",\n \"RB\": \"R~\",\n \"RBI\": \"RBI\",\n \"RO\": \"RBI\",\n \"ROI\": \"RBI\",\n \"RS\": \"RBI\",\n \"R~\": \"R~\",\n \"S\": \"D\",\n \"SI\": \"BI\"\n },\n \"PFI\": {\n \"B\": \"B\",\n \"BI\": \"BI|DI|MI|OI|PSI|SI\",\n \"D\": \"D|O|S\",\n \"DI\": \"\",\n \"E\": \"\",\n \"F\": \"\",\n \"FI\": \"\",\n \"M\": \"\",\n \"MI\": \"\",\n \"O\": \"\",\n \"OI\": \"\",\n \"PE\": \"PFI\",\n \"PF\": \"E|F|FI\",\n \"PFI\": \"\",\n \"PS\": \"M\",\n \"PSI\": \"\",\n \"RB\": \"\",\n \"RBI\": \"RBI|RO|ROI|RS\",\n \"RO\": \"\",\n \"ROI\": \"\",\n \"RS\": \"\",\n \"R~\": \"RB|R~\",\n \"S\": \"\",\n \"SI\": \"\"\n },\n \"PS\": {\n \"B\": \"B\",\n \"BI\": \"BI\",\n \"D\": \"D\",\n \"DI\": \"B\",\n \"E\": \"PS\",\n \"F\": \"D\",\n \"FI\": \"B\",\n \"M\": \"B\",\n \"MI\": \"PF\",\n \"O\": \"B\",\n \"OI\": \"D\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"B\",\n \"PS\": \"\",\n \"PSI\": \"PE\",\n \"RB\": \"B\",\n \"RBI\": \"RBI\",\n \"RO\": \"B\",\n \"ROI\": \"D\",\n \"RS\": \"PS\",\n \"R~\": \"R~\",\n \"S\": \"PS\",\n \"SI\": \"PS\"\n },\n \"PSI\": {\n \"B\": \"B|DI|FI|M|O|PFI|RB|RO\",\n \"BI\": \"BI\",\n \"D\": \"D|F|OI|ROI\",\n \"DI\": \"\",\n \"E\": \"\",\n \"F\": \"\",\n \"FI\": \"\",\n \"M\": \"\",\n \"MI\": \"\",\n \"O\": \"\",\n \"OI\": \"\",\n \"PE\": \"PSI\",\n \"PF\": \"MI\",\n \"PFI\": \"\",\n \"PS\": \"E|RS|S|SI\",\n \"PSI\": \"\",\n \"RB\": \"\",\n \"RBI\": \"RBI\",\n \"RO\": \"\",\n \"ROI\": \"\",\n \"RS\": \"\",\n \"R~\": \"R~\",\n \"S\": \"\",\n \"SI\": \"\"\n },\n \"RB\": {\n \"B\": \"RB\",\n \"BI\": \"BI|DI|MI|OI|PSI|RB|RO|ROI|RS|SI\",\n \"D\": \"RB|RO|ROI|RS\",\n \"DI\": \"RB\",\n \"E\": \"RB\",\n \"F\": \"RB|RO|ROI|RS\",\n \"FI\": \"RB\",\n \"M\": \"RB\",\n \"MI\": \"RB|RO|ROI|RS\",\n \"O\": \"RB\",\n \"OI\": \"RB|RO|ROI|RS\",\n \"PE\": \"RB\",\n \"PF\": \"RB|RO|ROI|RS\",\n \"PFI\": \"RB\",\n \"PS\": \"RB\",\n \"PSI\": \"RB\",\n \"RB\": \"RB\",\n \"RBI\": \"D|DI|E|F|FI|O|OI|RB|RBI|RO|ROI|RS|S|SI\",\n \"RO\": \"RB\",\n \"ROI\": \"RB|RO|ROI|RS\",\n \"RS\": \"RB\",\n \"R~\": \"B|DI|FI|M|O|PFI|RB|RO|R~\",\n \"S\": \"RB\",\n \"SI\": \"RB\"\n },\n \"RBI\": {\n \"B\": \"R~\",\n \"BI\": \"BI\",\n \"D\": \"RBI\",\n \"DI\": \"BI|RBI|R~\",\n \"E\": \"RBI\",\n \"F\": \"RBI\",\n \"FI\": \"RBI|R~\",\n \"M\": \"R~\",\n \"MI\": \"BI\",\n \"O\": \"RBI|R~\",\n \"OI\": \"BI|RBI\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"R~\",\n \"PS\": \"\",\n \"PSI\": \"BI\",\n \"RB\": \"B|BI|D|DI|E|F|FI|M|MI|O|OI|PE|PF|PFI|PS|PSI|RB|RBI|RO|ROI|RS|R~|S|SI\",\n \"RBI\": \"RBI\",\n \"RO\": \"BI|D|F|MI|OI|PF|RBI|ROI|R~\",\n \"ROI\": \"BI|D|F|MI|OI|PF|RBI|ROI\",\n \"RS\": \"BI|D|F|MI|OI|PF|RBI|ROI\",\n \"R~\": \"R~\",\n \"S\": \"RBI\",\n \"SI\": \"BI|RBI\"\n },\n \"RO\": {\n \"B\": \"RB\",\n \"BI\": \"BI|DI|MI|OI|PSI|SI\",\n \"D\": \"RO|ROI|RS\",\n \"DI\": \"DI|RB|RO\",\n \"E\": \"RO\",\n \"F\": \"RO|ROI|RS\",\n \"FI\": \"RB|RO\",\n \"M\": \"RB\",\n \"MI\": \"DI|OI|SI\",\n \"O\": \"RB|RO\",\n \"OI\": \"DI|OI|RO|ROI|RS|SI\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"RB\",\n \"PS\": \"\",\n \"PSI\": \"DI\",\n \"RB\": \"B|DI|FI|M|O|PFI|RB|RO\",\n \"RBI\": \"RBI|RO|ROI|RS\",\n \"RO\": \"DI|FI|O|RB|RO\",\n \"ROI\": \"D|DI|E|F|FI|O|OI|RO|ROI|RS|S|SI\",\n \"RS\": \"DI|FI|O|RO\",\n \"R~\": \"RB|R~\",\n \"S\": \"RO\",\n \"SI\": \"DI|RO\"\n },\n \"ROI\": {\n \"B\": \"RB\",\n \"BI\": \"BI\",\n \"D\": \"ROI\",\n \"DI\": \"BI|DI|MI|OI|PSI|RB|RO|ROI|RS|SI\",\n \"E\": \"ROI\",\n \"F\": \"ROI\",\n \"FI\": \"RB|RO|ROI|RS\",\n \"M\": \"RB\",\n \"MI\": \"BI\",\n \"O\": \"RB|RO|ROI|RS\",\n \"OI\": \"BI|MI|OI|ROI\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"RB\",\n \"PS\": \"\",\n \"PSI\": \"BI\",\n \"RB\": \"B|DI|FI|M|O|PFI|RB|RO|R~\",\n \"RBI\": \"RBI\",\n \"RO\": \"D|DI|E|F|FI|O|OI|RB|RBI|RO|ROI|RS|S|SI\",\n \"ROI\": \"D|F|OI|RBI|ROI\",\n \"RS\": \"D|F|OI|RBI|ROI\",\n \"R~\": \"R~\",\n \"S\": \"ROI\",\n \"SI\": \"BI|MI|OI|ROI\"\n },\n \"RS\": {\n \"B\": \"RB\",\n \"BI\": \"BI\",\n \"D\": \"ROI\",\n \"DI\": \"DI|RB|RO\",\n \"E\": \"RS\",\n \"F\": \"ROI\",\n \"FI\": \"RB|RO\",\n \"M\": \"RB\",\n \"MI\": \"MI\",\n \"O\": \"RB|RO\",\n \"OI\": \"OI|ROI\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"RB\",\n \"PS\": \"\",\n \"PSI\": \"PSI\",\n \"RB\": \"B|DI|FI|M|O|PFI|RB|RO\",\n \"RBI\": \"RBI\",\n \"RO\": \"DI|FI|O|RB|RO\",\n \"ROI\": \"D|F|OI|ROI\",\n \"RS\": \"E|RS|S|SI\",\n \"R~\": \"R~\",\n \"S\": \"RS\",\n \"SI\": \"RS|SI\"\n },\n \"R~\": {\n \"B\": \"R~\",\n \"BI\": \"BI|RBI|R~\",\n \"D\": \"RBI|R~\",\n \"DI\": \"R~\",\n \"E\": \"R~\",\n \"F\": \"RBI|R~\",\n \"FI\": \"R~\",\n \"M\": \"R~\",\n \"MI\": \"RBI|R~\",\n \"O\": \"R~\",\n \"OI\": \"RBI|R~\",\n \"PE\": \"R~\",\n \"PF\": \"RBI|R~\",\n \"PFI\": \"R~\",\n \"PS\": \"R~\",\n \"PSI\": \"R~\",\n \"RB\": \"R~\",\n \"RBI\": \"BI|D|F|MI|OI|PF|RBI|ROI|R~\",\n \"RO\": \"R~\",\n \"ROI\": \"RBI|R~\",\n \"RS\": \"R~\",\n \"R~\": \"B|BI|D|DI|E|F|FI|M|MI|O|OI|PE|PF|PFI|PS|PSI|RB|RBI|RO|ROI|RS|R~|S|SI\",\n \"S\": \"R~\",\n \"SI\": \"R~\"\n },\n \"S\": {\n \"B\": \"B\",\n \"BI\": \"BI\",\n \"D\": \"D\",\n \"DI\": \"B|DI|FI|M|O|PFI\",\n \"E\": \"S\",\n \"F\": \"D\",\n \"FI\": \"B|M|O\",\n \"M\": \"B\",\n \"MI\": \"MI\",\n \"O\": \"B|M|O\",\n \"OI\": \"D|F|OI\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"B\",\n \"PS\": \"\",\n \"PSI\": \"PSI\",\n \"RB\": \"B|RB\",\n \"RBI\": \"RBI\",\n \"RO\": \"B|M|O|RO\",\n \"ROI\": \"D|ROI\",\n \"RS\": \"RS|S\",\n \"R~\": \"R~\",\n \"S\": \"S\",\n \"SI\": \"E|S|SI\"\n },\n \"SI\": {\n \"B\": \"B|DI|FI|M|O|PFI|RB|RO\",\n \"BI\": \"BI\",\n \"D\": \"D|F|OI|ROI\",\n \"DI\": \"DI\",\n \"E\": \"SI\",\n \"F\": \"OI\",\n \"FI\": \"DI\",\n \"M\": \"DI|FI|O|RO\",\n \"MI\": \"MI\",\n \"O\": \"DI|FI|O|RO\",\n \"OI\": \"OI\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"DI\",\n \"PS\": \"\",\n \"PSI\": \"PSI\",\n \"RB\": \"RB\",\n \"RBI\": \"RBI\",\n \"RO\": \"RO\",\n \"ROI\": \"ROI\",\n \"RS\": \"RS\",\n \"R~\": \"R~\",\n \"S\": \"E|RS|S|SI\",\n \"SI\": \"SI\"\n }\n }\n"
]
],
[
[
"### Left-Branching Linear Interval Algebra",
"_____no_output_____"
]
],
[
[
"print_compact_transitivity_table(algL)",
" \"TransTable\": {\n \"B\": {\n \"B\": \"B\",\n \"BI\": \"B|BI|D|DI|E|F|FI|LB|LBI|LF|LO|LOI|L~|M|MI|O|OI|PE|PF|PFI|PS|PSI|S|SI\",\n \"D\": \"B|D|LB|LO|M|O|PS|S\",\n \"DI\": \"B\",\n \"E\": \"B\",\n \"F\": \"B|D|LB|LO|M|O|PS|S\",\n \"FI\": \"B\",\n \"LB\": \"LB\",\n \"LBI\": \"L~\",\n \"LF\": \"LB\",\n \"LO\": \"LB\",\n \"LOI\": \"LB\",\n \"L~\": \"L~\",\n \"M\": \"B\",\n \"MI\": \"B|D|LB|LO|M|O|PS|S\",\n \"O\": \"B\",\n \"OI\": \"B|D|LB|LO|M|O|PS|S\",\n \"PE\": \"B\",\n \"PF\": \"B|D|LB|LO|M|O|PS|S\",\n \"PFI\": \"B\",\n \"PS\": \"B\",\n \"PSI\": \"B\",\n \"S\": \"B\",\n \"SI\": \"B\"\n },\n \"BI\": {\n \"B\": \"B|BI|D|DI|E|F|FI|M|MI|O|OI|PE|PF|PFI|PS|PSI|S|SI\",\n \"BI\": \"BI\",\n \"D\": \"BI|D|F|MI|OI|PF\",\n \"DI\": \"BI\",\n \"E\": \"BI\",\n \"F\": \"BI\",\n \"FI\": \"BI\",\n \"LB\": \"BI|D|F|LB|LF|LO|LOI|MI|OI|PF\",\n \"LBI\": \"BI\",\n \"LF\": \"BI\",\n \"LO\": \"BI|D|F|MI|OI|PF\",\n \"LOI\": \"BI\",\n \"L~\": \"BI|LBI|L~\",\n \"M\": \"BI|D|F|MI|OI|PF\",\n \"MI\": \"BI\",\n \"O\": \"BI|D|F|MI|OI|PF\",\n \"OI\": \"BI\",\n \"PE\": \"BI\",\n \"PF\": \"BI\",\n \"PFI\": \"BI\",\n \"PS\": \"BI|D|F|MI|OI|PF\",\n \"PSI\": \"BI\",\n \"S\": \"BI|D|F|MI|OI|PF\",\n \"SI\": \"BI\"\n },\n \"D\": {\n \"B\": \"B\",\n \"BI\": \"BI\",\n \"D\": \"D\",\n \"DI\": \"B|BI|D|DI|E|F|FI|M|MI|O|OI|PE|PF|PFI|PS|PSI|S|SI\",\n \"E\": \"D\",\n \"F\": \"D\",\n \"FI\": \"B|D|M|O|PS|S\",\n \"LB\": \"LB\",\n \"LBI\": \"BI|LBI|L~\",\n \"LF\": \"D|LB|LO\",\n \"LO\": \"D|LB|LO\",\n \"LOI\": \"BI|D|F|LB|LF|LO|LOI|MI|OI|PF\",\n \"L~\": \"L~\",\n \"M\": \"B\",\n \"MI\": \"BI\",\n \"O\": \"B|D|M|O|PS|S\",\n \"OI\": \"BI|D|F|MI|OI|PF\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"B\",\n \"PS\": \"\",\n \"PSI\": \"BI\",\n \"S\": \"D\",\n \"SI\": \"BI|D|F|MI|OI|PF\"\n },\n \"DI\": {\n \"B\": \"B|DI|FI|M|O|PFI\",\n \"BI\": \"BI|DI|LBI|LOI|MI|OI|PSI|SI\",\n \"D\": \"D|DI|E|F|FI|LF|LO|LOI|O|OI|S|SI\",\n \"DI\": \"DI\",\n \"E\": \"DI\",\n \"F\": \"DI|LOI|OI|SI\",\n \"FI\": \"DI\",\n \"LB\": \"LB|LF|LO|LOI\",\n \"LBI\": \"LBI\",\n \"LF\": \"LOI\",\n \"LO\": \"LF|LO|LOI\",\n \"LOI\": \"LOI\",\n \"L~\": \"LBI|L~\",\n \"M\": \"DI|FI|O\",\n \"MI\": \"DI|LOI|OI|SI\",\n \"O\": \"DI|FI|O\",\n \"OI\": \"DI|LOI|OI|SI\",\n \"PE\": \"DI\",\n \"PF\": \"DI|LOI|OI|SI\",\n \"PFI\": \"DI\",\n \"PS\": \"DI|FI|O\",\n \"PSI\": \"DI\",\n \"S\": \"DI|FI|O\",\n \"SI\": \"DI\"\n },\n \"E\": {\n \"B\": \"B\",\n \"BI\": \"BI\",\n \"D\": \"D\",\n \"DI\": \"DI\",\n \"E\": \"E\",\n \"F\": \"F\",\n \"FI\": \"FI\",\n \"LB\": \"LB\",\n \"LBI\": \"LBI\",\n \"LF\": \"LF\",\n \"LO\": \"LO\",\n \"LOI\": \"LOI\",\n \"L~\": \"L~\",\n \"M\": \"M\",\n \"MI\": \"MI\",\n \"O\": \"O\",\n \"OI\": \"OI\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"PFI\",\n \"PS\": \"\",\n \"PSI\": \"PSI\",\n \"S\": \"S\",\n \"SI\": \"SI\"\n },\n \"F\": {\n \"B\": \"B\",\n \"BI\": \"BI\",\n \"D\": \"D\",\n \"DI\": \"BI|DI|MI|OI|PSI|SI\",\n \"E\": \"F\",\n \"F\": \"F\",\n \"FI\": \"E|F|FI\",\n \"LB\": \"LB\",\n \"LBI\": \"BI|LBI\",\n \"LF\": \"F|LF\",\n \"LO\": \"D|LO\",\n \"LOI\": \"BI|LOI|MI|OI\",\n \"L~\": \"L~\",\n \"M\": \"M\",\n \"MI\": \"BI\",\n \"O\": \"D|O|S\",\n \"OI\": \"BI|MI|OI\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"PFI\",\n \"PS\": \"\",\n \"PSI\": \"BI\",\n \"S\": \"D\",\n \"SI\": \"BI|MI|OI\"\n },\n \"FI\": {\n \"B\": \"B\",\n \"BI\": \"BI|DI|LBI|LOI|MI|OI|PSI|SI\",\n \"D\": \"D|LO|O|S\",\n \"DI\": \"DI\",\n \"E\": \"FI\",\n \"F\": \"E|F|FI|LF\",\n \"FI\": \"FI\",\n \"LB\": \"LB\",\n \"LBI\": \"LBI\",\n \"LF\": \"LF\",\n \"LO\": \"LO\",\n \"LOI\": \"LOI\",\n \"L~\": \"L~\",\n \"M\": \"M\",\n \"MI\": \"DI|LOI|OI|SI\",\n \"O\": \"O\",\n \"OI\": \"DI|LOI|OI|SI\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"PFI\",\n \"PS\": \"\",\n \"PSI\": \"DI\",\n \"S\": \"O\",\n \"SI\": \"DI\"\n },\n \"LB\": {\n \"B\": \"B\",\n \"BI\": \"L~\",\n \"D\": \"LB\",\n \"DI\": \"B|LB|L~\",\n \"E\": \"LB\",\n \"F\": \"LB\",\n \"FI\": \"B|LB\",\n \"LB\": \"LB\",\n \"LBI\": \"B|BI|D|DI|E|F|FI|LB|LBI|LF|LO|LOI|L~|M|MI|O|OI|PE|PF|PFI|PS|PSI|S|SI\",\n \"LF\": \"B|D|LB|LO|M|O|PS|S\",\n \"LO\": \"B|D|LB|LO|M|O|PS|S\",\n \"LOI\": \"B|D|LB|LO|L~|M|O|PS|S\",\n \"L~\": \"L~\",\n \"M\": \"B\",\n \"MI\": \"L~\",\n \"O\": \"B|LB\",\n \"OI\": \"LB|L~\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"B\",\n \"PS\": \"\",\n \"PSI\": \"L~\",\n \"S\": \"LB\",\n \"SI\": \"LB|L~\"\n },\n \"LBI\": {\n \"B\": \"B|DI|FI|LBI|LF|LO|LOI|M|O|PFI\",\n \"BI\": \"LBI\",\n \"D\": \"LBI|LF|LO|LOI\",\n \"DI\": \"LBI\",\n \"E\": \"LBI\",\n \"F\": \"LBI\",\n \"FI\": \"LBI\",\n \"LB\": \"D|DI|E|F|FI|LB|LBI|LF|LO|LOI|O|OI|S|SI\",\n \"LBI\": \"LBI\",\n \"LF\": \"LBI\",\n \"LO\": \"LBI|LF|LO|LOI\",\n \"LOI\": \"LBI\",\n \"L~\": \"BI|DI|LBI|LOI|L~|MI|OI|PSI|SI\",\n \"M\": \"LBI|LF|LO|LOI\",\n \"MI\": \"LBI\",\n \"O\": \"LBI|LF|LO|LOI\",\n \"OI\": \"LBI\",\n \"PE\": \"LBI\",\n \"PF\": \"LBI\",\n \"PFI\": \"LBI\",\n \"PS\": \"LBI|LF|LO|LOI\",\n \"PSI\": \"LBI\",\n \"S\": \"LBI|LF|LO|LOI\",\n \"SI\": \"LBI\"\n },\n \"LF\": {\n \"B\": \"B\",\n \"BI\": \"LBI\",\n \"D\": \"LO\",\n \"DI\": \"DI|LBI|LOI\",\n \"E\": \"LF\",\n \"F\": \"LF\",\n \"FI\": \"FI|LF\",\n \"LB\": \"LB\",\n \"LBI\": \"BI|DI|LBI|LOI|MI|OI|PSI|SI\",\n \"LF\": \"E|F|FI|LF\",\n \"LO\": \"D|LO|O|S\",\n \"LOI\": \"DI|LBI|LOI|OI|SI\",\n \"L~\": \"L~\",\n \"M\": \"M\",\n \"MI\": \"LBI\",\n \"O\": \"LO|O\",\n \"OI\": \"LBI|LOI\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"PFI\",\n \"PS\": \"\",\n \"PSI\": \"LBI\",\n \"S\": \"LO\",\n \"SI\": \"LBI|LOI\"\n },\n \"LO\": {\n \"B\": \"B\",\n \"BI\": \"LBI\",\n \"D\": \"LO\",\n \"DI\": \"B|DI|FI|LBI|LF|LO|LOI|M|O|PFI\",\n \"E\": \"LO\",\n \"F\": \"LO\",\n \"FI\": \"B|LO|M|O\",\n \"LB\": \"LB\",\n \"LBI\": \"BI|DI|LBI|LOI|L~|MI|OI|PSI|SI\",\n \"LF\": \"D|LB|LO|O|S\",\n \"LO\": \"D|LB|LO|O|S\",\n \"LOI\": \"D|DI|E|F|FI|LB|LBI|LF|LO|LOI|O|OI|S|SI\",\n \"L~\": \"L~\",\n \"M\": \"B\",\n \"MI\": \"LBI\",\n \"O\": \"B|LO|M|O\",\n \"OI\": \"LBI|LF|LO|LOI\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"B\",\n \"PS\": \"\",\n \"PSI\": \"LBI\",\n \"S\": \"LO\",\n \"SI\": \"LBI|LF|LO|LOI\"\n },\n \"LOI\": {\n \"B\": \"B|DI|FI|M|O|PFI\",\n \"BI\": \"LBI\",\n \"D\": \"LF|LO|LOI\",\n \"DI\": \"DI|LBI|LOI\",\n \"E\": \"LOI\",\n \"F\": \"LOI\",\n \"FI\": \"DI|LOI\",\n \"LB\": \"LB|LF|LO|LOI\",\n \"LBI\": \"BI|DI|LBI|LOI|MI|OI|PSI|SI\",\n \"LF\": \"DI|LOI|OI|SI\",\n \"LO\": \"D|DI|E|F|FI|LF|LO|LOI|O|OI|S|SI\",\n \"LOI\": \"DI|LBI|LOI|OI|SI\",\n \"L~\": \"LBI|L~\",\n \"M\": \"DI|FI|O\",\n \"MI\": \"LBI\",\n \"O\": \"DI|FI|LF|LO|LOI|O\",\n \"OI\": \"LBI|LOI\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"DI\",\n \"PS\": \"\",\n \"PSI\": \"LBI\",\n \"S\": \"LF|LO|LOI\",\n \"SI\": \"LBI|LOI\"\n },\n \"L~\": {\n \"B\": \"B|LB|L~\",\n \"BI\": \"L~\",\n \"D\": \"LB|L~\",\n \"DI\": \"L~\",\n \"E\": \"L~\",\n \"F\": \"L~\",\n \"FI\": \"L~\",\n \"LB\": \"B|D|LB|LO|L~|M|O|PS|S\",\n \"LBI\": \"L~\",\n \"LF\": \"L~\",\n \"LO\": \"LB|L~\",\n \"LOI\": \"L~\",\n \"L~\": \"B|BI|D|DI|E|F|FI|LB|LBI|LF|LO|LOI|L~|M|MI|O|OI|PE|PF|PFI|PS|PSI|S|SI\",\n \"M\": \"LB|L~\",\n \"MI\": \"L~\",\n \"O\": \"LB|L~\",\n \"OI\": \"L~\",\n \"PE\": \"L~\",\n \"PF\": \"L~\",\n \"PFI\": \"L~\",\n \"PS\": \"LB|L~\",\n \"PSI\": \"L~\",\n \"S\": \"LB|L~\",\n \"SI\": \"L~\"\n },\n \"M\": {\n \"B\": \"B\",\n \"BI\": \"BI|DI|LBI|LOI|MI|OI|PSI|SI\",\n \"D\": \"D|LO|O|S\",\n \"DI\": \"B\",\n \"E\": \"M\",\n \"F\": \"D|LO|O|S\",\n \"FI\": \"B\",\n \"LB\": \"LB\",\n \"LBI\": \"L~\",\n \"LF\": \"LB\",\n \"LO\": \"LB\",\n \"LOI\": \"LB\",\n \"L~\": \"L~\",\n \"M\": \"B\",\n \"MI\": \"E|F|FI|LF\",\n \"O\": \"B\",\n \"OI\": \"D|LO|O|S\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"B\",\n \"PS\": \"\",\n \"PSI\": \"PFI\",\n \"S\": \"M\",\n \"SI\": \"M\"\n },\n \"MI\": {\n \"B\": \"B|DI|FI|M|O|PFI\",\n \"BI\": \"BI\",\n \"D\": \"D|F|OI\",\n \"DI\": \"BI\",\n \"E\": \"MI\",\n \"F\": \"MI\",\n \"FI\": \"MI\",\n \"LB\": \"LB|LF|LO|LOI\",\n \"LBI\": \"BI\",\n \"LF\": \"MI\",\n \"LO\": \"D|F|OI\",\n \"LOI\": \"BI\",\n \"L~\": \"LBI|L~\",\n \"M\": \"E|S|SI\",\n \"MI\": \"BI\",\n \"O\": \"D|F|OI\",\n \"OI\": \"BI\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"PSI\",\n \"PS\": \"\",\n \"PSI\": \"BI\",\n \"S\": \"D|F|OI\",\n \"SI\": \"BI\"\n },\n \"O\": {\n \"B\": \"B\",\n \"BI\": \"BI|DI|LBI|LOI|MI|OI|PSI|SI\",\n \"D\": \"D|LO|O|S\",\n \"DI\": \"B|DI|FI|M|O|PFI\",\n \"E\": \"O\",\n \"F\": \"D|LO|O|S\",\n \"FI\": \"B|M|O\",\n \"LB\": \"LB\",\n \"LBI\": \"LBI|L~\",\n \"LF\": \"LB|LO\",\n \"LO\": \"LB|LO\",\n \"LOI\": \"LB|LF|LO|LOI\",\n \"L~\": \"L~\",\n \"M\": \"B\",\n \"MI\": \"DI|LOI|OI|SI\",\n \"O\": \"B|M|O\",\n \"OI\": \"D|DI|E|F|FI|LF|LO|LOI|O|OI|S|SI\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"B\",\n \"PS\": \"\",\n \"PSI\": \"DI\",\n \"S\": \"O\",\n \"SI\": \"DI|FI|O\"\n },\n \"OI\": {\n \"B\": \"B|DI|FI|M|O|PFI\",\n \"BI\": \"BI\",\n \"D\": \"D|F|OI\",\n \"DI\": \"BI|DI|MI|OI|PSI|SI\",\n \"E\": \"OI\",\n \"F\": \"OI\",\n \"FI\": \"DI|OI|SI\",\n \"LB\": \"LB|LF|LO|LOI\",\n \"LBI\": \"BI|LBI\",\n \"LF\": \"LOI|OI\",\n \"LO\": \"D|F|LF|LO|LOI|OI\",\n \"LOI\": \"BI|LOI|MI|OI\",\n \"L~\": \"LBI|L~\",\n \"M\": \"DI|FI|O\",\n \"MI\": \"BI\",\n \"O\": \"D|DI|E|F|FI|O|OI|S|SI\",\n \"OI\": \"BI|MI|OI\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"DI\",\n \"PS\": \"\",\n \"PSI\": \"BI\",\n \"S\": \"D|F|OI\",\n \"SI\": \"BI|MI|OI\"\n },\n \"PE\": {\n \"B\": \"B\",\n \"BI\": \"BI\",\n \"D\": \"D\",\n \"DI\": \"\",\n \"E\": \"\",\n \"F\": \"\",\n \"FI\": \"\",\n \"LB\": \"LB\",\n \"LBI\": \"\",\n \"LF\": \"\",\n \"LO\": \"\",\n \"LOI\": \"\",\n \"L~\": \"L~\",\n \"M\": \"\",\n \"MI\": \"\",\n \"O\": \"\",\n \"OI\": \"\",\n \"PE\": \"PE\",\n \"PF\": \"PF\",\n \"PFI\": \"\",\n \"PS\": \"PS\",\n \"PSI\": \"\",\n \"S\": \"\",\n \"SI\": \"\"\n },\n \"PF\": {\n \"B\": \"B\",\n \"BI\": \"BI\",\n \"D\": \"D\",\n \"DI\": \"BI\",\n \"E\": \"PF\",\n \"F\": \"PF\",\n \"FI\": \"PF\",\n \"LB\": \"LB\",\n \"LBI\": \"BI\",\n \"LF\": \"PF\",\n \"LO\": \"D\",\n \"LOI\": \"BI\",\n \"L~\": \"L~\",\n \"M\": \"PS\",\n \"MI\": \"BI\",\n \"O\": \"D\",\n \"OI\": \"BI\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"PE\",\n \"PS\": \"\",\n \"PSI\": \"BI\",\n \"S\": \"D\",\n \"SI\": \"BI\"\n },\n \"PFI\": {\n \"B\": \"B\",\n \"BI\": \"BI|DI|LBI|LOI|MI|OI|PSI|SI\",\n \"D\": \"D|LO|O|S\",\n \"DI\": \"\",\n \"E\": \"\",\n \"F\": \"\",\n \"FI\": \"\",\n \"LB\": \"LB\",\n \"LBI\": \"\",\n \"LF\": \"\",\n \"LO\": \"\",\n \"LOI\": \"\",\n \"L~\": \"L~\",\n \"M\": \"\",\n \"MI\": \"\",\n \"O\": \"\",\n \"OI\": \"\",\n \"PE\": \"PFI\",\n \"PF\": \"E|F|FI|LF\",\n \"PFI\": \"\",\n \"PS\": \"M\",\n \"PSI\": \"\",\n \"S\": \"\",\n \"SI\": \"\"\n },\n \"PS\": {\n \"B\": \"B\",\n \"BI\": \"BI\",\n \"D\": \"D\",\n \"DI\": \"B\",\n \"E\": \"PS\",\n \"F\": \"D\",\n \"FI\": \"B\",\n \"LB\": \"LB\",\n \"LBI\": \"L~\",\n \"LF\": \"LB\",\n \"LO\": \"LB\",\n \"LOI\": \"LB\",\n \"L~\": \"L~\",\n \"M\": \"B\",\n \"MI\": \"PF\",\n \"O\": \"B\",\n \"OI\": \"D\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"B\",\n \"PS\": \"\",\n \"PSI\": \"PE\",\n \"S\": \"PS\",\n \"SI\": \"PS\"\n },\n \"PSI\": {\n \"B\": \"B|DI|FI|M|O|PFI\",\n \"BI\": \"BI\",\n \"D\": \"D|F|OI\",\n \"DI\": \"\",\n \"E\": \"\",\n \"F\": \"\",\n \"FI\": \"\",\n \"LB\": \"LB|LF|LO|LOI\",\n \"LBI\": \"\",\n \"LF\": \"\",\n \"LO\": \"\",\n \"LOI\": \"\",\n \"L~\": \"LBI|L~\",\n \"M\": \"\",\n \"MI\": \"\",\n \"O\": \"\",\n \"OI\": \"\",\n \"PE\": \"PSI\",\n \"PF\": \"MI\",\n \"PFI\": \"\",\n \"PS\": \"E|S|SI\",\n \"PSI\": \"\",\n \"S\": \"\",\n \"SI\": \"\"\n },\n \"S\": {\n \"B\": \"B\",\n \"BI\": \"BI\",\n \"D\": \"D\",\n \"DI\": \"B|DI|FI|M|O|PFI\",\n \"E\": \"S\",\n \"F\": \"D\",\n \"FI\": \"B|M|O\",\n \"LB\": \"LB\",\n \"LBI\": \"LBI|L~\",\n \"LF\": \"LB|LO\",\n \"LO\": \"LB|LO\",\n \"LOI\": \"LB|LF|LO|LOI\",\n \"L~\": \"L~\",\n \"M\": \"B\",\n \"MI\": \"MI\",\n \"O\": \"B|M|O\",\n \"OI\": \"D|F|OI\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"B\",\n \"PS\": \"\",\n \"PSI\": \"PSI\",\n \"S\": \"S\",\n \"SI\": \"E|S|SI\"\n },\n \"SI\": {\n \"B\": \"B|DI|FI|M|O|PFI\",\n \"BI\": \"BI\",\n \"D\": \"D|F|OI\",\n \"DI\": \"DI\",\n \"E\": \"SI\",\n \"F\": \"OI\",\n \"FI\": \"DI\",\n \"LB\": \"LB|LF|LO|LOI\",\n \"LBI\": \"LBI\",\n \"LF\": \"LOI\",\n \"LO\": \"LF|LO|LOI\",\n \"LOI\": \"LOI\",\n \"L~\": \"LBI|L~\",\n \"M\": \"DI|FI|O\",\n \"MI\": \"MI\",\n \"O\": \"DI|FI|O\",\n \"OI\": \"OI\",\n \"PE\": \"\",\n \"PF\": \"\",\n \"PFI\": \"DI\",\n \"PS\": \"\",\n \"PSI\": \"PSI\",\n \"S\": \"E|S|SI\",\n \"SI\": \"SI\"\n }\n }\n"
]
],
[
[
"### Region Connection Calculus 8",
"_____no_output_____"
]
],
[
[
"print_compact_transitivity_table(rcc8)",
" \"TransTable\": {\n \"DC\": {\n \"DC\": \"DC|EC|EQ|NTPP|NTPPI|PO|TPP|TPPI\",\n \"EC\": \"DC|EC|NTPP|PO|TPP\",\n \"EQ\": \"DC\",\n \"NTPP\": \"DC|EC|NTPP|PO|TPP\",\n \"NTPPI\": \"DC\",\n \"PO\": \"DC|EC|NTPP|PO|TPP\",\n \"TPP\": \"DC|EC|NTPP|PO|TPP\",\n \"TPPI\": \"DC\"\n },\n \"EC\": {\n \"DC\": \"DC|EC|NTPPI|PO|TPPI\",\n \"EC\": \"DC|EC|EQ|PO|TPP|TPPI\",\n \"EQ\": \"EC\",\n \"NTPP\": \"NTPP|PO|TPP\",\n \"NTPPI\": \"DC\",\n \"PO\": \"DC|EC|NTPP|PO|TPP\",\n \"TPP\": \"EC|NTPP|PO|TPP\",\n \"TPPI\": \"DC|EC\"\n },\n \"EQ\": {\n \"DC\": \"DC\",\n \"EC\": \"EC\",\n \"EQ\": \"EQ\",\n \"NTPP\": \"NTPP\",\n \"NTPPI\": \"NTPPI\",\n \"PO\": \"PO\",\n \"TPP\": \"TPP\",\n \"TPPI\": \"TPPI\"\n },\n \"NTPP\": {\n \"DC\": \"DC\",\n \"EC\": \"DC\",\n \"EQ\": \"NTPP\",\n \"NTPP\": \"NTPP\",\n \"NTPPI\": \"DC|EC|EQ|NTPP|NTPPI|PO|TPP|TPPI\",\n \"PO\": \"DC|EC|NTPP|PO|TPP\",\n \"TPP\": \"NTPP\",\n \"TPPI\": \"DC|EC|NTPP|PO|TPP\"\n },\n \"NTPPI\": {\n \"DC\": \"DC|EC|NTPPI|PO|TPPI\",\n \"EC\": \"NTPPI|PO|TPPI\",\n \"EQ\": \"NTPPI\",\n \"NTPP\": \"EQ|NTPP|NTPPI|PO|TPP|TPPI\",\n \"NTPPI\": \"NTPPI\",\n \"PO\": \"NTPPI|PO|TPPI\",\n \"TPP\": \"NTPPI|PO|TPPI\",\n \"TPPI\": \"NTPPI\"\n },\n \"PO\": {\n \"DC\": \"DC|EC|NTPPI|PO|TPPI\",\n \"EC\": \"DC|EC|NTPPI|PO|TPPI\",\n \"EQ\": \"PO\",\n \"NTPP\": \"NTPP|PO|TPP\",\n \"NTPPI\": \"DC|EC|NTPPI|PO|TPPI\",\n \"PO\": \"DC|EC|EQ|NTPP|NTPPI|PO|TPP|TPPI\",\n \"TPP\": \"NTPP|PO|TPP\",\n \"TPPI\": \"DC|EC|NTPPI|PO|TPPI\"\n },\n \"TPP\": {\n \"DC\": \"DC\",\n \"EC\": \"DC|EC\",\n \"EQ\": \"TPP\",\n \"NTPP\": \"NTPP\",\n \"NTPPI\": \"DC|EC|NTPPI|PO|TPPI\",\n \"PO\": \"DC|EC|NTPP|PO|TPP\",\n \"TPP\": \"NTPP|TPP\",\n \"TPPI\": \"DC|EC|EQ|PO|TPP|TPPI\"\n },\n \"TPPI\": {\n \"DC\": \"DC|EC|NTPPI|PO|TPPI\",\n \"EC\": \"EC|NTPPI|PO|TPPI\",\n \"EQ\": \"TPPI\",\n \"NTPP\": \"NTPP|PO|TPP\",\n \"NTPPI\": \"NTPPI\",\n \"PO\": \"NTPPI|PO|TPPI\",\n \"TPP\": \"EQ|PO|TPP|TPPI\",\n \"TPPI\": \"NTPPI|TPPI\"\n }\n }\n"
]
]
] |
[
"markdown",
"code",
"markdown",
"raw",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code"
] |
[
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"raw"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
]
] |
4ae9c1dfef8cb2f6dc10896c35ec96e40d9ca7b9
| 1,763 |
ipynb
|
Jupyter Notebook
|
flarow/Hash & Heap/Find first non-repeating character from a stream of characters.ipynb
|
Anjani100/logicmojo
|
25763e401f5cc7e874d28866c06cf39ad42b3a8d
|
[
"MIT"
] | null | null | null |
flarow/Hash & Heap/Find first non-repeating character from a stream of characters.ipynb
|
Anjani100/logicmojo
|
25763e401f5cc7e874d28866c06cf39ad42b3a8d
|
[
"MIT"
] | null | null | null |
flarow/Hash & Heap/Find first non-repeating character from a stream of characters.ipynb
|
Anjani100/logicmojo
|
25763e401f5cc7e874d28866c06cf39ad42b3a8d
|
[
"MIT"
] | 2 |
2021-09-15T19:16:18.000Z
|
2022-03-31T11:14:26.000Z
| 24.150685 | 81 | 0.501985 |
[
[
[
"from collections import defaultdict\ndef find_non_repeating_character(streams):\n stream_dict = defaultdict(list)\n for i in streams:\n print('Now Streaming:', i)\n if stream_dict[i] == []:\n stream_dict[i].append(i)\n elif stream_dict[i] == [-1]:\n print(i, 'has already been repeated.')\n else:\n stream_dict[i] = [-1]\n return stream_dict\n\nif __name__=='__main__':\n streams = 'aabc'\n stream_dict = find_non_repeating_character(streams)\n for stream in stream_dict:\n if stream_dict[stream] != [-1]:\n print('First Non-repeating character:', stream_dict[stream])\n break",
"Now Streaming: a\nNow Streaming: a\nNow Streaming: b\nNow Streaming: c\nFirst Non-repeating character: ['b']\n"
]
]
] |
[
"code"
] |
[
[
"code"
]
] |
4ae9c9b2c4b488a03f8d44b48b8d50be7f984381
| 58,033 |
ipynb
|
Jupyter Notebook
|
1-Python/1-Basics/Teoria/Python Basics I.ipynb
|
jbenitolasa/thebridge_ft_nov21
|
4387cb3fb0c0ce06900eedb5574d7b88a2a8fcc2
|
[
"MIT"
] | null | null | null |
1-Python/1-Basics/Teoria/Python Basics I.ipynb
|
jbenitolasa/thebridge_ft_nov21
|
4387cb3fb0c0ce06900eedb5574d7b88a2a8fcc2
|
[
"MIT"
] | null | null | null |
1-Python/1-Basics/Teoria/Python Basics I.ipynb
|
jbenitolasa/thebridge_ft_nov21
|
4387cb3fb0c0ce06900eedb5574d7b88a2a8fcc2
|
[
"MIT"
] | null | null | null | 29.929345 | 723 | 0.559613 |
[
[
[
"",
"_____no_output_____"
],
[
"# Python Basics I\n\nBienvenido a tu primer asalto con Python. En este notebook encontrarás los primeros pasos para empezar a familiarizarte con este lenguaje.\n\n1. [Variables](#1.-Variables)\n2. [Print](#2.-Print)\n3. [Comentarios](#3.-Comentarios)\n4. [Flujos de ejecución](#4.-Flujos-de-ejecución)\n5. [Del](#5.-Del)\n6. [Tipos de los datos](#6.-Tipos-de-los-datos)\n7. [Conversión de tipos](#7.-Conversión-de-tipos)\n8. [Input](#8.-Input)\n9. [None](#9.-None)\n10. [Sintaxis y best practices](#10.-Sintaxis-y-best-practices)\n11. [Resumen](#11.-Resumen)\n",
"_____no_output_____"
],
[
"## 1. Variables\nEmpezamos nuestra aventura en Python declarando variables. ¿Qué es esto y para qué sirve? Simplemente es una manera de etiquetar los datos del programa. Empezaremos declarando variables muy simples, como números y texto, pero acabaremos implementando estructuras más complejas.\n\n\n### Variables numéricas",
"_____no_output_____"
]
],
[
[
"ingresos = 1000\ngastos = 400",
"_____no_output_____"
]
],
[
[
"**Esto es una asignación**. A la palabra *ingresos*, le asignamos un valor mediante `=`.\nSi queremos ver el valor de la variable, simplemente escribimos su nombre en una celda.",
"_____no_output_____"
]
],
[
[
"ingresos",
"_____no_output_____"
]
],
[
[
"### Cadenas de texto\nLas cadenas de texto se declaran con comillas simples o dobles",
"_____no_output_____"
]
],
[
[
"ingresos_texto = \"Los ingresos del año han sido altos\"\ningresos_texto_2 = 'Los ingresos del año han sido altos'",
"_____no_output_____"
]
],
[
[
"Python es un lenguaje dinámico por lo que simpre podremos actualizar los valores de las variables. **Se recomienda usar nombres descriptivos para declarar las variables, pero no excesivamente largos**. Así evitamos sobreescribirlas sin querer.\n\nPor otro lado, cuidado con los caracteres ele y uno (`l` vs `1`), así como con cero y o (`0` vs `O`). Se suelen confundir.\n\nfatal vs fata1\n\nclarO vs clar0\n\nReasignamos valor a gastos",
"_____no_output_____"
]
],
[
[
"gastos = 200",
"_____no_output_____"
],
[
"gastos",
"_____no_output_____"
]
],
[
[
"Ahora la variable gastos vale 200. Si la última línea de una celda es una variable, su valor será el *output* de la celda: 200.\n\nVale, ¿y de qué nos sirve guardar variables?\n\nPodremos usar estos datos posteriormente, en otro lugar del programa. Por ejemplo, si ahora en una celda nueva queremos obtener el beneficio, simplemente restamos los nombres de las variables",
"_____no_output_____"
]
],
[
[
"beneficio = ingresos - gastos",
"_____no_output_____"
]
],
[
[
"El `print` sirve para ver el output de la celda, imprimiendo valores por pantalla. Lo veremos en el siguiente apartado.\n\nSi has programado en otros lenguajes, te llamará la atención que en Python no hay que especificar los tipos de los datos cuando declaramos una variable. No tenemos que decirle a Python que *ingresos* es un valor numerico o que *ingresos_texto* es una cadena de texto. Python lo interpreta y sabe qué tipo de datos son. Cada variable tiene su tipo de datos ya que **Python es un lenguaje fuertemente tipado**. Lo veremos más adelante, en el apartado *Tipos de datos*.",
"_____no_output_____"
],
[
"<table align=\"left\">\n <tr><td width=\"80\"><img src=\"img/error.png\" style=\"width:auto;height:auto\"></td>\n <td style=\"text-align:left\">\n <h3>ERRORES en variables</h3>\n \n </td></tr>\n</table>",
"_____no_output_____"
],
[
"### Escribir mal el nombre\nUn error típico cuando declaramos variables es **escribir su nombre mal, o llamar despues a la variable de forma errónea**. En tal caso, aparece un `NameError: name 'variable_que_no_existe' is not defined`",
"_____no_output_____"
]
],
[
[
"gstos",
"_____no_output_____"
]
],
[
[
"Fíjate que te indica la línea donde se produce el error, el tipo de error (`NameError`), y una breve descripción del error.",
"_____no_output_____"
],
[
"### Cerrar bien los strings\nCuidado tambien cuando definamos una cadena de texto, y se nos olvide cerrarla con sus correspondientes comillas. Nos dará un `SyntaxError: EOL while scanning string literal` (End Of Line)",
"_____no_output_____"
]
],
[
[
"gastos_texto = \"Los gastos del año han sido bajos",
"_____no_output_____"
]
],
[
[
"### Prohibido espacios en los nombres de las variables\nTambién dará error si tenemos un espacio en la declaración de la variable. Se recomienda mínusculas y guiones bajos para simular los espacios.\n\n**Los espacios que encuentres alrededor del igual se pueden usar perfectamente**. Es pura estética a la hora de leer el código.",
"_____no_output_____"
]
],
[
[
"nueva variable = \"variable erronea\"",
"_____no_output_____"
]
],
[
[
"### Números en el nombre de la variable\nOjo con los números cuando declaremos variables. En ocasiones es determinante describir nuestra variable con algún número. En tal caso, ponlo siempre al final del nombre de la variable, ya que sino saltará un error.",
"_____no_output_____"
]
],
[
[
"ingresos_2021 = 900\nprint(ingresos_2021)",
"900\n"
],
[
"2021_ingresos = 900\nprint(2021_ingresos)",
"_____no_output_____"
]
],
[
[
"### Sensible a mayusculas\nMucho cuidado con las mayusculas y minusculas porque Python no las ignora. Si todas las letras de una variable están en mayusculas, tendremos que usarla en mayusculas, sino dará un error de que no encuentra la variable.",
"_____no_output_____"
]
],
[
[
"ingresos_2021 = 900\nprint(Ingresos_2021)",
"_____no_output_____"
]
],
[
[
"### Palabras reservadas\nEn Python, como en otros lenguajes, hay una serie de palabras reservadas que tienen un significado para el intérprete de Python y por lo tanto no podemos usar para ponerle nombre a nuestras variables.\n\nPor ejemplo, `def` se usa para definir funciones en Python (lo veremos en otros notebooks), por lo que no podemos emplear `def` para nombrar a nuestras variables",
"_____no_output_____"
]
],
[
[
"var = 9\nprint(var)",
"9\n"
],
[
"def = 9",
"_____no_output_____"
]
],
[
[
"Consulta la lista de palabras reservadas de Python",
"_____no_output_____"
]
],
[
[
"import keyword\nprint(keyword.kwlist)",
"['False', 'None', 'True', 'and', 'as', 'assert', 'async', 'await', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or', 'pass', 'raise', 'return', 'try', 'while', 'with', 'yield']\n"
]
],
[
[
"### Resumen variables\nEn resumen:\n* Usar minusculas. Sensible a mayusculas/minusculas\n* No usar espacios\n* No usar palabras reservadas\n* No usar numeros al principio de la variable\n* Cuidado con los caracteres `l`, `1`, `O`, `0`",
"_____no_output_____"
],
[
"<table align=\"left\">\n <tr><td width=\"80\"><img src=\"img/ejercicio.png\" style=\"width:auto;height:auto\"></td>\n <td style=\"text-align:left\">\n <h3>Ejercicio variables</h3>\n\n \n<ol>\n <li>Crea un programa que almacene tu nombre y tus apellidos en dos variables diferentes. </li>\n <li>Guarda tu edad en otra variable</li>\n <li>Modifica la variable de tu edad</li>\n <li>Comprueba que todas las variables tienen los valores que les corresponde</li>\n</ol>\n \n </td></tr>\n</table>",
"_____no_output_____"
]
],
[
[
"nombre = \"Alberto\"\napellido = \"Romero\"\nedad = 38\nedad = 37\nprint(nombre)\nprint(apellido)\nprint(edad)",
"Alberto\nRomero\n37\n"
]
],
[
[
"## 2. Print",
"_____no_output_____"
],
[
"Hasta ahora hemos visto en Jupyter dos tipos de celdas:\n* **Markdown**: básicamente texto para las explicaciones\n* **Código**: donde insertamos el código Python y lo ejecutamos\n\nLas celdas de código, no solo corren el código y realizan todas las operaciones que le indiquemos, sino que también tienen un output, una salida de ese código. Tenemos dos opciones para ver el output del código, o bien mediante `print`, o poniendo una variable al final de la celda. En este último caso, veremos el valor de esa variable",
"_____no_output_____"
]
],
[
[
"print(ingresos)\nprint(gastos)\nprint(\"Los beneficios han sido: \")\nbeneficio",
"1000\n200\nLos beneficios han sido: \n"
]
],
[
[
"Si hacemos un print de un texto, podemos concatenar valores de variables mediante `%s`.",
"_____no_output_____"
]
],
[
[
"mes = \"junio\"\nprint(\"Los beneficios de %s han sido de %s millones\" % (mes, beneficio))\n",
"Los beneficios de junio han sido de 800 millones\nhola, ¿qué tal estás? Julia\n"
]
],
[
[
"Otra opcion si queremos imprimir por pantalla varios strings, es separandolos por comas en el `print`. Fíjate que le añade espacios en la salida cada vez que ponemos un valor nuevo entre comas.",
"_____no_output_____"
]
],
[
[
"mes = \"agosto\"\nprint(\"Los beneficios de\", mes, \"han sido de\", beneficio)",
"Los beneficios de agosto han sido de 800\n"
]
],
[
[
"## 3. Comentarios\nSe trata de texto que va junto con el código, y que el intérprete de Python ignora por completo. Muy útil para documentar y explicar el código",
"_____no_output_____"
]
],
[
[
"# Comentario de una linea, va con hashtag. El intérprete lo ignora\n# print(\"Este print lo va a ignorar\")\n\nprint(\"Esto sí lo ejecuto\") # Otro comentario aquí\n\n'''\nComentario\nMultilinea\nSi lo pones solo en una celda, te imprime su contenido\n'''\n\n\"\"\"\nTambién me valen 3 comillas dobles\npara el comentario multilinea\n\"\"\"\n\nprint(\"Fin del programa\")\n\n\n\n",
"Esto sí lo ejecuto\nFin del programa\n"
]
],
[
[
"**IMPORTATE**. SIEMPRE comentar el código. Nunca sabes quén lo puede heredar. Te dejo en [este link](https://realpython.com/python-comments-guide/) una guía interesante sobre cómo comentar tu código.",
"_____no_output_____"
],
[
"## 4. Flujos de ejecución\nLos programas de Python se ejecutan secuencialmente, por lo que el orden en el que escribas las operaciones es determinante",
"_____no_output_____"
]
],
[
[
"ventas_jun_jul = ventas_junio + ventas_julio\n\nventas_junio = 100\nventas_julio = 150\n",
"_____no_output_____"
]
],
[
[
"**Da error**, primero tenemos que declarar las ventas, y luego sumarlas.\n\n**¿Cuándo acaba una línea de código?**. El salto de línea lo interpreta Python como una nueva instrucción. En muchos lengujes, como Java hay que especificar el fin de la sentencia de código mediante `;` o con `,`. En Python no es necesario, aunque se puede usar igualmente.",
"_____no_output_____"
]
],
[
[
"altura = 1.80; peso = 75\nprint(altura)\nprint(peso)\n\nx, y, z = 1, 2, 3\nprint(z)",
"1.8\n75\n3\n"
]
],
[
[
"## 5. Del\nEs la sentencia que usaremos para borrar una variable. La verdad, no se suelen borrar variables. Vamos desarrollando los programas de Python sin preocuparnos de limpiar aquellas variables que no usamos. Normalmente no borrarlas no suele ser un problema, pero cuando manejamos un gran volumen de datos, podemos sufrir problemas de rendimiento ya que **las variables ocupan memoria**.\n\nCuando las variables son las que hemos visto hasta ahora, no pasa nada, pero si son más pesadas, como por ejemplo datasets de imágenes que ocupan mucho, sí va a venir bien eliminar aquellas que no usemos.",
"_____no_output_____"
]
],
[
[
"altura = 1.85\ndel altura\nprint(altura)",
"_____no_output_____"
]
],
[
[
"## 6. Tipos de los datos\nPython es un lenguaje fuertemente tipado. Eso significa que las variables que usamos pertenecen a un tipo de datos: numero entero (int), real (float), texto (String), u otro tipo de objetos.\n\n**¿Por qué es importante saber bien de que tipos son los datos?** Porque cada tipo de dato tiene una serie propiedades y operaciones asociadas. Por ejemplo, a un texto no lo puedo sumar 5. Por lo que cuando vayamos a hacer operaciones entre ellos, tenemos que asegurarnos de que son del mismo tipo para que el resultado sea el esperado. `texto + 5` no tiene sentido y va a dar error. Parece obvio, pero hay ocasiones en las que los tipos de los datos no son los esperados.\n\n**¿Cuántos tipos de datos hay?** Básicamente aquí no hay límites. En este notebook veremos los más básicos, pero en notebooks posteriores verás que puedes crearte tus propios tipos de datos mediante las **clases**. En Python hay una serie de tipos de datos básicos, que podremos usar sin importar ningun módulo externo, son los llamados [*built-in Types*](https://docs.python.org/3/library/stdtypes.html). Estos son los más comunes:\n\n* **Numérico**: tenemos `int`, `float` y `complex`. Dependiendo de si es un numero entero, uno real o un complejo.\n* **String**: o Cadena. Cadena de texto plano\n* **Booleano**: o Lógico. `True`/`False`\n\n**¿Cómo sabemos el tipo de datos de una variable?** Mediante `type(nombre_variable)`",
"_____no_output_____"
],
[
"### Numéricos",
"_____no_output_____"
]
],
[
[
"numero = 22\ntype(numero)",
"_____no_output_____"
]
],
[
[
"Bien, es un ***int***, un número entero. Si lo que quiero es un numero real, es decir, que tenga decimales, le añado un punto",
"_____no_output_____"
]
],
[
[
"numero_real = 22.0\ntype(numero_real)",
"_____no_output_____"
]
],
[
[
"Aunque no le haya añadido decimales como tal, ya le estoy diciendo a Python que esta variable es un numero real (***float***).",
"_____no_output_____"
]
],
[
[
"numero_real_decimales = 22.45123\ntype(numero_real_decimales)",
"_____no_output_____"
]
],
[
[
"Algunas operaciones básicas que podemos hacer con los numeros:\n* Sumar: `+`\n* Restar: `-`\n* Multiplicar: `*`\n* Dividir: `/`\n* Elevar: `**`\n* Cociente division: `//`\n* Resto de la división: `%`",
"_____no_output_____"
]
],
[
[
"print(\"Sumas/restas\")\nprint(1 + 2)\nprint(1.0 + 2) # Fijate que cuando fuerzo a que alguno de los numeros sea float, el resultado es float\nprint(1 + 2.0)\nprint(1-2)\n\nprint(\"Multiplicaciones/Divisiones\")\nprint(2 * 2)\nprint(2.0 * 2) # Ocurre lo mismo que en las sumas, cuando ponemos uno de los numeros como float.\nprint(2/2) # Al hacer la división, directamente convierte el numero en float, a pesar de que los dos son enteros y el resultado también.\nprint(1000/10)\n\nprint(\"Resto de la división\")\nprint(10/3)\nprint(int(10/3)) # Me quedo con el entero de la division\nprint(10 % 3) # Me quedo con el resto de la division",
"Sumas/restas\n3\n3.0\n3.0\n-1\nMultiplicaciones/Divisiones\n4\n4.0\n1.0\n100.0\nResto de la división\n3.3333333333333335\n3\n1\n"
]
],
[
[
"### Strings\nEl tercer tipo de datos más común es el *String*, o cadena de texto. Hay varias maneras de declararlo:",
"_____no_output_____"
]
],
[
[
"# con comillas dobles\ncadena = \"Esto es una cadena de texto\"\n\n# con comillas simples\ncadena = 'las comillas simples también valen'\ntype(cadena)",
"_____no_output_____"
]
],
[
[
"Si da la casualidad de que en el texto hay comillas, tenemos la posibilidad de que Python las interprete como parte del texto y no como comando de inicio/cierre de String",
"_____no_output_____"
]
],
[
[
"# comillas dobles si dentro hay simples\nprint(\"String con comillas simples dentro ' ' '\")\n\n# tres comillas dobles si dentro hay dobles\nprint(\"\"\"String con comillas dobles dentro \" \" \" \"\"\")",
"String con comillas simples dentro ' ' '\nString con comillas dobles dentro \" \" \" \n"
]
],
[
[
"En ocasiones queremos poner saltos de línea o tabulaciones en los prints, o simplemente en una variable de tipo String. Para ello usamos los [*escape characters*](https://www.w3schools.com/python/gloss_python_escape_characters.asp) como `\\n` para saltos de línea o `\\t` para tabulaciones.",
"_____no_output_____"
]
],
[
[
"print(\"Primera linea\\nSegunda linea\\n\\tTercera linea tabulada\")",
"Primera linea\nSegunda linea\n\tTercera linea tabulada\n"
]
],
[
[
"Para unir dos variables de tipo String, simplemente usamos el `+`",
"_____no_output_____"
]
],
[
[
"nombre = \"Bon\"\napellido = \"Scott\"\nnombre_apellido = nombre + \" \" + apellido\nprint(nombre_apellido)",
"Bon Scott\n"
]
],
[
[
"### Booleano\nPor último, el cuarto tipo de datos basiquísimo es el *booleano*: `True`/`False`. Para que Python reconoza este tipo de datos, hay que escribirlos con la primera letra en mayúscula",
"_____no_output_____"
]
],
[
[
"ya_se_de_python = True\ntype(ya_se_de_python)",
"_____no_output_____"
]
],
[
[
"Tipos de datos hay muchos, verás más adelante cómo crear tus propios tipos de datos mediante las clases y los objetos. Pero por ahora, quédate con los tipos de datos más simples:\n* **int**: entero\n* **float**: real\n* **str**: cadena de texto\n* **booleano**: true/false",
"_____no_output_____"
],
[
"En otros lenguajes de programación el valor numérico suele ir más desagregado dependiendo del volumen del mismo. No es lo mismo tener un `double`, que un `float`. Por suerte en Python no hay que preocuparse de eso :)\n\nVeamos más ejemplos",
"_____no_output_____"
]
],
[
[
"print(type(1))\nprint(type(1.0))\nprint(type(-74))\nprint(type(4/1)) # Aunque haga division de enteros, Python automáticamente los convierte a float\nprint(type(\"Cadena de texto\"))\nprint(type(\"-74\"))\nprint(type(True))\nprint(type(False))",
"<class 'int'>\n<class 'float'>\n<class 'int'>\n<class 'float'>\n<class 'str'>\n<class 'str'>\n<class 'bool'>\n<class 'bool'>\n"
]
],
[
[
"<table align=\"left\">\n <tr><td width=\"80\"><img src=\"img/error.png\" style=\"width:auto;height:auto\"></td>\n <td style=\"text-align:left\">\n <h3>ERRORES en tipos de datos</h3>\n \n </td></tr>\n</table>",
"_____no_output_____"
]
],
[
[
"# cuidado cuando tenemos cadenas de texto con comillas dentro\nprint(\"Lleva comillas \"dobles\". Da fallo)",
"_____no_output_____"
]
],
[
[
"## 7. Conversión de tipos\nComo en otros lenguajes, en Python también tenemos la posibilidad de realizar conversiones entre los tipos de datos. Hasta ahora hemos visto pocos, pero cuando descubramos más tipos de datos y objetos, verás que son muy comunes estas transformaciones.\n\nUn caso muy habitual es leer un archivo datos numéricos, y que Python interprete los números como caracteres. No es un error, pero posteriormente, cuando hagamos operaciones con nuestros números, tendremos errores, ya que en realidad son cadenas de texto. Si forzamos el cambio a numerico, nos evitaremos futuros problemas.\n\n**Mucho cuidado en los cambios de tipos**. Tenemos que estar seguros de lo que hacemos ya que podemos perder información, o lo más probable, puede dar error, al no ser compatible el cambio.\n\nVeamos como cambiar los tipos",
"_____no_output_____"
]
],
[
[
"numero_real = 24.69\nprint(type(numero_real))\n\nnumero_entero = int(numero_real)\nprint(type(numero_entero))\nprint(numero_entero)",
"<class 'float'>\n<class 'int'>\n24\n"
]
],
[
[
"Perdemos unos decimales, normalmente nada grave, aunque depende de la aplicación.\n\n**NOTA**: si lo que queremos es redondear, podemos usar la función `round()`",
"_____no_output_____"
]
],
[
[
"# Esta funcion tiene dos argumentos: el número y la cantidad de decimales que queremos conservar.\n# Veremos funciones más adelante.\nround(24.69845785,1)",
"_____no_output_____"
]
],
[
[
"Para pasar de un **numero a string**, no hay problema",
"_____no_output_____"
]
],
[
[
"real = 24.69\nentero = 5\n\nreal_str = str(real)\nentero_str = str(entero)\n\nprint(real_str)\nprint(type(real_str))\n\nprint(entero_str)\nprint(type(entero_str))",
"24.69\n<class 'str'>\n5\n<class 'str'>\n"
]
],
[
[
"De **String a un número** tampoco suele haber problema. Hay que tener mucho cuidado con los puntos de los decimales. **Puntos, NO comas**",
"_____no_output_____"
]
],
[
[
"print(int(\"98\"))\nprint(type(int(\"98\")))\n\nprint(float(\"98.25\"))\nprint(type(float(\"98.25\")))\n\nprint(float(\"98\"))\nprint(type(float(\"98\")))",
"98\n<class 'int'>\n98.25\n<class 'float'>\n98.0\n<class 'float'>\n"
]
],
[
[
"Pasar de **numero a boleano y viceversa**, tambien es bastante sencillo. Simplemente ten en cuenta que los 0s son `False`, y el resto de numeros equivalen a un `True`",
"_____no_output_____"
]
],
[
[
"print(bool(1))\nprint(bool(1.87))\nprint(bool(1000))\nprint(bool(-75))\nprint(bool(0))\n\nprint(int(True))\nprint(int(False))\n\nprint(float(True))\nprint(float(False))\n\nprint(complex(True))\nprint(complex(False))",
"True\nTrue\nTrue\nTrue\nFalse\n1\n0\n1.0\n0.0\n(1+0j)\n0j\n"
]
],
[
[
"En el caso de transformar **String a booleano**, los strings vacíos serán `False`, mientras que los que tengan cualquier cadena, equivaldrán a `True`.\n\nSin embargo, si la operación es la inversa, el booleano `True` pasará a valer una cadena de texto como `True`, y para `False` lo mismo.",
"_____no_output_____"
]
],
[
[
"print(bool(\"\"))\nprint(bool(\"Cadena de texto\"))\n\nverdadero = True\nprint(verdadero)\nprint(type(verdadero))\n\nverdadero_str = str(verdadero)\nprint(verdadero_str)\nprint(type(verdadero_str))",
"False\nTrue\nTrue\n<class 'bool'>\nTrue\n<class 'str'>\n"
]
],
[
[
"<table align=\"left\">\n <tr><td width=\"80\"><img src=\"img/error.png\" style=\"width:auto;height:auto\"></td>\n <td style=\"text-align:left\">\n <h3>ERRORES en conversion de tipos</h3>\n \n </td></tr>\n</table>",
"_____no_output_____"
],
[
"Ojo si intentamos pasar a entero un string con pinta de real. En cuanto lleva el punto, ya tiene que ser un numero real. A no ser que lo pasemos a real y posteriormente a entero (`int()`), o usando el `round()` como vimos anteriormente",
"_____no_output_____"
]
],
[
[
"print(int(\"98.25\"))",
"_____no_output_____"
]
],
[
[
"Si leemos datos con decimales y tenemos comas en vez de puntos, habrá errores.",
"_____no_output_____"
]
],
[
[
"float(\"98,25\")",
"_____no_output_____"
]
],
[
[
"Para solventar esto utilizaremos funciones que sustituyan unos caracteres por otros",
"_____no_output_____"
]
],
[
[
"mi_numero = \"98,25\"\nprint(mi_numero)\nprint(type(mi_numero))\n\nmi_numero_punto = mi_numero.replace(\",\", \".\")\nprint(mi_numero_punto)\nprint(type(mi_numero_punto))\n\nmi_numero_float = float(mi_numero_punto)\nprint(mi_numero_float)\nprint(type(mi_numero_float))",
"98,25\n<class 'str'>\n98.25\n<class 'str'>\n98.25\n<class 'float'>\n"
]
],
[
[
"Es fudndamental operar con los mismos tipos de datos. Mira lo que ocurre cuando sumamos texto con un numero. Da un `TypeError`. Básicamente nos dice que no puedes concatenar un texto con un numero entero",
"_____no_output_____"
]
],
[
[
"\"4\" + 6",
"_____no_output_____"
]
],
[
[
"<table align=\"left\">\n <tr><td width=\"80\"><img src=\"img/ejercicio.png\" style=\"width:auto;height:auto\"></td>\n <td style=\"text-align:left\">\n <h3>Ejercicio tipos de datos</h3>\n\n \n<ol>\n <li>Crea una variable de tipo String en la que se incluyan unas comillas dobles </li>\n <li>Comprueba su tipo</li>\n <li>Crea otro string guardándolo en otra variable, y prueba a sumarlos</li>\n <li>Ahora declara una variable entera. Imprímela por pantalla</li>\n <li>Cambia el tipo de la variable entera a float. Imprime por pantalla tanto la nueva variable obtenida, como su tipo</li>\n</ol>\n \n </td></tr>\n</table>",
"_____no_output_____"
]
],
[
[
"mi_var = \"\"\"texto con \"\" dobles \"\"\"\nprint(type(mi_var))\n\nmi_var2 = \" Otro texto\"\n\nmi_var + mi_var2\n\nentera = 4\n\nprint(float(entera))\nprint(type(float(entera)))",
"<class 'str'>\n4.0\n<class 'float'>\n"
]
],
[
[
"## 8. Input\nEsta sentencia se usa en Python para recoger un valor que escriba el usuario del programa. Los programas suelen funcionar de esa manera, reciben un input, realizan operaciones, y acaban sacando un output para el usuario.\n\nPor ejemplo, en la siguiente celda recojo un input, que luego podremos usar en celdas posteriores.\n\n**CUIDADO**. Si corres una celda con un `input()` el programa se queda esperando a que el usuario meta un valor. Si en el momento en el que está esperando, vuelves a correr la misma celda, se te puede quedar pillado, depende del ordendaor/versión de Jupyter. Si eso ocurre, pincha en la celda y dale despues al botón de stop de arriba, o sino a Kernel -> Restart Kernel...",
"_____no_output_____"
]
],
[
[
"primer_input = input()",
" hola\n"
],
[
"print(primer_input)",
"hola\n"
]
],
[
[
"Puedes poner ints, floats, strings, lo que quieras recoger en texto plano.\n\nMira que fácil es hacer un chatbot un poco tonto, mediante el que hacemos preguntas al usuario, y almacenamos sus respuestas.",
"_____no_output_____"
]
],
[
[
"nombre = input(\"¿Cómo te llamas? \")\nprint(\"Encantado de saludarte %s \" % (nombre))\n\nfeedback = input(\"¿Qué te está pareciendo Python? \")\nprint(\"Coincido\")",
"¿Cómo te llamas? Alberto\n"
]
],
[
[
"<table align=\"left\">\n <tr><td width=\"80\"><img src=\"img/error.png\" style=\"width:auto;height:auto\"></td>\n <td style=\"text-align:left\">\n <h3>ERRORES con input</h3>\n \n </td></tr>\n</table>",
"_____no_output_____"
]
],
[
[
"\"\"\"\nPor defecto, el input del usuario es de tipo texto. Habrá que convertirlo a numerico con int(numero_input)\no con float(numero_input). Lo vemos en el siguiente notebook.\n\"\"\"\nnumero_input = input(\"Introduce un numero \")\nnumero_input + 4",
"Introduce un numero 5\n"
]
],
[
[
"<table align=\"left\">\n <tr><td width=\"80\"><img src=\"img/ejercicio.png\" style=\"width:auto;height:auto\"></td>\n <td style=\"text-align:left\">\n <h3>Ejercicio input</h3>\n\nEn este ejemplo vamos a simular un chatbot al que le haremos pedidos de pizzas.\n<ol>\n <li>El chatbot tiene que saludar con un: \"Buenas tardes, bienvenido al servicio de pedido online, ¿Cuántas pizzas desea?\"</li>\n <li>El ususario tiene que introducir un número de pizzas en una variable llamada 'pizz'</li>\n <li>Respuesta del chatbot: \"Estupendo, se están preparando 'pizz' pizzas. Digame su dirección\"</li>\n <li>El ususario tiene que introducir una direccion en formato String en otra variable llamada 'direcc'</li>\n <li>Respuesta final del chatbot: \"Le mandaremos las 'pizz' pizzas a la dirección 'direcc'. Muchas gracias por su pedido.\"</li>\n</ol>\n \n </td></tr>\n</table>",
"_____no_output_____"
]
],
[
[
"pizz = input(\"Buenas tardes, bienvenido al servicio de pedido online, ¿cuántas pizzas desea? \")\ndirecc = input (\"Estupendo, se están preparando \" + pizz + \" pizzas. Dígame su dirección, por favor \")\n\nprint(\"Le mandamos las\", pizz, \"pizzas a la dirección\", direcc, \". Muchas gracias\")",
"Buenas tardes, bienvenido al servicio de pedido online, ¿cuántas pizzas desea? 5\nEstupendo, se estaán preparando 5pizzas. Dígame su dirección, por favor calle mayor 3\n"
]
],
[
[
"## 9. None\nPalabra reservada en Python para designar al valor nulo. `None` no es 0, tampoco es un string vacio, ni `False`, simplemente es un tipo de datos más para representar el conjunto vacío.",
"_____no_output_____"
]
],
[
[
"print(None)\nprint(type(None))\n",
"None\n<class 'NoneType'>\n"
]
],
[
[
"## 10. Sintaxis y best practices\nA la hora de escribir en Python, existen ciertas normas que hay que tener en cuenta:\n* Todo lo que abras, lo tienes que cerrar: paréntesis, llaves, corchetes...\n* Los decimales se ponen con puntos `.`\n* Best practices\n * **Caracteres**: NO se recomienda usar Ñs, acentos o caracteres raros (ª,º,@,ç...) en el codigo. Ponerlo únicamente en los comentarios.\n * **Espacios**: NO usar espacios en los nombres de las variables ni de las funciones. Se recomienda usar guión bajo para simular el espacio. O también juntar las palabras y usar mayuscula para diferenciarlas `miVariable`. Lo normal es todo minúscula y guiones bajos\n * Ahora bien, sí se recomienda usar espacios entre cada comando, para facilitar la lectura, aunque esto ya es más cuestión de gustos. `mi_variable = 36`.\n * Se suelen declarar las variables en minuscula.\n * Las constantes (variables que no van a cambiar nunca) en mayuscula. `MI_PAIS = \"España\"`\n * **Cada sentencia en una linea**. Se puede usar el `;` para declarar varias variables, pero no es lo habitual\n * **Comentarios**: TODOS los que se pueda. Nunca sabes cuándo otra persona va a coger tu espectacular código, o si tu *yo* del futuro se acordará de por qué hiciste ese bucle while en vez de un for.\n * **Case sensitive**: sensible a mayusculas y minusculas. CUIDADO con esto cuando declaremos variables o usemos Strings\n * **Sintaxis de línea**: para una correcta lectura del codigo lo mejor es aplicar sintaxis de línea en la medida de lo posible",
"_____no_output_____"
]
],
[
[
"# A esto nos referimos con sintaxis de línea\nlista_compra = ['Manzanas',\n 'Galletas',\n 'Pollo',\n 'Cereales']",
"_____no_output_____"
]
],
[
[
"### The Zen of Python\nCualquier consejo que te haya podido dar hasta ahora se queda en nada comparado con los 20 principios que definió *Tim Peters* en 1999. Uno de los mayores colaboradores en la creación de este lenguaje",
"_____no_output_____"
]
],
[
[
"import this",
"The Zen of Python, by Tim Peters\n\nBeautiful is better than ugly.\nExplicit is better than implicit.\nSimple is better than complex.\nComplex is better than complicated.\nFlat is better than nested.\nSparse is better than dense.\nReadability counts.\nSpecial cases aren't special enough to break the rules.\nAlthough practicality beats purity.\nErrors should never pass silently.\nUnless explicitly silenced.\nIn the face of ambiguity, refuse the temptation to guess.\nThere should be one-- and preferably only one --obvious way to do it.\nAlthough that way may not be obvious at first unless you're Dutch.\nNow is better than never.\nAlthough never is often better than *right* now.\nIf the implementation is hard to explain, it's a bad idea.\nIf the implementation is easy to explain, it may be a good idea.\nNamespaces are one honking great idea -- let's do more of those!\n"
]
],
[
[
"## 11. Resumen",
"_____no_output_____"
]
],
[
[
"# Declarar variables\nvar = 10\n\n# Reasignar valores\nvar = 12\n\n# Imprimir por pantalla\nprint(\"Primera linea\")\nprint(\"Variable declarada es:\", var)\nprint(\"Variable declarada es: %s\" %(var))\n\n\"\"\"\nComentarios\nMultilínea\n\"\"\"\n\n# Eliminar variables\ndel var\n\n# Tipos de datos\nprint(\"\\n\") # Simplemente para que haya un salto de linea en el output\nprint(type(1)) # Int\nprint(type(1.0)) # Float\nprint(type(\"1\")) # String\nprint(type(True)) # Boolean\n\n# Conversiones de tipos\nprint(\"\\n\")\nvar2 = 4\nprint(type(var2))\nvar2 = str(var2)\nprint(type(var2))\nvar2 = bool(var2)\nprint(type(var2))\n\n# El valor nulo\nprint(None)\n\n# Input de variables\nvar3 = input(\"Inserta variable \")",
"Primera linea\nVariable declarada es: 12\nVariable declarada es: 12\n\n\n<class 'int'>\n<class 'float'>\n<class 'str'>\n<class 'bool'>\n\n\n<class 'int'>\n<class 'str'>\n<class 'bool'>\nNone\n"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code"
] |
[
[
"markdown",
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown",
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
]
] |
4ae9d8ba15d412c13426fb45063ac68c8bd89330
| 22,592 |
ipynb
|
Jupyter Notebook
|
Analytics/EntityStoreTools/EntityStoreNotebooks/Process_Aggregate_Measure.ipynb
|
skolbin-ssi/Dynamics-365-FastTrack-Implementation-Assets
|
a7ace0eb3c8f05a2f8b1b5c9451c21e09658fea1
|
[
"MIT"
] | null | null | null |
Analytics/EntityStoreTools/EntityStoreNotebooks/Process_Aggregate_Measure.ipynb
|
skolbin-ssi/Dynamics-365-FastTrack-Implementation-Assets
|
a7ace0eb3c8f05a2f8b1b5c9451c21e09658fea1
|
[
"MIT"
] | null | null | null |
Analytics/EntityStoreTools/EntityStoreNotebooks/Process_Aggregate_Measure.ipynb
|
skolbin-ssi/Dynamics-365-FastTrack-Implementation-Assets
|
a7ace0eb3c8f05a2f8b1b5c9451c21e09658fea1
|
[
"MIT"
] | null | null | null | 34.334347 | 351 | 0.491457 |
[
[
[
"empty"
]
]
] |
[
"empty"
] |
[
[
"empty"
]
] |
4ae9ecb12dca55bc53d95fbff3e8a669066faf24
| 84,450 |
ipynb
|
Jupyter Notebook
|
notebooks/logistic_regression/logistic_regression_with_linear_boundary_demo.ipynb
|
ssameerr/homemade-machine-learning
|
8a0d2917729545a928c24ff563b153380862cb44
|
[
"MIT"
] | 13 |
2019-07-13T21:14:57.000Z
|
2021-11-08T10:43:40.000Z
|
notebooks/logistic_regression/logistic_regression_with_linear_boundary_demo.ipynb
|
hbcbh1999/homemade-machine-learning
|
d5a0679016c6a200991de4df1fa6c31715bb3fdd
|
[
"MIT"
] | null | null | null |
notebooks/logistic_regression/logistic_regression_with_linear_boundary_demo.ipynb
|
hbcbh1999/homemade-machine-learning
|
d5a0679016c6a200991de4df1fa6c31715bb3fdd
|
[
"MIT"
] | 3 |
2019-08-26T12:41:52.000Z
|
2021-04-05T15:18:26.000Z
| 146.614583 | 29,156 | 0.86116 |
[
[
[
"# Logistic Regression With Linear Boundary Demo\n\n> ☝Before moving on with this demo you might want to take a look at:\n> - 📗[Math behind the Logistic Regression](https://github.com/trekhleb/homemade-machine-learning/tree/master/homemade/logistic_regression)\n> - ⚙️[Logistic Regression Source Code](https://github.com/trekhleb/homemade-machine-learning/blob/master/homemade/logistic_regression/logistic_regression.py)\n\n**Logistic regression** is the appropriate regression analysis to conduct when the dependent variable is dichotomous (binary). Like all regression analyses, the logistic regression is a predictive analysis. Logistic regression is used to describe data and to explain the relationship between one dependent binary variable and one or more nominal, ordinal, interval or ratio-level independent variables.\n\nLogistic Regression is used when the dependent variable (target) is categorical.\n\nFor example:\n\n- To predict whether an email is spam (`1`) or (`0`).\n- Whether online transaction is fraudulent (`1`) or not (`0`).\n- Whether the tumor is malignant (`1`) or not (`0`).\n\n> **Demo Project:** In this example we will try to classify Iris flowers into tree categories (`Iris setosa`, `Iris virginica` and `Iris versicolor`) based on `petal_length` and `petal_width` parameters.",
"_____no_output_____"
]
],
[
[
"# To make debugging of logistic_regression module easier we enable imported modules autoreloading feature.\n# By doing this you may change the code of logistic_regression library and all these changes will be available here.\n%load_ext autoreload\n%autoreload 2\n\n# Add project root folder to module loading paths.\nimport sys\nsys.path.append('../..')",
"_____no_output_____"
]
],
[
[
"### Import Dependencies\n\n- [pandas](https://pandas.pydata.org/) - library that we will use for loading and displaying the data in a table\n- [numpy](http://www.numpy.org/) - library that we will use for linear algebra operations\n- [matplotlib](https://matplotlib.org/) - library that we will use for plotting the data\n- [logistic_regression](https://github.com/trekhleb/homemade-machine-learning/blob/master/homemade/logistic_regression/logistic_regression.py) - custom implementation of logistic regression",
"_____no_output_____"
]
],
[
[
"# Import 3rd party dependencies.\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\n\n# Import custom logistic regression implementation.\nfrom homemade.logistic_regression import LogisticRegression",
"_____no_output_____"
]
],
[
[
"### Load the Data\n\nIn this demo we will use [Iris data set](http://archive.ics.uci.edu/ml/datasets/Iris).\n\nThe data set consists of several samples from each of three species of Iris (`Iris setosa`, `Iris virginica` and `Iris versicolor`). Four features were measured from each sample: the length and the width of the sepals and petals, in centimeters. Based on the combination of these four features, [Ronald Fisher](https://en.wikipedia.org/wiki/Iris_flower_data_set) developed a linear discriminant model to distinguish the species from each other.",
"_____no_output_____"
]
],
[
[
"# Load the data.\ndata = pd.read_csv('../../data/iris.csv')\n\n# Print the data table.\ndata.head(10)",
"_____no_output_____"
]
],
[
[
"### Plot the Data\n\nLet's take two parameters `petal_length` and `petal_width` for each flower into consideration and plot the dependency of the Iris class on these two parameters.",
"_____no_output_____"
]
],
[
[
"# List of suppported Iris classes.\niris_types = ['SETOSA', 'VERSICOLOR', 'VIRGINICA']\n\n# Pick the Iris parameters for consideration.\nx_axis = 'petal_length'\ny_axis = 'petal_width'\n\n# Plot the scatter for every type of Iris.\nfor iris_type in iris_types:\n plt.scatter(\n data[x_axis][data['class'] == iris_type],\n data[y_axis][data['class'] == iris_type],\n label=iris_type\n )\n\n# Plot the data. \nplt.xlabel(x_axis + ' (cm)')\nplt.ylabel(y_axis + ' (cm)')\nplt.title('Iris Types')\nplt.legend()\nplt.show()",
"_____no_output_____"
]
],
[
[
"### Prepara the Data for Training\n\nLet's extract `petal_length` and `petal_width` data and form a training feature set and let's also form out training labels set.",
"_____no_output_____"
]
],
[
[
"# Get total number of Iris examples.\nnum_examples = data.shape[0]\n\n# Get features.\nx_train = data[[x_axis, y_axis]].values.reshape((num_examples, 2))\n# Get labels.\ny_train = data['class'].values.reshape((num_examples, 1))",
"_____no_output_____"
]
],
[
[
"### Init and Train Logistic Regression Model\n\n> ☝🏻This is the place where you might want to play with model configuration.\n\n- `polynomial_degree` - this parameter will allow you to add additional polynomial features of certain degree. More features - more curved the line will be.\n- `max_iterations` - this is the maximum number of iterations that gradient descent algorithm will use to find the minimum of a cost function. Low numbers may prevent gradient descent from reaching the minimum. High numbers will make the algorithm work longer without improving its accuracy.\n- `regularization_param` - parameter that will fight overfitting. The higher the parameter, the simplier is the model will be.\n- `polynomial_degree` - the degree of additional polynomial features (`x1^2 * x2, x1^2 * x2^2, ...`). This will allow you to curve the predictions.\n- `sinusoid_degree` - the degree of sinusoid parameter multipliers of additional features (`sin(x), sin(2*x), ...`). This will allow you to curve the predictions by adding sinusoidal component to the prediction curve.",
"_____no_output_____"
]
],
[
[
"# Set up linear regression parameters.\nmax_iterations = 1000 # Max number of gradient descent iterations.\nregularization_param = 0 # Helps to fight model overfitting.\npolynomial_degree = 0 # The degree of additional polynomial features.\nsinusoid_degree = 0 # The degree of sinusoid parameter multipliers of additional features.\n\n# Init logistic regression instance.\nlogistic_regression = LogisticRegression(x_train, y_train, polynomial_degree, sinusoid_degree)\n\n# Train logistic regression.\n(thetas, costs) = logistic_regression.train(regularization_param, max_iterations)\n\n# Print model parameters that have been learned.\npd.DataFrame(thetas, columns=['Theta 1', 'Theta 2', 'Theta 3'], index=['SETOSA', 'VERSICOLOR', 'VIRGINICA'])",
"_____no_output_____"
]
],
[
[
"### Analyze Gradient Descent Progress\n\nThe plot below illustrates how the cost function value changes over each iteration. You should see it decreasing. \n\nIn case if cost function value increases it may mean that gradient descent missed the cost function minimum and with each step it goes further away from it.\n\nFrom this plot you may also get an understanding of how many iterations you need to get an optimal value of the cost function. ",
"_____no_output_____"
]
],
[
[
"# Draw gradient descent progress for each label.\nlabels = logistic_regression.unique_labels\nplt.plot(range(len(costs[0])), costs[0], label=labels[0])\nplt.plot(range(len(costs[1])), costs[1], label=labels[1])\nplt.plot(range(len(costs[2])), costs[2], label=labels[2])\n\nplt.xlabel('Gradient Steps')\nplt.ylabel('Cost')\nplt.legend()\nplt.show()",
"_____no_output_____"
]
],
[
[
"### Calculate Model Training Precision\n\nCalculate how many flowers from the training set have been guessed correctly. ",
"_____no_output_____"
]
],
[
[
"# Make training set predictions.\ny_train_predictions = logistic_regression.predict(x_train)\n\n# Check what percentage of them are actually correct.\nprecision = np.sum(y_train_predictions == y_train) / y_train.shape[0] * 100\n\nprint('Precision: {:5.4f}%'.format(precision))",
"Precision: 96.0000%\n"
]
],
[
[
"### Draw Decision Boundaries\n\nLet's build our decision boundaries. These are the lines that distinguish classes from each other. This will give us a pretty clear overview of how successfull our training process was. You should see clear distinguishment of three sectors on the data plain. ",
"_____no_output_____"
]
],
[
[
"# Get the number of training examples.\nnum_examples = x_train.shape[0]\n\n# Set up how many calculations we want to do along every axis. \nsamples = 150\n\n# Generate test ranges for x and y axis.\nx_min = np.min(x_train[:, 0])\nx_max = np.max(x_train[:, 0])\n\ny_min = np.min(x_train[:, 1])\ny_max = np.max(x_train[:, 1])\n\nX = np.linspace(x_min, x_max, samples)\nY = np.linspace(y_min, y_max, samples)\n\n# z axis will contain our predictions. So let's get predictions for every pair of x and y.\nZ_setosa = np.zeros((samples, samples))\nZ_versicolor = np.zeros((samples, samples))\nZ_virginica = np.zeros((samples, samples))\n\nfor x_index, x in enumerate(X):\n for y_index, y in enumerate(Y):\n data = np.array([[x, y]])\n prediction = logistic_regression.predict(data)[0][0]\n if prediction == 'SETOSA':\n Z_setosa[x_index][y_index] = 1\n elif prediction == 'VERSICOLOR':\n Z_versicolor[x_index][y_index] = 1\n elif prediction == 'VIRGINICA':\n Z_virginica[x_index][y_index] = 1\n\n# Now, when we have x, y and z axes being setup and calculated we may print decision boundaries.\nfor iris_type in iris_types:\n plt.scatter(\n x_train[(y_train == iris_type).flatten(), 0],\n x_train[(y_train == iris_type).flatten(), 1],\n label=iris_type\n )\n\nplt.contour(X, Y, Z_setosa)\nplt.contour(X, Y, Z_versicolor)\nplt.contour(X, Y, Z_virginica)\n \nplt.xlabel(x_axis + ' (cm)')\nplt.ylabel(y_axis + ' (cm)')\nplt.title('Iris Types')\nplt.legend()\nplt.show()",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code"
] |
[
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
]
] |
4ae9f2c22e63298b2b4440caaf62cf35a4f256e9
| 398,333 |
ipynb
|
Jupyter Notebook
|
examples/reinforcement_learning_controllers/tensorforce_dqn_disc_pmsm_example.ipynb
|
54hanxiucao/gym-electric-motor
|
911432388b00675e8a93f4a7937fdc575f106f22
|
[
"MIT"
] | 1 |
2021-03-29T07:47:32.000Z
|
2021-03-29T07:47:32.000Z
|
examples/reinforcement_learning_controllers/tensorforce_dqn_disc_pmsm_example.ipynb
|
54hanxiucao/gym-electric-motor
|
911432388b00675e8a93f4a7937fdc575f106f22
|
[
"MIT"
] | null | null | null |
examples/reinforcement_learning_controllers/tensorforce_dqn_disc_pmsm_example.ipynb
|
54hanxiucao/gym-electric-motor
|
911432388b00675e8a93f4a7937fdc575f106f22
|
[
"MIT"
] | null | null | null | 244.076593 | 144,791 | 0.895643 |
[
[
[
"# Working with Tensorforce to Train a Reinforcement-Learning Agent",
"_____no_output_____"
],
[
"This notebook serves as an educational introduction to the usage of Tensorforce using a gym-electric-motor (GEM) environment. The goal of this notebook is to give an understanding of what tensorforce is and how to use it to train and evaluate a reinforcement learning agent that can solve a current control problem of the GEM toolbox.\n",
"_____no_output_____"
],
[
"## 1. Installation",
"_____no_output_____"
],
[
"Before you can start you need to make sure that you have both gym-electric-motor and tensorforce installed. You can install both easily using pip:\n\n - ```pip install gym-electric-motor```\n - ```pip install tensorforce```\n\nAlternatively, you can install their latest developer version directly from GitHub:\n\n - [GitHub Gym-Electric-Motor](https://github.com/upb-lea/gym-electric-motor)\n - [GitHub Tensorforce](https://github.com/tensorforce/tensorforce)\n\nFor this notebook, the following cell will do the job:",
"_____no_output_____"
]
],
[
[
"!pip install -q git+https://github.com/upb-lea/gym-electric-motor.git tensorforce==0.5.5",
"_____no_output_____"
],
[
"%matplotlib notebook\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom tqdm import tqdm",
"_____no_output_____"
]
],
[
[
"## 2. Setting up a GEM Environment\n\nThe basic idea behind reinforcement learning is to create a so-called agent, that should learn by itself to solve a specified task in a given environment. \nThis environment gives the agent feedback on its actions and reinforces the targeted behavior.\nIn this notebook, the task is to train a controller for the current control of a *permanent magnet synchronous motor* (*PMSM*).\n \nIn the following, the used GEM-environment is briefly presented, but this notebook does not focus directly on the detailed usage of GEM. If you are new to the used environment and interested in finding out what it does and how to use it, you should take a look at the [GEM cookbook](https://colab.research.google.com/github/upb-lea/gym-electric-motor/blob/master/examples/example_notebooks/GEM_cookbook.ipynb).\n\nTo save some space in this notebook, there is a function defined in an external python file called **getting_environment.py**. If you want to know how the environment's parameters are defined you can take a look at that file. By simply calling the **get_env()** function from the external file, you can set up an environment for a *PMSM* with discrete inputs.\n\nThe basic idea of the control setup from the GEM-environment is displayed in the following figure. \n\n\n\nThe agent controls the converter who converts the supply currents to the currents flowing into the motor - for the *PMSM*: $i_{sq}$ and $i_{sd}$\n\nIn the continuous case, the agent's action equals a duty cycle which will be modulated into a corresponding voltage. \n\nIn the discrete case, the agent's actions denote switching states of the converter at the given instant. Here, only a discrete amount of options are available. In this notebook, for the PMSM the *discrete B6 bridge converter* with six switches is utilized per default. This converter provides a total of eight possible actions.\n\n\n\nThe motor schematic is the following:\n\n\n\n\nAnd the electrical ODEs for that motor are:\n\n<h3 align=\"center\">\n\n<!-- $\\frac{\\mathrm{d}i_{sq}}{\\mathrm{d}t} = \\frac{u_{sq}-pL_d\\omega_{me}i_{sd}-R_si_{sq}}{L_q}$\n\n$\\frac{\\mathrm{d}i_{sd}}{\\mathrm{d}t} = \\frac{u_{sd}-pL_q\\omega_{me}i_{sq}-R_si_{sd}}{L_d}$\n\n$\\frac{\\mathrm{d}\\epsilon_{el}}{\\mathrm{d}t} = p\\omega_{me}$\n -->\n\n $ \\frac{\\mathrm{d}i_{sd}}{\\mathrm{d}t}=\\frac{u_{sd} + p\\omega_{me}L_q i_{sq} - R_s i_{sd}}{L_d} $ <br><br>\n $\\frac{\\mathrm{d} i_{sq}}{\\mathrm{d} t}=\\frac{u_{sq} - p \\omega_{me} (L_d i_{sd} + \\mathit{\\Psi}_p) - R_s i_{sq}}{L_q}$ <br><br>\n $\\frac{\\mathrm{d}\\epsilon_{el}}{\\mathrm{d}t} = p\\omega_{me}$\n\n</h3>\n\nThe target for the agent is now to learn to control the currents. For this, a reference generator produces a trajectory that the agent has to follow. \nTherefore, it has to learn a function (policy) from given states, references and rewards to appropriate actions.\n\nFor a deeper understanding of the used models behind the environment see the [documentation](https://upb-lea.github.io/gym-electric-motor/).\nComprehensive learning material to RL is also [freely available](https://github.com/upb-lea/reinforcement_learning_course_materials).",
"_____no_output_____"
]
],
[
[
"import numpy as np\nfrom pathlib import Path\nimport gym_electric_motor as gem\nfrom gym_electric_motor.reference_generators import \\\n MultipleReferenceGenerator,\\\n WienerProcessReferenceGenerator\nfrom gym_electric_motor.visualization import MotorDashboard\nfrom gym_electric_motor.core import Callback\nfrom gym.spaces import Discrete, Box\nfrom gym.wrappers import FlattenObservation, TimeLimit\nfrom gym import ObservationWrapper",
"/home/wilhelmk/tools/anaconda3/envs/tf-cpu/lib/python3.7/site-packages/gym/logger.py:30: UserWarning: \u001b[33mWARN: Box bound precision lowered by casting to float32\u001b[0m\n warnings.warn(colorize('%s: %s'%('WARN', msg % args), 'yellow'))\n"
],
[
"# helper functions and classes\n\nclass FeatureWrapper(ObservationWrapper):\n \"\"\"\n Wrapper class which wraps the environment to change its observation. Serves\n the purpose to improve the agent's learning speed.\n \n It changes epsilon to cos(epsilon) and sin(epsilon). This serves the purpose\n to have the angles -pi and pi close to each other numerically without losing\n any information on the angle.\n \n Additionally, this wrapper adds a new observation i_sd**2 + i_sq**2. This should\n help the agent to easier detect incoming limit violations.\n \"\"\"\n\n def __init__(self, env, epsilon_idx, i_sd_idx, i_sq_idx):\n \"\"\"\n Changes the observation space to fit the new features\n \n Args:\n env(GEM env): GEM environment to wrap\n epsilon_idx(integer): Epsilon's index in the observation array\n i_sd_idx(integer): I_sd's index in the observation array\n i_sq_idx(integer): I_sq's index in the observation array\n \"\"\"\n super(FeatureWrapper, self).__init__(env)\n self.EPSILON_IDX = epsilon_idx\n self.I_SQ_IDX = i_sq_idx\n self.I_SD_IDX = i_sd_idx\n new_low = np.concatenate((self.env.observation_space.low[\n :self.EPSILON_IDX], np.array([-1.]),\n self.env.observation_space.low[\n self.EPSILON_IDX:], np.array([0.])))\n new_high = np.concatenate((self.env.observation_space.high[\n :self.EPSILON_IDX], np.array([1.]),\n self.env.observation_space.high[\n self.EPSILON_IDX:],np.array([1.])))\n\n self.observation_space = Box(new_low, new_high)\n\n def observation(self, observation):\n \"\"\"\n Gets called at each return of an observation. Adds the new features to the\n observation and removes original epsilon.\n \n \"\"\"\n cos_eps = np.cos(observation[self.EPSILON_IDX] * np.pi)\n sin_eps = np.sin(observation[self.EPSILON_IDX] * np.pi)\n currents_squared = observation[self.I_SQ_IDX]**2 + observation[self.I_SD_IDX]**2\n observation = np.concatenate((observation[:self.EPSILON_IDX],\n np.array([cos_eps, sin_eps]),\n observation[self.EPSILON_IDX + 1:],\n np.array([currents_squared])))\n return observation",
"_____no_output_____"
],
[
"# define motor arguments\nmotor_parameter = dict(p=3, # [p] = 1, nb of pole pairs\n r_s=17.932e-3, # [r_s] = Ohm, stator resistance\n l_d=0.37e-3, # [l_d] = H, d-axis inductance\n l_q=1.2e-3, # [l_q] = H, q-axis inductance\n psi_p=65.65e-3, # [psi_p] = Vs, magnetic flux of the permanent magnet\n )\n# supply voltage\nu_sup = 350\n# nominal and absolute state limitations\nnominal_values=dict(omega=4000*2*np.pi/60,\n i=230,\n u=u_sup\n )\nlimit_values=dict(omega=4000*2*np.pi/60,\n i=1.5*230,\n u=u_sup\n )\n# defining reference-generators\nq_generator = WienerProcessReferenceGenerator(reference_state='i_sq')\nd_generator = WienerProcessReferenceGenerator(reference_state='i_sd')\nrg = MultipleReferenceGenerator([q_generator, d_generator])\n# defining sampling interval\ntau = 1e-5\n# defining maximal episode steps\nmax_eps_steps = 10_000\n\n\nmotor_initializer={'random_init': 'uniform', 'interval': [[-230, 230], [-230, 230], [-np.pi, np.pi]]}\nreward_function=gem.reward_functions.WeightedSumOfErrors(\n reward_weights={'i_sq': 10, 'i_sd': 10},\n gamma=0.99, # discount rate \n reward_power=1)\n\n\n# creating gem environment\nenv = gem.make( # define a PMSM with discrete action space\n \"PMSMDisc-v1\",\n # visualize the results\n visualization=MotorDashboard(state_plots=['i_sq', 'i_sd'], reward_plot=True),\n # parameterize the PMSM and update limitations\n motor_parameter=motor_parameter,\n limit_values=limit_values, nominal_values=nominal_values,\n # define the random initialisation for load and motor\n load='ConstSpeedLoad',\n load_initializer={'random_init': 'uniform', },\n motor_initializer=motor_initializer,\n reward_function=reward_function,\n # define the duration of one sampling step\n tau=tau, u_sup=u_sup,\n # turn off terminations via limit violation, parameterize the rew-fct\n reference_generator=rg, ode_solver='euler',\n)\n\n# remove one action from the action space to help the agent speed up its training\n# this can be done as both switchting states (1,1,1) and (-1,-1,-1) - which are encoded\n# by action 0 and 7 - both lead to the same zero voltage vector in alpha/beta-coordinates\nenv.action_space = Discrete(7)\n\n# applying wrappers\neps_idx = env.physical_system.state_names.index('epsilon')\ni_sd_idx = env.physical_system.state_names.index('i_sd')\ni_sq_idx = env.physical_system.state_names.index('i_sq')\nenv = TimeLimit(FeatureWrapper(FlattenObservation(env), \n eps_idx, i_sd_idx, i_sq_idx),\n max_eps_steps)",
"_____no_output_____"
]
],
[
[
"## 3. Using Tensorforce",
"_____no_output_____"
],
[
"To take advantage of some already implemented deep-RL agents, we use the *tensorforce-framework*. It is built on *TensorFlow* and offers agents based on deep Q-networks, policy gradients, or actor-critic algorithms. \n\nFor more information to specific agents or different modules that can be used, some good explanations can be found in the corresponding [documentation](https://tensorforce.readthedocs.io/en/latest/).\n \nFor the control task with a discrete action space we will use a [deep Q-network (DQN)]((https://www.nature.com/articles/nature14236)).",
"_____no_output_____"
],
[
"### 3.1 Defining a Tensorforce-Environment",
"_____no_output_____"
],
[
"Tensorforce requires you to define a *tensorforce-environment*. This is done simply by using the ```Environment.create``` interface, which acts as a wrapper around usual [gym](https://github.com/openai/gym) instances.",
"_____no_output_____"
]
],
[
[
"from tensorforce.environments import Environment\n\n# creating tensorforce environment\ntf_env = Environment.create(environment=env,\n max_episode_timesteps=max_eps_steps)",
"_____no_output_____"
]
],
[
[
"### 3.2 Setting-up a Tensorforce-Agent",
"_____no_output_____"
],
[
"The Agent is created just like the environment. The agent's parameters can be passed as arguments to the ```create()``` function or via a configuration as a dictionary or as *.json* file.\nIn the following, the way via a dictionary is demonstrated.\n\nWith the *tensorforce-framework* it is possible to define own network-architectures like it is shown below.\nFor some parameters, it can be useful to have a decaying value during the training. A possible way for this is also shown in the following code.\n\nThe exact meaning of the used parameters can be found in the already mentioned tensorforce documentation.\n",
"_____no_output_____"
]
],
[
[
"# using a parameter decay for the exploration\nepsilon_decay = {'type': 'decaying',\n 'decay': 'polynomial',\n 'decay_steps': 50000,\n 'unit': 'timesteps',\n 'initial_value': 1.0,\n 'decay_rate': 5e-2,\n 'final_value': 5e-2,\n 'power': 3.0}\n\n# defining a simple network architecture: 2 dense-layers with 64 nodes each\nnet = [\n dict(type='dense', size=64, activation='relu'),\n dict(type='dense', size=64, activation='relu'),\n]\n\n# defining the parameters of a dqn-agent\nagent_config = {\n 'agent': 'dqn',\n 'memory': 200000,\n 'batch_size': 25,\n 'network': net,\n 'update_frequency': 1,\n 'start_updating': 10000,\n 'learning_rate': 1e-4,\n 'discount': 0.99,\n 'exploration': epsilon_decay,\n 'target_sync_frequency': 1000,\n 'target_update_weight': 1.0,\n }",
"_____no_output_____"
],
[
"from tensorforce.agents import Agent\n\ntau = 1e-5\nsimulation_time = 2 # seconds\ntraining_steps = int(simulation_time // tau)\n# creating agent via dictionary\ndqn_agent = Agent.create(agent=agent_config, environment=tf_env)",
"WARNING:tensorflow:From /home/wilhelmk/tools/anaconda3/envs/tf-cpu/lib/python3.7/site-packages/tensorforce/core/module.py:701: calling while_loop_v2 (from tensorflow.python.ops.control_flow_ops) with back_prop=False is deprecated and will be removed in a future version.\nInstructions for updating:\nback_prop=False is deprecated. Consider using tf.stop_gradient instead.\nInstead of:\nresults = tf.while_loop(c, b, vars, back_prop=False)\nUse:\nresults = tf.nest.map_structure(tf.stop_gradient, tf.while_loop(c, b, vars))\nINFO:tensorflow:Graph was finalized.\nINFO:tensorflow:Running local_init_op.\nINFO:tensorflow:Done running local_init_op.\n"
]
],
[
[
"### 3.3 Training the Agent",
"_____no_output_____"
],
[
"Training the agent is executed with the **tensorforce-runner**. The runner stores metrics during the training, like the reward per episode, and can be used to save learned agents. If you just want to experiment a little with an already trained agent, it is possible to skip the next cells and just load a pre-trained agent.",
"_____no_output_____"
]
],
[
[
"from tensorforce.execution import Runner\n\n# create and train the agent\nrunner = Runner(agent=dqn_agent, environment=tf_env)\nrunner.run(num_timesteps=training_steps)",
"Timesteps: 95%|█████████▌| 190670/199999 [11:20<00:32, 286.56it/s, mean_reward=n/a]"
]
],
[
[
"Accessing saved metrics from the runner, it is possible to have a look on the mean reward per episode or the corresponding episode-length. ",
"_____no_output_____"
]
],
[
[
"# accesing the metrics from runner\nrewards = np.asarray(runner.episode_rewards)\nepisode_length = np.asarray(runner.episode_timesteps)\n\n# calculating the mean-reward per episode\nmean_reward = rewards/episode_length\nnum_episodes = len(mean_reward)\n\n# plotting mean-reward over episodes\nf, (ax1, ax2) = plt.subplots(2, 1, sharex=True, figsize=(20,10))\nax1.plot(range(num_episodes), mean_reward, linewidth=3)\n#plt.xticks(fontsize=15)\nax1.set_ylabel('mean-reward', fontsize=22)\nax1.grid(True)\nax1.tick_params(axis=\"y\", labelsize=15) \n# plotting episode length over episodes\nax2.plot(range(num_episodes), episode_length, linewidth=3)\nax2.set_xlabel('# episodes', fontsize=22)\nax2.set_ylabel('episode-length', fontsize=22)\nax2.tick_params(axis=\"y\", labelsize=15) \nax2.tick_params(axis=\"x\", labelsize=15) \nax2.grid(True)\n\nplt.show()\n\nprint('number of episodes during training: ', len(rewards))",
"_____no_output_____"
]
],
[
[
"Saving the agents trained model makes it available for a separate evaluation and further usage.",
"_____no_output_____"
]
],
[
[
"agent_path = Path('saved_agents')\nagent_path.mkdir(parents=True, exist_ok=True)\nagent_name = 'dqn_agent_tensorforce'\nrunner.agent.save(directory=str(agent_path), filename=agent_name)\nprint('\\n agent saved \\n')\nrunner.close()",
"WARNING:tensorflow:From /home/wilhelmk/tools/anaconda3/envs/tf-cpu/lib/python3.7/site-packages/tensorforce/core/models/model.py:1508: remove_training_nodes (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\nInstructions for updating:\nUse `tf.compat.v1.graph_util.remove_training_nodes`\nWARNING:tensorflow:From /home/wilhelmk/tools/anaconda3/envs/tf-cpu/lib/python3.7/site-packages/tensorforce/core/models/model.py:1516: convert_variables_to_constants (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\nInstructions for updating:\nUse `tf.compat.v1.graph_util.convert_variables_to_constants`\nWARNING:tensorflow:From /home/wilhelmk/tools/anaconda3/envs/tf-cpu/lib/python3.7/site-packages/tensorflow/python/framework/convert_to_constants.py:854: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\nInstructions for updating:\nUse `tf.compat.v1.graph_util.extract_sub_graph`\n"
]
],
[
[
"\n",
"_____no_output_____"
],
[
"## 4. Evaluating the Trained Agent",
"_____no_output_____"
],
[
"### 4.1 Loading a Model",
"_____no_output_____"
],
[
"If a previously saved agent is available, it can be restored by using the runner to load the model with the ```load()``` function. To load the agent it is necessary to pass the directory, the filename, the environment, and the agent configuration used for the training.",
"_____no_output_____"
]
],
[
[
"from tensorforce import Agent\n\ndqn_agent = Agent.load(\n directory=str(agent_path),\n filename=agent_name,\n environment=tf_env,\n **agent_config\n)\nprint('\\n agent loaded \\n')",
"INFO:tensorflow:Graph was finalized.\nINFO:tensorflow:Running local_init_op.\nINFO:tensorflow:Done running local_init_op.\nINFO:tensorflow:Restoring parameters from saved_agents/dqn_agent_tensorforce\n\n agent loaded \n\n"
]
],
[
[
"### 4.3 Evaluating the Agent",
"_____no_output_____"
],
[
"To use the trained agent as a controller, a typical loop to interact with the environment can be used, which is displayed in the cell below.\n\nNow the agent takes the observations from the environment and reacts with an action, which is used to control the environment. To get an impression of how the trained agent performs, the trajectory of the control-states can be observed. A live-plot will be displayed in a jupyter-notebook. If you are using jupyter-lab, the following cell could cause problems regarding the visualization.",
"_____no_output_____"
]
],
[
[
"%matplotlib notebook\n\n# currently the visualization crashes for larger values, than the defined value\nvisualization_steps = int(9e4) \nobs = env.reset()\nfor step in range(visualization_steps):\n # getting the next action from the agent\n actions = dqn_agent.act(obs, evaluation=True)\n # the env return the next state, reward and the information, if the state is terminal\n obs, reward, done, _ = env.step(action=actions)\n # activating the visualization\n env.render()\n\n if done:\n # reseting the env, if a terminal state is reached\n obs = env.reset()\n",
"_____no_output_____"
]
],
[
[
"In the next example a classic *environment-interaction loop* can be extended to access different metrics and values, e.g. the cumulated reward over all steps. The number of evaluation-steps can be reduced, but a higher variance of the evaluation result must then be accepted.",
"_____no_output_____"
]
],
[
[
"# test agent\nsteps = 250000\n\nrewards = []\nepisode_lens = []\n\nobs = env.reset()\nterminal = False\ncumulated_rew = 0\nstep_counter = 0\nepisode_rew = 0\n\nfor step in (range(steps)):\n actions = dqn_agent.act(obs, evaluation=True)\n obs, reward, done, _ = env.step(action=actions)\n \n cumulated_rew += reward\n episode_rew += reward\n \n step_counter += 1\n\n if done:\n rewards.append(episode_rew)\n episode_lens.append(step_counter)\n episode_rew = 0\n step_counter = 0\n \n obs = env.reset()\n done = False\n\nprint(f' \\n Cumulated reward per step is {cumulated_rew/steps} \\n')\nprint(f' \\n Number of episodes Reward {len(episode_lens)} \\n')\n\n\n",
" \n Cumulated reward per step is -1.9074805558363808 \n\n \n Number of episodes Reward 41 \n\n"
],
[
"%matplotlib inline\n# accesing the metrics from runner\nrewards = np.asarray(rewards)\nepisode_length = np.asarray(episode_lens)\n# calculating the mean-reward per episode\nmean_reward = rewards/episode_length\nnum_episodes = len(rewards)\n\n# plotting mean-reward over episodes\nf, (ax1, ax2) = plt.subplots(2, 1, sharex=True, figsize=(20, 10))\nax1.plot(range(num_episodes), mean_reward, linewidth=3)\n#plt.xticks(fontsize=15)\nax1.set_ylabel('reward', fontsize=22)\nax1.grid(True)\nax1.tick_params(axis=\"y\", labelsize=15) \n# plotting episode length over episodes\nax2.plot(range(num_episodes), episode_length, linewidth=3)\nax2.set_xlabel('# episodes', fontsize=22)\nax2.set_ylabel('episode-length', fontsize=20)\nax2.tick_params(axis=\"y\", labelsize=15) \nax2.tick_params(axis=\"x\", labelsize=15) \n\nax2.grid(True)\n\nplt.show()\n\nprint('number of episodes during training: ', len(episode_lens))",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code"
] |
[
[
"markdown",
"markdown",
"markdown",
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown",
"markdown",
"markdown",
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code",
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown",
"markdown",
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
]
] |
4ae9fd14055db60dde7ad106dd3bc955ae5edc83
| 546,216 |
ipynb
|
Jupyter Notebook
|
lesson2/Applied 9 Auto.ipynb
|
iamkartik/ISLR-python
|
70813413b4ae0070f5e6e538c7566f31467329eb
|
[
"MIT"
] | null | null | null |
lesson2/Applied 9 Auto.ipynb
|
iamkartik/ISLR-python
|
70813413b4ae0070f5e6e538c7566f31467329eb
|
[
"MIT"
] | null | null | null |
lesson2/Applied 9 Auto.ipynb
|
iamkartik/ISLR-python
|
70813413b4ae0070f5e6e538c7566f31467329eb
|
[
"MIT"
] | null | null | null | 663.688943 | 473,240 | 0.93972 |
[
[
[
"import warnings\nwarnings.filterwarnings('ignore')\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n%matplotlib inline",
"_____no_output_____"
],
[
"auto = pd.read_csv('../datasets/Auto.csv')",
"_____no_output_____"
],
[
"auto.head()",
"_____no_output_____"
]
],
[
[
"Quantitative - mpg, cylinders,displacement,horsepower,weight,acceleration,year\n\n\nQualitative - origin ,name ",
"_____no_output_____"
]
],
[
[
"auto.nunique()",
"_____no_output_____"
],
[
"auto[auto['horsepower']=='?']",
"_____no_output_____"
],
[
"# horsepower is object converting to float\nauto['horsepower'] = auto['horsepower'].apply(lambda x:float(x) if x!='?' else 0)",
"_____no_output_____"
],
[
"auto.info()",
"<class 'pandas.core.frame.DataFrame'>\nRangeIndex: 397 entries, 0 to 396\nData columns (total 9 columns):\nmpg 397 non-null float64\ncylinders 397 non-null int64\ndisplacement 397 non-null float64\nhorsepower 397 non-null object\nweight 397 non-null int64\nacceleration 397 non-null float64\nyear 397 non-null int64\norigin 397 non-null int64\nname 397 non-null object\ndtypes: float64(3), int64(4), object(2)\nmemory usage: 28.0+ KB\n"
],
[
"auto.describe()",
"_____no_output_____"
],
[
"auto[auto.columns[0:7]].max()",
"_____no_output_____"
],
[
"\nauto[auto.columns[0:7]].min() ",
"_____no_output_____"
],
[
"auto.drop(auto.index[10:85]).describe()",
"_____no_output_____"
],
[
"sns.pairplot(auto)",
"_____no_output_____"
]
],
[
[
"mpg is strongly correlated with acceleration , weight , horsepower and displacement",
"_____no_output_____"
]
],
[
[
"sns.heatmap(auto.corr(),annot=True)",
"_____no_output_____"
]
]
] |
[
"code",
"markdown",
"code",
"markdown",
"code"
] |
[
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code"
]
] |
4aea18a0fd70eccec6e18166c42eca2641a2a0de
| 136,834 |
ipynb
|
Jupyter Notebook
|
sample_plot.ipynb
|
saurabhwjha/astroplots
|
c0bfcf9e976124bd525dbb63190091bf56e13481
|
[
"MIT"
] | null | null | null |
sample_plot.ipynb
|
saurabhwjha/astroplots
|
c0bfcf9e976124bd525dbb63190091bf56e13481
|
[
"MIT"
] | null | null | null |
sample_plot.ipynb
|
saurabhwjha/astroplots
|
c0bfcf9e976124bd525dbb63190091bf56e13481
|
[
"MIT"
] | null | null | null | 346.41519 | 40,296 | 0.929732 |
[
[
[
"import numpy as np \nimport matplotlib.pyplot as plt \n%matplotlib inline",
"_____no_output_____"
],
[
"p = plt.rcParams.find_all(pattern='size')\n#plt.rcParams['font.size'] = 14\np",
"_____no_output_____"
],
[
"def scale_text(scale='bigger',fig_adj=False):\n if isinstance(scale,str):\n if scale=='bigger':\n scale = 1.25\n elif scale=='smaller':\n scale = 0.8\n elif scale=='default':\n \n size_params = plt.rcParams.find_all(pattern='font.size')\n size_params.update(plt.rcParams.find_all(pattern='labelsize'))\n \n fig_sizes = plt.rcParams['figure.figsize']\n if fig_adj:\n plt.rcParams['figure.figsize'] = [fig_sizes[0]*scale,fig_sizes[1]*scale]\n for i in size_params:\n if isinstance(plt.rcParams[i],float):\n plt.rcParams[i]*=scale\n \n \n \n \n ",
"_____no_output_____"
],
[
"scale_text('smaller')",
"_____no_output_____"
],
[
"def squarefig(fold_on='x'):\n sizes = plt.rcParams['figure.figsize']\n if fold_on == 'x':\n plt.rcParams['figure.figsize'] = [sizes[0],sizes[0]]\n elif fold_on == 'y':\n plt.rcParams['figure.figsize'] = [sizes[1],sizes[1]]\n",
"_____no_output_____"
],
[
"squarefig()",
"_____no_output_____"
],
[
"plt.show()",
"_____no_output_____"
],
[
"def demo():\n ews = np.loadtxt('measured_brg_ews.txt',usecols=(1,2,3,4,5))\n ews = ews.T \n\n measured_ews = ews[0]\n measured_ew_unc = ews[1]\n measured_ew_unc_log = 0.434 * (measured_ew_unc / measured_ews)\n joel_ews = ews[3]\n joel_minus = ews[2]\n joel_plus = ews[4]\n joel_errs = np.array([joel_ews-joel_minus,joel_plus-joel_ews])\n joel_errs_log = 0.434 * (joel_errs / joel_ews)\n #plot_bounds = np.array([np.max([measured_ews,joel_plus]),np.max([measured_ews,joel_plus])])\n #plt.rcParams.update({'font.size': 15})\n fig, ax = plt.subplots()\n ax.errorbar(np.log10(joel_ews),np.log10(measured_ews),yerr=measured_ew_unc_log,xerr=joel_errs_log,fmt='None',color='#113166',alpha=0.15)\n ax.plot(np.log10(joel_ews),np.log10(measured_ews),'s',color='#006289',ms=7,alpha=0.9)\n #ax.plot([0.0001,np.max([measured_ews,joel_plus])],[0.0001,np.max([measured_ews,joel_plus])],color='k',alpha=0.8)\n #plt.subplots_adjust(right=0.98,top=0.98)\n #ax.set_xscale('log')\n #ax.set_yscale('log')\n #ax.tick_params(axis='both',which='both',direction='in',top=True,right=True)\n ax.set_ylabel('log EW[Br-$\\gamma$] (Measured)')\n ax.set_xlabel('log EW[Br-$\\gamma$] (predicted from photometry)')\n ax.set_xlim((-0.3,1.8))\n ax.set_ylim((-1.05,2.5))\n #ax.set_xticks([-0.5,0.0,0.5,1.0,])\n #ax.set_yticks([-0.5,0.0,0.5,1.0,1.5])\n ax.plot([-5,5],[-5,5],'k',alpha=0.5)\n ax.text(1.6,-0.72,'mean offset = 0.07 dex',horizontalalignment='right')\n ax.text(1.6,-0.9,'biweight scatter = 0.27 dex',horizontalalignment='right')\n #ax.plot(0.55,-0.48,'v',color='#7c0b0b',alpha=0.8)\n plt.show()\n\n #residuals = measured_ews - joel_ews \n #std = np.log10(np.std(residuals))\n #print(std)\n\n\n\n #fig2, ax2 = plt.subplots(figsize=(5,5))\n #ax2.errorbar(measured_ews,joel_ews-measured_ews,yerr=joel_errs,xerr=measured_ew_unc,fmt='s',alpha=0.8)\n #plt.show()",
"_____no_output_____"
],
[
"class Astroplots():\n def __init__(self):\n self.orig_params = plt.rcParams.copy()\n \n def default_all(self):\n for i in plt.rcParams.keys():\n plt.rcParams[i] = self.orig_params[i]\n \n def squarefig(self,fold_on='x'):\n sizes = plt.rcParams['figure.figsize']\n if fold_on == 'x':\n plt.rcParams['figure.figsize'] = [sizes[0],sizes[0]]\n elif fold_on == 'y':\n plt.rcParams['figure.figsize'] = [sizes[1],sizes[1]]\n \n def bigger_onplot_text(self,scale):\n plt.rcParams['figure.fontsize']*=scale\n \n def scale_text(self,scale='bigger',fig_adj=False):\n if isinstance(scale,str):\n if scale=='bigger':\n scale = 1.25\n elif scale=='smaller':\n scale = 0.8\n elif scale=='default':\n pass\n size_params = plt.rcParams.find_all(pattern='font.size')\n size_params.update(plt.rcParams.find_all(pattern='labelsize'))\n \n fig_sizes = plt.rcParams['figure.figsize']\n if fig_adj:\n plt.rcParams['figure.figsize'] = [fig_sizes[0]*scale,fig_sizes[1]*scale]\n for i in size_params:\n if isinstance(plt.rcParams[i],float):\n plt.rcParams[i]*=scale",
"_____no_output_____"
],
[
"astroplots = Astroplots()",
"_____no_output_____"
],
[
"astroplots.default_all()",
"_____no_output_____"
],
[
"astroplots.squarefig()",
"_____no_output_____"
],
[
"astroplots.scale_text(1.5,fig_adj=True)",
"_____no_output_____"
],
[
"demo()",
"_____no_output_____"
],
[
"astroplots.default_all()\ndemo()",
"_____no_output_____"
],
[
"astroplots.default_all()\nastroplots.squarefig()\nastroplots.scale_text(1.2,fig_adj=True)\ndemo()\n",
"_____no_output_____"
],
[
"astroplots.default_all()\nastroplots.squarefig()\nastroplots.scale_text(0.8,fig_adj=False)\ndemo()",
"_____no_output_____"
],
[
"astroplots.default_all()\nastroplots.squarefig()\nastroplots.scale_text([1,2,3])\ndemo()",
"_____no_output_____"
]
]
] |
[
"code"
] |
[
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
]
] |
4aea1a96126a2a7cbfcc65088c9d882028dfd397
| 23,313 |
ipynb
|
Jupyter Notebook
|
deeplearning.ai/nlp/c3_w1_03_trax_intro_2.ipynb
|
martin-fabbri/colab-notebooks
|
03658a7772fbe71612e584bbc767009f78246b6b
|
[
"Apache-2.0"
] | 8 |
2020-01-18T18:39:49.000Z
|
2022-02-17T19:32:26.000Z
|
deeplearning.ai/nlp/c3_w1_03_trax_intro_2.ipynb
|
martin-fabbri/colab-notebooks
|
03658a7772fbe71612e584bbc767009f78246b6b
|
[
"Apache-2.0"
] | null | null | null |
deeplearning.ai/nlp/c3_w1_03_trax_intro_2.ipynb
|
martin-fabbri/colab-notebooks
|
03658a7772fbe71612e584bbc767009f78246b6b
|
[
"Apache-2.0"
] | 6 |
2020-01-18T18:40:02.000Z
|
2020-09-27T09:26:38.000Z
| 23,313 | 23,313 | 0.688672 |
[
[
[
"<a href=\"https://colab.research.google.com/github/martin-fabbri/colab-notebooks/blob/master/deeplearning.ai/nlp/c3_w1_03_trax_intro_2.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>",
"_____no_output_____"
],
[
"# Trax : Ungraded Lecture Notebook\n\nIn this notebook you'll get to know about the Trax framework and learn about some of its basic building blocks.\n\n",
"_____no_output_____"
],
[
"## Background\n\n### Why Trax and not TensorFlow or PyTorch?\n\nTensorFlow and PyTorch are both extensive frameworks that can do almost anything in deep learning. They offer a lot of flexibility, but that often means verbosity of syntax and extra time to code.\n\nTrax is much more concise. It runs on a TensorFlow backend but allows you to train models with 1 line commands. Trax also runs end to end, allowing you to get data, model and train all with a single terse statements. This means you can focus on learning, instead of spending hours on the idiosyncrasies of big framework implementation.\n\n### Why not Keras then?\n\nKeras is now part of Tensorflow itself from 2.0 onwards. Also, trax is good for implementing new state of the art algorithms like Transformers, Reformers, BERT because it is actively maintained by Google Brain Team for advanced deep learning tasks. It runs smoothly on CPUs,GPUs and TPUs as well with comparatively lesser modifications in code.\n\n### How to Code in Trax\nBuilding models in Trax relies on 2 key concepts:- **layers** and **combinators**.\nTrax layers are simple objects that process data and perform computations. They can be chained together into composite layers using Trax combinators, allowing you to build layers and models of any complexity.\n\n### Trax, JAX, TensorFlow and Tensor2Tensor\n\nYou already know that Trax uses Tensorflow as a backend, but it also uses the JAX library to speed up computation too. You can view JAX as an enhanced and optimized version of numpy. \n\n**Watch out for assignments which import `import trax.fastmath.numpy as np`. If you see this line, remember that when calling `np` you are really calling Trax’s version of numpy that is compatible with JAX.**\n\nAs a result of this, where you used to encounter the type `numpy.ndarray` now you will find the type `jax.interpreters.xla.DeviceArray`.\n\nTensor2Tensor is another name you might have heard. It started as an end to end solution much like how Trax is designed, but it grew unwieldy and complicated. So you can view Trax as the new improved version that operates much faster and simpler.\n\n### Resources\n\n- Trax source code can be found on Github: [Trax](https://github.com/google/trax)\n- JAX library: [JAX](https://jax.readthedocs.io/en/latest/index.html)\n",
"_____no_output_____"
],
[
"## Installing Trax\n\nTrax has dependencies on JAX and some libraries like JAX which are yet to be supported in [Windows](https://github.com/google/jax/blob/1bc5896ee4eab5d7bb4ec6f161d8b2abb30557be/README.md#installation) but work well in Ubuntu and MacOS. We would suggest that if you are working on Windows, try to install Trax on WSL2. \n\nOfficial maintained documentation - [trax-ml](https://trax-ml.readthedocs.io/en/latest/) not to be confused with this [TraX](https://trax.readthedocs.io/en/latest/index.html)",
"_____no_output_____"
]
],
[
[
"%%capture\n!pip install trax==1.3.1",
"_____no_output_____"
]
],
[
[
"\n## Imports",
"_____no_output_____"
]
],
[
[
"%%capture\nimport numpy as np # regular ol' numpy\n\nfrom trax import layers as tl # core building block\nfrom trax import shapes # data signatures: dimensionality and type\nfrom trax import fastmath # uses jax, offers numpy on steroids",
"_____no_output_____"
],
[
"# Trax version 1.3.1 or better \n!pip list | grep trax",
"trax 1.3.1 \n"
]
],
[
[
"## Layers\nLayers are the core building blocks in Trax or as mentioned in the lectures, they are the base classes.\n\nThey take inputs, compute functions/custom calculations and return outputs.\n\nYou can also inspect layer properties. Let me show you some examples.\n",
"_____no_output_____"
],
[
"### Relu Layer\nFirst I'll show you how to build a relu activation function as a layer. A layer like this is one of the simplest types. Notice there is no object initialization so it works just like a math function.\n\n**Note: Activation functions are also layers in Trax, which might look odd if you have been using other frameworks for a longer time.**",
"_____no_output_____"
]
],
[
[
"# Layers\n# Create a relu trax layer\nrelu = tl.Relu()\n\n# Inspect properties\nprint(\"-- Properties --\")\nprint(\"name :\", relu.name)\nprint(\"expected inputs :\", relu.n_in)\nprint(\"promised outputs :\", relu.n_out, \"\\n\")\n\n# Inputs\nx = np.array([-2, -1, 0, 1, 2])\nprint(\"-- Inputs --\")\nprint(\"x :\", x, \"\\n\")\n\n# Outputs\ny = relu(x)\nprint(\"-- Outputs --\")\nprint(\"y :\", y)",
"-- Properties --\nname : Relu\nexpected inputs : 1\npromised outputs : 1 \n\n-- Inputs --\nx : [-2 -1 0 1 2] \n\n-- Outputs --\ny : [0 0 0 1 2]\n"
]
],
[
[
"### Concatenate Layer\nNow I'll show you how to build a layer that takes 2 inputs. Notice the change in the expected inputs property from 1 to 2.",
"_____no_output_____"
]
],
[
[
"# Create a concatenate trax layer\nconcat = tl.Concatenate()\nprint(\"-- Properties --\")\nprint(\"name :\", concat.name)\nprint(\"expected inputs :\", concat.n_in)\nprint(\"promised outputs :\", concat.n_out, \"\\n\")\n\n# Inputs\nx1 = np.array([-10, -20, -30])\nx2 = x1 / -10\nprint(\"-- Inputs --\")\nprint(\"x1 :\", x1)\nprint(\"x2 :\", x2, \"\\n\")\n\n# Outputs\ny = concat([x1, x2])\nprint(\"-- Outputs --\")\nprint(\"y :\", y)",
"-- Properties --\nname : Concatenate\nexpected inputs : 2\npromised outputs : 1 \n\n-- Inputs --\nx1 : [-10 -20 -30]\nx2 : [1. 2. 3.] \n\n-- Outputs --\ny : [-10. -20. -30. 1. 2. 3.]\n"
]
],
[
[
"## Layers are Configurable\nYou can change the default settings of layers. For example, you can change the expected inputs for a concatenate layer from 2 to 3 using the optional parameter `n_items`.",
"_____no_output_____"
]
],
[
[
"# Configure a concatenate layer\nconcat_3 = tl.Concatenate(n_items=3) # configure the layer's expected inputs\nprint(\"-- Properties --\")\nprint(\"name :\", concat_3.name)\nprint(\"expected inputs :\", concat_3.n_in)\nprint(\"promised outputs :\", concat_3.n_out, \"\\n\")\n\n# Inputs\nx1 = np.array([-10, -20, -30])\nx2 = x1 / -10\nx3 = x2 * 0.99\nprint(\"-- Inputs --\")\nprint(\"x1 :\", x1)\nprint(\"x2 :\", x2)\nprint(\"x3 :\", x3, \"\\n\")\n\n# Outputs\ny = concat_3([x1, x2, x3])\nprint(\"-- Outputs --\")\nprint(\"y :\", y)",
"-- Properties --\nname : Concatenate\nexpected inputs : 3\npromised outputs : 1 \n\n-- Inputs --\nx1 : [-10 -20 -30]\nx2 : [1. 2. 3.]\nx3 : [0.99 1.98 2.97] \n\n-- Outputs --\ny : [-10. -20. -30. 1. 2. 3. 0.99 1.98 2.97]\n"
]
],
[
[
"**Note: At any point,if you want to refer the function help/ look up the [documentation](https://trax-ml.readthedocs.io/en/latest/) or use help function.**",
"_____no_output_____"
]
],
[
[
"#help(tl.Concatenate) #Uncomment this to see the function docstring with explaination",
"_____no_output_____"
]
],
[
[
"## Layers can have Weights\nSome layer types include mutable weights and biases that are used in computation and training. Layers of this type require initialization before use.\n\nFor example the `LayerNorm` layer calculates normalized data, that is also scaled by weights and biases. During initialization you pass the data shape and data type of the inputs, so the layer can initialize compatible arrays of weights and biases.",
"_____no_output_____"
]
],
[
[
"# Uncomment any of them to see information regarding the function\n# help(tl.LayerNorm)\n# help(shapes.signature)\n",
"_____no_output_____"
],
[
"# Layer initialization\nnorm = tl.LayerNorm()\n\n# You first must know what the input data will look like\nx = np.array([0, 1, 2, 3], dtype=\"float\")\n\n# Use the input data signature to get shape and type for initializing weights and biases\n# We need to convert the input datatype from usual tuple to trax ShapeDtype\nnorm.init(shapes.signature(x))\n\nprint(\"Normal shape:\",x.shape, \"Data Type:\",type(x.shape))\nprint(\"Shapes Trax:\",shapes.signature(x),\"Data Type:\",type(shapes.signature(x)))\n\n# Inspect properties\nprint(\"-- Properties --\")\nprint(\"name :\", norm.name)\nprint(\"expected inputs :\", norm.n_in)\nprint(\"promised outputs :\", norm.n_out)\n# Weights and biases\nprint(\"weights :\", norm.weights[0])\nprint(\"biases :\", norm.weights[1], \"\\n\")\n\n# Inputs\nprint(\"-- Inputs --\")\nprint(\"x :\", x)\n\n# Outputs\ny = norm(x)\nprint(\"-- Outputs --\")\nprint(\"y :\", y)",
"Normal shape: (4,) Data Type: <class 'tuple'>\nShapes Trax: ShapeDtype{shape:(4,), dtype:float64} Data Type: <class 'trax.shapes.ShapeDtype'>\n-- Properties --\nname : LayerNorm\nexpected inputs : 1\npromised outputs : 1\nweights : [1. 1. 1. 1.]\nbiases : [0. 0. 0. 0.] \n\n-- Inputs --\nx : [0. 1. 2. 3.]\n-- Outputs --\ny : [-1.3416404 -0.44721344 0.44721344 1.3416404 ]\n"
]
],
[
[
"## Custom Layers\nThis is where things start getting more interesting!\nYou can create your own custom layers too and define custom functions for computations by using `tl.Fn`. Let me show you how.",
"_____no_output_____"
]
],
[
[
"#help(tl.Fn)",
"_____no_output_____"
],
[
"# Define a custom layer\n# In this example you will create a layer to calculate the input times 2\ndef TimesTwo():\n layer_name = \"TimesTwo\"\n\n def func(x):\n return x * 2\n\n return tl.Fn(layer_name, func)\n\n# Test it\ntimes_two = TimesTwo()\n\n# Inspect properties\nprint(\"-- Properties --\")\nprint(\"name :\", times_two.name)\nprint(\"expected inputs :\", times_two.n_in)\nprint(\"promised outputs :\", times_two.n_out, \"\\n\")\n\n# Inputs\nx = np.array([1, 2, 3])\nprint(\"-- Inputs --\")\nprint(\"x :\", x, \"\\n\")\n\n# Outputs\ny = times_two(x)\nprint(\"-- Outputs --\")\nprint(\"y :\", y)",
"-- Properties --\nname : TimesTwo\nexpected inputs : 1\npromised outputs : 1 \n\n-- Inputs --\nx : [1 2 3] \n\n-- Outputs --\ny : [2 4 6]\n"
]
],
[
[
"## Combinators\nYou can combine layers to build more complex layers. Trax provides a set of objects named combinator layers to make this happen. Combinators are themselves layers, so behavior commutes.\n\n",
"_____no_output_____"
],
[
"### Serial Combinator\nThis is the most common and easiest to use. For example could build a simple neural network by combining layers into a single layer using the `Serial` combinator. This new layer then acts just like a single layer, so you can inspect intputs, outputs and weights. Or even combine it into another layer! Combinators can then be used as trainable models. _Try adding more layers_\n\n**Note:As you must have guessed, if there is serial combinator, there must be a parallel combinator as well. Do try to explore about combinators and other layers from the trax documentation and look at the repo to understand how these layers are written.**\n",
"_____no_output_____"
]
],
[
[
"# help(tl.Serial)\n# help(tl.Parallel)",
"_____no_output_____"
],
[
"# Serial combinator\nserial = tl.Serial(\n tl.LayerNorm(),\n tl.Relu(),\n times_two, \n)\n\n# Initialization\nx = np.array([-2, -1, 0, 1, 2])\nserial.init(shapes.signature(x))\n\nprint(\"-- Serial Model --\")\nprint(serial,\"\\n\")\nprint(\"-- Properties --\")\nprint(\"name :\", serial.name)\nprint(\"sublayers :\", serial.sublayers)\nprint(\"expected inputs :\", serial.n_in)\nprint(\"promised outputs :\", serial.n_out)\nprint(\"weights & biases:\", serial.weights, \"\\n\")\n\n# Inputs\nprint(\"-- Inputs --\")\nprint(\"x :\", x, \"\\n\")\n\n# Outputs\ny = serial(x)\nprint(\"-- Outputs --\")\nprint(\"y :\", y)",
"-- Serial Model --\nSerial[\n LayerNorm\n Relu\n TimesTwo\n] \n\n-- Properties --\nname : Serial\nsublayers : [LayerNorm, Relu, TimesTwo]\nexpected inputs : 1\npromised outputs : 1\nweights & biases: [(DeviceArray([1, 1, 1, 1, 1], dtype=int32), DeviceArray([0, 0, 0, 0, 0], dtype=int32)), (), ()] \n\n-- Inputs --\nx : [-2 -1 0 1 2] \n\n-- Outputs --\ny : [0. 0. 0. 1.4142132 2.8284264]\n"
]
],
[
[
"## JAX\nJust remember to lookout for which numpy you are using, the regular ol' numpy or Trax's JAX compatible numpy. Both tend to use the alias np so watch those import blocks.\n\n**Note:There are certain things which are still not possible in fastmath.numpy which can be done in numpy so you will see in assignments we will switch between them to get our work done.**",
"_____no_output_____"
]
],
[
[
"# Numpy vs fastmath.numpy have different data types\n# Regular ol' numpy\nx_numpy = np.array([1, 2, 3])\nprint(\"good old numpy : \", type(x_numpy), \"\\n\")\n\n# Fastmath and jax numpy\nx_jax = fastmath.numpy.array([1, 2, 3])\nprint(\"jax trax numpy : \", type(x_jax))",
"good old numpy : <class 'numpy.ndarray'> \n\njax trax numpy : <class 'jax.interpreters.xla._DeviceArray'>\n"
]
],
[
[
"## Summary\nTrax is a concise framework, built on TensorFlow, for end to end machine learning. The key building blocks are layers and combinators. This notebook is just a taste, but sets you up with some key inuitions to take forward into the rest of the course and assignments where you will build end to end models.",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown"
] |
[
[
"markdown",
"markdown",
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown",
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
]
] |
4aea211ad588b9c278ab677e2ee0b9efac1189a3
| 58,714 |
ipynb
|
Jupyter Notebook
|
Data Science and Machine Learning/Machine-Learning-In-Python-THOROUGH/EXAMPLES/FINITE_ELEMENTS/INTRO/EXERCICES/05_CABLE_SIN.ipynb
|
okara83/Becoming-a-Data-Scientist
|
f09a15f7f239b96b77a2f080c403b2f3e95c9650
|
[
"MIT"
] | null | null | null |
Data Science and Machine Learning/Machine-Learning-In-Python-THOROUGH/EXAMPLES/FINITE_ELEMENTS/INTRO/EXERCICES/05_CABLE_SIN.ipynb
|
okara83/Becoming-a-Data-Scientist
|
f09a15f7f239b96b77a2f080c403b2f3e95c9650
|
[
"MIT"
] | null | null | null |
Data Science and Machine Learning/Machine-Learning-In-Python-THOROUGH/EXAMPLES/FINITE_ELEMENTS/INTRO/EXERCICES/05_CABLE_SIN.ipynb
|
okara83/Becoming-a-Data-Scientist
|
f09a15f7f239b96b77a2f080c403b2f3e95c9650
|
[
"MIT"
] | 2 |
2022-02-09T15:41:33.000Z
|
2022-02-11T07:47:40.000Z
| 240.631148 | 31,176 | 0.901046 |
[
[
[
"import matplotlib.pyplot as plt\n\ndef model():\n \"\"\"Solve u'' = -1, u(0)=0, u'(1)=0.\"\"\"\n import sympy as sym\n x, c_0, c_1, = sym.symbols('x c_0 c_1')\n u_x = sym.integrate(1, (x, 0, x)) + c_0\n u = sym.integrate(u_x, (x, 0, x)) + c_1\n r = sym.solve([u.subs(x,0) - 0,\n sym.diff(u,x).subs(x, 1) - 0],\n [c_0, c_1])\n u = u.subs(c_0, r[c_0]).subs(c_1, r[c_1])\n u = sym.simplify(sym.expand(u))\n return u\n\ndef midpoint_rule(f, M=100000):\n \"\"\"Integrate f(x) over [0,1] using M intervals.\"\"\"\n from numpy import sum, linspace\n dx = 1.0/M # interval length\n x = linspace(dx/2, 1-dx/2, M) # integration points\n return dx*sum(f(x))\n\ndef check_integral_b():\n from numpy import pi, sin\n for i in range(12):\n exact = 2/(pi*(2*i+1))\n numerical = midpoint_rule(\n f=lambda x: sin((2*i+1)*pi*x/2))\n print((i, abs(exact - numerical)))\n\ndef sine_sum(x, N):\n s = 0\n from numpy import pi, sin, zeros\n u = [] # u[k] is the sum i=0,...,k\n k = 0\n for i in range(N+1):\n s += - 16.0/((2*i+1)**3*pi**3)*sin((2*i+1)*pi*x/2)\n u.append(s.copy()) # important with copy!\n return u\n\ndef plot_sine_sum():\n from numpy import linspace\n x = linspace(0, 1, 501) # coordinates for plot\n u = sine_sum(x, N=10)\n u_e = 0.5*x*(x-2)\n N_values = 0, 1, 10\n for k in N_values:\n plt.plot(x, u[k])\n plt.plot(x, u_e)\n plt.legend(['N=%d' % k for k in N_values] + ['exact'],\n loc='upper right')\n plt.xlabel('$x$'); plt.ylabel('$u$')\n plt.savefig('tmpc.png'); plt.savefig('tmpc.pdf')\n\ndef check_integral_d():\n from numpy import pi, sin\n for i in range(24):\n if i % 2 == 0:\n exact = 2/(pi*(i+1))\n elif (i-1) % 4 == 0:\n exact = 2*2/(pi*(i+1))\n else:\n exact = 0\n numerical = midpoint_rule(\n f=lambda x: sin((i+1)*pi*x/2))\n print((i, abs(exact - numerical)))\n\ndef check_integral_d_sympy_answer():\n from numpy import pi, sin\n for i in range(12):\n exact = 2/(pi*(i+1))\n numerical = midpoint_rule(\n f=lambda x: sin((i+1)*pi*x/2))\n print((i, abs(exact - numerical)))\n\ndef sine_sum_d(x, N):\n s = 0\n from numpy import pi, sin, zeros\n u = [] # u[k] is the sum i=0,...,k\n k = 0\n for i in range(N+1):\n if i % 2 == 0: # even i\n s += - 16.0/((i+1)**3*pi**3)*sin((i+1)*pi*x/2)\n elif (i-1) % 4 == 0: # 1, 5, 9, 13, 17\n s += - 2*16.0/((i+1)**3*pi**3)*sin((i+1)*pi*x/2)\n else:\n s += 0\n u.append(s.copy())\n return u\n\ndef plot_sine_sum_d():\n from numpy import linspace\n x = linspace(0, 1, 501) # coordinates for plot\n u = sine_sum_d(x, N=20)\n u_e = 0.5*x*(x-2)\n N_values = 0, 1, 2, 3, 20\n for k in N_values:\n plt.plot(x, u[k])\n plt.plot(x, u_e)\n plt.legend(['N=%d' % k for k in N_values] + ['exact'],\n loc='upper right')\n plt.xlabel('$x$'); plt.ylabel('$u$')\n #plt.axis([0.9, 1, -0.52, -0.49])\n plt.savefig('tmpd.png'); plt.savefig('tmpd.pdf')\n\n\nif __name__ == '__main__':\n import sys\n print((model()))\n print('sine 2*i+1 integral:')\n check_integral_b()\n print('sine i+1 integral, sympy answer:')\n check_integral_d_sympy_answer()\n print('sine i+1 integral:')\n check_integral_d()\n #sys.exit(0)\n plot_sine_sum()\n plt.figure()\n plot_sine_sum_d()\n plt.show()",
"x*(x - 2)/2\nsine 2*i+1 integral:\n(0, 6.54487575246776e-12)\n(1, 1.963507134661313e-11)\n(2, 3.27249061182755e-11)\n(3, 4.5815004567906215e-11)\n(4, 5.890472831726612e-11)\n(5, 7.19949447280932e-11)\n(6, 8.50848350109068e-11)\n(7, 9.817498897168875e-11)\n(8, 1.1126468496547304e-10)\n(9, 1.243548805596184e-10)\n(10, 1.3744471533128078e-10)\n(11, 1.5053485194482796e-10)\nsine i+1 integral, sympy answer:\n(0, 6.54487575246776e-12)\n(1, 0.31830988620997064)\n(2, 1.963507134661313e-11)\n(3, 0.15915494309189532)\n(4, 3.27249061182755e-11)\n(5, 0.10610329547313685)\n(6, 4.5815004567906215e-11)\n(7, 0.07957747154594767)\n(8, 5.890472831726612e-11)\n(9, 0.06366197736765776)\n(10, 7.19949447280932e-11)\n(11, 0.05305164769729848)\nsine i+1 integral:\n(0, 6.54487575246776e-12)\n(1, 2.617994709908089e-11)\n(2, 1.963507134661313e-11)\n(3, 4.007461029686965e-17)\n(4, 3.27249061182755e-11)\n(5, 7.853995231954514e-11)\n(6, 4.5815004567906215e-11)\n(7, 1.9895196601282807e-18)\n(8, 5.890472831726612e-11)\n(9, 1.30899624473102e-10)\n(10, 7.19949447280932e-11)\n(11, 3.637978807091713e-17)\n(12, 8.50848350109068e-11)\n(13, 1.8325958806020282e-10)\n(14, 9.817498897168875e-11)\n(15, 6.821210263296963e-18)\n(16, 1.1126468496547304e-10)\n(17, 2.3561939899163775e-10)\n(18, 1.243548805596184e-10)\n(19, 2.3874235921539367e-17)\n(20, 1.3744471533128078e-10)\n(21, 2.879793903343142e-10)\n(22, 1.5053485194482796e-10)\n(23, 1.4779288903810086e-17)\n"
]
]
] |
[
"code"
] |
[
[
"code"
]
] |
4aea294eb2a90368ee405c2ef2c744de78a14453
| 367,518 |
ipynb
|
Jupyter Notebook
|
02.bike_count/12.bike-count-XGBoost.ipynb
|
mkumar73/time-series
|
6a19c69a34002981ae29b9c667486445a7a83c58
|
[
"MIT"
] | 2 |
2021-10-30T19:08:19.000Z
|
2021-11-17T10:21:16.000Z
|
02.bike_count/12.bike-count-XGBoost.ipynb
|
mkumar73/time-series
|
6a19c69a34002981ae29b9c667486445a7a83c58
|
[
"MIT"
] | 14 |
2020-01-28T22:53:33.000Z
|
2022-02-10T00:18:47.000Z
|
02.bike_count/12.bike-count-XGBoost.ipynb
|
mkumar73/time-series
|
6a19c69a34002981ae29b9c667486445a7a83c58
|
[
"MIT"
] | 1 |
2020-05-02T02:49:33.000Z
|
2020-05-02T02:49:33.000Z
| 441.198079 | 143,064 | 0.937905 |
[
[
[
"# XGBoost model for Bike sharing dataset",
"_____no_output_____"
]
],
[
[
"import pandas as pd\nimport numpy as np\nimport os\n\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n%matplotlib inline\n\n# preprocessing methods\nfrom sklearn.preprocessing import StandardScaler\n\n# accuracy measures and data spliting\nfrom sklearn.metrics import mean_squared_error\nfrom sklearn.metrics import mean_absolute_error\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.model_selection import GridSearchCV\n\n# deep learning libraries\nimport xgboost as xgb\nimport graphviz",
"_____no_output_____"
],
[
"plt.style.use('fivethirtyeight')\nplt.rcParams['figure.figsize'] = 15, 7",
"_____no_output_____"
]
],
[
[
"## 1. Data import",
"_____no_output_____"
]
],
[
[
"DATADIR = '../data/bike/'\nMODELDIR = '../checkpoints/bike-sharing/xgb/'\n\ndata_path = os.path.join(DATADIR, 'bike-sharing-processed.csv')\ndata = pd.read_csv(data_path)",
"_____no_output_____"
],
[
"data.set_index('date', inplace=True)\ndata.sort_index(inplace=True)\ndata.head()",
"_____no_output_____"
],
[
"plt.plot(data.cnt, '.')\nplt.title('Bike sharing count')\nplt.xlabel('sample id')\nplt.ylabel('count')\nplt.show()",
"_____no_output_____"
]
],
[
[
"## 2. Train test split",
"_____no_output_____"
]
],
[
[
"y = data[['cnt']].copy()\nX = data.drop(columns=['cnt'], axis=1)\n\nprint(f'X and y shape:')\nprint(X.shape, y.shape)",
"X and y shape:\n(731, 12) (731, 1)\n"
],
[
"# date selection\ndatelist = data.index.unique()\n\n# two month data for testset\nprint(f'Test start date: {datelist[-61]}')",
"Test start date: 2012-11-01\n"
],
[
"# Train test split : last 60 days for test set\n\nX_train = X[X.index < datelist[-61]]\nX_test = X[X.index >= datelist[-61]]\n\ny_train = y[y.index < datelist[-61]]\ny_test = y[y.index >= datelist[-61]]\n\nprint(f'Size of train and test set respectively:')\nprint(X_train.shape,X_test.shape, y_train.shape, y_test.shape)",
"Size of train and test set respectively:\n(670, 12) (61, 12) (670, 1) (61, 1)\n"
]
],
[
[
"## 3. Parameter selection using grid search",
"_____no_output_____"
]
],
[
[
"def xgb_parameter_selection(X, y, grid_param, xgb_param):\n\n xgb_grid = GridSearchCV(estimator=xgb.XGBRegressor(**xgb_param, seed=seed), \n param_grid=grid_param, cv=3)\n xgb_grid.fit(X, y)\n \n return xgb_grid",
"_____no_output_____"
]
],
[
[
"### 3.1 Depth and child weight selection",
"_____no_output_____"
]
],
[
[
"seed = 42\n\n# max depth and child weight selection\ngrid_param_1 = {'max_depth': [3, 5],\n 'min_child_weight': [3, 5, 7]\n }\n\nxgb_param_1 = {'objective' :'reg:linear', \n 'silent' : 1,\n 'n_estimators': 100, \n 'learning_rate' : 0.1}",
"_____no_output_____"
],
[
"model_1 = xgb_parameter_selection(X_train, y_train, grid_param_1, xgb_param_1)\n\n# print(f'Best estimator : {model_1.best_estimator_}')\nprint(f'Best parameter : {model_1.best_params_}')\nprint(f'Best score : {model_1.best_score_}')",
"Best estimator : XGBRegressor(base_score=0.5, booster='gbtree', colsample_bylevel=1,\n colsample_bytree=1, gamma=0, learning_rate=0.1, max_delta_step=0,\n max_depth=5, min_child_weight=7, missing=None, n_estimators=100,\n n_jobs=1, nthread=None, objective='reg:linear', random_state=0,\n reg_alpha=0, reg_lambda=1, scale_pos_weight=1, seed=42, silent=1,\n subsample=1)\nBest parameter : {'max_depth': 5, 'min_child_weight': 7}\nBest score : 0.2972105129489122\n"
]
],
[
[
"### 3.2 colsample_bytree and subsample selection",
"_____no_output_____"
]
],
[
[
"# column and sample selection parameter\ngrid_param_2 = {'colsample_bytree' : [0.7, 1.0],\n 'subsample' : [0.8, 1]\n }\n\nxgb_param_2 = {'objective' :'reg:linear', \n 'silent' : 1,\n 'max_depth': 5,\n 'min_child_weight':7,\n 'n_estimators': 100, \n 'learning_rate' : 0.1,\n 'eval_metric' : 'mae' }",
"_____no_output_____"
],
[
"model_2 = xgb_parameter_selection(X_train, y_train, grid_param_2, xgb_param_2)\n\nprint(f'Best parameter : {model_2.best_params_}')\nprint(f'Best score : {model_2.best_score_}')",
"Best parameter : {'colsample_bytree': 0.7, 'subsample': 1}\nBest score : 0.3446978540630942\n"
]
],
[
[
"### 3.3 gamma selection",
"_____no_output_____"
]
],
[
[
"# gamma selection\ngrid_param_3 = {'gamma' : [0, 0.1, 0.2, 5]\n }\n\nxgb_param_3 = {'objective' :'reg:linear', \n 'silent' : 1,\n 'max_depth': 5,\n 'min_child_weight': 7,\n 'n_estimators': 100, \n 'learning_rate' : 0.1,\n 'colsample_bytree' : 0.7,\n 'subsample' : 1}",
"_____no_output_____"
],
[
"model_3 = xgb_parameter_selection(X_train, y_train, grid_param_3, xgb_param_3)\n\nprint(f'Best parameter : {model_3.best_params_}')\nprint(f'Best score : {model_3.best_score_}')",
"Best parameter : {'gamma': 0}\nBest score : 0.3446978540630942\n"
]
],
[
[
"### 3.4 learning rate",
"_____no_output_____"
]
],
[
[
"# learning_rate selection\ngrid_param_4 = {'learning_rate' : [0.1, 0.01, 0.001]\n }\n\nxgb_param_4 = {'objective' :'reg:linear', \n 'silent' : 1,\n 'max_depth': 5,\n 'min_child_weight': 7,\n 'n_estimators': 100, \n 'learning_rate' : 0.1,\n 'colsample_bytree' : 0.7,\n 'subsample' : 1,\n 'gamma' : 0}",
"_____no_output_____"
],
[
"model_4 = xgb_parameter_selection(X_train, y_train, grid_param_4, xgb_param_4)\n\nprint(f'Best parameter : {model_4.best_params_}')\nprint(f'Best score : {model_4.best_score_}')",
"Best parameter : {'learning_rate': 0.1}\nBest score : 0.3446978540630942\n"
]
],
[
[
"## 4. Final model training",
"_____no_output_____"
]
],
[
[
"final_param = {'objective' :'reg:linear', \n 'silent' : 1,\n 'max_depth': 5,\n 'min_child_weight': 7,\n 'n_estimators': 100, \n 'learning_rate' : 0.1,\n 'colsample_bytree' : 0.7,\n 'subsample' : 1,\n 'gamma' : 0,\n 'eval_metric' : 'mae'}",
"_____no_output_____"
],
[
"def xgb_final(X_train, y_train, param, MODELDIR):\n\n model = xgb.XGBRegressor(**param)\n\n model.fit(X_train, y_train, verbose=True)\n \n # directory for saving model \n if os.path.exists(MODELDIR):\n pass\n else:\n os.makedirs(MODELDIR)\n \n model.save_model(os.path.join(MODELDIR, 'xgb-v1.model'))\n \n return model",
"_____no_output_____"
],
[
"model = xgb_final(X_train, y_train, final_param, MODELDIR)",
"_____no_output_____"
]
],
[
[
"## 5. Model evaluation",
"_____no_output_____"
]
],
[
[
"def model_evaluation(X_train, X_test, y_train, y_test):\n \n # predict and tranform to original scale\n y_train_pred = model.predict(X_train)\n y_test_pred = model.predict(X_test)\n\n\n # MAE and NRMSE calculation\n train_rmse = np.sqrt(mean_squared_error(y_train, y_train_pred))\n train_mae = mean_absolute_error(y_train, y_train_pred)\n train_nrmse = train_rmse/np.std(y_train.values)\n\n test_rmse = np.sqrt(mean_squared_error(y_test, y_test_pred))\n test_mae = mean_absolute_error(y_test, y_test_pred)\n test_nrmse = test_rmse/np.std(y_test.values)\n\n print(f'Training MAE: {np.round(train_mae, 3)}')\n print(f'Trainig NRMSE: {np.round(train_nrmse, 3)}')\n print()\n\n print(f'Test MAE: {np.round(test_mae)}')\n print(f'Test NRMSE: {np.round(test_nrmse)}')\n \n return y_train_pred, y_test_pred",
"_____no_output_____"
],
[
"y_train_pred, y_test_pred = model_evaluation(X_train, X_test, y_train, y_test)",
"Training MAE: 200.654\nTrainig NRMSE: 0.14\n\nTest MAE: 780.0\nTest NRMSE: 1.0\n"
]
],
[
[
"## 6. Result plotting",
"_____no_output_____"
]
],
[
[
"plt.plot(y_train.values, label='actual')\nplt.plot(y_train_pred, label='predicted')\nplt.ylabel('count')\nplt.xlabel('sample id')\nplt.title('Actual vs Predicted on training data using XGBoost')\nplt.legend()\nplt.tight_layout()\nplt.show()",
"_____no_output_____"
],
[
"plt.plot(y_test.values, label='actual')\nplt.plot(y_test_pred, label='predicted')\nplt.ylabel('count')\nplt.xlabel('sample id')\nplt.title('Actual vs Predicted on test data using XGBoost', fontsize=14)\nplt.legend()\nplt.tight_layout()\nplt.show()",
"_____no_output_____"
]
],
[
[
"## 7. Variable importance",
"_____no_output_____"
]
],
[
[
"xgb.plot_importance(model)\nplt.show()",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code"
] |
[
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
]
] |
4aea2e8ae30f4ac31282921eea28ec39a52c0d6f
| 7,503 |
ipynb
|
Jupyter Notebook
|
Assignment Dated 13-12-19.ipynb
|
bharathkuppala309/Assignment
|
5b878fcde611ab55af843c721d416c039a35dbf4
|
[
"MIT"
] | null | null | null |
Assignment Dated 13-12-19.ipynb
|
bharathkuppala309/Assignment
|
5b878fcde611ab55af843c721d416c039a35dbf4
|
[
"MIT"
] | null | null | null |
Assignment Dated 13-12-19.ipynb
|
bharathkuppala309/Assignment
|
5b878fcde611ab55af843c721d416c039a35dbf4
|
[
"MIT"
] | null | null | null | 20.278378 | 152 | 0.435426 |
[
[
[
"# Bubble Sort",
"_____no_output_____"
]
],
[
[
"def sort(lst):\n while True:\n corrected = False\n for i in range(0,len(lst)-1):\n if lst[i]>lst[i+1]:\n lst[i],lst[i+1] = lst[i+1],lst[i]\n corrected = True\n if not corrected:\n return lst\n \nsort([2,13,3,7,1,5])",
"_____no_output_____"
],
[
"sort([15,14,19,13,20,4,9])",
"_____no_output_____"
]
],
[
[
"# Selection sort",
"_____no_output_____"
]
],
[
[
"def selection_sort(lst):\n for i in range(len(lst)-1):\n min_position = i\n for j in range(i,len(lst)):\n if lst[j]<lst[min_position]:\n min_position = j\n temp = lst[i]\n lst[i]=lst[min_position]\n lst[min_position] = temp\n \n print(lst)\n\n\nselection_sort([5,3,8,6,7,2])\n",
"[2, 3, 8, 6, 7, 5]\n[2, 3, 8, 6, 7, 5]\n[2, 3, 5, 6, 7, 8]\n[2, 3, 5, 6, 7, 8]\n[2, 3, 5, 6, 7, 8]\n"
]
],
[
[
"# Write a Python program to find the index of an item in a specified list.",
"_____no_output_____"
]
],
[
[
"lst = [10,30,4,-6]\n\n\nnum = int(input(\"Enter a element to find index: \"))\n\nif num in lst:\n print(\"index of number is: \",lst.index(num))\nelse:\n print(\"number Not in list\")",
"Enter a element to find index: 33\nnumber Not in list\n"
]
],
[
[
"# Write a Python program to remove a key from a dictionary",
"_____no_output_____"
]
],
[
[
"myDict = {'a':1,'b':2,'c':3,'d':4}\nprint(myDict)\nif 'a' in myDict: \n del myDict['a']\nprint(myDict)\n",
"{'a': 1, 'b': 2, 'c': 3, 'd': 4}\n{'b': 2, 'c': 3, 'd': 4}\n"
]
],
[
[
"# Write a Python program to get the key, value and item in a dictionary.",
"_____no_output_____"
]
],
[
[
"dict_num = {1: 10, 2: 20, 3: 30, 4: 40, 5: 50, 6: 60}\nprint(\"key value count\")\nfor count, (key, value) in enumerate(dict_num.items(), 1):\n print(key,' ',value,' ', count)\n",
"key value count\n1 10 1\n2 20 2\n3 30 3\n4 40 4\n5 50 5\n6 60 6\n"
]
],
[
[
"# Write a Python program to concatenate all elements in a list into a string and return it.",
"_____no_output_____"
]
],
[
[
"def concatenate_list_data(list):\n result= ''\n for element in list:\n result += str(element)\n return result\n\nprint(concatenate_list_data([1, 5, 12, 2]))\n",
"15122\n"
]
],
[
[
"# Write a Python program to create all possible strings by using 'a', 'e', 'i', 'o', 'u'. Use the characters exactly once.",
"_____no_output_____"
]
],
[
[
"import random\nchar_list = ['a','e','i','o','u']\nrandom.shuffle(char_list)\nprint(''.join(char_list))\n",
"ouaei\n"
]
],
[
[
"# Write a Python program to reverse the digits of a given number and add it to the original, If the sum is not a palindrome repeat this procedure.",
"_____no_output_____"
]
],
[
[
"def rev_number(n):\n s = 0\n while True:\n k = str(n)\n if k == k[::-1]:\n break\n else:\n m = int(k[::-1])\n n += m\n s += 1\n return n \n\nprint(rev_number(1234))\nprint(rev_number(1473))\n",
"5555\n9339\n"
]
],
[
[
"# Write a Python program to iteration over sets. And also add multiple elemntss",
"_____no_output_____"
]
],
[
[
"num_set = set([0, 1, 2, 3, 4, 5])\n\nfor x in num_set:\n print(x)\n",
"0\n1\n2\n3\n4\n5\n"
],
[
"\ncolor_set = num_set\ncolor_set.add(3)\nprint(color_set)\n#Add multiple items\ncolor_set.update([3,57,77])\nprint(color_set)\n",
"{0, 1, 2, 3, 4, 5}\n{0, 1, 2, 3, 4, 5, 77, 57}\n"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code"
] |
[
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
]
] |
4aea3e9e55d86494fd5674c51b1dd93a3350236e
| 210,608 |
ipynb
|
Jupyter Notebook
|
src/notebooks/21-control-rug-and-density-on-seaborn-histogram.ipynb
|
nrslt/The-Python-Graph-Gallery
|
55898de66070ae716c95442466783ee986576e7d
|
[
"0BSD"
] | 1 |
2022-01-28T09:36:36.000Z
|
2022-01-28T09:36:36.000Z
|
src/notebooks/21-control-rug-and-density-on-seaborn-histogram.ipynb
|
preguza/The-Python-Graph-Gallery
|
4645ec59eaa6b8c8e2ff4eee86516ee3a7933b4d
|
[
"0BSD"
] | null | null | null |
src/notebooks/21-control-rug-and-density-on-seaborn-histogram.ipynb
|
preguza/The-Python-Graph-Gallery
|
4645ec59eaa6b8c8e2ff4eee86516ee3a7933b4d
|
[
"0BSD"
] | null | null | null | 1,452.468966 | 57,894 | 0.744506 |
[
[
[
"## Histogram + rug + kernel density curve",
"_____no_output_____"
]
],
[
[
"# libraries & dataset\nimport seaborn as sns\nimport matplotlib.pyplot as plt\n# set a grey background (use sns.set_theme() if seaborn version 0.11.0 or above) \nsns.set(style=\"darkgrid\")\ndf = sns.load_dataset(\"iris\")\n\nsns.distplot(df[\"sepal_length\"], kde=True, rug=True)\n# in the next version of the distplot function, one would have to write:\n# sns.distplot(data=df, x=\"sepal_length\", kde=True, rug=True) # note that 'kind' is 'hist' by default\nplt.show()",
"_____no_output_____"
]
],
[
[
"## Customizing rugs",
"_____no_output_____"
]
],
[
[
"# libraries & dataset\nimport seaborn as sns\nimport matplotlib.pyplot as plt\n# set a grey background (use sns.set_theme() if seaborn version 0.11.0 or above) \nsns.set(style=\"darkgrid\")\ndf = sns.load_dataset(\"iris\")\n\nsns.distplot(df[\"sepal_length\"],\n kde=True,\n rug=True,\n rug_kws={\"color\": \"r\", \"alpha\": 0.3, \"linewidth\": 2, \"height\":0.2})\n# in the next version of the distplot function, one would have to write:\n# sns.distplot(data=df, x=\"sepal_length\", kde=True, rug=True, rug_kws={\"color\": \"r\", \"alpha\":0.3, \"linewidth\": 2, \"height\":0.2 })\nplt.show()",
"_____no_output_____"
]
],
[
[
"## Customizing the density curve",
"_____no_output_____"
]
],
[
[
"# libraries & dataset\nimport seaborn as sns\nimport matplotlib.pyplot as plt\n# set a grey background (use sns.set_theme() if seaborn version 0.11.0 or above) \nsns.set(style=\"darkgrid\")\ndf = sns.load_dataset(\"iris\")\n\nsns.distplot(df[\"sepal_length\"],\n kde=True,\n kde_kws={\"color\": \"g\", \"alpha\": 0.3, \"linewidth\": 5, \"shade\": True})\n# in the next version of the distplot function, one would have to write:\n# sns.distplot(data=df, x=\"sepal_length\", kde=True, kde_kws={\"color\": \"g\", \"alpha\": 0.3, \"linewidth\": 5, \"shade\": True})\nplt.show()",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code"
] |
[
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
]
] |
4aea494544413e398b980392b950be22588eb62f
| 2,722 |
ipynb
|
Jupyter Notebook
|
webpage/.ipynb_checkpoints/webpage_to_header-checkpoint.ipynb
|
sdp8483/CANalog
|
750f912f05806c9d3d30be77408d885693ecf437
|
[
"MIT"
] | null | null | null |
webpage/.ipynb_checkpoints/webpage_to_header-checkpoint.ipynb
|
sdp8483/CANalog
|
750f912f05806c9d3d30be77408d885693ecf437
|
[
"MIT"
] | null | null | null |
webpage/.ipynb_checkpoints/webpage_to_header-checkpoint.ipynb
|
sdp8483/CANalog
|
750f912f05806c9d3d30be77408d885693ecf437
|
[
"MIT"
] | null | null | null | 26.173077 | 99 | 0.487142 |
[
[
[
"import os\n\n# set directories\nworking_dir = os.getcwd()\nweb_dir = working_dir.replace(\"webpage\", \"firmware/esp_CANalog_interface/lib/webpage\")\n\n# Get all html, js, css files in CANalog/webpage directory\nfiles_to_convert = []\nfor file in os.listdir():\n if (file.endswith(\".html\") | (file.endswith(\".js\")) | (file.endswith(\".css\"))):\n print(file)\n files_to_convert.append(file)\n\nfor f in files_to_convert:\n print(f)\n \n header_fname = \"{}.h\".format(f)\n header_path = os.path.join(web_dir, header_fname)\n\n hdefine = \"INC_{}_\".format(header_fname.replace(\".\", \"_\").upper())\n pdefine = \"PAGE_{}_{}\".format(f.split(\".\")[0].lower(), f.split(\".\")[-1].upper())\n\n with open(header_path, 'w') as header, open(f, 'r') as html:\n header.write(\"#ifndef {}\\n\".format(hdefine))\n header.write(\"#define {}\\n\\n\".format(hdefine))\n header.write(\"#include <Arduino.h>\\n\\n\")\n header.write('const char {}[] PROGMEM = R\"=====(\\n'.format(pdefine))\n header.write(html.read())\n header.write(')=====\";\\n')\n header.write(\"#endif\")",
"analog.html\npgnid.js\nindex.js\nframe.html\npgnid.html\nanalog.js\nabout.js\nindex.html\nsaved_ok.html\nstyle.css\nabout.html\nsaved_nok.html\nframe.js\nanalog.html\npgnid.js\nindex.js\nframe.html\npgnid.html\nanalog.js\nabout.js\nindex.html\nsaved_ok.html\nstyle.css\nabout.html\nsaved_nok.html\nframe.js\n"
]
]
] |
[
"code"
] |
[
[
"code"
]
] |
4aea54ea1d047144b2aecd24e4d9a4c94dbb79d4
| 29,321 |
ipynb
|
Jupyter Notebook
|
beginners/01_1.Weather_Data_Collection.ipynb
|
snafuz/redbull-analytics-hol
|
124828f93d71d0a64ec61983c9f3445437eca9e0
|
[
"UPL-1.0"
] | 1 |
2021-09-24T18:25:18.000Z
|
2021-09-24T18:25:18.000Z
|
beginners/01_1.Weather_Data_Collection.ipynb
|
ttscoff/redbull-analytics-hol
|
9774c98addc04cd6c276a1af5f3b9b3e4b9bc35c
|
[
"UPL-1.0"
] | null | null | null |
beginners/01_1.Weather_Data_Collection.ipynb
|
ttscoff/redbull-analytics-hol
|
9774c98addc04cd6c276a1af5f3b9b3e4b9bc35c
|
[
"UPL-1.0"
] | null | null | null | 28.689824 | 149 | 0.373146 |
[
[
[
"# Weather Data Collection",
"_____no_output_____"
]
],
[
[
"import pandas as pd\nimport numpy as np\nfrom selenium import webdriver\nimport time",
"_____no_output_____"
],
[
"races = pd.read_csv('./data/races.csv')",
"_____no_output_____"
],
[
"races.head()",
"_____no_output_____"
],
[
"races.shape",
"_____no_output_____"
],
[
"weather = races.iloc[:,[0,1,2]]",
"_____no_output_____"
],
[
"info = []\n\nfor link in races.url:\n try:\n df = pd.read_html(link)[0]\n if 'Weather' in list(df.iloc[:,0]):\n n = list(df.iloc[:,0]).index('Weather')\n info.append(df.iloc[n,1])\n else:\n df = pd.read_html(link)[1]\n if 'Weather' in list(df.iloc[:,0]):\n n = list(df.iloc[:,0]).index('Weather')\n info.append(df.iloc[n,1])\n else:\n df = pd.read_html(link)[2]\n if 'Weather' in list(df.iloc[:,0]):\n n = list(df.iloc[:,0]).index('Weather')\n info.append(df.iloc[n,1])\n else:\n df = pd.read_html(link)[3]\n if 'Weather' in list(df.iloc[:,0]):\n n = list(df.iloc[:,0]).index('Weather')\n info.append(df.iloc[n,1])\n else:\n driver = webdriver.Chrome()\n driver.get(link)\n\n # click language button\n button = driver.find_element_by_link_text('Italiano')\n button.click()\n \n clima = driver.find_element_by_xpath('//*[@id=\"mw-content-text\"]/div/table[1]/tbody/tr[9]/td').text\n info.append(clima) \n \n except:\n info.append('not found')",
"_____no_output_____"
],
[
"len(info)",
"_____no_output_____"
],
[
"weather['weather'] = info",
"/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:1: SettingWithCopyWarning: \nA value is trying to be set on a copy of a slice from a DataFrame.\nTry using .loc[row_indexer,col_indexer] = value instead\n\nSee the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n \"\"\"Entry point for launching an IPython kernel.\n"
],
[
"weather.head()",
"_____no_output_____"
],
[
"weather.tail()",
"_____no_output_____"
],
[
"weather_dict = {'weather_warm': ['soleggiato', 'clear', 'warm', 'hot', 'sunny', 'fine', 'mild', 'sereno'],\n 'weather_cold': ['cold', 'fresh', 'chilly', 'cool'],\n 'weather_dry': ['dry', 'asciutto'],\n 'weather_wet': ['showers', 'wet', 'rain', 'pioggia', 'damp', 'thunderstorms', 'rainy'],\n 'weather_cloudy': ['overcast', 'nuvoloso', 'clouds', 'cloudy', 'grey', 'coperto']}",
"_____no_output_____"
],
[
"weather_df = pd.DataFrame(columns = weather_dict.keys())",
"_____no_output_____"
],
[
"for col in weather_df:\n weather_df[col] = weather['weather'].map(lambda x: 1 if any(i in weather_dict[col] for i in x.lower().split()) else 0)\n ",
"_____no_output_____"
],
[
"weather_df.head()",
"_____no_output_____"
],
[
"weather_info = pd.concat([weather, weather_df], axis = 1)",
"_____no_output_____"
],
[
"weather_info.shape",
"_____no_output_____"
],
[
"weather_info.head()",
"_____no_output_____"
],
[
"weather_info.tail()",
"_____no_output_____"
],
[
"weather_info.to_csv('./data/weather.csv', index= False)",
"_____no_output_____"
]
]
] |
[
"markdown",
"code"
] |
[
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
]
] |
4aea7127fc19167f83b99749b29775264f7de429
| 12,524 |
ipynb
|
Jupyter Notebook
|
Math152_Jan_19_2021.ipynb
|
kelngu/PythonForMathematics
|
60c3518c26b221bfab755afdf5fb716afb789a40
|
[
"MIT"
] | 6 |
2020-12-24T06:51:36.000Z
|
2022-03-31T12:25:59.000Z
|
Math152_Jan_19_2021.ipynb
|
kelngu/PythonForMathematics
|
60c3518c26b221bfab755afdf5fb716afb789a40
|
[
"MIT"
] | null | null | null |
Math152_Jan_19_2021.ipynb
|
kelngu/PythonForMathematics
|
60c3518c26b221bfab755afdf5fb716afb789a40
|
[
"MIT"
] | 19 |
2021-01-05T18:16:26.000Z
|
2022-01-31T22:11:31.000Z
| 25.403651 | 352 | 0.423826 |
[
[
[
"<a href=\"https://colab.research.google.com/github/MartyWeissman/PythonForMathematics/blob/main/Math152_Jan_19_2021.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>",
"_____no_output_____"
],
[
"# Teaching notebook, January 19, 2021",
"_____no_output_____"
]
],
[
[
"def print_square(x):\n answer = x*x\n print('The square of {} is {}.'.format(x,answer))",
"_____no_output_____"
],
[
"print_square(9)",
"The square of 9 is 81.\n"
],
[
"def return_square(x):\n answer = x*x\n print('The square of {} is {}.'.format(x,answer))\n return answer",
"_____no_output_____"
],
[
"return_square(9)",
"The square of 9 is 81.\n"
],
[
"return_square(9) * 5",
"The square of 9 is 81.\n"
],
[
"print_square(9) * 5",
"The square of 9 is 81.\n"
],
[
"def quick_square(x):\n return x*x",
"_____no_output_____"
],
[
"quick_square(quick_square(9))",
"_____no_output_____"
],
[
"from time import time # a package to tell the current time.\nsec_min = 60\nsec_hour = sec_min * 60\nsec_day = sec_hour * 24\nsec_year = sec_day * 365 # Ignore leap years. Oh well.\n\ndef tell_time():\n t = time() # Seconds since 1970.\n yrs = t // sec_year # Number of years since 1970.\n t_rest = t % sec_year # Number of seconds left over.\n days = t_rest // sec_day # Number of days left over.\n t_rest = t_rest % sec_day # Number of seconds left over.\n print('The current time is {}'.format(t))\n print('This is {} years and {} days since the start of 1970.'.format(yrs, days))",
"_____no_output_____"
],
[
"time()",
"_____no_output_____"
],
[
"tell_time()",
"The current time is 1611082779.9330168\nThis is 51.0 years and 31.0 days since the start of 1970.\n"
],
[
"from mpmath import *\nmpf(3.14)",
"_____no_output_____"
],
[
"mpf(3.14)**100",
"_____no_output_____"
],
[
"# Angelly's code\n\nimport math\n\nS = 0 # S stands for sum.\nx = 1 # constant.\nfor i in range(10):\n S = S + x**i/math.factorial(i)\n print(\"e={}\".format(S))",
"e=1.0\ne=2.0\ne=2.5\ne=2.6666666666666665\ne=2.708333333333333\ne=2.7166666666666663\ne=2.7180555555555554\ne=2.7182539682539684\ne=2.71827876984127\ne=2.7182815255731922\n"
],
[
"# Edward's solution\n\nfact = 1 # Running factorial\napprox_e = fact # Approximation of e.\nfor i in range(1,10):\n fact = fact * i\n print(\"The current factorial is {}\".format(fact))\n approx_e = approx_e + (1/fact)\n print(approx_e)",
"The current factorial is 1\n2.0\nThe current factorial is 2\n2.5\nThe current factorial is 6\n2.6666666666666665\nThe current factorial is 24\n2.708333333333333\nThe current factorial is 120\n2.7166666666666663\nThe current factorial is 720\n2.7180555555555554\nThe current factorial is 5040\n2.7182539682539684\nThe current factorial is 40320\n2.71827876984127\nThe current factorial is 362880\n2.7182815255731922\n"
],
[
"x=1\nsum=1\nfactorial = 1\nfor i in range(1,11):\n factorial = factorial * i\n sum = sum + (1/factorial)\nprint(sum)",
"2.7182818011463845\n"
],
[
"",
"_____no_output_____"
]
]
] |
[
"markdown",
"code"
] |
[
[
"markdown",
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
]
] |
4aea8252708f4874069c91ac05f5d7c090f195aa
| 26,651 |
ipynb
|
Jupyter Notebook
|
examples/usage/network_design.ipynb
|
ConorPQuinn/NengoDecimal
|
ef798db409417b23da6dcda761654b93a2b44342
|
[
"BSD-2-Clause"
] | null | null | null |
examples/usage/network_design.ipynb
|
ConorPQuinn/NengoDecimal
|
ef798db409417b23da6dcda761654b93a2b44342
|
[
"BSD-2-Clause"
] | null | null | null |
examples/usage/network_design.ipynb
|
ConorPQuinn/NengoDecimal
|
ef798db409417b23da6dcda761654b93a2b44342
|
[
"BSD-2-Clause"
] | null | null | null | 37.695898 | 102 | 0.533901 |
[
[
[
"empty"
]
]
] |
[
"empty"
] |
[
[
"empty"
]
] |
4aea82aa699f2e607601c1a9e288a7b00c79b33f
| 503,883 |
ipynb
|
Jupyter Notebook
|
workflow/notebooks/analysis/clause_temporal_con.ipynb
|
CambridgeSemiticsLab/BH_time_collocations
|
2d1864b6e9cd26624c769ee1e970d69d19da7fbf
|
[
"CC-BY-4.0"
] | 5 |
2019-06-19T19:42:21.000Z
|
2021-04-20T22:43:45.000Z
|
workflow/notebooks/analysis/clause_temporal_con.ipynb
|
CambridgeSemiticsLab/BHTenseAndAspect
|
2d1864b6e9cd26624c769ee1e970d69d19da7fbf
|
[
"CC-BY-4.0"
] | 2 |
2020-02-25T10:19:40.000Z
|
2020-03-13T15:29:01.000Z
|
workflow/notebooks/analysis/clause_temporal_con.ipynb
|
CambridgeSemiticsLab/BH_time_collocations
|
2d1864b6e9cd26624c769ee1e970d69d19da7fbf
|
[
"CC-BY-4.0"
] | null | null | null | 64.418691 | 43,744 | 0.556334 |
[
[
[
"# Temporal Congruency Experiments",
"_____no_output_____"
]
],
[
[
"from scripts.imports import *\nfrom scripts.df_styles import df_highlighter\n\nout = Exporter(paths['outdir'], 'clause')\n\n# redefine df_sg to include adverbs\ndf_sg = df[df.n_times == 1]\n",
"_____no_output_____"
],
[
"df_sg.columns",
"_____no_output_____"
]
],
[
[
"# Tense Collocations with tokens",
"_____no_output_____"
]
],
[
[
"token_ct = df_sg.pivot_table(\n index=['lex_token'],\n columns='verbtense',\n aggfunc='size',\n fill_value=0,\n)\n\n# pair down to top tenses\ntoken_ct = token_ct.loc[token_ct.index[token_ct.sum(1) >= 2]]\ntoken_ct = token_ct[token_ct.columns[token_ct.sum(0) >= 2]]\n\n# sorting\ntoken_ct = token_ct.loc[token_ct.sum(1).sort_values(ascending=False).index]\n\ntoken_ct",
"_____no_output_____"
],
[
"token_dp = sig.apply_deltaP(token_ct, 0, 1)\ntoken_dp = token_dp.dropna()\ntoken_dp.head()",
"_____no_output_____"
],
[
"token_fs, token_odds = sig.apply_fishers(token_ct, 0, 1)",
"_____no_output_____"
],
[
"token_fs",
"_____no_output_____"
]
],
[
[
"## PCA Analysis",
"_____no_output_____"
]
],
[
[
"vtense_pca, vtense_loadings = apply_pca(token_dp, 0, 1, components=4)",
"_____no_output_____"
],
[
"fig, ax = plt.subplots(figsize=(8, 8))\nx, y = (vtense_pca['PC1'], vtense_pca['PC2'])\nax.scatter(x, y, s=15)",
"_____no_output_____"
],
[
"fig, ax = plt.subplots(figsize=(8, 8))\n\ns = 70\nx, y = (vtense_pca.iloc[:,0], vtense_pca.iloc[:,1])\nax.scatter(x, y, facecolor=[], s=2)\n\ntexts = []\nfor lex_tok in vtense_pca.index:\n tx, ty = vtense_pca.loc[idx[lex_tok]][:2]\n show_lex = get_display(lex_tok)\n texts.append(plt.text(tx, ty, show_lex, size=12, \n fontfamily='SBL Biblit'))\noffsets = {}\ntop_loadings = vtense_loadings.abs().sum().sort_values(ascending=False).index[:8]\ntexts = []\nfor feature in top_loadings:\n x_off, y_off, size = offsets.get(feature, (0,0,15)) # config offsets / size\n fx, fy = vtense_loadings[feature][:2] * 2\n plt.arrow(0, 0, fx, fy, color='#808080', linewidth=1, head_width=0)\n show_text = get_display(feature) # handle bidirectional\n texts.append(plt.text(fx+x_off, fy+y_off, show_text, color='#808080', size=size, fontfamily='SBL Biblit'))\n \n \nout.plot('tense_PCA')",
"_____no_output_____"
]
],
[
[
"## PCA Analysis (with Fisher's)",
"_____no_output_____"
]
],
[
[
"vtense_pca2, vtense_loadings2 = apply_pca(token_fs, 0, 1, components=4)",
"_____no_output_____"
],
[
"fig, ax = plt.subplots(figsize=(8, 8))\nx, y = (vtense_pca2['PC1'], vtense_pca2['PC2'])\nax.scatter(x, y, s=15)",
"_____no_output_____"
],
[
"fig, ax = plt.subplots(figsize=(8, 8))\n\ns = 70\nx, y = (vtense_pca2.iloc[:,0], vtense_pca2.iloc[:,1])\nax.scatter(x, y, facecolor=[], s=2)\n\ntexts = []\nfor lex_tok in vtense_pca2.index:\n tx, ty = vtense_pca2.loc[idx[lex_tok]][:2]\n show_lex = get_display(lex_tok)\n texts.append(plt.text(tx, ty, show_lex, size=12, \n fontfamily='SBL Biblit'))\n#adjust_text(texts)\n#out.plot('pca2_durVSloc_TENSE_text')\n\noffsets = {}\ntop_loadings2 = vtense_loadings2.abs().sum().sort_values(ascending=False).index[:5]\ntexts = []\nfor feature in top_loadings2:\n x_off, y_off, size = offsets.get(feature, (0,0,15)) # config offsets / size\n fx, fy = vtense_loadings2[feature][:2] * 2\n plt.arrow(0, 0, fx, fy, color='#808080', linewidth=1, head_width=0)\n show_text = get_display(feature) # handle bidirectional\n texts.append(plt.text(fx+x_off, fy+y_off, show_text, color='#808080', size=size, fontfamily='SBL Biblit'))",
"_____no_output_____"
]
],
[
[
"## With Demonstratives (generally)",
"_____no_output_____"
]
],
[
[
"df_sg.demon_type.value_counts()",
"_____no_output_____"
],
[
"df_sg.columns",
"_____no_output_____"
],
[
"demon_ct = df_sg[df_sg.DEMON == 1].pivot_table(\n index=['front', 'demon_type'],\n columns=['verbtense'],\n aggfunc='size',\n fill_value=0,\n)\n\ndemon_ct",
"_____no_output_____"
],
[
"df_sg[\n (df_sg.verbtense == 'PRES')\n & (df_sg.demon_type == 'THAT')\n][['verse', 'clause']]",
"_____no_output_____"
]
],
[
[
"## Tense + Verbform + Modifiers",
"_____no_output_____"
]
],
[
[
"modi_ct = df_sg.pivot_table(\n index=['verbform', 'verbtense'],\n values=['DEF', 'ORDN', 'QUANT', 'PL', 'NUM', 'DEMON', 'SFX', 'unmodified'],\n aggfunc='sum',\n fill_value=0,\n)\n\nmodi_ct",
"_____no_output_____"
],
[
"modi_fs, modi_odds = sig.apply_fishers(modi_ct, 0, 1)",
"_____no_output_____"
],
[
"df_highlighter(modi_fs, rule='fishers')",
"_____no_output_____"
]
],
[
[
"# With Tagged Tenses",
"_____no_output_____"
]
],
[
[
"tense_advbs = df_sg[\n (df_sg.is_advb == 1)\n]\n\ntense_advbs.shape",
"_____no_output_____"
],
[
"# get counts about which adverbs are being tagged as what\nlex_tense_ct = tense_advbs.pivot_table(\n index=['TA Heads'],\n columns=['tense'],\n aggfunc='size',\n fill_value=0,\n)\n\nlex_tense_ct = lex_tense_ct.loc[lex_tense_ct.sum(1).sort_values(ascending=False).index] \n\nlex_tense_ct",
"_____no_output_____"
],
[
"# first look at it with adverbs only\n\nat_counts = tense_advbs.pivot_table(\n index=['tense'],\n columns=['verbform'],\n aggfunc='size',\n fill_value=0,\n)\n\nat_counts.drop('infc', axis=1, inplace=True)\n\n# sort\nat_counts = at_counts.loc[at_counts.sum(1).sort_values(ascending=False).index]\nat_counts = at_counts[at_counts.sum().sort_values(ascending=False).index]\n\nout.table(\n at_counts,\n 'advb_tense_ct',\n caption='Tense and Hebrew Verb Collocation Frequencies (adverbs)'\n)\n\nat_counts",
"_____no_output_____"
],
[
"at_pr = at_counts.div(at_counts.sum(1), 0).round(2)\n\nout.table(\n at_pr,\n 'advb_tense_pr',\n caption='Tense and Hebrew Verb Collocation Proportions (adverbs)'\n)\n\nat_pr",
"_____no_output_____"
]
],
[
[
"#### Now look across non-adverbial versions",
"_____no_output_____"
]
],
[
[
"tense_np = df_sg[\n (df_sg.is_advb == 0)\n & (df_sg.function == 'simultaneous')\n]",
"_____no_output_____"
],
[
"np_ct = df_sg[df_sg.is_advb == 0].pivot_table(\n index=['tense'],\n columns=['verbform'],\n aggfunc='size',\n fill_value=0,\n)\n\nnp_ct.drop(['infc', 'infa'], axis=1, inplace=True)\n\n# sort in accord with the adverb DF\nnp_ct = np_ct.loc[at_pr.index]\nnp_ct = np_ct[at_pr.columns]\n\nout.table(\n np_ct,\n 'np_tense_ct',\n caption='Tense and Hebrew Verb Collocation Frequencies (NP-based adverbials)'\n)\n\nnp_ct",
"_____no_output_____"
],
[
"np_pr = np_ct.div(np_ct.sum(1), 0).round(2)\n\nout.table(\n np_pr,\n 'np_tense_pr',\n caption='Tense and Hebrew Verb Collocation Proportions (NP-based adverbials)'\n)\n\nnp_pr",
"_____no_output_____"
],
[
"# how much more frequent is weqatal future than in adverb set?\n\nwqtl_diff = np_pr.loc['FUT']['wqtl'] - at_pr.loc['FUT']['wqtl']\n\nout.number(wqtl_diff*100, 'wqtl_diff')\n\nwqtl_diff",
"_____no_output_____"
],
[
"out.number(\n np_pr['wayq']['PAST']*100,\n 'NP_past_wayq_perc'\n)",
"_____no_output_____"
],
[
"df_sg[\n (df_sg.tense == 'FUT')\n & (df_sg.verbform == 'qtl')\n][['verse', 'clause']]",
"_____no_output_____"
],
[
"df_sg[\n (df_sg.tense == 'PAST')\n & (df_sg.verbform == 'wqtl')\n][['verse', 'clause']]",
"_____no_output_____"
],
[
"df_sg[\n (df_sg.tense == 'PAST')\n & (df_sg.verbform == 'yqtl')\n][['verse', 'clause']]",
"_____no_output_____"
],
[
"df_sg[\n (df_sg.tense == 'PRES')\n & (df_sg.verbform == 'wqtl')\n][['verse', 'clause']]",
"_____no_output_____"
],
[
"df_sg[\n (df_sg.tense == 'PAST')\n & (df_sg.verbform == 'ptcp')\n][['verse', 'clause']]",
"_____no_output_____"
],
[
"df_sg[\n (df_sg.tense == 'FUT')\n & (df_sg.verbform == 'ptcp')\n][['verse', 'clause']]",
"_____no_output_____"
],
[
"fig, axs = plt.subplots(2, 3, figsize=(12, 8))\naxs = axs.ravel()\n\ntensenames = {'PRES':'Present', 'FUT': 'Future', 'PAST': 'Past'}\n\n\ni = 0 \nfor table, kind in ([at_pr, 'Adverb'], [np_pr, 'Adverbial']):\n for tense in table.index:\n ax = axs[i]\n i += 1\n data = table.loc[tense]\n if kind == 'Adverb':\n ct_data = at_counts.loc[tense]\n else:\n ct_data = np_ct.loc[tense]\n tensename = tensenames[tense]\n kwargs = {}\n if tensename == 'Present' and kind == 'Adverbial':\n tensename = '\"Today\"'\n \n if kind == 'Adverbial':\n kwargs['color'] = 'orange'\n \n data.plot(ax=ax, kind='bar', edgecolor='black', **kwargs)\n ax.set_xticklabels(ax.get_xticklabels(), rotation=0)\n ax.set_title(f'Collocations with {tensename} Time {kind} (N={ct_data.sum()})', size=10)\n ax.set_ylabel('proportion')\n ax.set_ylim((0, 0.7))\n ax.grid(True, axis='y')\n ax.set_axisbelow(True)\nfig.tight_layout()\n\nout.plot(\n 'advb_np_prs'\n)",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code"
] |
[
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
]
] |
4aeab5a52f76ae342c005042c0c260f649677b0c
| 12,317 |
ipynb
|
Jupyter Notebook
|
api/api_notebook.ipynb
|
nnair12/pycon_2017
|
35ad3ea8c7199c0203a33e69021a175327ac8793
|
[
"MIT"
] | 30 |
2017-05-17T15:57:36.000Z
|
2022-02-15T05:31:02.000Z
|
api/api_notebook.ipynb
|
nnair12/pycon_2017
|
35ad3ea8c7199c0203a33e69021a175327ac8793
|
[
"MIT"
] | 3 |
2017-05-17T17:59:55.000Z
|
2020-09-13T10:51:52.000Z
|
api/api_notebook.ipynb
|
nnair12/pycon_2017
|
35ad3ea8c7199c0203a33e69021a175327ac8793
|
[
"MIT"
] | 70 |
2017-05-21T03:20:03.000Z
|
2022-03-26T05:25:16.000Z
| 27.929705 | 497 | 0.585289 |
[
[
[
"## APIs",
"_____no_output_____"
],
[
"Let's start by looking at [OMDb API](https://www.omdbapi.com/).\n\nThe OMDb API is a free web service to obtain movie information, all content and images on the site are contributed and maintained by users.\n\nThe Python package [urllib](https://docs.python.org/3/howto/urllib2.html) can be used to fetch resources from the internet.\n\nOMDb tells us what kinds of requests we can make. We are going to do a title search. As you can see below, we have an additional parameter \"&Season=1\" which does not appear in the parameter tables. If you read through the change log, you will see it documented there. \n\nUsing the urllib and json packages allow us to call an API and store the results locally.",
"_____no_output_____"
]
],
[
[
"import json\nimport urllib.request",
"_____no_output_____"
],
[
"data = json.loads(urllib.request.urlopen('http://www.omdbapi.com/?t=Game%20of%20Thrones&Season=1').read().\\\n decode('utf8'))",
"_____no_output_____"
]
],
[
[
"What should we expect the type to be for the variable data?",
"_____no_output_____"
]
],
[
[
"print(type(data))",
"_____no_output_____"
]
],
[
[
"What do you think the data will look like?",
"_____no_output_____"
]
],
[
[
"data.keys()",
"_____no_output_____"
],
[
"data",
"_____no_output_____"
]
],
[
[
"We now have a dictionary object of our data. We can use python to manipulate it in a variety of ways. For example, we can print all the titles of the episodes.",
"_____no_output_____"
]
],
[
[
"for episode in data['Episodes']:\n print(episode['Title'], episode['imdbRating'])",
"_____no_output_____"
]
],
[
[
"We can use pandas to convert the episode information to a dataframe.",
"_____no_output_____"
]
],
[
[
"import pandas as pd\n\ndf = pd.DataFrame.from_dict(data['Episodes'])",
"_____no_output_____"
],
[
"df",
"_____no_output_____"
]
],
[
[
"And, we can save our data locally to use later.",
"_____no_output_____"
]
],
[
[
"with open('tutorial_output/omdb_api_data.json', 'w') as f:\n json.dump(data, f)",
"_____no_output_____"
]
],
[
[
"Let's try an API that requires an API key!\n\n\"The [Digital Public Library of America](https://dp.la/) brings together the riches of America’s libraries, archives, and museums, and makes them freely available to the world. It strives to contain the full breadth of human expression, from the written word, to works of art and culture, to records of America’s heritage, to the efforts and data of science.\"\n\nAnd, they have an [API](https://dp.la/info/developers/codex/api-basics/).\n\nIn order to use the API, you need to [request a key](https://dp.la/info/developers/codex/policies/#get-a-key). You can do this with an HTTP POST request.\n",
"_____no_output_____"
],
[
"If you are using **OS X or Linux**, replace \"[email protected]\" in the cell below with your email address and execute the cell. This will send the rquest to DPLA and they will email your API key to the email address you provided. To successfully query the API, you must include the ?api_key= parameter with the 32-character hash following.",
"_____no_output_____"
]
],
[
[
"# execute this on OS X or Linux by removing '#' on the next line and excuting the cell\n#! curl -v -XPOST http://api.dp.la/v2/api_key/[email protected]",
"_____no_output_____"
]
],
[
[
"If you are on **Windows 7 or 10**, [open PowerShell](http://www.tenforums.com/tutorials/25581-windows-powershell-open-windows-10-a.html). Replace \"[email protected]\" in the cell below with your email address. Copy the code and paste it at the command prompt in PowerShell. This will send the rquest to DPLA and they will email your API key to the email address you provided. To successfully query the API, you must include the ?api_key= parameter with the 32-character hash following.",
"_____no_output_____"
]
],
[
[
"#execute this on Windows by running the line below, without the leading '#', in PowerShell\n#Invoke-WebRequest -Uri (\"http://api.dp.la/v2/api_key/[email protected]\") -Method POST -Verbose -usebasicparsing",
"_____no_output_____"
]
],
[
[
"You will get a response similar to what is shown below and will receive an email fairly quickly from DPLA with your key.",
"_____no_output_____"
],
[
" shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory\n * Trying 52.2.169.251...\n * Connected to api.dp.la (52.2.169.251) port 80 (#0)\n > POST /v2/api_key/[email protected] HTTP/1.1\n > Host: api.dp.la\n > User-Agent: curl/7.43.0\n > Accept: */*\n > \n < HTTP/1.1 201 Created\n < Access-Control-Allow-Origin: *\n < Cache-Control: max-age=0, private, must-revalidate\n < Content-Type: application/json; charset=utf-8\n < Date: Thu, 20 Oct 2016 20:53:24 GMT\n < ETag: \"8b66d9fe7ded79e3151d5a22f0580d99\"\n < Server: nginx/1.1.19\n < Status: 201 Created\n < X-Request-Id: d61618751a376452ac3540b3157dcf48\n < X-Runtime: 0.179920\n < X-UA-Compatible: IE=Edge,chrome=1\n < Content-Length: 89\n < Connection: keep-alive\n < \n * Connection #0 to host api.dp.la left intact\n {\"message\":\"API key created and sent via email. Be sure to check your Spam folder, too.\"}",
"_____no_output_____"
],
[
"It is good practice not to put your keys in your code. You can store them in a file and read them in from there. If you are pushing your code to GitHub, make sure you put your key files in .gitignore.\n\nI created a file on my drive called \"config_secret.json\". The contents of the file look like this:\n\n{\n\t\"api_key\" : \"my api key here\"\n}\n\nI can then write code to read the information in.\n\nA template called config_secret_template.json has been provided for you to add your keys to.",
"_____no_output_____"
]
],
[
[
"with open(\"./dpla_config_secret.json\") as key_file:\n key = json.load(key_file)",
"_____no_output_____"
],
[
"key",
"_____no_output_____"
]
],
[
[
"Then, when I create my API query, I can use a variable in place of my actual key.\n\nThe Requests library allows us to build urls with different parameters. You build the parameters as a dictionary that contains key/value pairs for everything after the '?' in your url.",
"_____no_output_____"
]
],
[
[
"import requests",
"_____no_output_____"
],
[
"# we are specifying our url and parameters here as variables\nurl = 'http://api.dp.la/v2/items/'\nparams = {'api_key' : key['api_key'], 'q' : 'goats+AND+cats'}",
"_____no_output_____"
],
[
"# we are creating a response object, r\nr = requests.get(url, params=params)",
"_____no_output_____"
],
[
"type(r)",
"_____no_output_____"
],
[
"# we can look at the url that was created by requests with our specified variables\nr.url",
"_____no_output_____"
],
[
"# we can check the status code of our request\nr.status_code",
"_____no_output_____"
]
],
[
[
"[HTTP Status Codes](http://www.restapitutorial.com/httpstatuscodes.html)",
"_____no_output_____"
]
],
[
[
"# we can look at the content of our request\nprint(r.content)",
"_____no_output_____"
]
],
[
[
"By default, DPLA returns 10 items at a time. We can see from the count value, our query has 29 results. DPLA does give us a paramter we can set to change this to get up to 500 items at a time.\n\n",
"_____no_output_____"
]
],
[
[
"params = {'api_key' : key['api_key'], 'q' : 'goats+AND+cats', 'page_size': 500}\nr = requests.get(url, params=params)\nprint(r.content)",
"_____no_output_____"
]
],
[
[
"If we were working with an API that limited us to only 10 items at a time, we could write a loop to pull our data.\n\nThe file [seeclickfix_api.py](./seeclickfix_api.py) in the api folder of this repo is an example of how you can pull multiple pages of data from an API. It uses the [SeeClickFix API](http://dev.seeclickfix.com/). \"[SeeClickFix](https://seeclickfix.com/) allows you to play an integral role in public services — routing neighborhood concerns like potholes and light outages to the right official with the right information.\"",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown"
] |
[
[
"markdown",
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown",
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
]
] |
4aeadd5206077e0318b5dafa3577d079981ead14
| 109,101 |
ipynb
|
Jupyter Notebook
|
examples/chicago_taxi/chicago_taxi_tfdv.ipynb
|
daikeshi/data-validation
|
71b61165c013ff6bf8b31c5a8819a5ca3fc81710
|
[
"Apache-2.0"
] | null | null | null |
examples/chicago_taxi/chicago_taxi_tfdv.ipynb
|
daikeshi/data-validation
|
71b61165c013ff6bf8b31c5a8819a5ca3fc81710
|
[
"Apache-2.0"
] | null | null | null |
examples/chicago_taxi/chicago_taxi_tfdv.ipynb
|
daikeshi/data-validation
|
71b61165c013ff6bf8b31c5a8819a5ca3fc81710
|
[
"Apache-2.0"
] | null | null | null | 121.764509 | 47,933 | 0.79442 |
[
[
[
"# TensorFlow Data Validation Example",
"_____no_output_____"
],
[
"This notebook describes how to explore and validate Chicago Taxi dataset using TensorFlow Data Validation.",
"_____no_output_____"
],
[
"# Setup",
"_____no_output_____"
],
[
"Import necessary packages and set up data paths.",
"_____no_output_____"
]
],
[
[
"import tensorflow_data_validation as tfdv\nimport os",
"_____no_output_____"
],
[
"BASE_DIR = os.getcwd()\nDATA_DIR = os.path.join(BASE_DIR, 'data')\nTRAIN_DATA = os.path.join(DATA_DIR, 'train.csv')\nEVAL_DATA = os.path.join(DATA_DIR, 'eval.csv')\nSERVING_DATA = os.path.join(DATA_DIR, 'serving.csv')",
"_____no_output_____"
]
],
[
[
"# Compute descriptive data statistics",
"_____no_output_____"
],
[
"TFDV can compute descriptive\n[statistics](https://github.com/tensorflow/metadata/tree/v0.6.0/tensorflow_metadata/proto/v0/statistics.proto)\nthat provide a quick overview of the data in terms of the features that are\npresent and the shapes of their value distributions.\n\nInternally, TFDV uses [Apache Beam](https://beam.apache.org)'s data-parallel\nprocessing framework to scale the computation of statistics over large datasets.\nFor applications that wish to integrate deeper with TFDV (e.g., attach\nstatistics generation at the end of a data-generation pipeline), the API also\nexposes a Beam PTransform for statistics generation.",
"_____no_output_____"
]
],
[
[
"train_stats = tfdv.generate_statistics_from_csv(TRAIN_DATA)",
"_____no_output_____"
]
],
[
[
"The statistics can be visualized using [Facets Overview](https://pair-code.github.io/facets/) tool which provide a succinct visualization of these statistics for easy browsing. TFDV provides a utility method that visualizes statistics using Facets.",
"_____no_output_____"
]
],
[
[
"tfdv.visualize_statistics(train_stats)",
"_____no_output_____"
]
],
[
[
"# Infer a schema",
"_____no_output_____"
],
[
"The\n[schema](https://github.com/tensorflow/metadata/tree/v0.6.0/tensorflow_metadata/proto/v0/schema.proto)\ndescribes the expected properties of the data. Some of these properties are:\n\n* which features are expected to be present\n* their type\n* the number of values for a feature in each example\n* the presence of each feature across all examples\n* the expected domains of features.\n\nIn short, the schema describes the expectations for \"correct\" data and can thus\nbe used to detect errors in the data (described below). \n\nSince writing a schema can be a tedious task, especially for datasets with lots\nof features, TFDV provides a method to generate an initial version of the schema\nbased on the descriptive statistics.",
"_____no_output_____"
]
],
[
[
"schema = tfdv.infer_schema(train_stats)",
"_____no_output_____"
]
],
[
[
"In general, TFDV uses conservative heuristics to infer stable data properties\nfrom the statistics in order to avoid overfitting the schema to the specific\ndataset. It is strongly advised to **review the inferred schema and refine\nit as needed**, to capture any domain knowledge about the data that TFDV's\nheuristics might have missed.",
"_____no_output_____"
]
],
[
[
"tfdv.display_schema(schema)",
"_____no_output_____"
]
],
[
[
"# Check evaluation data for errors",
"_____no_output_____"
],
[
"Given a schema, it is possible to check whether a dataset conforms to the\nexpectations set in the schema or whether there exist any data anomalies. TFDV\nperforms this check by matching the statistics of the dataset against the schema\nand marking any discrepancies. ",
"_____no_output_____"
]
],
[
[
"# Compute stats over eval data.\neval_stats = tfdv.generate_statistics_from_csv(EVAL_DATA)",
"_____no_output_____"
],
[
"# Compare stats of eval data with training data.\ntfdv.visualize_statistics(lhs_statistics=eval_stats, rhs_statistics=train_stats,\n lhs_name='EVAL_DATASET', rhs_name='TRAIN_DATASET')",
"_____no_output_____"
],
[
"# Check eval data for errors by validating the eval data stats using the previously inferred schema.\nanomalies = tfdv.validate_statistics(eval_stats, schema)",
"_____no_output_____"
],
[
"tfdv.display_anomalies(anomalies)",
"_____no_output_____"
]
],
[
[
"The anomalies indicate that out of domain values were found for features `company` and `payment_type` in the stats in < 1% of the feature values. If this was expected, then the schema can be updated as follows.",
"_____no_output_____"
]
],
[
[
"# Relax the minimum fraction of values that must come from the domain for feature company.\ncompany = tfdv.get_feature(schema, 'company')\ncompany.distribution_constraints.min_domain_mass = 0.9\n\n# Add new value to the domain of feature payment_type.\npayment_type_domain = tfdv.get_domain(schema, 'payment_type')\npayment_type_domain.value.append('Prcard')",
"_____no_output_____"
],
[
"updated_anomalies = tfdv.validate_statistics(eval_stats, schema)",
"_____no_output_____"
],
[
"tfdv.display_anomalies(updated_anomalies)",
"_____no_output_____"
]
],
[
[
"If an anomaly truly indicates a data error, then the underlying data should be fixed.",
"_____no_output_____"
],
[
"# Schema Environments",
"_____no_output_____"
],
[
"By default, validations assume that all datasets in a pipeline adhere to a single schema. In some cases introducing\nslight schema variations is necessary, for instance features used as labels are required during training (and should\nbe validated), but are missing during serving.\n\n**Environments** can be used to express such requirements. In particular, features in schema can be associated with a set of environments using `default_environment`, `in_environment` and `not_in_environment`.\n\nFor example, if the `tips` feature is being used as the label in training, but missing in the serving data. Without environment specified, it will show up as an anomaly.",
"_____no_output_____"
]
],
[
[
"serving_stats = tfdv.generate_statistics_from_csv(SERVING_DATA)\nserving_anomalies = tfdv.validate_statistics(serving_stats, schema)",
"_____no_output_____"
],
[
"tfdv.display_anomalies(serving_anomalies)",
"_____no_output_____"
]
],
[
[
"Note that 'tips' feature is shown in the anomalies as 'Column dropped', as it is not present in the serving dataset. We can do the following to fix this.",
"_____no_output_____"
]
],
[
[
"# All features are by default in both TRAINING and SERVING environments.\nschema.default_environment.append('TRAINING')\nschema.default_environment.append('SERVING')\n\n# Specify that 'tips' feature is not in SERVING environment.\ntfdv.get_feature(schema, 'tips').not_in_environment.append('SERVING')\n\nserving_anomalies_with_env = tfdv.validate_statistics(\n serving_stats, schema, environment='SERVING')",
"_____no_output_____"
],
[
"tfdv.display_anomalies(serving_anomalies_with_env)",
"_____no_output_____"
]
],
[
[
"# Check data drift and skew",
"_____no_output_____"
],
[
"In addition to checking whether a dataset conforms to the expectations set in the schema, TFDV also provides functionalities to detect\n* drift between different days of training data\n* skew between training and serving data\n\nTFDV performs this check by comparing the statistics of different datasets based on the drift/skew comparators specified in the schema.",
"_____no_output_____"
]
],
[
[
"# Add skew comparator for 'payment_type' feature.\npayment_type = tfdv.get_feature(schema, 'payment_type')\npayment_type.skew_comparator.infinity_norm.threshold = 0.01\n\n# Add drift comparator for 'company' feature.\ncompany=tfdv.get_feature(schema, 'company')\ncompany.drift_comparator.infinity_norm.threshold = 0.001",
"_____no_output_____"
],
[
"skew_anomalies = tfdv.validate_statistics(train_stats, schema, previous_statistics=eval_stats,\n serving_statistics=serving_stats)",
"_____no_output_____"
],
[
"tfdv.display_anomalies(skew_anomalies)",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code"
] |
[
[
"markdown",
"markdown",
"markdown",
"markdown"
],
[
"code",
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown",
"markdown",
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown",
"markdown"
],
[
"code",
"code",
"code"
]
] |
4aeaee384d715f752fdd9b42f57bad83bd0dc64c
| 12,957 |
ipynb
|
Jupyter Notebook
|
Three_Part_Moudule/pytorch/data_operator/data_operator-checkpoint.ipynb
|
QAlexBall/Learning_Py
|
8a5987946928a9d86f6807555ed435ac604b2c44
|
[
"MIT"
] | 2 |
2019-01-24T15:06:59.000Z
|
2019-01-25T07:34:45.000Z
|
Three_Part_Moudule/pytorch/data_operator/data_operator-checkpoint.ipynb
|
QAlexBall/Learning_Py
|
8a5987946928a9d86f6807555ed435ac604b2c44
|
[
"MIT"
] | 1 |
2019-12-23T09:45:11.000Z
|
2019-12-23T09:45:11.000Z
|
Three_Part_Moudule/pytorch/data_operator/data_operator-checkpoint.ipynb
|
QAlexBall/Learning_Py
|
8a5987946928a9d86f6807555ed435ac604b2c44
|
[
"MIT"
] | 1 |
2019-07-18T14:21:35.000Z
|
2019-07-18T14:21:35.000Z
| 19.781679 | 91 | 0.40673 |
[
[
[
"import torch\nx = torch.empty(5, 3)\nx",
"_____no_output_____"
],
[
"x = torch.rand(5, 3)\nx",
"_____no_output_____"
],
[
"x = torch.zeros(5, 3, dtype=torch.long)\nx",
"_____no_output_____"
],
[
"x = torch.tensor([5.5, 3])\nprint(x)",
"tensor([5.5000, 3.0000])\n"
],
[
"x = x.new_ones(5, 3, dtype=torch.float64)\nx\n",
"_____no_output_____"
],
[
"x = torch.randn_like(x, dtype=torch.float)\nx",
"_____no_output_____"
],
[
"y = torch.rand(5, 3)\nx + y\ntorch.add(x, y)\ny.add_(x)\nx",
"_____no_output_____"
]
],
[
[
"### Index",
"_____no_output_____"
]
],
[
[
"y = x[0, :]\nprint(y)\nprint(x)\ny += 1\nprint(y)\nprint(x[0, :])",
"tensor([1.1788, 3.9351, 2.1025])\ntensor([[ 1.1788, 3.9351, 2.1025],\n [-0.1464, 0.4804, -0.4417],\n [ 1.7609, -0.3312, -0.2145],\n [-1.7894, -1.6312, -0.2785],\n [-0.4103, 0.1828, -0.5633]])\ntensor([2.1788, 4.9351, 3.1025])\ntensor([2.1788, 4.9351, 3.1025])\n"
],
[
"y = x.view(15)\ny",
"_____no_output_____"
],
[
"z = x.view(-1, 5) # -1所指的纬度可以根据其他纬度的值推算出来\nz",
"_____no_output_____"
],
[
"print(x.size(), y.size(), z.size())",
"torch.Size([5, 3]) torch.Size([15]) torch.Size([3, 5])\n"
],
[
"x_cp = x.clone().view(15)\nx -= 1\nprint(x)\nprint(x_cp)",
"tensor([[ 1.1788, 3.9351, 2.1025],\n [-1.1464, -0.5196, -1.4417],\n [ 0.7609, -1.3312, -1.2145],\n [-2.7894, -2.6312, -1.2785],\n [-1.4103, -0.8172, -1.5633]])\ntensor([ 2.1788, 4.9351, 3.1025, -0.1464, 0.4804, -0.4417, 1.7609, -0.3312,\n -0.2145, -1.7894, -1.6312, -0.2785, -0.4103, 0.1828, -0.5633])\n"
]
],
[
[
"### 线性代数\n函数\t 功能\ntrace\t 对角线元素之和(矩阵的迹)\ndiag\t 对角线元素\ntriu/tril 矩阵的上三角/下三角,可指定偏移量\nmm/bmm\t 矩阵乘法,batch的矩阵乘法\naddmm/addbmm/addmv/addr/baddbmm..\t矩阵运算\nt\t 转置\ndot/cross 内积/外积\ninverse\t 求逆矩阵\nsvd 奇异值分解",
"_____no_output_____"
]
],
[
[
"x = torch.arange(1, 3).view(1, 2)\nx",
"_____no_output_____"
],
[
"y = torch.arange(1, 4).view(3, 1)\ny",
"_____no_output_____"
],
[
"# 广播机制\nprint(x)\nprint(y)\nx + y # x中的元素被广播",
"tensor([[1, 2]])\ntensor([[1],\n [2],\n [3]])\n"
],
[
"x = torch.tensor([1, 2])\ny = torch.tensor([3, 4])\nid_before = id(y)\ny = y + x\nprint(id(y) == id_before)",
"False\n"
],
[
"x = torch.tensor([1, 2])\ny = torch.tensor([3, 4])\nid_before = id(y)\ny[:] = y + x\nprint(id(y) == id_before)",
"True\n"
],
[
"x = torch.tensor([1, 2])\ny = torch.tensor([3, 4])\nid_before = id(y)\ntorch.add(x, y, out=y) # y += x, y.add(_x)\nprint(id(y) == id_before)",
"True\n"
]
],
[
[
"### Tensor and Numpy",
"_____no_output_____"
]
],
[
[
"a = torch.ones(5)\nb = a.numpy()\nprint(a, b)",
"tensor([1., 1., 1., 1., 1.]) [1. 1. 1. 1. 1.]\n"
],
[
"a += 1\nprint(a, b)\nb += 1\nprint(a, b)",
"tensor([2., 2., 2., 2., 2.]) [2. 2. 2. 2. 2.]\ntensor([3., 3., 3., 3., 3.]) [3. 3. 3. 3. 3.]\n"
],
[
"import numpy as np\na = np.ones(5)\nb = torch.from_numpy(a)\nprint(a, b)",
"[1. 1. 1. 1. 1.] tensor([1., 1., 1., 1., 1.], dtype=torch.float64)\n"
],
[
"a += 1\nprint(a, b)\nb += 1\nprint(a, b)",
"[2. 2. 2. 2. 2.] tensor([2., 2., 2., 2., 2.], dtype=torch.float64)\n[3. 3. 3. 3. 3.] tensor([3., 3., 3., 3., 3.], dtype=torch.float64)\n"
],
[
"c = torch.tensor(a)\na += 1\nprint(a, c)",
"[4. 4. 4. 4. 4.] tensor([3., 3., 3., 3., 3.], dtype=torch.float64)\n"
],
[
"if torch.cuda.is_available():\n device = torch.device(\"cuda\")\n y = torch.ones_like(x, device=device)\n x = x.to(device)\n z = x + y\n print(z)\n print(z.to(\"cput\", torch.double))\nelse:\n print(\"cuda_not_avaiable\")",
"cuda_not_avaiable\n"
]
]
] |
[
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code"
] |
[
[
"code",
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code"
]
] |
4aeb0d21cd7dde1f9cfb31f6442dadac91f0a430
| 31,454 |
ipynb
|
Jupyter Notebook
|
cwpk-34-module-ii-structure-extractor.ipynb
|
Cognonto/CWPK
|
2a01423ef3da2fb57bde076f3e5e058c08548403
|
[
"CC-BY-4.0"
] | 15 |
2020-09-28T23:38:52.000Z
|
2022-02-17T03:41:56.000Z
|
cwpk-34-module-ii-structure-extractor.ipynb
|
Cognonto/CWPK
|
2a01423ef3da2fb57bde076f3e5e058c08548403
|
[
"CC-BY-4.0"
] | 8 |
2020-10-19T15:07:58.000Z
|
2021-02-15T17:00:41.000Z
|
cwpk-34-module-ii-structure-extractor.ipynb
|
Cognonto/CWPK
|
2a01423ef3da2fb57bde076f3e5e058c08548403
|
[
"CC-BY-4.0"
] | 9 |
2020-09-28T23:39:16.000Z
|
2021-12-15T19:18:38.000Z
| 70.683146 | 1,002 | 0.642462 |
[
[
[
"CWPK \\#34: A Python Module, Part II: Packaging and The Structure Extractor\n=======================================\n\nMoving from Notebook to Package Proved Perplexing\n--------------------------\n\n<div style=\"float: left; width: 305px; margin-right: 10px;\">\n\n<img src=\"http://kbpedia.org/cwpk-files/cooking-with-kbpedia-305.png\" title=\"Cooking with KBpedia\" width=\"305\" />\n\n</div>\n\nThis installment of the [*Cooking with Python and KBpedia*](https://www.mkbergman.com/cooking-with-python-and-kbpedia/) series is the second of a three-part mini-series on writing and packaging a formal Python project. The previous installment described a [DRY](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself) (don't repeat yourself) approach to how to generalize our annotation extraction routine. This installment describes how to transition that code from [Jupyter Notebook](https://en.wikipedia.org/wiki/Project_Jupyter#Jupyter_Notebook) interactive code to a formally organized Python package. We also extend our generalized approach to the structure extractor. \n\nIn this installment I am working with the notebook and the [Spyder](https://en.wikipedia.org/wiki/Spyder_(software)) IDE in tandem. The notebook is the source of the initial prototype code. It is also the testbed for seeing if the package may be imported and is working properly. We use Spyder for all of the final code development, including moving into functions and classes and organizing by files. We also start to learn some of its [IDE](https://en.wikipedia.org/wiki/Integrated_development_environment) features, such as auto-complete, which is a nice way to test questions about namespaces and local and global variables.\n\nAs noted in earlier installments, a Python 'module' is a single script file (in the form of <code>my_file.py</code>) that itself may contain multiple functions, variable declarations, class (object) definitions, and the like, kept in this single file because of their related functionality. A 'package' in Python is a directory with at least one module and (generally) a standard <code>\\_\\_init\\_\\_.py</code> file that informs Python a package is available and its name. Python packages and modules are named with lower case. A package name is best when short and without underscores. A module may use underscores to better convey its purpose, such as <code>do_something.py</code>.\n\nFor our project based on _Cooking with Python and KBpedia_ (**CWPK**), we will pick up on this acronym and name our project '*cowpoke*'. The functional module we are starting the project with is <code>extract.py</code>, the module for the extraction routines we have been developing over the past few installments..",
"_____no_output_____"
],
[
"### Perplexing Questions\nWhile it is true the Python organization has some thorough tutorials, referenced in the concluding **Additional Documentation**, I found it surprisingly difficult to figure out how to move my [Jupyter Notebook](https://en.wikipedia.org/wiki/Project_Jupyter#Jupyter_Notebook) prototypes to a packaged [Python](https://en.wikipedia.org/wiki/Python_(programming_language)) program. I could see that logical modules (single Python scripts, <code>\\*.py</code>) made sense, and that there were going to be shared functions across those modules. I could also see that I wanted to use a standard set of variable descriptions in order to specify 'record-like' inputs to the routines. My hope was to segregate all of the input information required for a new major exercise of *cowpoke* into the editing of a single file. That would make configuring a new run a simple process.\n\nI read and tried many tutorials trying to figure out an architecture and design for this packaging. I found the tutorials helpful at a broad, structural level of what goes into a package and how to refer and import other parts, but the nuances of where and how to use classes and functions and how to best share some variables and specifications across modules remained opaque to me. Here are some of the questions and answers I needed to discover before I could make progress:\n\n***1. Where do I put the files to be seen by the notebook and the project?***\n\nAfter installing Python and setting up the environment noted in installments [**CWPK #9**](https://www.mkbergman.com/2336/cwpk-9-installing-python/) - [**#11**](https://www.mkbergman.com/2338/cwpk-11-installing-a-python-ide/) you should have many packages already on your system, including for Spyder and Jupyter Notebook. There are at least two listings of full packages in different locations. To re-discover what your Python paths are, Run this cell:",
"_____no_output_____"
]
],
[
[
"import sys\nprint(sys.path)",
"_____no_output_____"
]
],
[
[
"You want to find the site packages directory under your Python library (mine is <code>C:\\\\1-PythonProjects\\\\Python\\\\lib\\\\site-packages</code>). We will define the '*cowpoke*' directory under this parent and also point our Spyder project to it. (**NB:** Of course, you can locate your package directory anywhere you want, but you would need to add that location to your path as well, and later configuration steps may also require customization.)\n\n***2. What is the role of class and defined variables?***\n\nI know the major functions I have been prototyping, such as the annotation extractor from the last [**CWPK #33**](https://www.mkbergman.com/2370/cwpk-33-a-python-package-part-i-the-annotation-extractor/) installment, need to be formalized as a defined function (the <code>def *function_name*</code> statement). Going into this packaging, however, it is not clear to me whether I should package multiple function definitions under one class (some tutorials seem to so suggest) or where and how I need to declare variables such as *loop* that are part of a run configuration.\n\nOne advantage of putting both variables and functions under a single class is that they can be handled as a unit. On the other hand, having a separate class of only input variables seems to be the best arrangement for a record orientation (see next question #4). In practice, I chose to embrace both types.\n\n***3. What is the role of <code>self</code> and where to introduce or use?***\n\nThe question of the role of <code>self</code> perplexed me for some time. On the one hand, <code>self</code> is not a reserved keyword in Python, but it is used frequently by convention. Class variables come in two flavors. One flavor is when the variable value is universal to all instances of class. Every instance of this class will share the same value for this variable. It is declared simply after first defining the class and outside of any methods:\n\n<pre>variable = my_variable</pre>\n\nIn contrast, instance variables, which is where <code>self</code> is used, are variables with values specific to each instance of class. The values of one instance typically vary from the values of another instance. Class instance variables should be declared within a method, often with this kind of form, as this example from the **Additional Documentation** shows:\n\n<pre>\nclass SomeClass:\n variable_1 = “ This is a class variable”\n variable_2 = 100 #this is also a class variable.\n\n def __init__(self, param1, param2):\n self.instance_var1 = param1\n #instance_var1 is a instance variable\n\tself.instance_var2 = param2 \n #instance_var2 is a instance variable\n</pre>\n\nIn this recipe, we are assigning <code>self</code> by convention to the first parameter of the function (method). We can then access the values of the instance variable as declared in the definition via the <code>self</code> convention, also without the need to pass additional arguments or parameters, making for simpler use and declarations. (**NB:** You may name this first parameter something other than <code>self</code>, but that is likely confusing since it goes against the convention.)\n\nImportantly, know we may use this same approach to assign <code>self</code> as the first parameter for instance methods, in addition to instance variables. For either instance variables or methods, Python explicitly passes the current instance and its arguments (<code>self</code>) as the first argument to the instance call.\n\nAt any rate, for our interest of being able to pass variable assignments from a separate <code>config.py</code> file to a local extraction routine, the approach using the universal class variable is the right form. But, is it the best form?\n\n***4. What is the best practice for initializing a record?***\n\nIf one stands back and thinks about what we are trying to do with our annotation extraction routine (as with other build or extraction steps), we see that we are trying to set a number of key parameters for what data we use and what branches we take during the routine. These parameters are, in effect, keywords used in the routines, the specific values of which (sources of data, what to loop over, etc.) vary by the specific instance of the extraction or build run we are currently invoking. This set-up sounds very much like a kind of 'record' format where we have certain method fields (such as output file or source of the looping data) that vary by run. This is equivalent to a *key:value* pair. In other words, we can treat our configuration specification as the input to a given run of the annotation extractor as a dictionary (<code>dict</code>) as we discussed in the last installment. The <code>dict</code> form looks to be the best form for our objective. We'll see this use below.\n\n***5. What are the special privileges about <code>\\_\\_main\\_\\_.py</code>?***\n\nAnother thing I saw while reading the background tutorials was reference to a more-or-less standard <code>\\_\\_main.\\_\\_.py</code> file. However, in looking at many of the packages installed in my current Python installation I saw that this construct is by no means universally used, though some packages do. Should I be using this format or not?\n\nFor two reasons my general desire is to remove this file. The first reason is because this file can be confused with the <code>\\_\\_main\\_\\_</code> module. The second reason is because I could find no real clear guidance about best practices for the file except to keep it simple. That seemed to me thin gruel for keeping something I did not fully understand and found confusing. So, I initially decided not to use this form.\n\nHowever, I found things broke when I tried to remove it. I assume with greater knowledge or more experience I might find the compelling recipe for simplifying this file away. But, it is easier to keep it and move on rather than get stuck on a question not central to our project. \n\n***6. What is the best practice for arranging internal imports across a project?***\n\nI think one of the reasons I did not see a simple answer to the above question is the fact I have not yet fully understood the relationships between global and local variables and module functions and inheritance, all of which require a sort of grokking, I suppose, of namespaces. \n\nI plan to continue to return to these questions as I learn more with subsequent installments and code development. If I encounter new insights or better ways to do things, my current intent is to return to any prior installments, leave the existing text as is, and then add annotations as to what I learned. If you have not seen any of these notices by now, I guess I have not later discovered better approaches. (**Note**: I think I began to get a better understanding about namespaces on the return leg of our build 'roundtrip', roughly about **CWPK #40** from now, but I still have questions, even from that later vantage point.)",
"_____no_output_____"
],
[
"### New File Definitions\nAs one may imagine, the transition from notebook to module package has resulted in some changes to the code. The first change, of course, was to split the code into the starting pieces, including adding the <code>\\_\\_init\\_\\_.py</code> that signals the available *cowpoke* package. Here is the new file structure:\n\n<pre>\n|-- PythonProject \n |-- Python \n |-- [Anaconda3 distribution] \n |-- Lib \n |-- site-packages # location to store files \n |-- alot \n |-- cowpoke # new project directory \n |-- __init__.py # four new files here \n |-- __main__.py \n |-- config.py \n |-- extract.py \n |-- TBA \n |-- TBA \n</pre>\n\nAt the top of each file we place our import statements, including references to other modules within the *cowpoke* project. Here is the statement at the top of <code>\\_\\_init\\_\\_.py</code> (which also includes some package identification boilerplate):\n\n<pre>\nfrom cowpoke.__main__ import *\nfrom cowpoke.config import *\nfrom cowpoke.extract import *\n</pre>\n\nI should note that the asterisk (\\*) character above tells the system to import all objects within the file, a practice that is generally not encouraged, though is common. It is discouraged because of the amount of objects brought into a current working space, which may pose name conflicts or a burdened system for larger projects. However, since our system is quite small and I do not foresee unmanageable namespace complexity, I use this simpler shorthand.\n\nOur <code>\\_\\_main\\_\\_.py</code> contains the standard start-up script that we have recently been using for many installments. You can see this code and the entire file by Running the next cell (assuming you have been following this entire **CWPK** series and have stored earlier distribution files):\n\n<div style=\"background-color:#eee; border:1px dotted #aaa; vertical-align:middle; margin:15px 60px; padding:8px;\"><strong>Which environment?</strong> The specific load routine you should choose below depends on whether you are using the online MyBinder service (the 'raw' version) or local files. The example below is based on using local files (though replace with your own local directory specification). If loading from MyBinder, replace with the lines that are commented (<code>#</code>) out.</div>",
"_____no_output_____"
]
],
[
[
"with open(r'C:\\1-PythonProjects\\Python\\Lib\\site-packages\\cowpoke\\__main__.py', 'r') as f:\n print(f.read())",
"_____no_output_____"
]
],
[
[
"(**NB:** Remember the '<code>r</code>' switch on the file name is to treat the string as 'raw'.)\n\nWe move our dictionary definitions to the <code>config.py</code>. Go ahead and inspect it in the next cell, but realized much has been added to this file due to subsequent coding steps in our project installments:",
"_____no_output_____"
]
],
[
[
"with open(r'C:\\1-PythonProjects\\Python\\Lib\\site-packages\\cowpoke\\config.py', 'r') as f:\n print(f.read())",
"_____no_output_____"
]
],
[
[
"We already had the class and property dictionaries as presented in the [**CWPK #33**](https://www.mkbergman.com/2370/cwpk-33-a-python-package-part-i-the-annotation-extractor/) installment. The key change notable for the <code>config.py</code>, which remember is intended for where we enter run specifications for a new run (build or extract) of the code, was to pull out our specifications for the annotation extractor. This new dictionary, the <code>extract_deck</code>, is expanded later to embrace other run parameters for additional functions. At the time of this initial set-up, however, the dictionary contained these relatively few entries:\n\n<pre>\nextract_deck = {\n \"\"\"This is the dictionary for the specifications of each\n extraction run; what is its run deck.\n \"\"\"\n 'property_loop' : '',\n 'class_loop' : '',\n 'loop' : 'property_loop',\n 'loop_list' : prop_dict.values(),\n 'out_file' : 'C:/1-PythonProjects/kbpedia/sandbox/prop_annot_out.csv',\n }\n</pre>\n\nThese are the values passed to the new annotation extraction function, <code>def annot_extractor</code>, now migrated to the <code>extract.py</code> module. Here is the commented code block (which will not run on its own as a cell):",
"_____no_output_____"
]
],
[
[
"def annot_extractor(**extract_deck): # define the method here, see note\n print('Beginning annotation extraction . . .') \n loop_list = extract_deck.get('loop_list') # notice we are passing run_deck to current vars\n loop = extract_deck.get('loop')\n out_file = extract_deck.get('out_file')\n class_loop = extract_deck.get('class_loop')\n property_loop = extract_deck.get('property_loop')\n a_dom = ''\n a_rng = ''\n a_func = ''\n \"\"\" These are internal counters used in this module's methods \"\"\"\n p_set = ''\n x = 1\n cur_list = []\n with open(out_file, mode='w', encoding='utf8', newline='') as output:\n csv_out = csv.writer(output) \n ... # remainder of code as prior installment . . . ",
"_____no_output_____"
]
],
[
[
"**Note:** Normally, a function definition is followed by its arguments in parentheses. The special notation of the double asterisks (\\*\\*) signals to expect a variable list of keywords (more often in tutorials shown as '<code>\\*\\*kwargs</code>'), which is how we make the connection to the values of the keys in the <code>extract_deck</code> dictionary. We retrieve these values based on the <code>.get()</code> method shown in the next assignments. Note, as well, that positional arguments can also be treated in a similar way using the single asterisk (<code>\\*</code>) notation ('<code>\\*args</code>').\n\nAt the command line or in an interactive notebook, we can run this function with the following call:\n\n<pre>\nimport cowpoke\ncowpoke.annot_extractor(**cowpoke.extract_deck)\n</pre>\n\nWe are not calling it here given that your local <code>config.py</code> is not set up with the proper configuration parameters for this specific example.\n\nThese efforts complete our initial set-up on the Python *cowpoke* package.\n\n### Generalizing and Moving the Structure Extractor\nYou may want to relate the modified code in this section to the last state of our structure extraction routine, shown as the last code cell in [**CWPK #32**](https://www.mkbergman.com/2368/cwpk-32-iterating-over-a-full-extraction/).\n\nWe took that code, applied the generalization approaches earlier discussed, and added a <code>set.union</code> method to getting the unique list from a very large list of large sets. This approach using sets (that can be hashed) sped up what had been a linear lookup by about 10x. We also moved the general parameters to share the same <code>extract_deck</code> dictionary. \n\nWe made the same accommodations for processing properties v classes (and typologies). We wrapped the resulting code block into a defined function wrapper, similar for what we did for annotations, only now for (is-a) structure:",
"_____no_output_____"
]
],
[
[
"from owlready2 import * \nfrom cowpoke.config import *\nfrom cowpoke.__main__ import *\nimport csv \nimport types\n\nworld = World()\n\nkko = []\nkb = []\nrc = []\ncore = []\nskos = []\nkb_src = master_deck.get('kb_src') # we get the build setting from config.py\n\nif kb_src is None:\n kb_src = 'standard'\nif kb_src == 'sandbox':\n kbpedia = 'C:/1-PythonProjects/kbpedia/sandbox/kbpedia_reference_concepts.owl'\n kko_file = 'C:/1-PythonProjects/kbpedia/sandbox/kko.owl'\nelif kb_src == 'standard':\n kbpedia = 'C:/1-PythonProjects/kbpedia/v300/targets/ontologies/kbpedia_reference_concepts.owl'\n kko_file = 'C:/1-PythonProjects/kbpedia/v300/build_ins/stubs/kko.owl'\nelif kb_src == 'extract':\n kbpedia = 'C:/1-PythonProjects/kbpedia/v300/build_ins/ontologies/kbpedia_reference_concepts.owl'\n kko_file = 'C:/1-PythonProjects/kbpedia/v300/build_ins/ontologies/kko.owl' \nelif kb_src == 'full':\n kbpedia = 'C:/1-PythonProjects/kbpedia/v300/build_ins/stubs/kbpedia_rc_stub.owl'\n kko_file = 'C:/1-PythonProjects/kbpedia/v300/build_ins/stubs/kko.owl'\nelse:\n print('You have entered an inaccurate source parameter for the build.')\nskos_file = 'http://www.w3.org/2004/02/skos/core' \n\nkb = world.get_ontology(kbpedia).load()\nrc = kb.get_namespace('http://kbpedia.org/kko/rc/') \n\nskos = world.get_ontology(skos_file).load()\nkb.imported_ontologies.append(skos)\ncore = world.get_namespace('http://www.w3.org/2004/02/skos/core#')\n\nkko = world.get_ontology(kko_file).load()\nkb.imported_ontologies.append(kko)\nkko = kb.get_namespace('http://kbpedia.org/ontologies/kko#')",
"_____no_output_____"
],
[
"def struct_extractor(**extract_deck):\n print('Beginning structure extraction . . .')\n loop_list = extract_deck.get('loop_list')\n loop = extract_deck.get('loop')\n out_file = extract_deck.get('out_file')\n class_loop = extract_deck.get('class_loop')\n property_loop = extract_deck.get('property_loop')\n x = 1\n cur_list = []\n a_set = []\n s_set = []\n# r_default = '' # Series of variables needed later\n# r_label = '' #\n# r_iri = '' #\n# render = '' #\n new_class = 'owl:Thing'\n with open(out_file, mode='w', encoding='utf8', newline='') as output:\n csv_out = csv.writer(output)\n if loop == class_loop: \n header = ['id', 'subClassOf', 'parent']\n p_item = 'rdfs:subClassOf'\n else:\n header = ['id', 'subPropertyOf', 'parent']\n p_item = 'rdfs:subPropertyOf'\n csv_out.writerow(header) \n for value in loop_list:\n print(' . . . processing', value) \n root = eval(value)\n a_set = root.descendants() \n a_set = set(a_set)\n s_set = a_set.union(s_set)\n print(' . . . processing consolidated set.')\n for s_item in s_set:\n o_set = s_item.is_a\n for o_item in o_set:\n row_out = (s_item,p_item,o_item)\n csv_out.writerow(row_out)\n if loop == class_loop:\n if s_item not in cur_list: \n row_out = (s_item,p_item,new_class)\n csv_out.writerow(row_out)\n cur_list.append(s_item)\n x = x + 1\n print('Total rows written to file:', x) ",
"_____no_output_____"
],
[
"struct_extractor(**extract_deck)",
"Beginning structure extraction . . .\n . . . processing kko.predicateProperties\n . . . processing kko.predicateDataProperties\n . . . processing kko.representations\n . . . processing consolidated set.\nTotal rows written to file: 9670\n"
]
],
[
[
"Again, since we can not guarantee the operating circumstance, you can try this on your own instance with the command:\n\n<pre>\ncowpoke.struct_extractor(**cowpoke.extract_deck)\n</pre>\n\nNote we're using a prefixed *cowpoke* function to make the generic dictionary request. All we need to do before the run is to go to the <code>config.py</code> file, and make the value (right-hand side) changes to the <code>extract_deck</code> dictionary. Save the file, make sure your current notebook instance has been cleared, and enter the command above. \n\nThere aren't any commercial-grade checks here to make sure you are not inadvertently overwriting a desired file. Loose code and routines such as what we are developing in this **CWPK** series warrant making frequent backups, and scrutinizing your <code>config.py</code> assignments before kicking off a run. ",
"_____no_output_____"
],
[
"### Additional Documentation\n\nHere are additional guides resulting from the research in today's installation:\n\n\n- Python's [Class and Instance Variable](https://docs.python.org/3/tutorial/classes.html#class-and-instance-variables) documentation\n- [Understanding self in Python](https://medium.com/quick-code/understanding-self-in-python-a3704319e5f0)\n- PythonTips' [The self variable in python explained](https://pythontips.com/2013/08/07/the-self-variable-in-python-explained/)\n- DEV's [class v instance variables](https://dev.to/ogwurujohnson/distinguishing-instance-variables-from-class-variables-in-python-81)\n- Programiz' [self in Python, Demystified](https://www.programiz.com/article/python-self-why)\n- StackOverflow's [What is \\_\\_main\\_\\_.py?](https://stackoverflow.com/questions/4042905/what-is-main-py)\n- See StackOverflow for a nice example of the advantage of [using sets to find unique items](https://stackoverflow.com/questions/12897374/get-unique-values-from-a-list-in-python) in a listing.\n\n\n <div style=\"background-color:#efefff; border:1px dotted #ceceff; vertical-align:middle; margin:15px 60px; padding:8px;\"> \n <span style=\"font-weight: bold;\">NOTE:</span> This article is part of the <a href=\"https://www.mkbergman.com/cooking-with-python-and-kbpedia/\" style=\"font-style: italic;\">Cooking with Python and KBpedia</a> series. See the <a href=\"https://www.mkbergman.com/cooking-with-python-and-kbpedia/\"><strong>CWPK</strong> listing</a> for other articles in the series. <a href=\"http://kbpedia.org/\">KBpedia</a> has its own Web site.\n </div>\n\n<div style=\"background-color:#ebf8e2; border:1px dotted #71c837; vertical-align:middle; margin:15px 60px; padding:8px;\"> \n\n<span style=\"font-weight: bold;\">NOTE:</span> This <strong>CWPK \ninstallment</strong> is available both as an online interactive\nfile <a href=\"https://mybinder.org/v2/gh/Cognonto/CWPK/master\" ><img src=\"https://mybinder.org/badge_logo.svg\" style=\"display:inline-block; vertical-align: middle;\" /></a> or as a <a href=\"https://github.com/Cognonto/CWPK\" title=\"CWPK notebook\" alt=\"CWPK notebook\">direct download</a> to use locally. Make sure and pick the correct installment number. For the online interactive option, pick the <code>*.ipynb</code> file. It may take a bit of time for the interactive option to load.</div>\n\n<div style=\"background-color:#feeedc; border:1px dotted #f7941d; vertical-align:middle; margin:15px 60px; padding:8px;\"> \n<div style=\"float: left; margin-right: 5px;\"><img src=\"http://kbpedia.org/cwpk-files/warning.png\" title=\"Caution!\" width=\"32\" /></div>I am at best an amateur with Python. There are likely more efficient methods for coding these steps than what I provide. I encourage you to experiment -- which is part of the fun of Python -- and to <a href=\"mailto:[email protected]\">notify me</a> should you make improvements. \n\n</div>",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown"
] |
[
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown",
"markdown"
]
] |
4aeb0f9fd6a03d6124a920b78958bff9516c13d0
| 5,164 |
ipynb
|
Jupyter Notebook
|
MathAndPython/week1/optimization_scipy.ipynb
|
ishatserka/MachineLearningAndDataAnalysisCoursera
|
e82e772df2f4aec162cb34ac6127df10d14a625a
|
[
"MIT"
] | null | null | null |
MathAndPython/week1/optimization_scipy.ipynb
|
ishatserka/MachineLearningAndDataAnalysisCoursera
|
e82e772df2f4aec162cb34ac6127df10d14a625a
|
[
"MIT"
] | null | null | null |
MathAndPython/week1/optimization_scipy.ipynb
|
ishatserka/MachineLearningAndDataAnalysisCoursera
|
e82e772df2f4aec162cb34ac6127df10d14a625a
|
[
"MIT"
] | null | null | null | 23.366516 | 427 | 0.494965 |
[
[
[
"# Решение оптимизационных задач в SciPy",
"_____no_output_____"
]
],
[
[
"from scipy import optimize",
"_____no_output_____"
],
[
"def f(x): # The rosenbrock function\n return .5*(1 - x[0])**2 + (x[1] - x[0]**2)**2\n \nprint(f([1, 1]))",
"0.0\n"
],
[
"result = optimize.brute(f, ((-5, 5), (-5, 5)))\nprint(result)",
"[ 0.99999324 1.00001283]\n"
],
[
"print(optimize.differential_evolution(f, ((-5, 5), (-5, 5))))",
" fun: 7.3955709864469857e-32\n message: 'Optimization terminated successfully.'\n nfev: 3243\n nit: 107\n success: True\n x: array([ 1., 1.])\n"
],
[
"import numpy as np\n\ndef g(x):\n return np.array((-2*.5*(1 - x[0]) - 4*x[0]*(x[1] - x[0]**2), 2*(x[1] - x[0]**2)))",
"_____no_output_____"
],
[
"print(optimize.check_grad(f, g, [2, 2]))",
"2.38418579102e-07\n"
],
[
"print(optimize.fmin_bfgs(f, [2, 2], fprime=g))",
"Optimization terminated successfully.\n Current function value: 0.000000\n Iterations: 8\n Function evaluations: 9\n Gradient evaluations: 9\n[ 1.00000582 1.00001285]\n"
],
[
"print(optimize.minimize(f, [2, 2]))",
" fun: 1.7837922318191788e-11\n hess_inv: array([[ 0.95489065, 1.90006641],\n [ 1.90006641, 4.27872401]])\n jac: array([ 9.88094923e-07, 2.41748031e-06])\n message: 'Optimization terminated successfully.'\n nfev: 36\n nit: 8\n njev: 9\n status: 0\n success: True\n x: array([ 1.00000573, 1.00001265])\n"
],
[
"print(optimize.minimize(f, [2, 2], method='BFGS'))",
" fun: 1.7837922318191788e-11\n hess_inv: array([[ 0.95489065, 1.90006641],\n [ 1.90006641, 4.27872401]])\n jac: array([ 9.88094923e-07, 2.41748031e-06])\n message: 'Optimization terminated successfully.'\n nfev: 36\n nit: 8\n njev: 9\n status: 0\n success: True\n x: array([ 1.00000573, 1.00001265])\n"
],
[
"print(optimize.minimize(f, [2, 2], method='Nelder-Mead'))",
" final_simplex: (array([[ 0.99998568, 0.99996682],\n [ 1.00002149, 1.00004744],\n [ 1.0000088 , 1.00003552]]), array([ 1.23119954e-10, 2.50768082e-10, 3.59639951e-10]))\n fun: 1.2311995365407462e-10\n message: 'Optimization terminated successfully.'\n nfev: 91\n nit: 46\n status: 0\n success: True\n x: array([ 0.99998568, 0.99996682])\n"
]
]
] |
[
"markdown",
"code"
] |
[
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
]
] |
4aeb106e75b3686ec40a688c2c2e25a300001b56
| 15,133 |
ipynb
|
Jupyter Notebook
|
session3/complete/session3.ipynb
|
zhiweih/pb-exercises
|
c5e64075c47503a40063aa836c06a452af14246d
|
[
"BSD-2-Clause"
] | 153 |
2017-09-27T01:10:19.000Z
|
2022-03-17T12:13:59.000Z
|
session3/complete/session3.ipynb
|
zhiweih/pb-exercises
|
c5e64075c47503a40063aa836c06a452af14246d
|
[
"BSD-2-Clause"
] | 3 |
2018-11-10T20:04:13.000Z
|
2022-02-15T23:12:53.000Z
|
session3/complete/session3.ipynb
|
zhiweih/pb-exercises
|
c5e64075c47503a40063aa836c06a452af14246d
|
[
"BSD-2-Clause"
] | 85 |
2017-10-09T16:18:00.000Z
|
2022-02-09T14:21:08.000Z
| 31.396266 | 1,361 | 0.626313 |
[
[
[
"############## PLEASE RUN THIS CELL FIRST! ###################\n\n# import everything and define a test runner function\nfrom importlib import reload\nfrom helper import run\nimport ecc, helper, tx, script",
"_____no_output_____"
],
[
"# Signing Example\nfrom ecc import G, N\nfrom helper import hash256\nsecret = 1800555555518005555555\nz = int.from_bytes(hash256(b'ECDSA is awesome!'), 'big')\nk = 12345\nr = (k*G).x.num\ns = (z+r*secret) * pow(k, -1, N) % N\nprint(hex(z), hex(r), hex(s))\nprint(secret*G)",
"0xcf6304e0ed625dc13713ad8b330ca764325f013fe7a3057dbe6a2053135abeb4 0xf01d6b9018ab421dd410404cb869072065522bf85734008f105cf385a023a80f 0xf10c07e197e8b0e717108d0703d874357424ece31237c864621ac7acb0b9394c\nS256Point(4519fac3d910ca7e7138f7013706f619fa8f033e6ec6e09370ea38cee6a7574,82b51eab8c27c66e26c858a079bcdf4f1ada34cec420cafc7eac1a42216fb6c4)\n"
],
[
"# Verification Example\nfrom ecc import S256Point, G, N\nz = 0xbc62d4b80d9e36da29c16c5d4d9f11731f36052c72401a76c23c0fb5a9b74423\nr = 0x37206a0610995c58074999cb9767b87af4c4978db68c06e8e6e81d282047a7c6\ns = 0x8ca63759c1157ebeaec0d03cecca119fc9a75bf8e6d0fa65c841c8e2738cdaec\npoint = S256Point(0x04519fac3d910ca7e7138f7013706f619fa8f033e6ec6e09370ea38cee6a7574,\n 0x82b51eab8c27c66e26c858a079bcdf4f1ada34cec420cafc7eac1a42216fb6c4)\nu = z * pow(s, -1, N) % N\nv = r * pow(s, -1, N) % N\nprint((u*G + v*point).x.num == r)",
"True\n"
]
],
[
[
"### Exercise 1\nWhich sigs are valid?\n\n```\nP = (887387e452b8eacc4acfde10d9aaf7f6d9a0f975aabb10d006e4da568744d06c,\n61de6d95231cd89026e286df3b6ae4a894a3378e393e93a0f45b666329a0ae34)\nz, r, s = ec208baa0fc1c19f708a9ca96fdeff3ac3f230bb4a7ba4aede4942ad003c0f60,\nac8d1c87e51d0d441be8b3dd5b05c8795b48875dffe00b7ffcfac23010d3a395,\n68342ceff8935ededd102dd876ffd6ba72d6a427a3edb13d26eb0781cb423c4\nz, r, s = 7c076ff316692a3d7eb3c3bb0f8b1488cf72e1afcd929e29307032997a838a3d,\neff69ef2b1bd93a66ed5219add4fb51e11a840f404876325a1e8ffe0529a2c,\nc7207fee197d27c618aea621406f6bf5ef6fca38681d82b2f06fddbdce6feab6\n```\n",
"_____no_output_____"
]
],
[
[
"# Exercise 1\n\nfrom ecc import S256Point, G, N\npx = 0x887387e452b8eacc4acfde10d9aaf7f6d9a0f975aabb10d006e4da568744d06c\npy = 0x61de6d95231cd89026e286df3b6ae4a894a3378e393e93a0f45b666329a0ae34\nsignatures = (\n # (z, r, s)\n (0xec208baa0fc1c19f708a9ca96fdeff3ac3f230bb4a7ba4aede4942ad003c0f60,\n 0xac8d1c87e51d0d441be8b3dd5b05c8795b48875dffe00b7ffcfac23010d3a395,\n 0x68342ceff8935ededd102dd876ffd6ba72d6a427a3edb13d26eb0781cb423c4),\n (0x7c076ff316692a3d7eb3c3bb0f8b1488cf72e1afcd929e29307032997a838a3d,\n 0xeff69ef2b1bd93a66ed5219add4fb51e11a840f404876325a1e8ffe0529a2c,\n 0xc7207fee197d27c618aea621406f6bf5ef6fca38681d82b2f06fddbdce6feab6),\n)\n# initialize the public point\n# use: S256Point(x-coordinate, y-coordinate)\npoint = S256Point(px, py)\n# iterate over signatures\nfor z, r, s in signatures:\n # u = z / s, v = r / s\n u = z * pow(s, -1, N) % N\n v = r * pow(s, -1, N) % N\n # finally, uG+vP should have the x-coordinate equal to r\n print((u*G+v*point).x.num == r)",
"True\nTrue\n"
]
],
[
[
"### Exercise 2\n\n\n\n\n#### Make [this test](/edit/session3/ecc.py) pass: `ecc.py:S256Test:test_verify`",
"_____no_output_____"
]
],
[
[
"# Exercise 2\n\nreload(ecc)\nrun(ecc.S256Test('test_verify'))",
".\n----------------------------------------------------------------------\nRan 1 test in 0.759s\n\nOK\n"
]
],
[
[
"### Exercise 3\n\n\n\n\n#### Make [this test](/edit/session3/ecc.py) pass: `ecc.py:PrivateKeyTest:test_sign`",
"_____no_output_____"
]
],
[
[
"# Exercise 3\n\nreload(ecc)\nrun(ecc.PrivateKeyTest('test_sign'))",
".\n----------------------------------------------------------------------\nRan 1 test in 0.768s\n\nOK\n"
]
],
[
[
"### Exercise 4\nVerify the DER signature for the hash of \"ECDSA is awesome!\" for the given SEC pubkey\n\n`z = int.from_bytes(hash256('ECDSA is awesome!'), 'big')`\n\nPublic Key in SEC Format:\n0204519fac3d910ca7e7138f7013706f619fa8f033e6ec6e09370ea38cee6a7574\n\nSignature in DER Format: 304402201f62993ee03fca342fcb45929993fa6ee885e00ddad8de154f268d98f083991402201e1ca12ad140c04e0e022c38f7ce31da426b8009d02832f0b44f39a6b178b7a1\n",
"_____no_output_____"
]
],
[
[
"# Exercise 4\n\nfrom ecc import S256Point, Signature\nfrom helper import hash256\nder = bytes.fromhex('304402201f62993ee03fca342fcb45929993fa6ee885e00ddad8de154f268d98f083991402201e1ca12ad140c04e0e022c38f7ce31da426b8009d02832f0b44f39a6b178b7a1')\nsec = bytes.fromhex('0204519fac3d910ca7e7138f7013706f619fa8f033e6ec6e09370ea38cee6a7574')\n# message is the hash256 of the message \"ECDSA is awesome!\"\nz = int.from_bytes(hash256(b'ECDSA is awesome!'), 'big')\n# parse the der format to get the signature\nsig = Signature.parse(der)\n# parse the sec format to get the public key\npoint = S256Point.parse(sec)\n# use the verify method on S256Point to validate the signature\nprint(point.verify(z, sig))",
"True\n"
]
],
[
[
"### Exercise 5\n\n\n\n\n#### Make [this test](/edit/session3/tx.py) pass: `tx.py:TxTest:test_parse_version`",
"_____no_output_____"
]
],
[
[
"# Exercise 5\n\nreload(tx)\nrun(tx.TxTest('test_parse_version'))",
".\n----------------------------------------------------------------------\nRan 1 test in 0.003s\n\nOK\n"
]
],
[
[
"### Exercise 6\n\n\n\n\n#### Make [this test](/edit/session3/tx.py) pass: `tx.py:TxTest:test_parse_inputs`",
"_____no_output_____"
]
],
[
[
"# Exercise 6\n\nreload(tx)\nrun(tx.TxTest('test_parse_inputs'))",
".\n----------------------------------------------------------------------\nRan 1 test in 0.003s\n\nOK\n"
]
],
[
[
"### Exercise 7\n\n\n\n\n#### Make [this test](/edit/session3/tx.py) pass: `tx.py:TxTest:test_parse_outputs`",
"_____no_output_____"
]
],
[
[
"# Exercise 7\n\nreload(tx)\nrun(tx.TxTest('test_parse_outputs'))",
".\n----------------------------------------------------------------------\nRan 1 test in 0.003s\n\nOK\n"
]
],
[
[
"### Exercise 8\n\n\n\n\n#### Make [this test](/edit/session3/tx.py) pass: `tx.py:TxTest:test_parse_locktime`",
"_____no_output_____"
]
],
[
[
"# Exercise 8\n\nreload(tx)\nrun(tx.TxTest('test_parse_locktime'))",
".\n----------------------------------------------------------------------\nRan 1 test in 0.005s\n\nOK\n"
]
],
[
[
"### Exercise 9\nWhat is the scriptSig from the second input in this tx? What is the scriptPubKey and amount of the first output in this tx? What is the amount for the second output?\n\n```\n010000000456919960ac691763688d3d3bcea9ad6ecaf875df5339e148a1fc61c6ed7a069e010000006a47304402204585bcdef85e6b1c6af5c2669d4830ff86e42dd205c0e089bc2a821657e951c002201024a10366077f87d6bce1f7100ad8cfa8a064b39d4e8fe4ea13a7b71aa8180f012102f0da57e85eec2934a82a585ea337ce2f4998b50ae699dd79f5880e253dafafb7feffffffeb8f51f4038dc17e6313cf831d4f02281c2a468bde0fafd37f1bf882729e7fd3000000006a47304402207899531a52d59a6de200179928ca900254a36b8dff8bb75f5f5d71b1cdc26125022008b422690b8461cb52c3cc30330b23d574351872b7c361e9aae3649071c1a7160121035d5c93d9ac96881f19ba1f686f15f009ded7c62efe85a872e6a19b43c15a2937feffffff567bf40595119d1bb8a3037c356efd56170b64cbcc160fb028fa10704b45d775000000006a47304402204c7c7818424c7f7911da6cddc59655a70af1cb5eaf17c69dadbfc74ffa0b662f02207599e08bc8023693ad4e9527dc42c34210f7a7d1d1ddfc8492b654a11e7620a0012102158b46fbdff65d0172b7989aec8850aa0dae49abfb84c81ae6e5b251a58ace5cfeffffffd63a5e6c16e620f86f375925b21cabaf736c779f88fd04dcad51d26690f7f345010000006a47304402200633ea0d3314bea0d95b3cd8dadb2ef79ea8331ffe1e61f762c0f6daea0fabde022029f23b3e9c30f080446150b23852028751635dcee2be669c2a1686a4b5edf304012103ffd6f4a67e94aba353a00882e563ff2722eb4cff0ad6006e86ee20dfe7520d55feffffff0251430f00000000001976a914ab0c0b2e98b1ab6dbf67d4750b0a56244948a87988ac005a6202000000001976a9143c82d7df364eb6c75be8c80df2b3eda8db57397088ac46430600\n```\n",
"_____no_output_____"
]
],
[
[
"# Exercise 9\n\nfrom io import BytesIO\nfrom tx import Tx\nhex_transaction = '010000000456919960ac691763688d3d3bcea9ad6ecaf875df5339e148a1fc61c6ed7a069e010000006a47304402204585bcdef85e6b1c6af5c2669d4830ff86e42dd205c0e089bc2a821657e951c002201024a10366077f87d6bce1f7100ad8cfa8a064b39d4e8fe4ea13a7b71aa8180f012102f0da57e85eec2934a82a585ea337ce2f4998b50ae699dd79f5880e253dafafb7feffffffeb8f51f4038dc17e6313cf831d4f02281c2a468bde0fafd37f1bf882729e7fd3000000006a47304402207899531a52d59a6de200179928ca900254a36b8dff8bb75f5f5d71b1cdc26125022008b422690b8461cb52c3cc30330b23d574351872b7c361e9aae3649071c1a7160121035d5c93d9ac96881f19ba1f686f15f009ded7c62efe85a872e6a19b43c15a2937feffffff567bf40595119d1bb8a3037c356efd56170b64cbcc160fb028fa10704b45d775000000006a47304402204c7c7818424c7f7911da6cddc59655a70af1cb5eaf17c69dadbfc74ffa0b662f02207599e08bc8023693ad4e9527dc42c34210f7a7d1d1ddfc8492b654a11e7620a0012102158b46fbdff65d0172b7989aec8850aa0dae49abfb84c81ae6e5b251a58ace5cfeffffffd63a5e6c16e620f86f375925b21cabaf736c779f88fd04dcad51d26690f7f345010000006a47304402200633ea0d3314bea0d95b3cd8dadb2ef79ea8331ffe1e61f762c0f6daea0fabde022029f23b3e9c30f080446150b23852028751635dcee2be669c2a1686a4b5edf304012103ffd6f4a67e94aba353a00882e563ff2722eb4cff0ad6006e86ee20dfe7520d55feffffff0251430f00000000001976a914ab0c0b2e98b1ab6dbf67d4750b0a56244948a87988ac005a6202000000001976a9143c82d7df364eb6c75be8c80df2b3eda8db57397088ac46430600'\n# bytes.fromhex to get the binary representation\nbin_transaction = bytes.fromhex(hex_transaction)\n# create a stream using BytesIO()\nstream = BytesIO(bin_transaction)\n# Tx.parse() the stream\ntx_obj = Tx.parse(stream)\n# print tx's second input's scriptSig\nprint(tx_obj.tx_ins[1].script_sig)\n# print tx's first output's scriptPubKey\nprint(tx_obj.tx_outs[0].script_pubkey)\n# print tx's second output's amount\nprint(tx_obj.tx_outs[1].amount)",
"304402207899531a52d59a6de200179928ca900254a36b8dff8bb75f5f5d71b1cdc26125022008b422690b8461cb52c3cc30330b23d574351872b7c361e9aae3649071c1a71601 035d5c93d9ac96881f19ba1f686f15f009ded7c62efe85a872e6a19b43c15a2937\nOP_DUP OP_HASH160 ab0c0b2e98b1ab6dbf67d4750b0a56244948a879 OP_EQUALVERIFY OP_CHECKSIG\n40000000\n"
]
]
] |
[
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code"
] |
[
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
]
] |
4aeb153c8180d8c8873c94e48ac5eb9a90e5d2ec
| 307,525 |
ipynb
|
Jupyter Notebook
|
example.ipynb
|
elc08/ARCH-meth
|
8889781c4e5f2085234a863085eff503ca8fb220
|
[
"MIT"
] | null | null | null |
example.ipynb
|
elc08/ARCH-meth
|
8889781c4e5f2085234a863085eff503ca8fb220
|
[
"MIT"
] | null | null | null |
example.ipynb
|
elc08/ARCH-meth
|
8889781c4e5f2085234a863085eff503ca8fb220
|
[
"MIT"
] | null | null | null | 588.001912 | 131,414 | 0.946173 |
[
[
[
"import pandas as pd\nimport numpy as np\nimport seaborn as sns\nimport plotly.graph_objects as go\nimport matplotlib.pyplot as plt\n\nfrom itertools import combinations",
"_____no_output_____"
],
[
"data = np.load('/home/jan/lbc_full.npy')\nmeta = pd.read_csv('/mnt/tchandra-lab/Jan/methyl-pattern/data/lbc/meta.csv')\nlbc_fitness = pd.read_csv('Datasets/fitness_table.csv', index_col='id')",
"_____no_output_____"
],
[
"# Pre-allocate the memory for meth_gradients\ncounter = 0\nfor part_id in meta.ID.unique():\n # Extract number of waves in participant\n waves_number = len(meta[meta.ID == part_id].sort_values(by='WAVE'))\n\n # Use arithmetic progression formula to update #possible wave combinations\n combinations = waves_number*(waves_number-1)/2\n counter = counter + int(combinations)\n\n# create empty numpy array, each row is a combination of methylation gradients \ngradients = np.empty((counter, data.shape[1]))",
"_____no_output_____"
],
[
"# Create gradients metadata dataframe\ngradients_meta = pd.DataFrame()\n\n# Track combination number to point towards a row in gradients\nindex_counter = 0\n\nfor part_id in meta.ID.unique():\n part_slice = meta[meta.ID == part_id].sort_values(by='WAVE')\n\n for comb in combinations(part_slice.WAVE, 2):\n init_index = part_slice[part_slice['WAVE']==comb[0]]['index']\n last_index = part_slice[part_slice['WAVE']==comb[1]]['index']\n gradients[index_counter, :] = (data[last_index] - data[init_index]) / (3*(comb[1]-comb[0]))\n\n gradients_meta = gradients_meta.append({'part_id': part_id, \n 'gradients_index': index_counter,\n 'combination': comb},\n ignore_index=True)\n index_counter += 1",
"_____no_output_____"
],
[
"gradients_meta",
"_____no_output_____"
],
[
"y = np.zeros((len(gradients_meta), len(lbc_fitness.columns)))\nfor i, row in gradients_meta.iterrows():\n if row.part_id in lbc_fitness.index.unique():\n y[i,:] = lbc_fitness[lbc_fitness.index == row.part_id].values",
"_____no_output_____"
],
[
"zero_columns = np.where(~target.any(axis=1))[0]\n\ny_filtered = np.delete(target, zero_columns, axis=0)\nX_filtered = np.delete(gradients, zero_columns, axis=0)",
"_____no_output_____"
],
[
"import numpy as np\nfrom sklearn.decomposition import NMF\nmodel = NMF(n_components=100, init='random', random_state=0)\nW = model.fit_transform(X_filtered)\nH = model.components_",
"_____no_output_____"
],
[
"std_CpG = np.nanstd(X_filtered, axis=0)",
"_____no_output_____"
],
[
"box = sns.boxplot(x=std_CpG)\nbox",
"_____no_output_____"
],
[
"a=1\na",
"_____no_output_____"
]
],
[
[
"# Check sites",
"_____no_output_____"
]
],
[
[
"def part_gradient(part_id):\n part_slice = meta[meta.ID == part_id].sort_values(by='WAVE')\n time_span = 3*(part_slice.WAVE.iloc[-1] - part_slice.WAVE.iloc[0])\n \n first_index = meta[meta.ID == part_id].sort_values(by='WAVE')['index'].iloc[0]\n last_index = meta[meta.ID == part_id].sort_values(by='WAVE')['index'].iloc[-1]\n\n gradient = (data[last_index] - data[first_index]) / time_span\n \n return gradient\n\ndef check_sites(part_id , top_sites=True, bottom=True, n_std=4):\n # Extract participant data\n part_slice = meta[meta.ID == part_id].sort_values(by='WAVE')\n part_data = data[part_slice['index'],]\n\n # Compute evolution of methylation between first and last timepoint\n meth_evolution = part_gradient(part_id)\n mean = np.nanmean(meth_evolution)\n std = np.nanstd(meth_evolution)\n\n # Find locations whit large gradients\n top_sites = np.where(meth_evolution > mean + n_std*std)[0]\n bottom_sites = np.where(meth_evolution < mean - n_std*std)[0] \n\n fig, (ax1, ax2) = plt.subplots(2, 1)\n\n # Plot top sites\n for site in top_sites:\n ax1.plot(part_slice['WAVE'], part_data[:,site])\n\n # Plot bottom sites\n for site in bottom_sites:\n ax2.plot(part_slice['WAVE'], part_data[:,site])\n \n return fig, (top_sites, bottom_sites)",
"_____no_output_____"
],
[
"# Compute evolution of methylation between first and last timepoint\n\nmeth_evolution = part_gradient('LBC0001A')\nmean = np.nanmean(meth_evolution)\nstd = np.nanstd(meth_evolution)\nprint(f'Mean: {mean} -- 2 Std: {2*std}')\n\nbox = sns.boxplot(x=meth_evolution)",
"Mean: -0.00021586747144305057 -- 2 Std: 0.0145054513559847\n"
],
[
"# Extract and plot top and bottom sites\nfig, sites = check_sites('LBC0001A')",
"_____no_output_____"
],
[
"# Extract and plot top and bottom sites\nfig_2, sites_2 = check_sites('LBC0251K')",
"_____no_output_____"
]
],
[
[
"# Predicting the presence of mutations based on the longitudinal evolution of mutations\n\n## Preparing a dataset",
"_____no_output_____"
]
],
[
[
"import numpy as np\nfrom tensorflow import keras\nfrom keras.datasets import mnist",
"Using TensorFlow backend.\n"
],
[
"#loading dataset\n(train_X, train_y), (val_X, val_y) = mnist.load_data()\n\n#normalizing the dataset\ntrain_X, val_X = train_X/255, val_X/255\n\n# visualizing 9 rndom digits from the dataset\nfor i in range(331,340):\n plt.subplot(i)\n a = np.random.randint(0, train_X.shape[0], 1)\n plt.imshow(train_X[a[0]], cmap = plt.get_cmap('binary'))\n\nplt.tight_layout()\nplt.show()",
"_____no_output_____"
],
[
"train_X.shape",
"_____no_output_____"
]
]
] |
[
"code",
"markdown",
"code",
"markdown",
"code"
] |
[
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
]
] |
4aeb165e3e0262a0e5530a788670fe081b5c7fc8
| 223,188 |
ipynb
|
Jupyter Notebook
|
Crop Prediction ML Model.ipynb
|
Harshit564/Crop-Prediction-ML-Model
|
3ec48b5fa2be11f3dba379970e2fb2d6b032a2b0
|
[
"Apache-2.0"
] | null | null | null |
Crop Prediction ML Model.ipynb
|
Harshit564/Crop-Prediction-ML-Model
|
3ec48b5fa2be11f3dba379970e2fb2d6b032a2b0
|
[
"Apache-2.0"
] | null | null | null |
Crop Prediction ML Model.ipynb
|
Harshit564/Crop-Prediction-ML-Model
|
3ec48b5fa2be11f3dba379970e2fb2d6b032a2b0
|
[
"Apache-2.0"
] | 1 |
2020-12-18T13:32:26.000Z
|
2020-12-18T13:32:26.000Z
| 265.068884 | 119,264 | 0.909274 |
[
[
[
"# ML Model For Crop Prediction\n\n1. We are using the dataset which we have already cleaned and can be found <a href=\"https://github.com/Harshit564/Crop-Prediction-ML-Model/blob/main/final_crops_data.csv\" target=\"_top\">here</a>\n2. Our goal is to train a ML model which can predict the crop from the given features.",
"_____no_output_____"
]
],
[
[
"#importing the necessary libraries\n\nimport os\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nsns.set_style(\"darkgrid\")",
"_____no_output_____"
],
[
"# loading the csv file into the dataframe object\n\ncrops = pd.read_csv(\"final_crops_data.csv\")",
"_____no_output_____"
],
[
"crops.head()",
"_____no_output_____"
],
[
"# features and target variable in the dataset\n\ncolumns = list(crops.columns)\nprint(\"features in the dataset :-\")\nprint(columns[:-1])\nprint(\"\\n\")\nprint(\"Target variable :-\")\nprint(columns[-1])",
"features in the dataset :-\n['pH', 'moisture', 'humidity', 'temperature']\n\n\nTarget variable :-\ncrop\n"
],
[
"# Let's explore the dataset before training the ML model\n\nfig,axes = plt.subplots(2,2,sharey=False,sharex=False,figsize=(10,10))\n\nx = [0,0,1,1]\ny = [0,1,0,1]\n\nfor x,y,feature in zip(x,y,columns[:-1]):\n axes[x,y].hist(crops[feature],bins=30)\n axes[x,y].set_title(feature,fontsize=20)\n axes[x,y].set_ylabel(\"frequency\",fontsize=10)\n\nplt.show()",
"_____no_output_____"
]
],
[
[
"### From the histograms of all features you can see only pH has the normal distribution",
"_____no_output_____"
]
],
[
[
"# Boxplots\n\nfig,ax = plt.subplots(figsize=(13,13))\n\nsns.boxplot(x=\"pH\",y=\"crop\",data=crops)\nlabels = ax.get_yticklabels()\nax.set_ylabel(\"Crops\",Fontsize=\"18\")\nax.set_yticklabels(labels,Fontsize=14)\nplt.show()",
"_____no_output_____"
]
],
[
[
"### From the boxplot you can see \"phaphar\" crop has the largest pH range.",
"_____no_output_____"
]
],
[
[
"# Max humidity that can be withstand by crops\n\ncrops_max_temp = crop.groupby(\"crop\")[\"humidity\"].max()\ncrops_max_temp = crops_max_temp*100",
"_____no_output_____"
],
[
"fig,ax = plt.subplots(figsize=(12,12),dpi=80)\n\nax.plot(crops_max_temp,marker=\"s\",color='r')\nax.set_title(\"Maximum Humidity withstand by crops\",fontsize=20)\nax.set_xlabel(\"crops\",fontsize=15,labelpad=20)\nax.set_ylabel(\"Humidity(in %)\",fontsize=15)\ncr = ax.get_xticklabels()\nplt.xticks(rotation=45,fontsize=14)\nplt.yticks(fontsize=14)\nplt.show()",
"_____no_output_____"
]
],
[
[
"### From this graph you can see that 3 crops cabbage, strawberry and tomato can withstand the 90% humidity",
"_____no_output_____"
]
],
[
[
"#Splitting the data into training and testing set\n\nfeatures = crops.iloc[:,:-1]\nlabel = crops.iloc[:,-1]\n\nfrom sklearn.model_selection import train_test_split\n\nX_train, X_test, y_train, y_test = train_test_split(features, label, random_state=7,test_size=0.2, stratify=label)",
"_____no_output_____"
],
[
"# Preprocessing the data before feeding it to the ML algorithm\n\nfrom sklearn.preprocessing import StandardScaler\n\n# Standard Scaling\n\nstd_scalar = StandardScaler()\n\nX_train_std_scaled = std_scalar.fit_transform(X_train)\nX_test_std_scaled = std_scalar.transform(X_test)",
"_____no_output_____"
],
[
"# Training the dataset using K Nearest Neighbor\nfrom sklearn.neighbors import KNeighborsClassifier\nfrom sklearn.linear_model import LogisticRegression\nfrom sklearn.metrics import accuracy_score\n\n#lr_clf = LogisticRegression(max_iter=500,random_state=7)\nknn_clf = KNeighborsClassifier(n_neighbors=3)\n\nknn_clf.fit(X_train_std_scaled,y_train)\n\ny_predict_knn = knn_clf.predict(X_test_std_scaled)\n\nprint(\"Accuracy score using K(=3) Neighbors is \" + str(accuracy_score(y_test,y_predict_knn)))",
"Accuracy score using K(=3) Neighbors is 0.8668421052631579\n"
],
[
"lr_clf = LogisticRegression(max_iter=100000,random_state=7)\nlr_clf.fit(X_train_std_scaled,y_train)\ny_predict_lr = lr_clf.predict(X_test_std_scaled)\n\nprint(\"Accuracy score Logistic Regression using is \" + str(accuracy_score(y_test,y_predict_lr)))",
"Accuracy score Logistic Regression using is 0.8231578947368421\n"
],
[
"from sklearn.svm import SVC\n\nsvm_clf = SVC(kernel='rbf')\nsvm_clf.fit(X_train_std_scaled, y_train)\n\ny_predict_svm = svm_clf.predict(X_test_std_scaled)\n\nprint(\"Accuracy score using SVM is \" + str(accuracy_score(y_test,y_predict_svm)))",
"Accuracy score using SVM is 0.8668421052631579\n"
],
[
"from sklearn.tree import DecisionTreeClassifier\n\ntree_clf = DecisionTreeClassifier(max_depth=10)\ntree_clf.fit(X_train_std_scaled, y_train)\ny_predict_tree = tree_clf.predict(X_test_std_scaled)\n\nprint(\"Accuracy score using Decision tree classifier is \" + str(accuracy_score(y_test,y_predict_tree)))",
"Accuracy score using Decision tree classifier is 0.8878947368421053\n"
],
[
"# Random Forest Model\n\nfrom sklearn.ensemble import RandomForestClassifier\n\nrf_clf = RandomForestClassifier(n_estimators=100,max_depth=9,random_state=50)\nrf_clf.fit(X_train_std_scaled, y_train)",
"_____no_output_____"
],
[
"y_predict_rf = rf_clf.predict(X_test_std_scaled)\n\nprint(\"Accuracy score using Random Forest classifier is \" + str(accuracy_score(y_test,y_predict_rf)))",
"Accuracy score using Random Forest classifier is 0.8889473684210526\n"
],
[
"# Finding the best hyperparameters using RandomisedSearchCV\n\n# Forming the random grid\n\n# Number of trees in random forest\nn_estimators = [int(x) for x in np.linspace(start = 200, stop = 2000, num = 10)]\n# Number of features to consider at every split\nmax_features = ['auto', 'sqrt']\n# Maximum number of levels in tree\nmax_depth = [int(x) for x in np.linspace(10, 110, num = 11)]\nmax_depth.append(None)\n# Minimum number of samples required to split a node\nmin_samples_split = [2, 5, 10]\n# Minimum number of samples required at each leaf node\nmin_samples_leaf = [1, 2, 4]\n# Method of selecting samples for training each tree\nbootstrap = [True, False]\n# Create the random grid\nrandom_grid = {'n_estimators': n_estimators,\n 'max_features': max_features,\n 'max_depth': max_depth,\n 'min_samples_split': min_samples_split,\n 'min_samples_leaf': min_samples_leaf,\n 'bootstrap': bootstrap}\nprint(random_grid)\n\n# Use the random grid to search for best hyperparameters\n# First create the base model to tune\nrf = RandomForestClassifier()\n# Random search of parameters, using 3 fold cross validation, \n# search across 100 different combinations, and use all available cores\nrf_random = RandomizedSearchCV(estimator = rf, param_distributions = random_grid, n_iter = 100, cv = 3, verbose=2, random_state=42, n_jobs = -1)\n# Fit the random search model\nrf_random.fit(X_train_std_scaled, y_train)",
"{'n_estimators': [200, 400, 600, 800, 1000, 1200, 1400, 1600, 1800, 2000], 'max_features': ['auto', 'sqrt'], 'max_depth': [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, None], 'min_samples_split': [2, 5, 10], 'min_samples_leaf': [1, 2, 4], 'bootstrap': [True, False]}\nFitting 3 folds for each of 100 candidates, totalling 300 fits\n"
],
[
"rf_random.best_params_",
"_____no_output_____"
],
[
"# Again training the Random Forest Classifier with best parameters\n\nrf_clf_best = RandomForestClassifier(n_estimators=400,\n min_samples_split=2,\n min_samples_leaf=4,\n max_features=\"sqrt\",\n max_depth=10,\n bootstrap=True)\n\nrf_clf_best.fit(X_train_std_scaled, y_train)",
"_____no_output_____"
],
[
"y_predict_rf_be = rf_clf_best.predict(X_test_std_scaled)\n\nprint(\"Accuracy score using tuned Random Forest classifier is \" + str(accuracy_score(y_test,y_predict_rf_be)))",
"Accuracy score using tuned Random Forest classifier is 0.8863157894736842\n"
],
[
"from sklearn.model_selection import GridSearchCV\n# Create the parameter grid based on the results of random search \nparam_grid = {\n 'bootstrap': [True],\n 'max_depth': [80, 90, 100, 110],\n 'max_features': [2, 3],\n 'min_samples_leaf': [3, 4, 5],\n 'min_samples_split': [8, 10, 12],\n 'n_estimators': [100, 200, 300, 1000]\n}\n# Create a based model\nrf_clf_grid = RandomForestClassifier()\n# Instantiate the grid search model\ngrid_search = GridSearchCV(estimator = rf_clf_grid, param_grid = param_grid, \n cv = 3, n_jobs = -1, verbose = 2)\n\ngrid_search.fit(X_train_std_scaled, y_train)",
"Fitting 3 folds for each of 288 candidates, totalling 864 fits\n"
],
[
"grid_search.best_params_",
"_____no_output_____"
],
[
"# Again training the Random Forest Classifier with best parameters found using GridSearchCV\n\nrf_clf_best_gr = RandomForestClassifier(n_estimators=50,\n min_samples_split=8,\n min_samples_leaf=5,\n max_features=4,\n max_depth=10,\n bootstrap=True,\n random_state=50)\n\nrf_clf_best_gr.fit(X_train_std_scaled, y_train)\n\ny_predict_rf_gr = rf_clf_best_gr.predict(X_test_std_scaled)\n\nprint(\"Accuracy score using tuned(GridSearchCV) Random Forest classifier is \" + str(accuracy_score(y_test,y_predict_rf_gr)))",
"Accuracy score using tuned(GridSearchCV) Random Forest classifier is 0.8910526315789473\n"
]
],
[
[
"## After tuning the Hyperparameter we managed to improve our model by 0.2%",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown"
] |
[
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
]
] |
4aeb207dd2b1dfb8cfd9e23097d2f8dfe9162b62
| 120,855 |
ipynb
|
Jupyter Notebook
|
Assignment_214_Logistic_Regression.ipynb
|
navroz-lamba/DS-Unit-2-Linear-Models
|
dbc291c3bb2f2d9b27619a85d4dde0b5a61b4d5b
|
[
"MIT"
] | null | null | null |
Assignment_214_Logistic_Regression.ipynb
|
navroz-lamba/DS-Unit-2-Linear-Models
|
dbc291c3bb2f2d9b27619a85d4dde0b5a61b4d5b
|
[
"MIT"
] | null | null | null |
Assignment_214_Logistic_Regression.ipynb
|
navroz-lamba/DS-Unit-2-Linear-Models
|
dbc291c3bb2f2d9b27619a85d4dde0b5a61b4d5b
|
[
"MIT"
] | null | null | null | 46.626157 | 314 | 0.400041 |
[
[
[
"<a href=\"https://colab.research.google.com/github/navroz-lamba/DS-Unit-2-Linear-Models/blob/master/Assignment_214_Logistic_Regression.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>",
"_____no_output_____"
]
],
[
[
"import pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom sklearn.linear_model import LogisticRegression\nfrom sklearn.pipeline import Pipeline\nfrom sklearn.impute import SimpleImputer\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.preprocessing import StandardScaler\nfrom sklearn.preprocessing import OneHotEncoder\nfrom sklearn.compose import ColumnTransformer\nfrom sklearn.model_selection import RandomizedSearchCV",
"_____no_output_____"
],
[
"# importing the dataset \ndf = pd.read_csv('https://raw.githubusercontent.com/LambdaSchool/DS-Unit-2-Linear-Models/master/data/burritos/burritos.csv', \n parse_dates=['Date'],\n index_col='Date')\ndf.head(25)",
"_____no_output_____"
],
[
"# df.Date.dt.date.min()",
"_____no_output_____"
],
[
"# df.Date.dt.date.max()",
"_____no_output_____"
],
[
"# Derive binary classification target:\n# We define a 'Great' burrito as having an\n# overall rating of 4 or higher, on a 5 point scale.\n# Drop unrated burritos.\ndf = df.dropna(subset=['overall'])\ndf['Great'] = df['overall'] >= 4",
"_____no_output_____"
],
[
"# Clean/combine the Burrito categories\ndf['Burrito'] = df['Burrito'].str.lower()\n\ncalifornia = df['Burrito'].str.contains('california')\nasada = df['Burrito'].str.contains('asada')\nsurf = df['Burrito'].str.contains('surf')\ncarnitas = df['Burrito'].str.contains('carnitas')",
"_____no_output_____"
],
[
"df.loc[california, 'Burrito'] = 'California'\ndf.loc[asada, 'Burrito'] = 'Asada'\ndf.loc[surf, 'Burrito'] = 'Surf & Turf'\ndf.loc[carnitas, 'Burrito'] = 'Carnitas'\ndf.loc[~california & ~asada & ~surf & ~carnitas, 'Burrito'] = 'Other'\n\ndf.head()",
"_____no_output_____"
],
[
"# Drop some high cardinality categoricals\ndf = df.drop(columns=['Notes', 'Location', 'Reviewer', 'Address', 'URL', 'Neighborhood'])",
"_____no_output_____"
],
[
"# Drop some columns to prevent \"leakage\"\ndf = df.drop(columns=['Rec', 'overall'])",
"_____no_output_____"
],
[
"# split into train and test \nfilt = df.index < '2018-01-01'\ndf_train = df.loc[filt]\ndf_test = df.loc[~filt]\n",
"_____no_output_____"
],
[
"df_train.isna().sum().sort_values(ascending = False)",
"_____no_output_____"
],
[
"# since all the NaN values under categorical dtypes means they were not added to the burrito, \n#i am replacing them with not added so we could still use those to predict our model\ncat_attribs = df_train.select_dtypes(include='object')\n\nfor value in cat_attribs:\n df_train[value].fillna('''Wasn't Added''', inplace= True)",
"/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/pandas/core/generic.py:6245: SettingWithCopyWarning: \nA value is trying to be set on a copy of a slice from a DataFrame\n\nSee the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n self._update_inplace(new_data)\n"
],
[
"df_train.dtypes",
"_____no_output_____"
],
[
"# looking at the NaN values again\ndf_train.isna().sum().sort_values(ascending = False)",
"_____no_output_____"
],
[
"# we will drop Queso as all the values are NaN\n# We will also delete the Density, Mass, yelp and Google as 90% or more of the values are NaN\ndf_train = df_train.drop(['Queso', 'Density (g/mL)', 'Mass (g)', 'Yelp', 'Google','Chips'], axis=1)\ndf_train.head()",
"_____no_output_____"
]
],
[
[
"we will take care of the rest of the numerical NaN values with the simple imputer ",
"_____no_output_____"
],
[
"# split into train, test and val",
"_____no_output_____"
]
],
[
[
"X = df_train.drop('Great', axis=1)\ny = df_train['Great']\ndf_train.shape",
"_____no_output_____"
],
[
"# Train set \ncutoff_train = '2017-01-01'\nfilt= (X.index < cutoff_train)\n\nX_train, y_train = X.loc[filt], y.loc[filt]\n\n# val set \nX_val, y_val = X.loc[~filt], y.loc[~filt]",
"_____no_output_____"
],
[
"X_train.shape[0] + X_val.shape[0] == df_train.shape[0]",
"_____no_output_____"
]
],
[
[
"# lets build a pipeline \n### separating categorical and numerical attributes ",
"_____no_output_____"
]
],
[
[
"df_cat = X_train.select_dtypes(include='object')\ndf_cat.columns",
"_____no_output_____"
],
[
"df_cat_val = X_val.select_dtypes(include='object')\ndf_cat_val.columns",
"_____no_output_____"
],
[
"df_num = X_train.select_dtypes(exclude='object')\ndf_num.columns",
"_____no_output_____"
],
[
"pipeline_num = Pipeline([('imputer', SimpleImputer()),\n ('scaler', StandardScaler())])",
"_____no_output_____"
],
[
"pipeline_cat = Pipeline([('imputer', SimpleImputer(strategy='most_frequent')),\n (\"ohe\", OneHotEncoder(sparse=False))])",
"_____no_output_____"
],
[
"# now putting the pipelines together using ColumnTransformer\n#generate a list of col and num attributes that we could call \n\nnum_attribs = list(df_num)\ncat_attribs = list(df_cat)\n\nfull_pipeline = ColumnTransformer([\n ('categorical_pipeline', pipeline_cat, cat_attribs),\n ('numerical_pipeline', pipeline_num, num_attribs)])\n\n# transform the X_train \ndf_prepared_train = full_pipeline.fit_transform(X_train)\ndf_prepared_val = full_pipeline.transform(X_val)",
"_____no_output_____"
]
],
[
[
"## Making one final pipeline with the logistic regression model ",
"_____no_output_____"
]
],
[
[
"# we could add regularization to the model by adding the hyperparameter, C\nlog_reg = Pipeline([('full_pipeline', full_pipeline),\n ('logistic Regression', LogisticRegression())])\n# fitting the train test\nlog_reg.fit(X_train, y_train)\n\n# log_reg.fit(X_val, y_val)",
"/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n"
],
[
"print('Training Accuracy:', log_reg.score(X_train, y_train))\nprint('Validation Accuracy:', log_reg.score(X_val, y_val))",
"Training Accuracy: 0.9429530201342282\nValidation Accuracy: 0.7647058823529411\n"
]
],
[
[
"## We see that our model is clearly overfitting and we would need regularization ",
"_____no_output_____"
]
],
[
[
"# lets find the best value for C using cross validation \nlog_reg = LogisticRegression(random_state=42)\n\nparameters = {'C':[.001, .005, 1e-5, .01, .05, 1e-2, 1, 5,10]}\n\nlog_reg_cv = RandomizedSearchCV(log_reg, parameters, n_iter=9,cv=10, random_state=42 )\nlog_reg_cv.fit(df_prepared, y_train)\n\nprint(log_reg_cv.best_params_)\nprint(log_reg_cv.best_estimator_)",
"/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n"
],
[
"# using the best_estimator_ lets update the pipeline\nlog_reg = Pipeline([('full_pipeline', full_pipeline),\n ('logistic Regression', LogisticRegression(**log_reg_cv.best_params_))])\n# fitting the train test\nlog_reg.fit(X_train, y_train);",
"/Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages/sklearn/linear_model/logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n FutureWarning)\n"
]
],
[
[
"# Score with the regularized Logistic Regression model ",
"_____no_output_____"
]
],
[
[
"print('Training Accuracy:', log_reg.score(X_train, y_train))\nprint('Validation Accuracy:', log_reg.score(X_val, y_val))",
"Training Accuracy: 0.8959731543624161\nValidation Accuracy: 0.9058823529411765\n"
],
[
"!pip install feature-engine",
"Collecting feature-engine\n Downloading https://files.pythonhosted.org/packages/3c/32/885141003f4e2de75cd5e379a760a2184643c7d80cd413f0e962c1da2aa4/feature_engine-0.5.17-py2.py3-none-any.whl\nCollecting statsmodels>=0.11.1 (from feature-engine)\n\u001b[?25l Downloading https://files.pythonhosted.org/packages/bf/a0/f29d1644e74ecac3b86b7135f1f6058050e367568cbc493c981390c8ca34/statsmodels-0.11.1-cp37-cp37m-macosx_10_13_x86_64.whl (8.4MB)\n\u001b[K |████████████████████████████████| 8.4MB 2.1MB/s eta 0:00:01\n\u001b[?25hRequirement already satisfied: scipy>=1.4.1 in /Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages (from feature-engine) (1.5.2)\nRequirement already satisfied: pandas>=1.0.3 in /Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages (from feature-engine) (1.0.3)\nCollecting scikit-learn>=0.22.2 (from feature-engine)\n\u001b[?25l Downloading https://files.pythonhosted.org/packages/8f/e4/d5d59e76f274c7bf82707bb45cda9b2f1ef2874e66f80d53a91bca17374c/scikit_learn-0.23.2-cp37-cp37m-macosx_10_9_x86_64.whl (7.2MB)\n\u001b[K |████████████████████████████████| 7.2MB 2.9MB/s eta 0:00:01\n\u001b[?25hRequirement already satisfied: numpy>=1.18.2 in /Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages (from feature-engine) (1.18.4)\nRequirement already satisfied: patsy>=0.5 in /Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages (from statsmodels>=0.11.1->feature-engine) (0.5.1)\nRequirement already satisfied: pytz>=2017.2 in /Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages (from pandas>=1.0.3->feature-engine) (2019.3)\nRequirement already satisfied: python-dateutil>=2.6.1 in /Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages (from pandas>=1.0.3->feature-engine) (2.8.0)\nCollecting threadpoolctl>=2.0.0 (from scikit-learn>=0.22.2->feature-engine)\n Downloading https://files.pythonhosted.org/packages/f7/12/ec3f2e203afa394a149911729357aa48affc59c20e2c1c8297a60f33f133/threadpoolctl-2.1.0-py3-none-any.whl\nRequirement already satisfied: joblib>=0.11 in /Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages (from scikit-learn>=0.22.2->feature-engine) (0.13.2)\nRequirement already satisfied: six in /Users/navrozlamba/opt/anaconda3/lib/python3.7/site-packages (from patsy>=0.5->statsmodels>=0.11.1->feature-engine) (1.12.0)\nInstalling collected packages: statsmodels, threadpoolctl, scikit-learn, feature-engine\n Found existing installation: statsmodels 0.10.1\n Uninstalling statsmodels-0.10.1:\n Successfully uninstalled statsmodels-0.10.1\n Found existing installation: scikit-learn 0.21.3\n Uninstalling scikit-learn-0.21.3:\n Successfully uninstalled scikit-learn-0.21.3\nSuccessfully installed feature-engine-0.5.17 scikit-learn-0.23.2 statsmodels-0.11.1 threadpoolctl-2.1.0\n"
],
[
"",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code"
] |
[
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown",
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
]
] |
4aeb2592221d13cf17a09cfbc321fcfe1411a5d7
| 83,413 |
ipynb
|
Jupyter Notebook
|
src/Untitled.ipynb
|
ygarrot/vic_2_I
|
bca091d61d881275efb709855c10e7dd991c9288
|
[
"MIT"
] | null | null | null |
src/Untitled.ipynb
|
ygarrot/vic_2_I
|
bca091d61d881275efb709855c10e7dd991c9288
|
[
"MIT"
] | null | null | null |
src/Untitled.ipynb
|
ygarrot/vic_2_I
|
bca091d61d881275efb709855c10e7dd991c9288
|
[
"MIT"
] | null | null | null | 751.468468 | 80,964 | 0.952945 |
[
[
[
"from main import *\n\n# %matplotlib inline\nimport ipywidgets as widgets\nfrom ipywidgets import interact, interact_manual\n%load_ext autoreload\n%autoreload 2\n# pcv.params.debug = 'plot' ",
"_____no_output_____"
],
[
"tutorial()",
"_____no_output_____"
]
]
] |
[
"code"
] |
[
[
"code",
"code"
]
] |
4aeb3b641636d58d3ef0dbd9c253741844d68864
| 105,996 |
ipynb
|
Jupyter Notebook
|
2D-Pose-Similarity.ipynb
|
joo-yongjae/deeplearning
|
e31cac7449a4b60e8ad4ea4d3acb90d46ce9ca23
|
[
"Apache-2.0"
] | null | null | null |
2D-Pose-Similarity.ipynb
|
joo-yongjae/deeplearning
|
e31cac7449a4b60e8ad4ea4d3acb90d46ce9ca23
|
[
"Apache-2.0"
] | null | null | null |
2D-Pose-Similarity.ipynb
|
joo-yongjae/deeplearning
|
e31cac7449a4b60e8ad4ea4d3acb90d46ce9ca23
|
[
"Apache-2.0"
] | null | null | null | 62.831061 | 298 | 0.728282 |
[
[
[
"# Objective:\n\nAs input to the system, take the live feed from the webcam and use pose estimation to map out a small dance tutorial.\n\n# Approach:\n- We will take a pretrained **openpose estimation model** to prdict the **18 keypoints** on a human body.\n- We take openpose model for tensorflow by Ildoo Kim\n - GitHub Repo Link: https://github.com/ildoonet/tf-pose-estimation\n<br>**[!] Note**: Some how I found issues with this repo to work with tensorflow 2.0 and followed a modified repo of his by Gunjan Seth.<br>\nGitHub Repo Link: https://github.com/gsethi2409/tf-pose-estimation\n<br>Medium Blog by Gunjan Seth: https://medium.com/@gsethi2409/pose-estimation-with-tensorflow-2-0-a51162c095ba\n- The keypoints of the dancer are obtained and stored in a array list.\n- These keypoints are **normalized**.\n- The user feed is taken and the keypoints are detected.\n- The keypoints are normalized and the **cosine similarity** is found between the user keypoints and the array of dancer keypoints.\n- The minimum similarity score is **compared with the threshold** and then it displays is the user steps are correct or not for the given dancer moves.\n\n# Constraints To Look For:\n1. The model should be fast for prediction. Latency should be avoided.\n2. Predictions should be accurate and the steps should be close enough with the dancer.\n",
"_____no_output_____"
],
[
"## Import the Necessary Libraries",
"_____no_output_____"
]
],
[
[
"import sys\nimport time\nimport logging\nimport numpy as np\nimport cv2\n\nimport numpy as np\nfrom tf_pose import common\nfrom tf_pose.estimator import TfPoseEstimator\nfrom tf_pose.networks import get_graph_path, model_wh\nimport matplotlib.pyplot as plt\nfrom sklearn.preprocessing import Normalizer\nimport warnings\nwarnings.filterwarnings('ignore')\n",
"_____no_output_____"
]
],
[
[
"## Model and TfPose Estimator\nWe initialize the pretrained model with the required parameters as seen below.",
"_____no_output_____"
]
],
[
[
"camera = 0\nresize = '432x368' # resize images before they are processed\nresize_out_ratio = 4.0 # resize heatmaps before they are post-processed\nmodel='mobilenet_v2_large'\nshow_process = False\ntensorrt = False # for tensorrt process",
"_____no_output_____"
],
[
"w, h = model_wh(resize)\nif w > 0 and h > 0:\n e = TfPoseEstimator(get_graph_path(model), target_size=(w, h), trt_bool=False)\nelse:\n e = TfPoseEstimator(get_graph_path(model), target_size=(432, 368), trt_bool=False)\nprint('********* Model Ready *************')",
"[2020-08-17 07:40:15,769] [TfPoseEstimator] [INFO] loading graph from F:\\Position Estimation\\tf-pose-estimation\\models\\graph/mobilenet_v2_large/graph_opt.pb(default size=432x368)\n2020-08-17 07:40:15,769 INFO loading graph from F:\\Position Estimation\\tf-pose-estimation\\models\\graph/mobilenet_v2_large/graph_opt.pb(default size=432x368)\n"
]
],
[
[
"# Take position from the trainer (dancer):\n- We made two functions to get all the keypoints from the trainer and store them in a dataframe and in a list.\n- The function **\"dance_video_processing\"** is used to predict all the keypoints from the video and return all the keypoints for the video.\n- The function **\"get_position\"** is used to take all the keypoints that are returned from the above function, preprocess them and return the dataframe and the list of keypoints. ",
"_____no_output_____"
]
],
[
[
"def dance_video_processing(video_path= r'dance_video/dancer.mp4',showBG = True):\n cap = cv2.VideoCapture(video_path)\n if cap.isOpened() is False:\n print(\"Error opening video stream or file\")\n fps_time = 0\n while True:\n ret_val, image = cap.read()\n dim = (368, 428)\n if ret_val:\n # resize image\n image = cv2.resize(image, dim, interpolation = cv2.INTER_AREA)\n humans = e.inference(image,\n resize_to_default=(w > 0 and h > 0),\n upsample_size=4.0)\n if not showBG:\n image = np.zeros(image.shape)\n # Plotting the keypoints and lines to the image \n image = TfPoseEstimator.draw_humans(image, humans, imgcopy=False)\n npimg = np.copy(image)\n image_h, image_w = npimg.shape[:2]\n centers = {}\n keypoints_list=[]\n for human in humans:\n # draw point\n for i in range(common.CocoPart.Background.value):\n if i not in human.body_parts.keys():\n continue\n\n body_part = human.body_parts[i]\n x_axis=int(body_part.x * image_w + 0.5)\n y_axis=int(body_part.y * image_h + 0.5) \n center=[x_axis,y_axis]\n centers[i] = center\n keypoints_list.append(centers)\n # To display fps\n cv2.putText(image, \"FPS: %f\" % (1.0 / (time.time() - fps_time)), (10, 10),\n cv2.FONT_HERSHEY_SIMPLEX, 0.5, (0, 255, 0), 2)\n # To display image\n cv2.imshow('Dancer', image)\n fps_time = time.time()\n if cv2.waitKey(1) & 0xFF == ord('q'):\n break\n \n else:\n break\n #print(keypoints_list)\n cap.release()\n cv2.destroyAllWindows()\n return keypoints_list",
"_____no_output_____"
],
[
"def get_position(video_path= r'dance_video/dancer.mp4',showBG = True):\n keypoints_list=dance_video_processing()\n import pandas as pd\n #features=[0]*32\n features=[0]*36\n #print(features)\n keyp_list=[]\n #data=pd.Dataframe()\n #print(len(keypoints_list[i]))\n # Preprocessing of the keypoints data\n for i in range(0, len(keypoints_list)):\n k=-2\n for j in range(0,18):\n k=k+2\n try:\n if k>=36:\n break\n #print(k)\n #print(keypoints_list[i][j])\n features[k]=keypoints_list[i][j][0]\n features[k+1]=keypoints_list[i][j][1]\n except:\n features[k]=0\n features[k+1]=0\n #print(features)\n keyp_list.append(features)\n #print(keyp_list)\n # Getting all the feature column names for intialization of our dataframe.\n column_names=[]\n for i in range(36):\n column_names.append(str(i))\n data=pd.DataFrame(keyp_list,columns=column_names)\n return data,keyp_list",
"_____no_output_____"
],
[
"data,keyp_list=get_position()\ndata.head()",
"_____no_output_____"
]
],
[
[
"\n**Observation:** \n- We can see how the keypoints data looks from the above example.\n- Since they are 18 keypoints and each keypoint has **x-coordinate** and **y-coordinate** we have **36 columns** (18 x 2).",
"_____no_output_____"
],
[
"# Cosine Similarity:\nCosine Similarity function for our model to find the keypoints.",
"_____no_output_____"
]
],
[
[
"def findCosineSimilarity_1(source_representation, test_representation):\n import numpy as np\n a = np.matmul(np.transpose(source_representation), test_representation)\n b = np.sum(np.multiply(source_representation, source_representation))\n c = np.sum(np.multiply(test_representation, test_representation))\n return 1 - (a / (np.sqrt(b) * np.sqrt(c)))",
"_____no_output_____"
]
],
[
[
"# Comparing:\nComparing the user images with keypoints of the dancer. ",
"_____no_output_____"
]
],
[
[
"def compare_positions(trainer_video,user_video,keyp_list, dim=(420,720)):\n cap = cv2.VideoCapture(trainer_video)\n cam = cv2.VideoCapture(user_video) \n cam.set(3, w)\n cam.set(4, h)\n fps_time = 0 #Initializing fps to 0\n while True:\n ret_val, image_1 = cam.read()\n e_d=0\n ret_val_1,image_2=cap.read()\n if ret_val_1 and ret_val:\n # resizing the images\n image_2 = cv2.resize(image_2, dim, interpolation = cv2.INTER_AREA)\n image_1 = cv2.resize(image_1, dim, interpolation = cv2.INTER_AREA)\n dancers_1=e.inference(image_2,resize_to_default=(w > 0 and h > 0),upsample_size=4.0)\n humans_2 = e.inference(image_1, resize_to_default=(w > 0 and h > 0),upsample_size=4.0 )\n #Dancer keypoints and normalization\n transformer = Normalizer().fit(keyp_list) \n keyp_list=transformer.transform(keyp_list)\n # Showing FPS\n cv2.putText(image_2, \"FPS: %f\" % (1.0 / (time.time() - fps_time)), (10, 10),\n cv2.FONT_HERSHEY_SIMPLEX, 0.5, (0, 255, 0), 2)\n # Displaying the dancer feed.\n cv2.imshow('Dancer Window', image_2)\n # Getting User keypoints, normalization and comparing also plotting the keypoints and lines to the image\n image_1 = TfPoseEstimator.draw_humans(image_1, humans_2, imgcopy=False)\n npimg = np.copy(image_1)\n image_h, image_w = npimg.shape[:2]\n centers = {}\n keypoints_list=[]\n for human in humans_2:\n # draw point\n for i in range(common.CocoPart.Background.value):\n if i not in human.body_parts.keys():\n continue\n\n body_part = human.body_parts[i]\n x_axis=int(body_part.x * image_w + 0.5)\n y_axis=int(body_part.y * image_h + 0.5)\n center=[x_axis,y_axis]\n centers[i] = center\n k=-2\n features=[0]*36\n for j in range(0,18):\n k=k+2\n try:\n if k>=36:\n break\n #print(k)\n #print(keypoints_list[i][j])\n features[k]=centers[j][0]\n features[k+1]=centers[j][1]\n except:\n features[k]=0\n features[k+1]=0\n features=transformer.transform([features])\n #print(features[0])\n min_=100 # Intializing a value to get minimum cosine similarity score from the dancer array list with the user\n for j in keyp_list:\n #print(j)\n sim_score=findCosineSimilarity_1(j,features[0])\n #print(sim_score)\n #Getting the minimum Cosine Similarity Score\n if min_>sim_score:\n min_=sim_score\n # Displaying the minimum cosine score\n cv2.putText(image_1, str(min_), (10, 30),\n cv2.FONT_HERSHEY_SIMPLEX, 0.5, (0, 0, 255), 2)\n # If the disctance is below the threshold\n if min_<0.15:\n cv2.putText(image_1, \"CORRECT STEPS\", (120, 700),\n cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 255, 0), 2)\n else:\n cv2.putText(image_1, \"NOT CORRECT STEPS\", (80, 700),\n cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 0, 255), 2)\n cv2.putText(image_1, \"FPS: %f\" % (1.0 / (time.time() - fps_time)), (10, 50),\n cv2.FONT_HERSHEY_SIMPLEX, 0.5, (0, 255, 0), 2)\n # Display the user feed\n cv2.imshow('User Window', image_1)\n\n fps_time = time.time()\n if cv2.waitKey(1) & 0xFF == ord('q'):\n break\n else:\n break\n\n cam.release()\n cap.release()\n cv2.destroyAllWindows()",
"_____no_output_____"
]
],
[
[
"##### Note:\nSince I cant dance, I'll be using a video for this :P.<br> We can replce the **user_video** attribute to **0 or 1** to turn on live camera depending on the type of camera we have.\n### For a wrong positions:",
"_____no_output_____"
]
],
[
[
"compare_positions(r'dance_video/dancer.mp4',r'dance_video/wrong_dance.mp4',keyp_list)",
"_____no_output_____"
]
],
[
[
"### For a correct positions:",
"_____no_output_____"
]
],
[
[
"compare_positions(r'dance_video/dancer.mp4',r'dance_video/right_dance.mp4',keyp_list)",
"_____no_output_____"
]
],
[
[
"# Conclusion:",
"_____no_output_____"
],
[
"- We have developed a pose estimation similarity pipeline to compare similarity between two poses from the given feed of videos or live cam.<br>\n**Flaws:**\n- This approach fails when the trainer is far or the user is near to the camera or vise-versa. This happens because there is a **scale variation** between the keypoints of the image.<br>\n**Solution:**\n- We can eleminate this problem by **croping out the image of a peron** using a CNN architecture like Yolo or anything that could detect the bounding boxes of a person.\n- This image then can be fed to the openpose model to estimate keypoints for both the sources.<br>\n**Scope of improvement:**\n- The accuracy of the model for keypoint prediction can be increased by taking a much powerful pretrained model architecture than mobilenet.",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown"
] |
[
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
]
] |
4aeb43db7ce2be1b5ad4ab4a401646a5015b233b
| 10,165 |
ipynb
|
Jupyter Notebook
|
examples/Calculating rigorous bounds on pi.ipynb
|
Kolaru/IntervalArithmetic.jl
|
373b19b721f5edae1fbd722cd5e4448542a86794
|
[
"Apache-2.0"
] | 203 |
2017-04-18T21:51:26.000Z
|
2022-03-29T16:27:34.000Z
|
examples/Calculating rigorous bounds on pi.ipynb
|
Kolaru/IntervalArithmetic.jl
|
373b19b721f5edae1fbd722cd5e4448542a86794
|
[
"Apache-2.0"
] | 503 |
2017-04-03T01:10:02.000Z
|
2022-03-31T11:09:39.000Z
|
examples/Calculating rigorous bounds on pi.ipynb
|
Kolaru/IntervalArithmetic.jl
|
373b19b721f5edae1fbd722cd5e4448542a86794
|
[
"Apache-2.0"
] | 76 |
2017-04-10T20:49:11.000Z
|
2022-01-15T22:41:01.000Z
| 23.31422 | 385 | 0.518544 |
[
[
[
"empty"
]
]
] |
[
"empty"
] |
[
[
"empty"
]
] |
4aeb5ac7451032931dd46238ba60106adcc10f34
| 840,706 |
ipynb
|
Jupyter Notebook
|
08. Data Visualization - Matplotlib/8.3 Advanced Matplotlib concepts.ipynb
|
AnmolTomer/ml_bootcamp_udemy
|
0f9ccfc126c70acf03abb1cfb1a5b53ecc3e9c39
|
[
"MIT"
] | 7 |
2020-01-24T23:20:22.000Z
|
2022-03-14T17:10:25.000Z
|
08. Data Visualization - Matplotlib/8.3 Advanced Matplotlib concepts.ipynb
|
itsmerohit1/ml_bootcamp_udemy
|
e60b6415402be99e7a97fcec32b09febf0e92518
|
[
"MIT"
] | 2 |
2019-03-22T17:25:00.000Z
|
2019-03-23T09:50:19.000Z
|
08. Data Visualization - Matplotlib/8.3 Advanced Matplotlib concepts.ipynb
|
itsmerohit1/ml_bootcamp_udemy
|
e60b6415402be99e7a97fcec32b09febf0e92518
|
[
"MIT"
] | 8 |
2019-04-28T20:14:54.000Z
|
2021-08-29T08:36:11.000Z
| 833.207136 | 167,132 | 0.953957 |
[
[
[
"# Advanced Matplotlib Concepts Lecture\n\nIn this lecture we cover some more advanced topics which you won't usually use as often. You can always reference the documentation for more resources!",
"_____no_output_____"
],
[
"### Logarithmic Scale\n\n* It is also possible to set a logarithmic scale for one or both axes. This functionality is in fact only one application of a more general transformation system in Matplotlib. Each of the axes' scales are set seperately using `set_xscale` and `set_yscale` methods which accept one parameter (with the value \"log\" in this case):",
"_____no_output_____"
]
],
[
[
"import matplotlib.pyplot as plt\nimport matplotlib as mp",
"_____no_output_____"
],
[
"%matplotlib inline",
"_____no_output_____"
],
[
"import numpy as np\nx = np.linspace(0,5,11) # We go from 0 to 5 and grab 11 points which are linearly spaced.\ny = x ** 2",
"_____no_output_____"
],
[
"fig, axes = plt.subplots(1, 2, figsize=(10,4))\n \naxes[0].plot(x, x**2, x, np.exp(x))\naxes[0].set_title(\"Normal scale\")\n\naxes[1].plot(x, x**2, x, np.exp(x))\naxes[1].set_yscale(\"log\")\naxes[1].set_title(\"Logarithmic scale (y)\");",
"_____no_output_____"
]
],
[
[
"### Placement of ticks and custom tick labels\n\n* We can explicitly determine where we want the axis ticks with `set_xticks` and `set_yticks`, which both take a list of values for where on the axis the ticks are to be placed. We can also use the `set_xticklabels` and `set_yticklabels` methods to provide a list of custom text labels for each tick location:",
"_____no_output_____"
]
],
[
[
"fig, ax = plt.subplots(figsize=(10, 4))\n\nax.plot(x, x**2, x, x**3, lw=2)\n\nax.set_xticks([1, 2, 3, 4, 5])\nax.set_xticklabels([r'$\\alpha$', r'$\\beta$', r'$\\gamma$', r'$\\delta$', r'$\\epsilon$'], fontsize=18)\n\nyticks = [0, 50, 100, 150]\nax.set_yticks(yticks)\nax.set_yticklabels([\"$%.1f$\" % y for y in yticks], fontsize=18); # use LaTeX formatted labels",
"_____no_output_____"
]
],
[
[
"There are a number of more advanced methods for controlling major and minor tick placement in matplotlib figures, such as automatic placement according to different policies. See http://matplotlib.org/api/ticker_api.html for details.",
"_____no_output_____"
],
[
"#### Scientific notation\nWith large numbers on axes, it is often better use scientific notation:",
"_____no_output_____"
]
],
[
[
"fig, ax = plt.subplots(1, 1)\n \nax.plot(x, x**2, x, np.exp(x))\nax.set_title(\"scientific notation\")\n\nax.set_yticks([0, 50, 100, 150])\n\nfrom matplotlib import ticker\nformatter = ticker.ScalarFormatter(useMathText=True)\nformatter.set_scientific(True) \nformatter.set_powerlimits((-1,1)) \nax.yaxis.set_major_formatter(formatter) ",
"_____no_output_____"
]
],
[
[
"## Axis number and axis label spacing",
"_____no_output_____"
]
],
[
[
"# distance between x and y axis and the numbers on the axes\nmp.rcParams['xtick.major.pad'] = 5\nmp.rcParams['ytick.major.pad'] = 5\n\nfig, ax = plt.subplots(1, 1)\n \nax.plot(x, x**2, x, np.exp(x))\nax.set_yticks([0, 50, 100, 150])\n\nax.set_title(\"label and axis spacing\")\n\n# padding between axis label and axis numbers\nax.xaxis.labelpad = 5\nax.yaxis.labelpad = 5\n\nax.set_xlabel(\"x\")\nax.set_ylabel(\"y\")",
"_____no_output_____"
],
[
"# restore defaults\nmp.rcParams['xtick.major.pad'] = 3\nmp.rcParams['ytick.major.pad'] = 3",
"_____no_output_____"
]
],
[
[
"#### Axis position adjustments",
"_____no_output_____"
],
[
"Unfortunately, when saving figures the labels are sometimes clipped, and it can be necessary to adjust the positions of axes a little bit. This can be done using `subplots_adjust`:",
"_____no_output_____"
]
],
[
[
"fig, ax = plt.subplots(1, 1)\n \nax.plot(x, x**2, x, np.exp(x))\nax.set_yticks([0, 50, 100, 150])\n\nax.set_title(\"title\")\nax.set_xlabel(\"x\")\nax.set_ylabel(\"y\")\n\nfig.subplots_adjust(left=0.15, right=.9, bottom=0.1, top=0.9);",
"_____no_output_____"
]
],
[
[
"### Axis grid",
"_____no_output_____"
],
[
"With the `grid` method in the axis object, we can turn on and off grid lines. We can also customize the appearance of the grid lines using the same keyword arguments as the `plot` function:",
"_____no_output_____"
]
],
[
[
"fig, axes = plt.subplots(1, 2, figsize=(10,3))\n\n# default grid appearance\naxes[0].plot(x, x**2, x, x**3, lw=2)\naxes[0].grid(True)\n\n# custom grid appearance\naxes[1].plot(x, x**2, x, x**3, lw=2)\naxes[1].grid(color='b', alpha=0.5, linestyle='dashed', linewidth=0.5)",
"_____no_output_____"
]
],
[
[
"### Axis spines",
"_____no_output_____"
],
[
"* We can also change the properties of axis spines:",
"_____no_output_____"
]
],
[
[
"fig, ax = plt.subplots(figsize=(6,2))\n\nax.spines['bottom'].set_color('blue')\nax.spines['top'].set_color('blue')\n\nax.spines['left'].set_color('red')\nax.spines['left'].set_linewidth(2)\n\n# turn off axis spine to the right\nax.spines['right'].set_color(\"none\")\nax.yaxis.tick_left() # only ticks on the left side",
"_____no_output_____"
]
],
[
[
"### Twin axes\nSometimes it is useful to have dual x or y axes in a figure; for example, when plotting curves with different units together. Matplotlib supports this with the `twinx` and `twiny` functions:",
"_____no_output_____"
]
],
[
[
"fig, ax1 = plt.subplots()\n\nax1.plot(x, x**2, lw=2, color=\"blue\")\nax1.set_ylabel(r\"area $(m^2)$\", fontsize=18, color=\"blue\")\nfor label in ax1.get_yticklabels():\n label.set_color(\"blue\")\n \nax2 = ax1.twinx()\nax2.plot(x, x**3, lw=2, color=\"red\")\nax2.set_ylabel(r\"volume $(m^3)$\", fontsize=18, color=\"red\")\nfor label in ax2.get_yticklabels():\n label.set_color(\"red\")",
"_____no_output_____"
]
],
[
[
"### Axes where x and y is zero",
"_____no_output_____"
]
],
[
[
"fig, ax = plt.subplots()\n\nax.spines['right'].set_color('none')\nax.spines['top'].set_color('none')\n\nax.xaxis.set_ticks_position('bottom')\nax.spines['bottom'].set_position(('data',0)) # set position of x spine to x=0\n\nax.yaxis.set_ticks_position('left')\nax.spines['left'].set_position(('data',0)) # set position of y spine to y=0\n\nxx = np.linspace(-0.75, 1., 100)\nax.plot(xx, xx**3);",
"_____no_output_____"
]
],
[
[
"## Other 2D plot styles",
"_____no_output_____"
],
[
"In addition to the regular `plot` method, there are a number of other functions for generating different kind of plots. See the matplotlib plot gallery for a complete list of available plot types: http://matplotlib.org/gallery.html. Some of the more useful ones are show below:",
"_____no_output_____"
]
],
[
[
"n = np.array([0,1,2,3,4,5])",
"_____no_output_____"
],
[
"fig, axes = plt.subplots(1, 4, figsize=(12,3))\n\naxes[0].scatter(xx, xx + 0.25*np.random.randn(len(xx)))\naxes[0].set_title(\"scatter\")\n\naxes[1].step(n, n**2, lw=2)\naxes[1].set_title(\"step\")\n\naxes[2].bar(n, n**2, align=\"center\", width=0.5, alpha=0.5)\naxes[2].set_title(\"bar\")\n\naxes[3].fill_between(x, x**2, x**3, color=\"green\", alpha=0.5);\naxes[3].set_title(\"fill_between\");",
"_____no_output_____"
]
],
[
[
"### Text annotation\n\n* Annotating text in matplotlib figures can be done using the `text` function. It supports LaTeX formatting just like axis label texts and titles:",
"_____no_output_____"
]
],
[
[
"fig, ax = plt.subplots()\n\nax.plot(xx, xx**2, xx, xx**3)\n\nax.text(0.15, 0.2, r\"$y=x^2$\", fontsize=20, color=\"blue\")\nax.text(0.65, 0.1, r\"$y=x^3$\", fontsize=20, color=\"green\");",
"_____no_output_____"
]
],
[
[
"### Figures with multiple subplots and insets\n\n* Axes can be added to a matplotlib Figure canvas manually using `fig.add_axes` or using a sub-figure layout manager such as `subplots`, `subplot2grid`, or `gridspec`:",
"_____no_output_____"
],
[
"#### subplots",
"_____no_output_____"
]
],
[
[
"fig,ax = plt.subplots(2,3)\nfig.tight_layout()",
"_____no_output_____"
]
],
[
[
"### subplot2grid",
"_____no_output_____"
]
],
[
[
"fig = plt.figure()\nax1 = plt.subplot2grid((3,3), (0,0), colspan=3)\nax2 = plt.subplot2grid((3,3), (1,0), colspan=2)\nax3 = plt.subplot2grid((3,3), (1,2), rowspan=2)\nax4 = plt.subplot2grid((3,3), (2,0))\nax5 = plt.subplot2grid((3,3), (2,1))\nfig.tight_layout()",
"_____no_output_____"
]
],
[
[
"## gridspec",
"_____no_output_____"
]
],
[
[
"import matplotlib.gridspec as gridspec",
"_____no_output_____"
],
[
"fig = plt.figure()\n\ngs = gridspec.GridSpec(2, 3, height_ratios=[2,1], width_ratios=[1,2,1])\nfor g in gs:\n ax = fig.add_subplot(g)\n \nfig.tight_layout()",
"_____no_output_____"
]
],
[
[
"### add axes\n* Manually adding axes with `add_axes` is useful for adding insets to figures:",
"_____no_output_____"
]
],
[
[
"fig, ax = plt.subplots()\n\nax.plot(xx, xx**2, xx, xx**3)\nfig.tight_layout()\n\n# inset\ninset_ax = fig.add_axes([0.2, 0.55, 0.35, 0.35]) # X, Y, width, height\n\ninset_ax.plot(xx, xx**2, xx, xx**3)\ninset_ax.set_title('zoom near origin')\n\n# set axis range\ninset_ax.set_xlim(-.2, .2)\ninset_ax.set_ylim(-.005, .01)\n\n# set axis tick locations\ninset_ax.set_yticks([0, 0.005, 0.01])\ninset_ax.set_xticks([-0.1,0,.1]);",
"_____no_output_____"
]
],
[
[
"### Colormap and contour figures\n* Colormaps and contour figures are useful for plotting functions of two variables. In most of these functions we will use a colormap to encode one dimension of the data. There are a number of predefined colormaps. It is relatively straightforward to define custom colormaps. For a list of pre-defined colormaps, see: http://www.scipy.org/Cookbook/Matplotlib/Show_colormaps",
"_____no_output_____"
]
],
[
[
"alpha = 0.7\nphi_ext = 2 * np.pi * 0.5\n\ndef flux_qubit_potential(phi_m, phi_p):\n return 2 + alpha - 2 * np.cos(phi_p) * np.cos(phi_m) - alpha * np.cos(phi_ext - 2*phi_p)",
"_____no_output_____"
],
[
"phi_m = np.linspace(0, 2*np.pi, 100)\nphi_p = np.linspace(0, 2*np.pi, 100)\nX,Y = np.meshgrid(phi_p, phi_m)\nZ = flux_qubit_potential(X, Y).T",
"_____no_output_____"
]
],
[
[
"#### pcolor",
"_____no_output_____"
]
],
[
[
"fig, ax = plt.subplots()\n\np = ax.pcolor(X/(2*np.pi), Y/(2*np.pi), Z, cmap=mp.cm.RdBu, vmin=abs(Z).min(), vmax=abs(Z).max())\ncb = fig.colorbar(p, ax=ax)",
"_____no_output_____"
]
],
[
[
"#### imshow",
"_____no_output_____"
]
],
[
[
"fig, ax = plt.subplots()\n\nim = ax.imshow(Z, cmap=mp.cm.RdBu, vmin=abs(Z).min(), vmax=abs(Z).max(), extent=[0, 1, 0, 1])\nim.set_interpolation('bilinear')\n\ncb = fig.colorbar(im, ax=ax)",
"_____no_output_____"
]
],
[
[
"## Contour",
"_____no_output_____"
]
],
[
[
"fig, ax = plt.subplots()\n\ncnt = ax.contour(Z, cmap=mp.cm.RdBu, vmin=abs(Z).min(), vmax=abs(Z).max(), extent=[0, 1, 0, 1])",
"_____no_output_____"
]
],
[
[
"## 3D figures\n* To use 3D graphics in matplotlib, we first need to create an instance of the `Axes3D` class. 3D axes can be added to a matplotlib figure canvas in exactly the same way as 2D axes; or, more conveniently, by passing a `projection='3d'` keyword argument to the `add_axes` or `add_subplot` methods.",
"_____no_output_____"
]
],
[
[
"from mpl_toolkits.mplot3d.axes3d import Axes3D",
"_____no_output_____"
]
],
[
[
"#### Surface plots",
"_____no_output_____"
]
],
[
[
"fig = plt.figure(figsize=(14,6))\n\n# `ax` is a 3D-aware axis instance because of the projection='3d' keyword argument to add_subplot\nax = fig.add_subplot(1, 2, 1, projection='3d')\n\np = ax.plot_surface(X, Y, Z, rstride=4, cstride=4, linewidth=0)\n\n# surface_plot with color grading and color bar\nax = fig.add_subplot(1, 2, 2, projection='3d')\np = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=mp.cm.coolwarm, linewidth=0, antialiased=False)\ncb = fig.colorbar(p, shrink=0.5)",
"_____no_output_____"
]
],
[
[
"## Wire-frame plot",
"_____no_output_____"
]
],
[
[
"fig = plt.figure(figsize=(8,6))\n\nax = fig.add_subplot(1, 1, 1, projection='3d')\n\np = ax.plot_wireframe(X, Y, Z, rstride=4, cstride=4,color='teal')",
"_____no_output_____"
]
],
[
[
"#### Coutour plots with projections",
"_____no_output_____"
]
],
[
[
"fig = plt.figure(figsize=(8,6))\n\nax = fig.add_subplot(1,1,1, projection='3d')\n\nax.plot_surface(X, Y, Z, rstride=4, cstride=4, alpha=0.25)\ncset = ax.contour(X, Y, Z, zdir='z', offset=-np.pi, cmap=mp.cm.coolwarm)\ncset = ax.contour(X, Y, Z, zdir='x', offset=-np.pi, cmap=mp.cm.coolwarm)\ncset = ax.contour(X, Y, Z, zdir='y', offset=3*np.pi, cmap=mp.cm.coolwarm)\n\nax.set_xlim3d(-np.pi, 2*np.pi);\nax.set_ylim3d(0, 3*np.pi);\nax.set_zlim3d(-np.pi, 2*np.pi);",
"_____no_output_____"
]
],
[
[
"## FURTHER READING :",
"_____no_output_____"
],
[
"* http://www.matplotlib.org - The project web page for matplotlib.\n* https://github.com/matplotlib/matplotlib - The source code for matplotlib.\n* http://matplotlib.org/gallery.html - A large gallery showcaseing various types of plots matplotlib can create. Highly recommended! \n* http://www.loria.fr/~rougier/teaching/matplotlib - A good matplotlib tutorial.\n* http://scipy-lectures.github.io/matplotlib/matplotlib.html - Another good matplotlib reference.\n",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown"
] |
[
[
"markdown",
"markdown"
],
[
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
]
] |
4aeb696db30b0611140725af5319e2c6a2042bfa
| 18,999 |
ipynb
|
Jupyter Notebook
|
Notes/tf-data-Dataset.ipynb
|
KurozumiGH/tf2-note
|
eee0d8e86516453d416b3383056a52385f8055ad
|
[
"MIT"
] | null | null | null |
Notes/tf-data-Dataset.ipynb
|
KurozumiGH/tf2-note
|
eee0d8e86516453d416b3383056a52385f8055ad
|
[
"MIT"
] | null | null | null |
Notes/tf-data-Dataset.ipynb
|
KurozumiGH/tf2-note
|
eee0d8e86516453d416b3383056a52385f8055ad
|
[
"MIT"
] | null | null | null | 32.256367 | 120 | 0.462709 |
[
[
[
"# TensorFlow Datasetのテスト\n\n[tf.data.Dataset のAPIドキュメント (tensorflow.org/api_docs)](https://www.tensorflow.org/api_docs/python/tf/data/Dataset)",
"_____no_output_____"
]
],
[
[
"import numpy as np\nimport tensorflow as tf",
"_____no_output_____"
]
],
[
[
"## 共通的に利用する関数定義\n\n0..9までの連番を格納したDatasetを作成する`make_ds`と、Datasetの中身を表示する`print_ds`を定義。 \n1回の`print_ds`呼び出しが、機械学習の1エポックのデータ取り出しに相当する。 ",
"_____no_output_____"
]
],
[
[
"def make_ds():\n return tf.data.Dataset.range(10)\n\n\ndef print_ds(*args):\n line = \"\"\n for ds in args:\n data = list(ds.as_numpy_iterator())\n line += str(data)\n print(line)",
"_____no_output_____"
],
[
"ds = make_ds()\nprint_ds(ds)",
"[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n"
]
],
[
[
"## Datasetに対する操作と結果",
"_____no_output_____"
]
],
[
[
"LOOPS = 12 # Datasetから値を取り出す回数(エポック数のイメージ)",
"_____no_output_____"
]
],
[
[
"### shuffle操作",
"_____no_output_____"
]
],
[
[
"# 単純なDatasetの場合、何度取り出しても同じ値になる。\nds = make_ds()\nfor i in range(LOOPS):\n print_ds(ds)",
"[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n"
],
[
"# shuffleすると、取り出す度にデータがシャッフルされる。\n# shuffleの引数にはデータ数を指定すると、データ全体がほぼ均一にシャッフルされる。\nds = make_ds().shuffle(10)\nfor i in range(LOOPS):\n print_ds(ds)",
"[2, 7, 3, 1, 6, 5, 4, 8, 0, 9]\n[7, 2, 9, 4, 6, 3, 5, 8, 1, 0]\n[0, 2, 3, 7, 1, 9, 8, 4, 5, 6]\n[8, 1, 2, 9, 7, 6, 4, 3, 0, 5]\n[4, 2, 9, 6, 5, 1, 0, 8, 3, 7]\n[7, 5, 8, 4, 6, 0, 3, 9, 2, 1]\n[5, 3, 2, 4, 8, 1, 6, 7, 9, 0]\n[6, 9, 4, 1, 8, 0, 2, 5, 7, 3]\n[3, 1, 9, 0, 6, 5, 7, 8, 2, 4]\n[7, 4, 8, 5, 6, 0, 9, 1, 3, 2]\n[8, 0, 9, 7, 3, 4, 5, 6, 1, 2]\n[6, 0, 8, 5, 1, 7, 9, 4, 2, 3]\n"
],
[
"# shuffleに、reshuffle_each_iteration=Falseを設定すると、2回目以降は同じデータの並び順になる。\n# つまり、最初の1回だけシャッフルされるような状態。\n# デフォルトはreshuffle_each_iteration=Trueとなっているため、取り出す度にシャッフルされる。\nds = make_ds().shuffle(10, reshuffle_each_iteration=False)\nfor i in range(LOOPS):\n print_ds(ds)",
"[2, 3, 5, 9, 7, 4, 0, 6, 1, 8]\n[2, 3, 5, 9, 7, 4, 0, 6, 1, 8]\n[2, 3, 5, 9, 7, 4, 0, 6, 1, 8]\n[2, 3, 5, 9, 7, 4, 0, 6, 1, 8]\n[2, 3, 5, 9, 7, 4, 0, 6, 1, 8]\n[2, 3, 5, 9, 7, 4, 0, 6, 1, 8]\n[2, 3, 5, 9, 7, 4, 0, 6, 1, 8]\n[2, 3, 5, 9, 7, 4, 0, 6, 1, 8]\n[2, 3, 5, 9, 7, 4, 0, 6, 1, 8]\n[2, 3, 5, 9, 7, 4, 0, 6, 1, 8]\n[2, 3, 5, 9, 7, 4, 0, 6, 1, 8]\n[2, 3, 5, 9, 7, 4, 0, 6, 1, 8]\n"
]
],
[
[
"### shuffleとcache",
"_____no_output_____"
]
],
[
[
"# cacheを指定するとメモリ上にデータをキャッシュできるため、2回目以降のデータ取得でパフォーマンス向上が期待できる。\n# しかし、shuffle -> cache の順序で適用すると、2回目以降のシャッフルが反映されない。\n# なお、2回目以降のシャッフルを抑止する目的では使用しない方が良い。\n# 2回目以降のシャッフルを抑止するのであれば、shuffleでreshuffle_each_iteration=Falseを指定する。\nds = make_ds().shuffle(10).cache() # この順番は非推奨\nfor i in range(LOOPS):\n print_ds(ds)",
"[8, 2, 9, 5, 4, 1, 7, 6, 3, 0]\n[8, 2, 9, 5, 4, 1, 7, 6, 3, 0]\n[8, 2, 9, 5, 4, 1, 7, 6, 3, 0]\n[8, 2, 9, 5, 4, 1, 7, 6, 3, 0]\n[8, 2, 9, 5, 4, 1, 7, 6, 3, 0]\n[8, 2, 9, 5, 4, 1, 7, 6, 3, 0]\n[8, 2, 9, 5, 4, 1, 7, 6, 3, 0]\n[8, 2, 9, 5, 4, 1, 7, 6, 3, 0]\n[8, 2, 9, 5, 4, 1, 7, 6, 3, 0]\n[8, 2, 9, 5, 4, 1, 7, 6, 3, 0]\n[8, 2, 9, 5, 4, 1, 7, 6, 3, 0]\n[8, 2, 9, 5, 4, 1, 7, 6, 3, 0]\n"
],
[
"# cache -> shuffle という順序にすれば、正しくシャッフルが機能する。\n# 2回目以降の取り出しでも、shuffleが正しく機能している。\nds = make_ds().cache().shuffle(10) # 正しい順序\nfor i in range(LOOPS):\n print_ds(ds)",
"[1, 7, 9, 6, 4, 0, 2, 5, 3, 8]\n[9, 6, 2, 3, 1, 5, 7, 4, 8, 0]\n[6, 1, 2, 7, 9, 4, 5, 8, 0, 3]\n[7, 2, 8, 9, 6, 5, 1, 4, 3, 0]\n[5, 4, 7, 8, 9, 3, 0, 6, 2, 1]\n[7, 6, 0, 9, 8, 2, 4, 3, 1, 5]\n[8, 6, 7, 1, 4, 2, 9, 5, 3, 0]\n[5, 9, 2, 1, 3, 8, 6, 0, 7, 4]\n[8, 5, 7, 6, 3, 1, 4, 9, 0, 2]\n[2, 3, 7, 5, 1, 9, 6, 8, 0, 4]\n[5, 7, 8, 6, 1, 4, 2, 9, 3, 0]\n[4, 2, 5, 8, 3, 7, 9, 0, 6, 1]\n"
]
],
[
[
"### shuffleとbatch",
"_____no_output_____"
]
],
[
[
"# batchを使って、指定サイズのミニバッチに分割できる。\n# バッチサイズで割りきれずに余った部分は、余った数でバッチ化される。(オプションで切り捨てることも可能)\nds = make_ds().batch(4)\nfor i in range(LOOPS):\n print_ds(ds)",
"[array([0, 1, 2, 3], dtype=int64), array([4, 5, 6, 7], dtype=int64), array([8, 9], dtype=int64)]\n[array([0, 1, 2, 3], dtype=int64), array([4, 5, 6, 7], dtype=int64), array([8, 9], dtype=int64)]\n[array([0, 1, 2, 3], dtype=int64), array([4, 5, 6, 7], dtype=int64), array([8, 9], dtype=int64)]\n[array([0, 1, 2, 3], dtype=int64), array([4, 5, 6, 7], dtype=int64), array([8, 9], dtype=int64)]\n[array([0, 1, 2, 3], dtype=int64), array([4, 5, 6, 7], dtype=int64), array([8, 9], dtype=int64)]\n[array([0, 1, 2, 3], dtype=int64), array([4, 5, 6, 7], dtype=int64), array([8, 9], dtype=int64)]\n[array([0, 1, 2, 3], dtype=int64), array([4, 5, 6, 7], dtype=int64), array([8, 9], dtype=int64)]\n[array([0, 1, 2, 3], dtype=int64), array([4, 5, 6, 7], dtype=int64), array([8, 9], dtype=int64)]\n[array([0, 1, 2, 3], dtype=int64), array([4, 5, 6, 7], dtype=int64), array([8, 9], dtype=int64)]\n[array([0, 1, 2, 3], dtype=int64), array([4, 5, 6, 7], dtype=int64), array([8, 9], dtype=int64)]\n[array([0, 1, 2, 3], dtype=int64), array([4, 5, 6, 7], dtype=int64), array([8, 9], dtype=int64)]\n[array([0, 1, 2, 3], dtype=int64), array([4, 5, 6, 7], dtype=int64), array([8, 9], dtype=int64)]\n"
],
[
"# batch -> shuffle の順序で適用すると、各バッチ単位の固まりでシャッフルされる。\n# バッチ内部の値はシャッフルされない。\nds = make_ds().batch(4).shuffle(3)\nfor i in range(LOOPS):\n print_ds(ds)",
"[array([4, 5, 6, 7], dtype=int64), array([8, 9], dtype=int64), array([0, 1, 2, 3], dtype=int64)]\n[array([8, 9], dtype=int64), array([0, 1, 2, 3], dtype=int64), array([4, 5, 6, 7], dtype=int64)]\n[array([4, 5, 6, 7], dtype=int64), array([8, 9], dtype=int64), array([0, 1, 2, 3], dtype=int64)]\n[array([0, 1, 2, 3], dtype=int64), array([4, 5, 6, 7], dtype=int64), array([8, 9], dtype=int64)]\n[array([4, 5, 6, 7], dtype=int64), array([8, 9], dtype=int64), array([0, 1, 2, 3], dtype=int64)]\n[array([4, 5, 6, 7], dtype=int64), array([0, 1, 2, 3], dtype=int64), array([8, 9], dtype=int64)]\n[array([4, 5, 6, 7], dtype=int64), array([8, 9], dtype=int64), array([0, 1, 2, 3], dtype=int64)]\n[array([8, 9], dtype=int64), array([0, 1, 2, 3], dtype=int64), array([4, 5, 6, 7], dtype=int64)]\n[array([8, 9], dtype=int64), array([4, 5, 6, 7], dtype=int64), array([0, 1, 2, 3], dtype=int64)]\n[array([0, 1, 2, 3], dtype=int64), array([4, 5, 6, 7], dtype=int64), array([8, 9], dtype=int64)]\n[array([0, 1, 2, 3], dtype=int64), array([8, 9], dtype=int64), array([4, 5, 6, 7], dtype=int64)]\n[array([8, 9], dtype=int64), array([4, 5, 6, 7], dtype=int64), array([0, 1, 2, 3], dtype=int64)]\n"
],
[
"# shuffle -> batch だと、シャッフルしたデータに対してバッチ化するため、各バッチに含まれる値もシャッフルされる。\nds = make_ds().shuffle(10).batch(4)\nfor i in range(LOOPS):\n print_ds(ds)",
"[array([6, 7, 1, 2], dtype=int64), array([8, 0, 9, 3], dtype=int64), array([4, 5], dtype=int64)]\n[array([7, 0, 2, 3], dtype=int64), array([1, 9, 6, 8], dtype=int64), array([4, 5], dtype=int64)]\n[array([8, 0, 2, 4], dtype=int64), array([5, 1, 6, 7], dtype=int64), array([3, 9], dtype=int64)]\n[array([1, 5, 6, 0], dtype=int64), array([9, 8, 3, 7], dtype=int64), array([4, 2], dtype=int64)]\n[array([5, 1, 6, 3], dtype=int64), array([2, 0, 8, 4], dtype=int64), array([7, 9], dtype=int64)]\n[array([4, 9, 2, 3], dtype=int64), array([0, 6, 1, 7], dtype=int64), array([8, 5], dtype=int64)]\n[array([5, 3, 0, 8], dtype=int64), array([9, 1, 4, 6], dtype=int64), array([7, 2], dtype=int64)]\n[array([8, 2, 7, 3], dtype=int64), array([6, 5, 4, 0], dtype=int64), array([9, 1], dtype=int64)]\n[array([0, 5, 3, 9], dtype=int64), array([8, 1, 2, 4], dtype=int64), array([6, 7], dtype=int64)]\n[array([4, 8, 0, 5], dtype=int64), array([6, 7, 9, 2], dtype=int64), array([1, 3], dtype=int64)]\n[array([7, 8, 5, 2], dtype=int64), array([4, 9, 6, 3], dtype=int64), array([0, 1], dtype=int64)]\n[array([8, 6, 5, 9], dtype=int64), array([4, 2, 0, 3], dtype=int64), array([1, 7], dtype=int64)]\n"
],
[
"# 参考までに、cacheの挙動は、shuffleと組み合わせたときと同じ動き。\n# きちんとシャッフルしたければ、cacheはshuffleより先に適用する。\nds = make_ds().shuffle(10).batch(4).cache()\nfor i in range(LOOPS):\n print_ds(ds)",
"[array([2, 4, 6, 0], dtype=int64), array([9, 8, 7, 3], dtype=int64), array([1, 5], dtype=int64)]\n[array([2, 4, 6, 0], dtype=int64), array([9, 8, 7, 3], dtype=int64), array([1, 5], dtype=int64)]\n[array([2, 4, 6, 0], dtype=int64), array([9, 8, 7, 3], dtype=int64), array([1, 5], dtype=int64)]\n[array([2, 4, 6, 0], dtype=int64), array([9, 8, 7, 3], dtype=int64), array([1, 5], dtype=int64)]\n[array([2, 4, 6, 0], dtype=int64), array([9, 8, 7, 3], dtype=int64), array([1, 5], dtype=int64)]\n[array([2, 4, 6, 0], dtype=int64), array([9, 8, 7, 3], dtype=int64), array([1, 5], dtype=int64)]\n[array([2, 4, 6, 0], dtype=int64), array([9, 8, 7, 3], dtype=int64), array([1, 5], dtype=int64)]\n[array([2, 4, 6, 0], dtype=int64), array([9, 8, 7, 3], dtype=int64), array([1, 5], dtype=int64)]\n[array([2, 4, 6, 0], dtype=int64), array([9, 8, 7, 3], dtype=int64), array([1, 5], dtype=int64)]\n[array([2, 4, 6, 0], dtype=int64), array([9, 8, 7, 3], dtype=int64), array([1, 5], dtype=int64)]\n[array([2, 4, 6, 0], dtype=int64), array([9, 8, 7, 3], dtype=int64), array([1, 5], dtype=int64)]\n[array([2, 4, 6, 0], dtype=int64), array([9, 8, 7, 3], dtype=int64), array([1, 5], dtype=int64)]\n"
]
],
[
[
"### shuffleとtake/skip",
"_____no_output_____"
]
],
[
[
"# take/skipでDatasetを任意の場所で区切って取り出せる。\n# takeは、Datasetの先頭から指定した要素数のデータを取り出す。\n# skipは、Datasetの先頭から指定した要素数をスキップし、その後のデータを取り出す。\n# つまり、skip(7)とすれば、8個目の要素以降全てを取り出せる。\n# このtake/skipを使って、Datasetをtrain/test用に簡単に分割できる。\nds = make_ds()\nds_x = ds.take(7)\nds_y = ds.skip(7)\nfor i in range(LOOPS):\n print_ds(ds_x, ds_y)",
"[0, 1, 2, 3, 4, 5, 6][7, 8, 9]\n[0, 1, 2, 3, 4, 5, 6][7, 8, 9]\n[0, 1, 2, 3, 4, 5, 6][7, 8, 9]\n[0, 1, 2, 3, 4, 5, 6][7, 8, 9]\n[0, 1, 2, 3, 4, 5, 6][7, 8, 9]\n[0, 1, 2, 3, 4, 5, 6][7, 8, 9]\n[0, 1, 2, 3, 4, 5, 6][7, 8, 9]\n[0, 1, 2, 3, 4, 5, 6][7, 8, 9]\n[0, 1, 2, 3, 4, 5, 6][7, 8, 9]\n[0, 1, 2, 3, 4, 5, 6][7, 8, 9]\n[0, 1, 2, 3, 4, 5, 6][7, 8, 9]\n[0, 1, 2, 3, 4, 5, 6][7, 8, 9]\n"
],
[
"# shuffleしたデータに対して、take/skipでデータ分割した場合、値を取り出す度に元データ自体がシャッフルされる。\n# take/skipで区分けした中でのシャッフル「ではない」ので注意。\n# 特に、take/skipでtrain/test用にデータを分割した場合、train/test用データが各エポックごとに混ざってしまうので注意が必要。\nds = make_ds().shuffle(10)\nds_x = ds.take(7)\nds_y = ds.skip(7)\nfor i in range(LOOPS):\n print_ds(ds_x, ds_y)",
"[0, 4, 6, 7, 3, 2, 8][4, 7, 9]\n[1, 2, 8, 7, 3, 6, 5][8, 7, 9]\n[0, 7, 2, 1, 4, 6, 9][8, 1, 7]\n[5, 4, 9, 7, 2, 6, 0][9, 3, 7]\n[5, 0, 3, 1, 8, 7, 9][0, 7, 4]\n[6, 3, 0, 2, 1, 5, 4][4, 9, 5]\n[6, 5, 7, 9, 2, 8, 0][9, 4, 7]\n[0, 5, 8, 7, 1, 4, 9][1, 6, 0]\n[9, 1, 4, 5, 3, 6, 7][1, 2, 5]\n[4, 6, 0, 7, 1, 3, 8][4, 8, 3]\n[4, 0, 8, 9, 5, 3, 1][4, 8, 9]\n[9, 8, 4, 3, 5, 1, 6][2, 4, 5]\n"
],
[
"# shuffleしたデータを、take/skipで分割後に混ぜたくない場合、shuffleでreshuffle_each_iteration=Falseを指定すれば良い。\n# こうしておけば、2回目以降のデータ取り出しでも同じ並び順となるため、take/skipのデータが混ざることは無い。\n# ただし、take/skipで分割したそれぞれのデータブロック内でも、毎回同じ並び順になってしまう。\nds = make_ds().shuffle(10, reshuffle_each_iteration=False)\nds_x = ds.take(7)\nds_y = ds.skip(7)\nfor i in range(LOOPS):\n print_ds(ds_x, ds_y)",
"[0, 8, 3, 9, 5, 2, 7][4, 1, 6]\n[0, 8, 3, 9, 5, 2, 7][4, 1, 6]\n[0, 8, 3, 9, 5, 2, 7][4, 1, 6]\n[0, 8, 3, 9, 5, 2, 7][4, 1, 6]\n[0, 8, 3, 9, 5, 2, 7][4, 1, 6]\n[0, 8, 3, 9, 5, 2, 7][4, 1, 6]\n[0, 8, 3, 9, 5, 2, 7][4, 1, 6]\n[0, 8, 3, 9, 5, 2, 7][4, 1, 6]\n[0, 8, 3, 9, 5, 2, 7][4, 1, 6]\n[0, 8, 3, 9, 5, 2, 7][4, 1, 6]\n[0, 8, 3, 9, 5, 2, 7][4, 1, 6]\n[0, 8, 3, 9, 5, 2, 7][4, 1, 6]\n"
],
[
"# shuffleしたデータを、take/skipで分割後、takeで取得したデータだけを毎回シャッフルしたい場合、\n# takeで取得したデータに対して、再度shuffleを適用すればOK。\nds = make_ds().shuffle(10, reshuffle_each_iteration=False)\nds_x = ds.take(7).shuffle(7) # takeで取得したデータ内でシャッフル\nds_y = ds.skip(7)\nfor i in range(LOOPS):\n print_ds(ds_x, ds_y)",
"[5, 2, 7, 3, 0, 8, 4][1, 6, 9]\n[4, 8, 7, 5, 3, 0, 2][1, 6, 9]\n[8, 3, 5, 4, 0, 2, 7][1, 6, 9]\n[0, 3, 2, 7, 4, 8, 5][1, 6, 9]\n[4, 3, 2, 8, 5, 7, 0][1, 6, 9]\n[3, 0, 8, 2, 4, 7, 5][1, 6, 9]\n[3, 0, 4, 7, 5, 2, 8][1, 6, 9]\n[4, 5, 7, 8, 2, 0, 3][1, 6, 9]\n[3, 7, 5, 8, 0, 2, 4][1, 6, 9]\n[7, 0, 5, 8, 3, 2, 4][1, 6, 9]\n[8, 5, 2, 3, 0, 4, 7][1, 6, 9]\n[4, 0, 2, 8, 3, 7, 5][1, 6, 9]\n"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code"
] |
[
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code"
]
] |
4aeb6d668e08b3cb53a77166f4451735e73b5d4c
| 58,268 |
ipynb
|
Jupyter Notebook
|
tutorials/finance/04_european_put_option_pricing.ipynb
|
prasad-kumkar/qiskit-tutorials
|
3b87a1fc0a9cc7c558cbae3ea90a9e5b005eeb72
|
[
"Apache-2.0"
] | null | null | null |
tutorials/finance/04_european_put_option_pricing.ipynb
|
prasad-kumkar/qiskit-tutorials
|
3b87a1fc0a9cc7c558cbae3ea90a9e5b005eeb72
|
[
"Apache-2.0"
] | null | null | null |
tutorials/finance/04_european_put_option_pricing.ipynb
|
prasad-kumkar/qiskit-tutorials
|
3b87a1fc0a9cc7c558cbae3ea90a9e5b005eeb72
|
[
"Apache-2.0"
] | 1 |
2021-02-20T04:34:25.000Z
|
2021-02-20T04:34:25.000Z
| 103.864528 | 20,360 | 0.851479 |
[
[
[
"# _*Pricing European Put Options*_ ",
"_____no_output_____"
],
[
"### Introduction\n<br>\nSuppose a <a href=\"http://www.theoptionsguide.com/put-option.aspx\">European put option</a> with strike price $K$ and an underlying asset whose spot price at maturity $S_T$ follows a given random distribution.\nThe corresponding payoff function is defined as:\n\n$$\\max\\{K - S_T, 0\\}$$\n\nIn the following, a quantum algorithm based on amplitude estimation is used to estimate the expected payoff, i.e., the fair price before discounting, for the option:\n\n$$\\mathbb{E}\\left[ \\max\\{K - S_T, 0\\} \\right]$$\n\nas well as the corresponding $\\Delta$, i.e., the derivative of the option price with respect to the spot price, defined as:\n\n$$\n\\Delta = -\\mathbb{P}\\left[S_T \\leq K\\right]\n$$\n\nThe approximation of the objective function and a general introduction to option pricing and risk analysis on quantum computers are given in the following papers:\n\n- <a href=\"https://arxiv.org/abs/1806.06893\">Quantum Risk Analysis. Woerner, Egger. 2018.</a>\n- <a href=\"https://arxiv.org/abs/1905.02666\">Option Pricing using Quantum Computers. Stamatopoulos et al. 2019.</a>",
"_____no_output_____"
]
],
[
[
"import matplotlib.pyplot as plt\n%matplotlib inline\nimport numpy as np\n\nfrom qiskit import Aer\nfrom qiskit.aqua.algorithms import IterativeAmplitudeEstimation\nfrom qiskit.aqua.components.uncertainty_models import LogNormalDistribution\nfrom qiskit.aqua.components.uncertainty_problems import UnivariateProblem\nfrom qiskit.aqua.components.uncertainty_problems import UnivariatePiecewiseLinearObjective as PwlObjective",
"_____no_output_____"
]
],
[
[
"### Uncertainty Model\n\nWe construct a circuit factory to load a log-normal random distribution into a quantum state.\nThe distribution is truncated to a given interval $[low, high]$ and discretized using $2^n$ grid points, where $n$ denotes the number of qubits used.\nThe unitary operator corresponding to the circuit factory implements the following: \n\n$$\\big|0\\rangle_{n} \\mapsto \\big|\\psi\\rangle_{n} = \\sum_{i=0}^{2^n-1} \\sqrt{p_i}\\big|i\\rangle_{n},$$\n\nwhere $p_i$ denote the probabilities corresponding to the truncated and discretized distribution and where $i$ is mapped to the right interval using the affine map:\n\n$$ \\{0, \\ldots, 2^n-1\\} \\ni i \\mapsto \\frac{high - low}{2^n - 1} * i + low \\in [low, high].$$",
"_____no_output_____"
]
],
[
[
"# number of qubits to represent the uncertainty\nnum_uncertainty_qubits = 3\n\n# parameters for considered random distribution\nS = 2.0 # initial spot price\nvol = 0.4 # volatility of 40%\nr = 0.05 # annual interest rate of 4%\nT = 40 / 365 # 40 days to maturity\n\n# resulting parameters for log-normal distribution\nmu = ((r - 0.5 * vol**2) * T + np.log(S))\nsigma = vol * np.sqrt(T)\nmean = np.exp(mu + sigma**2/2)\nvariance = (np.exp(sigma**2) - 1) * np.exp(2*mu + sigma**2)\nstddev = np.sqrt(variance)\n\n# lowest and highest value considered for the spot price; in between, an equidistant discretization is considered.\nlow = np.maximum(0, mean - 3*stddev)\nhigh = mean + 3*stddev\n\n# construct circuit factory for uncertainty model\nuncertainty_model = LogNormalDistribution(num_uncertainty_qubits, mu=mu, sigma=sigma, low=low, high=high)",
"_____no_output_____"
],
[
"# plot probability distribution\nx = uncertainty_model.values\ny = uncertainty_model.probabilities\nplt.bar(x, y, width=0.2)\nplt.xticks(x, size=15, rotation=90)\nplt.yticks(size=15)\nplt.grid()\nplt.xlabel('Spot Price at Maturity $S_T$ (\\$)', size=15)\nplt.ylabel('Probability ($\\%$)', size=15)\nplt.show()",
"_____no_output_____"
]
],
[
[
"### Payoff Function\n\nThe payoff function decreases linearly with an increasing spot price at maturity $S_T$ until it reaches zero for a spot price equal to the strike price $K$, it stays constant to zero for larger spot prices.\nThe implementation uses a comparator, that flips an ancilla qubit from $\\big|0\\rangle$ to $\\big|1\\rangle$ if $S_T \\leq K$, and this ancilla is used to control the linear part of the payoff function.\n\nThe linear part itself is then approximated as follows.\nWe exploit the fact that $\\sin^2(y + \\pi/4) \\approx y + 1/2$ for small $|y|$.\nThus, for a given approximation scaling factor $c_{approx} \\in [0, 1]$ and $x \\in [0, 1]$ we consider\n$$ \\sin^2( \\pi/2 * c_{approx} * ( x - 1/2 ) + \\pi/4) \\approx \\pi/2 * c_{approx} * ( x - 1/2 ) + 1/2 $$ for small $c_{approx}$.\n\nWe can easily construct an operator that acts as \n$$\\big|x\\rangle \\big|0\\rangle \\mapsto \\big|x\\rangle \\left( \\cos(a*x+b) \\big|0\\rangle + \\sin(a*x+b) \\big|1\\rangle \\right),$$\nusing controlled Y-rotations.\n\nEventually, we are interested in the probability of measuring $\\big|1\\rangle$ in the last qubit, which corresponds to\n$\\sin^2(a*x+b)$.\nTogether with the approximation above, this allows to approximate the values of interest.\nThe smaller we choose $c_{approx}$, the better the approximation.\nHowever, since we are then estimating a property scaled by $c_{approx}$, the number of evaluation qubits $m$ needs to be adjusted accordingly.\n\nFor more details on the approximation, we refer to:\n<a href=\"https://arxiv.org/abs/1806.06893\">Quantum Risk Analysis. Woerner, Egger. 2018.</a>",
"_____no_output_____"
]
],
[
[
"# set the strike price (should be within the low and the high value of the uncertainty)\nstrike_price = 2.126\n\n# set the approximation scaling for the payoff function\nc_approx = 0.25\n\n# setup piecewise linear objective fcuntion\nbreakpoints = [uncertainty_model.low, strike_price]\nslopes = [-1, 0]\noffsets = [strike_price - uncertainty_model.low, 0]\nf_min = 0\nf_max = strike_price - uncertainty_model.low\neuropean_put_objective = PwlObjective(\n uncertainty_model.num_target_qubits, \n uncertainty_model.low, \n uncertainty_model.high,\n breakpoints,\n slopes,\n offsets,\n f_min,\n f_max,\n c_approx\n)\n\n# construct circuit factory for payoff function\neuropean_put = UnivariateProblem(\n uncertainty_model,\n european_put_objective\n)",
"_____no_output_____"
],
[
"# plot exact payoff function (evaluated on the grid of the uncertainty model)\nx = uncertainty_model.values\ny = np.maximum(0, strike_price - x)\nplt.plot(x, y, 'ro-')\nplt.grid()\nplt.title('Payoff Function', size=15)\nplt.xlabel('Spot Price', size=15)\nplt.ylabel('Payoff', size=15)\nplt.xticks(x, size=15, rotation=90)\nplt.yticks(size=15)\nplt.show()",
"_____no_output_____"
],
[
"# evaluate exact expected value (normalized to the [0, 1] interval)\nexact_value = np.dot(uncertainty_model.probabilities, y)\nexact_delta = -sum(uncertainty_model.probabilities[x <= strike_price])\nprint('exact expected value:\\t%.4f' % exact_value)\nprint('exact delta value: \\t%.4f' % exact_delta)",
"exact expected value:\t0.1709\nexact delta value: \t-0.8193\n"
]
],
[
[
"### Evaluate Expected Payoff",
"_____no_output_____"
]
],
[
[
"# set target precision and confidence level\nepsilon = 0.01\nalpha = 0.05\n\n# construct amplitude estimation \nae = IterativeAmplitudeEstimation(epsilon=epsilon, alpha=alpha, a_factory=european_put)",
"_____no_output_____"
],
[
"result = ae.run(quantum_instance=Aer.get_backend('qasm_simulator'), shots=100)",
"_____no_output_____"
],
[
"conf_int = np.array(result['confidence_interval'])\nprint('Exact value: \\t%.4f' % exact_value)\nprint('Estimated value: \\t%.4f' % (result['estimation']))\nprint('Confidence interval:\\t[%.4f, %.4f]' % tuple(conf_int))",
"Exact value: \t0.1709\nEstimated value: \t0.1773\nConfidence interval:\t[0.1712, 0.1835]\n"
]
],
[
[
"### Evaluate Delta\n\nThe Delta is a bit simpler to evaluate than the expected payoff.\nSimilarly to the expected payoff, we use a comparator circuit and an ancilla qubit to identify the cases where $S_T \\leq K$.\nHowever, since we are only interested in the (negative) probability of this condition being true, we can directly use this ancilla qubit as the objective qubit in amplitude estimation without any further approximation.",
"_____no_output_____"
]
],
[
[
"# setup piecewise linear objective fcuntion\nbreakpoints = [uncertainty_model.low, strike_price]\nslopes = [0, 0]\noffsets = [1, 0]\nf_min = 0\nf_max = 1\nc_approx = 1\neuropean_delta_objective = PwlObjective(\n uncertainty_model.num_target_qubits, \n uncertainty_model.low, \n uncertainty_model.high,\n breakpoints,\n slopes,\n offsets,\n f_min,\n f_max,\n c_approx\n)\n\n# construct circuit factory for payoff function\neuropean_put_delta = UnivariateProblem(\n uncertainty_model,\n european_delta_objective\n)",
"_____no_output_____"
],
[
"# set target precision and confidence level\nepsilon = 0.01\nalpha = 0.05\n\n# construct amplitude estimation \nae_delta = IterativeAmplitudeEstimation(epsilon=epsilon, alpha=alpha, a_factory=european_put_delta)",
"_____no_output_____"
],
[
"result_delta = ae_delta.run(quantum_instance=Aer.get_backend('qasm_simulator'), shots=100)",
"_____no_output_____"
],
[
"conf_int = -np.array(result_delta['confidence_interval'])[::-1]\nprint('Exact delta: \\t%.4f' % exact_delta)\nprint('Esimated value: \\t%.4f' % -result_delta['estimation'])\nprint('Confidence interval: \\t[%.4f, %.4f]' % tuple(conf_int))",
"Exact delta: \t-0.8193\nEsimated value: \t-0.8197\nConfidence interval: \t[-0.8236, -0.8158]\n"
],
[
"import qiskit.tools.jupyter\n%qiskit_version_table\n%qiskit_copyright",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code"
] |
[
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code"
]
] |
4aeb7394a44b7adc1dc9031ad429ee0be24d94d2
| 9,904 |
ipynb
|
Jupyter Notebook
|
code/CNN/.ipynb_checkpoints/Test on integrated system-checkpoint.ipynb
|
ttphan/The-Cupcakes-3000
|
44b9e2b433ff945b1b6d57354dc1d22afbd0eddd
|
[
"Unlicense",
"MIT"
] | null | null | null |
code/CNN/.ipynb_checkpoints/Test on integrated system-checkpoint.ipynb
|
ttphan/The-Cupcakes-3000
|
44b9e2b433ff945b1b6d57354dc1d22afbd0eddd
|
[
"Unlicense",
"MIT"
] | null | null | null |
code/CNN/.ipynb_checkpoints/Test on integrated system-checkpoint.ipynb
|
ttphan/The-Cupcakes-3000
|
44b9e2b433ff945b1b6d57354dc1d22afbd0eddd
|
[
"Unlicense",
"MIT"
] | 1 |
2017-06-14T02:37:48.000Z
|
2017-06-14T02:37:48.000Z
| 30.473846 | 279 | 0.495153 |
[
[
[
"# Le-Net 1 based architecture",
"_____no_output_____"
]
],
[
[
"%matplotlib inline\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom numpy import linalg as lin\nimport scipy.signal as sig\nfrom PIL import Image\nimport glob\nimport matplotlib.cm as cm\nimport itertools",
"_____no_output_____"
],
[
"########### Functions ############################################################################################################################\n\n# Define Activitation functions, pooling and convolution functions (the rules)\n\ndef Sigmoid(x): \n return (1/(1+np.exp(-x)))\n\ndef Sigmoid_dx(x):\n return np.exp(-x)/((1+np.exp(-x))**2)\n\ndef TanH(x):\n return (1-np.exp(-x))/(1+np.exp(-x))\n\n\ndef Pool(I,W):\n PoolImg=np.zeros((len(I)/len(W),len(I)/len(W))) # W must fit an integer times into I.\n for i in range(0,len(PoolImg)):\n for j in range(0,len(PoolImg)):\n SelAr=I[i*len(W):(i+1)*len(W),j*len(W):(j+1)*len(W)]\n PoolImg[i,j]=np.inner(SelAr.flatten(),W.flatten()) # Now this is just an inner product since we have vectors\n return PoolImg\n\n# To automatically make Gaussian kernels\ndef makeGaussian(size, fwhm = 3, center=None):\n x = np.arange(0, size, 1, float)\n y = x[:,np.newaxis]\n\n if center is None:\n x0 = y0 = size // 2\n else:\n x0 = center[0]\n y0 = center[1]\n\n return np.exp(-4*np.log(2) * ((x-x0)**2 + (y-y0)**2) / fwhm**2)\n\n# To automatically define pooling nodes\ndef Pool_node(N):\n s=(N,N)\n a=float(N)*float(N)\n return (1.0/a)*np.ones(s) \n\n",
"_____no_output_____"
],
[
"#################### Define pooling layers ###########################################################################\nP12=Pool_node(4)*(1.0/100.0) #factor 1000 added to lower values more\nP34=Pool_node(1)*(1.0/10.0) \n\n#################### Define Convolution layers #######################################################################\n\n######### First C layer #########\nC1=[]\n\n## First Kernel\n\n# Inspiration: http://en.wikipedia.org/wiki/Sobel_operator\n# http://stackoverflow.com/questions/9567882/sobel-filter-kernel-of-large-size\n\nKernel=np.array([[4,3,2,1,0,-1,-2,-3,-4],\n [5,4,3,2,0,-2,-3,-4,-5], \n [6,5,4,3,0,-3,-4,-5,-6],\n [7,6,5,4,0,-4,-5,-6,-7], \n [8,7,6,5,0,-5,-6,-7,-8],\n [7,6,5,4,0,-4,-5,-6,-7],\n [6,5,4,3,0,-3,-4,-5,-6],\n [5,4,3,2,0,-2,-3,-4,-5],\n [4,3,2,1,0,-1,-2,-3,-4]])\n\nC1.append(Kernel)\n\n## Second Kernel\nKernel=np.matrix.transpose(Kernel)\nC1.append(Kernel)\n\n##Third Kernel\n#Kernel=makeGaussian(9,5)\n#Kernel=(1/np.sum(Kernel))*Kernel\n#C1.append(Kernel)\n\n######### Initialize output weights and biases #########\n\n# Define the number of branches in one row\npatchSize=40\nN_branches= 3\nClassAmount=3 # Forest, City, Water\nSize_C2=5\nS_H3=((patchSize-C1[0].shape[0]+1)/P12.shape[1])-Size_C2+1\nS_H4=S_H3/P34.shape[1]\n\n\n\nimport pickle\nfile=open('W.txt','r')\nW=pickle.load(file)\nfile=open('W2.txt','r')\nW2=pickle.load(file)\nfile=open('Output_bias.txt','r')\nOutput_bias=pickle.load(file)\nfile=open('H3_bias.txt','r')\nH3_bias=pickle.load(file)\nfile=open('C2.txt','r')\nC2=pickle.load(file)\n",
"_____no_output_____"
]
],
[
[
"# For the extra information regarding the code in the following cell\n\na random patch is chosen in the following way: the program counts how many files and patches there are in total, then it permutes the sequence so that a random patch is chosen every iteration (forest, city, water). After selecting the number the file has to be found back. ",
"_____no_output_____"
],
[
"# save training parameters",
"_____no_output_____"
]
],
[
[
"####### Test phase on new images #######\nError_Test=[]\nN_correct=0\npatchSize=40 \n\nPatches_TEST=np.empty([1,patchSize,patchSize])\nPatches_TEST_RGB=np.empty([1,patchSize,patchSize,3])\nPatches_t=np.empty([3])\n\nname=\"Test/Test4.png\"\nimg = Image.open(name)\ndata=img.convert('RGB')\ndata= np.asarray( data, dtype=\"int32\" )\ndata=0.2126*data[:,:,0]+0.7152*data[:,:,1]+0.0722*data[:,:,2]\ndata2=img.convert('RGB')\ndata2= np.asarray( data2, dtype=\"int32\" )\n\nYamount=data.shape[0]/patchSize # Counts how many times the windowsize fits in the picture\nXamount=data.shape[1]/patchSize # Counts how many times the windowsize fits in the picture\n \n # Create patches for structure\ndata_t=np.array([[data[j*patchSize:(j+1)*patchSize,i*patchSize:(i+1)*patchSize] for i in range(0,Xamount)] for j in range(0,Yamount)])\ndata_t=np.reshape(data_t, [data_t.shape[0]*data_t.shape[1], patchSize, patchSize])\nPatches_TEST=np.append(Patches_TEST,data_t,axis=0)\n #Create patches for colour\ndata_t=np.array([[data2[j*patchSize:(j+1)*patchSize,i*patchSize:(i+1)*patchSize,:] for i in range(0,Xamount)] for j in range(0,Yamount)])\ndata_t=np.reshape(data_t, [data_t.shape[0]*data_t.shape[1], patchSize, patchSize, 3])\nPatches_TEST_RGB=np.append(Patches_TEST_RGB, data_t,axis=0)\nPatches_TEST=np.delete(Patches_TEST, 0,0) \nPatches_TEST_RGB=np.delete(Patches_TEST_RGB, 0,0) \n\nfrom itertools import product\n###### Chooses patch and defines label #####\n#for PP in range(0,len(Sequence)):\nForest=0\nCity=0\nWater=0\n\nfor PP in range(0,Patches_TEST.shape[0]):\n inputPatch=Patches_TEST[PP]\n Int_RGB=np.mean(np.mean(Patches_TEST_RGB[PP,:,:,:], axis=0), axis=0)/255\n ### Layer 1 ###\n H1=[]\n H2=[]\n H3=np.zeros((len(C1), N_branches, S_H3,S_H3))\n H4=np.zeros((len(C1), N_branches, S_H4,S_H4))\n x=np.zeros(ClassAmount)\n f=np.zeros(ClassAmount)\n for r in range (0, len(C1)):\n H1.append(sig.convolve(inputPatch, C1[r], 'valid'))\n H2.append(Pool(H1[r], P12))\n for b in range(0,N_branches):\n H3[r][b]=Sigmoid(sig.convolve(H2[r], C2[r][b],'valid')-H3_bias[r][b])\n H4[r][b]=Pool(H3[r][b],P34) \n y=np.append([H4.flatten()], [Int_RGB])\n #Now we have 3x3x4x4 inputs, connected to the 3 output nodes \n for k in range(0,ClassAmount):\n W_t=np.append([W[k].flatten()], [W2[k]])\n x[k]=np.inner(y, W_t) \n f[k]=Sigmoid(x[k]-Output_bias[k])\n f=f/np.sum((f))\n if np.argmax(f)==0:\n \n if np.argmax(f)==1:\n City=City+1\n if np.argmax(f)==2:\n Water=Water+1\n\n \n ",
"/anaconda/lib/python2.7/site-packages/IPython/kernel/__main__.py:6: RuntimeWarning: overflow encountered in exp\n"
],
[
"print Forest, City, Water",
"321 104 4\n"
],
[
"Int_RGB",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code"
] |
[
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown",
"markdown"
],
[
"code",
"code",
"code"
]
] |
4aeb87c298da6a54ef62d1d41d8b7b0318c4d5ad
| 905,204 |
ipynb
|
Jupyter Notebook
|
Solution_practice_exercise+(eda).ipynb
|
PacktPublishing/Python-for-Data-Analysis-step-by-step-with-projects-
|
d4303844d927f7bd61e48b71a9d272f426dfba0e
|
[
"MIT"
] | 6 |
2021-12-19T00:45:37.000Z
|
2022-03-26T05:11:59.000Z
|
Solution_practice_exercise+(eda).ipynb
|
PacktPublishing/Python-for-Data-Analysis-step-by-step-with-projects-
|
d4303844d927f7bd61e48b71a9d272f426dfba0e
|
[
"MIT"
] | null | null | null |
Solution_practice_exercise+(eda).ipynb
|
PacktPublishing/Python-for-Data-Analysis-step-by-step-with-projects-
|
d4303844d927f7bd61e48b71a9d272f426dfba0e
|
[
"MIT"
] | 10 |
2021-12-13T16:54:04.000Z
|
2022-03-30T18:12:27.000Z
| 256.722632 | 223,884 | 0.900561 |
[
[
[
"# Practice Exercise: Exploring data (Exploratory Data Analysis)",
"_____no_output_____"
],
[
"## Context:\n- The data includes 120 years (1896 to 2016) of Olympic games with information about athletes and medal results.\n- We'll focus on practicing the summary statistics and data visualization techniques that we've learned in the course. \n- In general, this dataset is popular to explore how the Olympics have evolved over time, including the participation and performance of different genders, different countries, in various sports and events.\n\n- Check out the original source if you are interested in using this data for other purposes (https://www.kaggle.com/heesoo37/120-years-of-olympic-history-athletes-and-results)",
"_____no_output_____"
],
[
"## Dataset Description:\n\nWe'll work on the data within athlete_events.csv. \n\nEach row corresponds to an individual athlete competing in an individual Olympic event.\n\nThe columns are:\n- **ID**: Unique number for each athlete\n- **Name**: Athlete's name\n- **Sex**: M or F\n- **Age**: Integer\n- **Height**: In centimeters\n- **Weight**: In kilograms\n- **Team**: Team name\n- **NOC**: National Olympic Committee 3-letter code\n- **Games**: Year and season\n- **Year**: Integer\n- **Season**: Summer or Winter\n- **City**: Host city\n- **Sport**: Sport\n- **Event**: Event\n- **Medal**: Gold, Silver, Bronze, or NA",
"_____no_output_____"
],
[
"## Objective: \n - Examine/clean the dataset\n - Explore distributions of single numerical and categorical features via statistics and plots\n - Explore relationships of multiple features via statistics and plots\n\nWe are only going to explore part of the dataset, please feel free to explore more if you are interested.",
"_____no_output_____"
],
[
"### 1. Import the libraries `Pandas` and `Seaborn`",
"_____no_output_____"
]
],
[
[
"import pandas as pd\nimport seaborn as sns",
"_____no_output_____"
]
],
[
[
"### 2. Import the data from the csv file as DataFrame `olympics`",
"_____no_output_____"
]
],
[
[
"olympics = pd.read_csv('athlete_events.csv')",
"_____no_output_____"
]
],
[
[
"### 3. Look at the info summary, head of the DataFrame",
"_____no_output_____"
]
],
[
[
"olympics.info()",
"<class 'pandas.core.frame.DataFrame'>\nRangeIndex: 271116 entries, 0 to 271115\nData columns (total 15 columns):\n # Column Non-Null Count Dtype \n--- ------ -------------- ----- \n 0 ID 271116 non-null int64 \n 1 Name 271116 non-null object \n 2 Sex 271116 non-null object \n 3 Age 261642 non-null float64\n 4 Height 210945 non-null float64\n 5 Weight 208241 non-null float64\n 6 Team 271116 non-null object \n 7 NOC 271116 non-null object \n 8 Games 271116 non-null object \n 9 Year 271116 non-null int64 \n 10 Season 271116 non-null object \n 11 City 271116 non-null object \n 12 Sport 271116 non-null object \n 13 Event 271116 non-null object \n 14 Medal 39783 non-null object \ndtypes: float64(3), int64(2), object(10)\nmemory usage: 31.0+ MB\n"
],
[
"olympics.head()",
"_____no_output_____"
]
],
[
[
"### 4. Impute the missing data",
"_____no_output_____"
],
[
"#### Use `IterativeImputer` in `sklearn` to impute based on columns `Year`, `Age`, `Height`, `Weight`",
"_____no_output_____"
],
[
"##### Import libraries",
"_____no_output_____"
]
],
[
[
"from sklearn.experimental import enable_iterative_imputer\nfrom sklearn.impute import IterativeImputer",
"_____no_output_____"
]
],
[
[
"##### Build a list of columns that will be used for imputation, which are `Year`, `Age`, `Height`, `Weight`\nThe column `Year` doesn't have mssing values, but we include it since it might be helpful modeling the other three columns. The age, height, and weight could change across years.",
"_____no_output_____"
]
],
[
[
"cols_to_impute = ['Year', 'Age', 'Height', 'Weight']",
"_____no_output_____"
]
],
[
[
"##### Create an `IterativeImputer` object and set its `min_value` and `max_value` parameters to be the minumum and maximum of corresponding columns",
"_____no_output_____"
]
],
[
[
"iter_imp = IterativeImputer(min_value=olympics[cols_to_impute].min(), max_value=olympics[cols_to_impute].max())",
"_____no_output_____"
]
],
[
[
"##### Apply the imputer to fit and transform the columns to an imputed NumPy array",
"_____no_output_____"
]
],
[
[
"imputed_cols = iter_imp.fit_transform(olympics[cols_to_impute])",
"_____no_output_____"
]
],
[
[
"##### Assign the imputed array back to the original DataFrame's columns",
"_____no_output_____"
]
],
[
[
"olympics[cols_to_impute] = imputed_cols",
"_____no_output_____"
]
],
[
[
"#### Fill the missing values in the column `Medal` with string of 'NA'",
"_____no_output_____"
]
],
[
[
"olympics['Medal'] = olympics['Medal'].fillna('NA')",
"_____no_output_____"
]
],
[
[
"#### Double check that the columns are all imputed",
"_____no_output_____"
]
],
[
[
"olympics.isna().sum()",
"_____no_output_____"
]
],
[
[
"### 5. Use the `describe` method to check the numerical columns",
"_____no_output_____"
]
],
[
[
"olympics.describe()",
"_____no_output_____"
]
],
[
[
"### 6. Plot the histograms of the numerical columns using `Pandas`",
"_____no_output_____"
]
],
[
[
"olympics.hist(figsize=(15, 10))",
"_____no_output_____"
]
],
[
[
"Notice that there could be outliers for `Age`, `Weight`, `Height`. But we'll only focus on `Age`.",
"_____no_output_____"
],
[
"### 7. Plot the histogram with a rug plot of the column `Age` using `Seaborn`, with both 20 and 50 bins",
"_____no_output_____"
]
],
[
[
"sns.displot(data=olympics, x='Age', bins=20, rug=True)",
"_____no_output_____"
],
[
"sns.displot(data=olympics, x='Age', bins=50, rug=True)",
"_____no_output_____"
]
],
[
[
"Notice the slight changes of distributions of `Age` when the number of bins changes.",
"_____no_output_____"
],
[
"### 8. Plot the boxplot of the column `Age` using `Pandas`",
"_____no_output_____"
]
],
[
[
"olympics['Age'].plot(kind='box')",
"_____no_output_____"
]
],
[
[
"### 9. Plot the boxplot of the column `Age` using `Seaborn`",
"_____no_output_____"
]
],
[
[
"sns.catplot(data=olympics, y='Age', kind='box')",
"_____no_output_____"
]
],
[
[
"### 10. Calculate the first quartile, third quartile, and IQR of the column `Age`",
"_____no_output_____"
]
],
[
[
"Q1 = olympics['Age'].quantile(0.25)\nQ3 = olympics['Age'].quantile(0.75)\nIQR = Q3 - Q1",
"_____no_output_____"
],
[
"print(Q1)\nprint(Q3)\nprint(IQR)",
"22.0\n28.0\n6.0\n"
]
],
[
[
"### 11. Print out the lower and upper thresholds for outliers based on IQR for the column `Age`",
"_____no_output_____"
]
],
[
[
"print(f'Low age outlier threshold: {Q1 - 1.5*IQR}')\nprint(f'High age outlier threshold: {Q3 + 1.5*IQR}')",
"Low age outlier threshold: 13.0\nHigh age outlier threshold: 37.0\n"
]
],
[
[
"### 12. What are the `Sport` for the athletes of really young age",
"_____no_output_____"
],
[
"#### Filter for the column `Sport` when the column `Age` has outliers of lower values",
"_____no_output_____"
]
],
[
[
"msk_lower = (olympics['Age'] < (Q1 - 1.5*IQR))\nolympics.loc[msk_lower,'Sport']",
"_____no_output_____"
]
],
[
[
"#### Look at the unique values of `Sport` and their counts when `Age` are low-valued outliers\n\nDid you find any sports popular for really young athletes?",
"_____no_output_____"
]
],
[
[
"olympics.loc[msk_lower,'Sport'].value_counts()",
"_____no_output_____"
]
],
[
[
"There are specific sports with really young age athletes, e.g., Swimming, Figure Skating.",
"_____no_output_____"
],
[
"### 13. What are the `Sport` for the athletes of older age",
"_____no_output_____"
],
[
"#### Filter for the column `Sport` when the column `Age` has outliers of higher values",
"_____no_output_____"
]
],
[
[
"msk_upper = (olympics['Age'] > (Q3 + 1.5*IQR))\nolympics.loc[msk_upper,'Sport']",
"_____no_output_____"
]
],
[
[
"#### Look at the unique values of `Sport` and their counts when `Age` are high-valued outliers\nDid you find any sports popular for older age athletes?",
"_____no_output_____"
]
],
[
[
"olympics.loc[msk_upper,'Sport'].value_counts()",
"_____no_output_____"
]
],
[
[
"There are specific sports popular for higher-aged athletes. They tend to need more skills rather than movements.",
"_____no_output_____"
],
[
"### 14. Check for the number of unique values in each column",
"_____no_output_____"
]
],
[
[
"olympics.nunique()",
"_____no_output_____"
]
],
[
[
"Olympics is a large event! There are many `Name`, `Team`, `NOC`, `Games`, `Year`, `City`, `Sport`, and `Event`!",
"_____no_output_____"
],
[
"### 15. Use the `describe` method to check the non-numerical columns",
"_____no_output_____"
]
],
[
[
"olympics.describe(exclude='number')",
"_____no_output_____"
]
],
[
[
"### 16. Apply the `value_counts` method for each non-numerical column, check for their unique values and counts",
"_____no_output_____"
]
],
[
[
"cat_cols = olympics.select_dtypes(exclude='number').columns\ncat_cols",
"_____no_output_____"
],
[
"for col in cat_cols:\n print(olympics[col].value_counts())\n print()",
"Robert Tait McKenzie 58\nHeikki Ilmari Savolainen 39\nJoseph \"Josy\" Stoffel 38\nIoannis Theofilakis 36\nTakashi Ono 33\n ..\nPaul \"Junior\" McKee 1\nMichael Haa 1\nDwarkadas Murarji 1\nPatrick Sharp 1\nChristopher Paul \"Chris\" McDermott 1\nName: Name, Length: 134732, dtype: int64\n\nM 196594\nF 74522\nName: Sex, dtype: int64\n\nUnited States 17847\nFrance 11988\nGreat Britain 11404\nItaly 10260\nGermany 9326\n ... \nHb-20 1\nLeipzig 1\nVerveine-19 1\nCrocodile-13 1\nWhitini Star 1\nName: Team, Length: 1184, dtype: int64\n\nUSA 18853\nFRA 12758\nGBR 12256\nITA 10715\nGER 9830\n ... \nYMD 5\nSSD 3\nNBO 2\nUNK 2\nNFL 1\nName: NOC, Length: 230, dtype: int64\n\n2000 Summer 13821\n1996 Summer 13780\n2016 Summer 13688\n2008 Summer 13602\n2004 Summer 13443\n1992 Summer 12977\n2012 Summer 12920\n1988 Summer 12037\n1972 Summer 10304\n1984 Summer 9454\n1976 Summer 8641\n1968 Summer 8588\n1952 Summer 8270\n1960 Summer 8119\n1964 Summer 7702\n1980 Summer 7191\n1936 Summer 6506\n1948 Summer 6405\n1924 Summer 5233\n1956 Summer 5127\n1928 Summer 4992\n2014 Winter 4891\n2010 Winter 4402\n2006 Winter 4382\n1920 Summer 4292\n2002 Winter 4109\n1912 Summer 4040\n1998 Winter 3605\n1992 Winter 3436\n1994 Winter 3160\n1908 Summer 3101\n1932 Summer 2969\n1988 Winter 2639\n1984 Winter 2134\n1900 Summer 1936\n1968 Winter 1891\n1976 Winter 1861\n1964 Winter 1778\n1980 Winter 1746\n1906 Summer 1733\n1972 Winter 1655\n1956 Winter 1307\n1904 Summer 1301\n1960 Winter 1116\n1952 Winter 1088\n1948 Winter 1075\n1936 Winter 895\n1928 Winter 582\n1924 Winter 460\n1896 Summer 380\n1932 Winter 352\nName: Games, dtype: int64\n\nSummer 222552\nWinter 48564\nName: Season, dtype: int64\n\nLondon 22426\nAthina 15556\nSydney 13821\nAtlanta 13780\nRio de Janeiro 13688\nBeijing 13602\nBarcelona 12977\nLos Angeles 12423\nSeoul 12037\nMunich 10304\nMontreal 8641\nMexico City 8588\nHelsinki 8270\nRoma 8119\nTokyo 7702\nMoskva 7191\nParis 7169\nBerlin 6506\nAmsterdam 4992\nSochi 4891\nMelbourne 4829\nVancouver 4402\nTorino 4382\nStockholm 4338\nAntwerpen 4292\nSalt Lake City 4109\nInnsbruck 3639\nNagano 3605\nAlbertville 3436\nLillehammer 3160\nCalgary 2639\nSarajevo 2134\nLake Placid 2098\nGrenoble 1891\nSankt Moritz 1657\nSapporo 1655\nCortina d'Ampezzo 1307\nSt. Louis 1301\nSquaw Valley 1116\nOslo 1088\nGarmisch-Partenkirchen 895\nChamonix 460\nName: City, dtype: int64\n\nAthletics 38624\nGymnastics 26707\nSwimming 23195\nShooting 11448\nCycling 10859\n ... \nRacquets 12\nJeu De Paume 11\nRoque 4\nBasque Pelota 2\nAeronautics 1\nName: Sport, Length: 66, dtype: int64\n\nFootball Men's Football 5733\nIce Hockey Men's Ice Hockey 4762\nHockey Men's Hockey 3958\nWater Polo Men's Water Polo 3358\nBasketball Men's Basketball 3280\n ... \nBasque Pelota Men's Two-Man Teams With Cesta 2\nArchery Men's Championnat Du Monde 2\nCroquet Mixed Doubles 2\nArchery Men's Target Archery, 28 metres, Individual 2\nAeronautics Mixed Aeronautics 1\nName: Event, Length: 765, dtype: int64\n\nNA 231333\nGold 13372\nBronze 13295\nSilver 13116\nName: Medal, dtype: int64\n\n"
]
],
[
[
"### 17. Check the first record within the dataset for each Olympic `Sport`\n\n*Hint: sort the DataFrame by `Year`, then groupby by `Sport`*",
"_____no_output_____"
]
],
[
[
"olympics.sort_values('Year').groupby('Sport').first()",
"_____no_output_____"
]
],
[
[
"### 18. What are the average `Age`, `Height`, `Weight` of female versus male Olympic athletes",
"_____no_output_____"
]
],
[
[
"olympics.groupby('Sex')[['Age','Height','Weight']].mean()",
"_____no_output_____"
]
],
[
[
"### 19. What are the minimum, average, maximum `Age`, `Height`, `Weight` of athletes in different `Year`",
"_____no_output_____"
]
],
[
[
"olympics.groupby('Year')[['Age','Height','Weight']].agg(['min', 'mean', 'max'])",
"_____no_output_____"
]
],
[
[
"### 20. What are the minimum, average, median, maximum `Age` of athletes for different `Season` and `Sex` combinations",
"_____no_output_____"
]
],
[
[
"olympics.groupby(['Season', 'Sex'])['Age'].agg(['min', 'mean', 'median', 'max'])",
"_____no_output_____"
]
],
[
[
"### 21. What are the average `Age` of athletes, and numbers of unique `Team`, `Sport`, `Event`, for different `Season` and `Sex` combinations",
"_____no_output_____"
]
],
[
[
"olympics.groupby(['Season', 'Sex']).agg({'Age': 'mean', 'Team': 'nunique', 'Sport': 'nunique', 'Event': 'nunique'})",
"_____no_output_____"
]
],
[
[
"### 22. What are the average `Age`, `Height`, `Weight` of athletes, for different `Medal`, `Season`, `Sex` combinations",
"_____no_output_____"
]
],
[
[
"olympics.groupby(['Medal', 'Season', 'Sex'])[['Age', 'Height', 'Weight']].mean()",
"_____no_output_____"
]
],
[
[
"### 23. Plot the scatterplot of `Height` and `Weight`",
"_____no_output_____"
]
],
[
[
"sns.relplot(data=olympics, x='Height', y='Weight', kind='scatter')",
"_____no_output_____"
]
],
[
[
"### 24. Plot the scatterplot of `Height` and `Weight`, using different colors and styles of dots for different `Sex`",
"_____no_output_____"
]
],
[
[
"sns.relplot(data=olympics, x='Height', y='Weight', hue='Sex', style='Sex')",
"_____no_output_____"
]
],
[
[
"### 25. Plot the pairwise relationships of `Age`, `Height`, `Weight`",
"_____no_output_____"
]
],
[
[
"sns.pairplot(olympics[['Age', 'Height', 'Weight']])",
"_____no_output_____"
]
],
[
[
"### 26. Plot the pairwise relationships of `Age`, `Height`, `Weight`, with different colors for `Sex`",
"_____no_output_____"
]
],
[
[
"sns.pairplot(olympics[['Age', 'Height', 'Weight', 'Sex']], hue='Sex')",
"_____no_output_____"
]
],
[
[
"### 27. Print out the correlation matrix of `Age`, `Height`, `Weight`",
"_____no_output_____"
]
],
[
[
"olympics[['Age', 'Height', 'Weight']].corr()",
"_____no_output_____"
]
],
[
[
"Notice the strong positive relationship between `Height` and `Weight`, which is intuitive.",
"_____no_output_____"
],
[
"### 28. Use heatmap to demonstrate the correlation matrix of `Age`, `Height`, `Weight`, use a colormap (`cmap`) of 'crest'",
"_____no_output_____"
]
],
[
[
"sns.heatmap(olympics[['Age', 'Height', 'Weight']].corr(), cmap='crest')",
"_____no_output_____"
]
],
[
[
"### 29. Plot the histograms of `Age`, with different colors for different `Sex`",
"_____no_output_____"
]
],
[
[
"sns.displot(data=olympics, x='Age', hue='Sex', aspect=2)",
"_____no_output_____"
]
],
[
[
"### 30. Plot the histograms of `Age`, on separate plots for different `Sex`",
"_____no_output_____"
]
],
[
[
"sns.displot(data=olympics, x='Age', col='Sex', aspect=2)",
"_____no_output_____"
]
],
[
[
"### 31. Look at the changes of average `Age` across `Year` by line charts, with separate lines for different `Season` using different colors",
"_____no_output_____"
]
],
[
[
"sns.relplot(data=olympics, x='Year', y='Age', hue='Season', kind='line', aspect=2)",
"_____no_output_____"
]
],
[
[
"### 32. Look at the distributions of `Age` for different `Sex` using boxplots",
"_____no_output_____"
]
],
[
[
"sns.catplot(data=olympics, x='Sex', y='Age', kind='box')",
"_____no_output_____"
]
],
[
[
"### 33. Look at the distributions of `Age` for different `Sex` using violin plots",
"_____no_output_____"
]
],
[
[
"sns.catplot(data=olympics, x='Sex', y='Age', kind='violin')",
"_____no_output_____"
]
],
[
[
"### 34. Look at the distributions of `Age` for different `Sex` using boxplots, with different colors of plots for different `Season`",
"_____no_output_____"
]
],
[
[
"sns.catplot(data=olympics, x='Sex', y='Age', kind='box', hue='Season')",
"_____no_output_____"
]
],
[
[
"### 35. Use count plots to look at the changes of number of athlete-events across `Year`, for different `Sex` by colors, and different `Season` on separate plots",
"_____no_output_____"
]
],
[
[
"sns.catplot(data=olympics, x='Year', hue='Sex', kind='count', col='Season', col_wrap=1, aspect=4)",
"_____no_output_____"
]
],
[
[
"Notice the obvious increase of female athlete-events in the Olympics across years.",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown"
] |
[
[
"markdown",
"markdown",
"markdown",
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown",
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code",
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
]
] |
4aeb893a812de03a0b676d9581004aa9c9d6694b
| 32,895 |
ipynb
|
Jupyter Notebook
|
site/en/r2/tutorials/generative/cyclegan.ipynb
|
gogasca/docs
|
cafcedad920dcebdc618487f27836fdc0875ec30
|
[
"Apache-2.0"
] | null | null | null |
site/en/r2/tutorials/generative/cyclegan.ipynb
|
gogasca/docs
|
cafcedad920dcebdc618487f27836fdc0875ec30
|
[
"Apache-2.0"
] | null | null | null |
site/en/r2/tutorials/generative/cyclegan.ipynb
|
gogasca/docs
|
cafcedad920dcebdc618487f27836fdc0875ec30
|
[
"Apache-2.0"
] | null | null | null | 34.626316 | 483 | 0.524183 |
[
[
[
"##### Copyright 2019 The TensorFlow Authors.",
"_____no_output_____"
]
],
[
[
"#@title Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.",
"_____no_output_____"
]
],
[
[
"# CycleGAN",
"_____no_output_____"
],
[
"<table class=\"tfo-notebook-buttons\" align=\"left\">\n <td>\n <a target=\"_blank\" href=\"https://www.tensorflow.org/beta/tutorials/generative/cyclegan\"><img src=\"https://www.tensorflow.org/images/tf_logo_32px.png\" />View on TensorFlow.org</a>\n </td>\n <td>\n <a target=\"_blank\" href=\"https://colab.research.google.com/github/tensorflow/docs/blob/master/site/en/r2/tutorials/generative/cyclegan.ipynb\"><img src=\"https://www.tensorflow.org/images/colab_logo_32px.png\" />Run in Google Colab</a>\n </td>\n <td>\n <a target=\"_blank\" href=\"https://github.com/tensorflow/docs/blob/master/site/en/r2/tutorials/generative/cyclegan.ipynb\"><img src=\"https://www.tensorflow.org/images/GitHub-Mark-32px.png\" />View source on GitHub</a>\n </td>\n <td>\n <a href=\"https://storage.googleapis.com/tensorflow_docs/docs/site/en/r2/tutorials/generative/cyclegan.ipynb\"><img src=\"https://www.tensorflow.org/images/download_logo_32px.png\" />Download notebook</a>\n </td>\n</table>",
"_____no_output_____"
],
[
"This notebook demonstrates unpaired image to image translation using conditional GAN's, as described in [Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks](https://arxiv.org/abs/1703.10593), also known as CycleGAN. The paper proposes a method that can capture the characteristics of one image domain and figure out how these characteristics could be translated into another image domain, all in the absence of any paired training examples. \n\nThis notebook assumes you are familiar with Pix2Pix, which you can learn about in the [Pix2Pix tutorial](https://www.tensorflow.org/beta/tutorials/generative/pix2pix). The code for CycleGAN is similar, the main difference is an additional loss function, and the use of unpaired training data.\n\nCycleGAN uses a cycle consistency loss to enable training without the need for paired data. In other words, it can translate from one domain to another without a one-to-one mapping between the source and target domain. \n\nThis opens up the possibility to do a lot of interesting tasks like photo-enhancement, image colorization, style transfer, etc. All you need is the source and the target dataset (which is simply a directory of images).\n\n\n",
"_____no_output_____"
],
[
"## Set up the input pipeline",
"_____no_output_____"
],
[
"Install the [tensorflow_examples](https://github.com/tensorflow/examples) package that enables importing of the generator and the discriminator.",
"_____no_output_____"
]
],
[
[
"!pip install git+https://github.com/tensorflow/examples.git",
"_____no_output_____"
],
[
"try:\n # %tensorflow_version only exists in Colab.\n %tensorflow_version 2.x\nexcept Exception:\n pass\nimport tensorflow as tf",
"_____no_output_____"
],
[
"from __future__ import absolute_import, division, print_function, unicode_literals\n\nimport tensorflow_datasets as tfds\nfrom tensorflow_examples.models.pix2pix import pix2pix\n\nimport os\nimport time\nimport matplotlib.pyplot as plt\nfrom IPython.display import clear_output\n\ntfds.disable_progress_bar()\nAUTOTUNE = tf.data.experimental.AUTOTUNE",
"_____no_output_____"
]
],
[
[
"## Input Pipeline\n\nThis tutorial trains a model to translate from images of horses, to images of zebras. You can find this dataset and similar ones [here](https://www.tensorflow.org/datasets/datasets#cycle_gan). \n\nAs mentioned in the [paper](https://arxiv.org/abs/1703.10593), apply random jittering and mirroring to the training dataset. These are some of the image augmentation techniques that avoids overfitting.\n\nThis is similar to what was done in [pix2pix](https://www.tensorflow.org/beta/tutorials/generative/pix2pix#load_the_dataset)\n\n* In random jittering, the image is resized to `286 x 286` and then randomly cropped to `256 x 256`.\n* In random mirroring, the image is randomly flipped horizontally i.e left to right.",
"_____no_output_____"
]
],
[
[
"dataset, metadata = tfds.load('cycle_gan/horse2zebra',\n with_info=True, as_supervised=True)\n\ntrain_horses, train_zebras = dataset['trainA'], dataset['trainB']\ntest_horses, test_zebras = dataset['testA'], dataset['testB']",
"_____no_output_____"
],
[
"BUFFER_SIZE = 1000\nBATCH_SIZE = 1\nIMG_WIDTH = 256\nIMG_HEIGHT = 256",
"_____no_output_____"
],
[
"def random_crop(image):\n cropped_image = tf.image.random_crop(\n image, size=[IMG_HEIGHT, IMG_WIDTH, 3])\n\n return cropped_image",
"_____no_output_____"
],
[
"# normalizing the images to [-1, 1]\ndef normalize(image):\n image = tf.cast(image, tf.float32)\n image = (image / 127.5) - 1\n return image",
"_____no_output_____"
],
[
"def random_jitter(image):\n # resizing to 286 x 286 x 3\n image = tf.image.resize(image, [286, 286],\n method=tf.image.ResizeMethod.NEAREST_NEIGHBOR)\n\n # randomly cropping to 256 x 256 x 3\n image = random_crop(image)\n\n # random mirroring\n image = tf.image.random_flip_left_right(image)\n\n return image",
"_____no_output_____"
],
[
"def preprocess_image_train(image, label):\n image = random_jitter(image)\n image = normalize(image)\n return image",
"_____no_output_____"
],
[
"def preprocess_image_test(image, label):\n image = normalize(image)\n return image",
"_____no_output_____"
],
[
"train_horses = train_horses.map(\n preprocess_image_train, num_parallel_calls=AUTOTUNE).cache().shuffle(\n BUFFER_SIZE).batch(1)\n\ntrain_zebras = train_zebras.map(\n preprocess_image_train, num_parallel_calls=AUTOTUNE).cache().shuffle(\n BUFFER_SIZE).batch(1)\n\ntest_horses = test_horses.map(\n preprocess_image_test, num_parallel_calls=AUTOTUNE).cache().shuffle(\n BUFFER_SIZE).batch(1)\n\ntest_zebras = test_zebras.map(\n preprocess_image_test, num_parallel_calls=AUTOTUNE).cache().shuffle(\n BUFFER_SIZE).batch(1)",
"_____no_output_____"
],
[
"sample_horse = next(iter(train_horses))\nsample_zebra = next(iter(train_zebras))",
"_____no_output_____"
],
[
"plt.subplot(121)\nplt.title('Horse')\nplt.imshow(sample_horse[0] * 0.5 + 0.5)\n\nplt.subplot(122)\nplt.title('Horse with random jitter')\nplt.imshow(random_jitter(sample_horse[0]) * 0.5 + 0.5)",
"_____no_output_____"
],
[
"plt.subplot(121)\nplt.title('Zebra')\nplt.imshow(sample_zebra[0] * 0.5 + 0.5)\n\nplt.subplot(122)\nplt.title('Zebra with random jitter')\nplt.imshow(random_jitter(sample_zebra[0]) * 0.5 + 0.5)",
"_____no_output_____"
]
],
[
[
"## Import and reuse the Pix2Pix models",
"_____no_output_____"
],
[
"Import the generator and the discriminator used in [Pix2Pix](https://github.com/tensorflow/examples/blob/master/tensorflow_examples/models/pix2pix/pix2pix.py) via the installed [tensorflow_examples](https://github.com/tensorflow/examples) package.\n\nThe model architecture used in this tutorial is very similar to what was used in [pix2pix](https://github.com/tensorflow/examples/blob/master/tensorflow_examples/models/pix2pix/pix2pix.py). Some of the differences are:\n\n* Cyclegan uses [instance normalization](https://arxiv.org/abs/1607.08022) instead of [batch normalization](https://arxiv.org/abs/1502.03167).\n* The [CycleGAN paper](https://arxiv.org/abs/1703.10593) uses a modified `resnet` based generator. This tutorial is using a modified `unet` generator for simplicity.\n\nThere are 2 generators (G and F) and 2 discriminators (X and Y) being trained here. \n\n* Generator `G` learns to transform image `X` to image `Y`. $(G: X -> Y)$\n* Generator `F` learns to transform image `Y` to image `X`. $(F: Y -> X)$\n* Discriminator `D_X` learns to differentiate between image `X` and generated image `X` (`F(Y)`).\n* Discriminator `D_Y` learns to differentiate between image `Y` and generated image `Y` (`G(X)`).\n\n",
"_____no_output_____"
]
],
[
[
"OUTPUT_CHANNELS = 3\n\ngenerator_g = pix2pix.unet_generator(OUTPUT_CHANNELS, norm_type='instancenorm')\ngenerator_f = pix2pix.unet_generator(OUTPUT_CHANNELS, norm_type='instancenorm')\n\ndiscriminator_x = pix2pix.discriminator(norm_type='instancenorm', target=False)\ndiscriminator_y = pix2pix.discriminator(norm_type='instancenorm', target=False)",
"_____no_output_____"
],
[
"to_zebra = generator_g(sample_horse)\nto_horse = generator_f(sample_zebra)\nplt.figure(figsize=(8, 8))\ncontrast = 8\n\nimgs = [sample_horse, to_zebra, sample_zebra, to_horse]\ntitle = ['Horse', 'To Zebra', 'Zebra', 'To Horse']\n\nfor i in range(len(imgs)):\n plt.subplot(2, 2, i+1)\n plt.title(title[i])\n if i % 2 == 0:\n plt.imshow(imgs[i][0] * 0.5 + 0.5)\n else:\n plt.imshow(imgs[i][0] * 0.5 * contrast + 0.5)\nplt.show()",
"_____no_output_____"
],
[
"plt.figure(figsize=(8, 8))\n\nplt.subplot(121)\nplt.title('Is a real zebra?')\nplt.imshow(discriminator_y(sample_zebra)[0, ..., -1], cmap='RdBu_r')\n\nplt.subplot(122)\nplt.title('Is a real horse?')\nplt.imshow(discriminator_x(sample_horse)[0, ..., -1], cmap='RdBu_r')\n\nplt.show()",
"_____no_output_____"
]
],
[
[
"## Loss functions",
"_____no_output_____"
],
[
"In CycleGAN, there is no paired data to train on, hence there is no guarantee that the input `x` and the target `y` pair are meaningful during training. Thus in order to enforce that the network learns the correct mapping, the authors propose the cycle consistency loss.\n\nThe discriminator loss and the generator loss are similar to the ones used in [pix2pix](https://www.tensorflow.org/beta/tutorials/generative/pix2pix#define_the_loss_functions_and_the_optimizer).",
"_____no_output_____"
]
],
[
[
"LAMBDA = 10",
"_____no_output_____"
],
[
"loss_obj = tf.keras.losses.BinaryCrossentropy(from_logits=True)",
"_____no_output_____"
],
[
"def discriminator_loss(real, generated):\n real_loss = loss_obj(tf.ones_like(real), real)\n\n generated_loss = loss_obj(tf.zeros_like(generated), generated)\n\n total_disc_loss = real_loss + generated_loss\n\n return total_disc_loss * 0.5",
"_____no_output_____"
],
[
"def generator_loss(generated):\n return loss_obj(tf.ones_like(generated), generated)",
"_____no_output_____"
]
],
[
[
"Cycle consistency means the result should be close to the original input. For example, if one translates a sentence from English to French, and then translates it back from French to English, then the resulting sentence should be the same as the original sentence.\n\nIn cycle consistency loss, \n\n* Image $X$ is passed via generator $G$ that yields generated image $\\hat{Y}$.\n* Generated image $\\hat{Y}$ is passed via generator $F$ that yields cycled image $\\hat{X}$.\n* Mean absolute error is calculated between $X$ and $\\hat{X}$.\n\n$$forward\\ cycle\\ consistency\\ loss: X -> G(X) -> F(G(X)) \\sim \\hat{X}$$\n\n$$backward\\ cycle\\ consistency\\ loss: Y -> F(Y) -> G(F(Y)) \\sim \\hat{Y}$$\n\n\n",
"_____no_output_____"
]
],
[
[
"def calc_cycle_loss(real_image, cycled_image):\n loss1 = tf.reduce_mean(tf.abs(real_image - cycled_image))\n \n return LAMBDA * loss1",
"_____no_output_____"
]
],
[
[
"As shown above, generator $G$ is responsible for translating image $X$ to image $Y$. Identity loss says that, if you fed image $Y$ to generator $G$, it should yield the real image $Y$ or something close to image $Y$.\n\n$$Identity\\ loss = |G(Y) - Y| + |F(X) - X|$$",
"_____no_output_____"
]
],
[
[
"def identity_loss(real_image, same_image):\n loss = tf.reduce_mean(tf.abs(real_image - same_image))\n return LAMBDA * 0.5 * loss",
"_____no_output_____"
]
],
[
[
"Initialize the optimizers for all the generators and the discriminators.",
"_____no_output_____"
]
],
[
[
"generator_g_optimizer = tf.keras.optimizers.Adam(2e-4, beta_1=0.5)\ngenerator_f_optimizer = tf.keras.optimizers.Adam(2e-4, beta_1=0.5)\n\ndiscriminator_x_optimizer = tf.keras.optimizers.Adam(2e-4, beta_1=0.5)\ndiscriminator_y_optimizer = tf.keras.optimizers.Adam(2e-4, beta_1=0.5)",
"_____no_output_____"
]
],
[
[
"## Checkpoints",
"_____no_output_____"
]
],
[
[
"checkpoint_path = \"./checkpoints/train\"\n\nckpt = tf.train.Checkpoint(generator_g=generator_g,\n generator_f=generator_f,\n discriminator_x=discriminator_x,\n discriminator_y=discriminator_y,\n generator_g_optimizer=generator_g_optimizer,\n generator_f_optimizer=generator_f_optimizer,\n discriminator_x_optimizer=discriminator_x_optimizer,\n discriminator_y_optimizer=discriminator_y_optimizer)\n\nckpt_manager = tf.train.CheckpointManager(ckpt, checkpoint_path, max_to_keep=5)\n\n# if a checkpoint exists, restore the latest checkpoint.\nif ckpt_manager.latest_checkpoint:\n ckpt.restore(ckpt_manager.latest_checkpoint)\n print ('Latest checkpoint restored!!')",
"_____no_output_____"
]
],
[
[
"## Training\n\nNote: This example model is trained for fewer epochs (40) than the paper (200) to keep training time reasonable for this tutorial. Predictions may be less accurate. ",
"_____no_output_____"
]
],
[
[
"EPOCHS = 40",
"_____no_output_____"
],
[
"def generate_images(model, test_input):\n prediction = model(test_input)\n \n plt.figure(figsize=(12, 12))\n\n display_list = [test_input[0], prediction[0]]\n title = ['Input Image', 'Predicted Image']\n\n for i in range(2):\n plt.subplot(1, 2, i+1)\n plt.title(title[i])\n # getting the pixel values between [0, 1] to plot it.\n plt.imshow(display_list[i] * 0.5 + 0.5)\n plt.axis('off')\n plt.show()",
"_____no_output_____"
]
],
[
[
"Even though the training loop looks complicated, it consists of four basic steps:\n\n* Get the predictions.\n* Calculate the loss.\n* Calculate the gradients using backpropagation.\n* Apply the gradients to the optimizer.",
"_____no_output_____"
]
],
[
[
"@tf.function\ndef train_step(real_x, real_y):\n # persistent is set to True because the tape is used more than\n # once to calculate the gradients.\n with tf.GradientTape(persistent=True) as tape:\n # Generator G translates X -> Y\n # Generator F translates Y -> X.\n \n fake_y = generator_g(real_x, training=True)\n cycled_x = generator_f(fake_y, training=True)\n\n fake_x = generator_f(real_y, training=True)\n cycled_y = generator_g(fake_x, training=True)\n\n # same_x and same_y are used for identity loss.\n same_x = generator_f(real_x, training=True)\n same_y = generator_g(real_y, training=True)\n\n disc_real_x = discriminator_x(real_x, training=True)\n disc_real_y = discriminator_y(real_y, training=True)\n\n disc_fake_x = discriminator_x(fake_x, training=True)\n disc_fake_y = discriminator_y(fake_y, training=True)\n\n # calculate the loss\n gen_g_loss = generator_loss(disc_fake_y)\n gen_f_loss = generator_loss(disc_fake_x)\n \n total_cycle_loss = calc_cycle_loss(real_x, cycled_x) + calc_cycle_loss(real_y, cycled_y)\n \n # Total generator loss = adversarial loss + cycle loss\n total_gen_g_loss = gen_g_loss + total_cycle_loss + identity_loss(real_y, same_y)\n total_gen_f_loss = gen_f_loss + total_cycle_loss + identity_loss(real_x, same_x)\n\n disc_x_loss = discriminator_loss(disc_real_x, disc_fake_x)\n disc_y_loss = discriminator_loss(disc_real_y, disc_fake_y)\n \n # Calculate the gradients for generator and discriminator\n generator_g_gradients = tape.gradient(total_gen_g_loss, \n generator_g.trainable_variables)\n generator_f_gradients = tape.gradient(total_gen_f_loss, \n generator_f.trainable_variables)\n \n discriminator_x_gradients = tape.gradient(disc_x_loss, \n discriminator_x.trainable_variables)\n discriminator_y_gradients = tape.gradient(disc_y_loss, \n discriminator_y.trainable_variables)\n \n # Apply the gradients to the optimizer\n generator_g_optimizer.apply_gradients(zip(generator_g_gradients, \n generator_g.trainable_variables))\n\n generator_f_optimizer.apply_gradients(zip(generator_f_gradients, \n generator_f.trainable_variables))\n \n discriminator_x_optimizer.apply_gradients(zip(discriminator_x_gradients,\n discriminator_x.trainable_variables))\n \n discriminator_y_optimizer.apply_gradients(zip(discriminator_y_gradients,\n discriminator_y.trainable_variables))",
"_____no_output_____"
],
[
"for epoch in range(EPOCHS):\n start = time.time()\n\n n = 0\n for image_x, image_y in tf.data.Dataset.zip((train_horses, train_zebras)):\n train_step(image_x, image_y)\n if n % 10 == 0:\n print ('.', end='')\n n+=1\n\n clear_output(wait=True)\n # Using a consistent image (sample_horse) so that the progress of the model\n # is clearly visible.\n generate_images(generator_g, sample_horse)\n\n if (epoch + 1) % 5 == 0:\n ckpt_save_path = ckpt_manager.save()\n print ('Saving checkpoint for epoch {} at {}'.format(epoch+1,\n ckpt_save_path))\n\n print ('Time taken for epoch {} is {} sec\\n'.format(epoch + 1,\n time.time()-start))",
"_____no_output_____"
]
],
[
[
"## Generate using test dataset",
"_____no_output_____"
]
],
[
[
"# Run the trained model on the test dataset\nfor inp in test_horses.take(5):\n generate_images(generator_g, inp)",
"_____no_output_____"
]
],
[
[
"## Next steps\n\nThis tutorial has shown how to implement CycleGAN starting from the generator and discriminator implemented in the [Pix2Pix](https://www.tensorflow.org/beta/tutorials/generative/pix2pix) tutorial. As a next step, you could try using a different dataset from [TensorFlow Datasets](https://www.tensorflow.org/datasets/datasets#cycle_gan). \n\nYou could also train for a larger number of epochs to improve the results, or you could implement the modified ResNet generator used in the [paper](https://arxiv.org/abs/1703.10593) instead of the U-Net generator used here.\n\n\n\nTry using a different dataset from . You can also implement the modified ResNet generator used in the [paper](https://arxiv.org/abs/1703.10593) instead of the U-Net generator that's used here.",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown"
] |
[
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown",
"markdown",
"markdown",
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown",
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown",
"markdown"
],
[
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
]
] |
4aeb89af013eccb10db923bb157cf1731f9f1d8d
| 17,067 |
ipynb
|
Jupyter Notebook
|
docs/devices.ipynb
|
Nexuscompute/Cirq
|
640ef8f82d6a56ec95361388ce7976e096cca906
|
[
"Apache-2.0"
] | null | null | null |
docs/devices.ipynb
|
Nexuscompute/Cirq
|
640ef8f82d6a56ec95361388ce7976e096cca906
|
[
"Apache-2.0"
] | 4 |
2022-01-16T14:12:15.000Z
|
2022-02-24T03:58:46.000Z
|
docs/devices.ipynb
|
Nexuscompute/Cirq
|
640ef8f82d6a56ec95361388ce7976e096cca906
|
[
"Apache-2.0"
] | null | null | null | 34.478788 | 526 | 0.606023 |
[
[
[
"##### Copyright 2022 The Cirq Developers",
"_____no_output_____"
]
],
[
[
"# @title Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.",
"_____no_output_____"
]
],
[
[
"# Devices",
"_____no_output_____"
],
[
"<table class=\"tfo-notebook-buttons\" align=\"left\">\n <td>\n <a target=\"_blank\" href=\"https://quantumai.google/cirq/devices\"><img src=\"https://quantumai.google/site-assets/images/buttons/quantumai_logo_1x.png\" />View on QuantumAI</a>\n </td>\n <td>\n <a target=\"_blank\" href=\"https://colab.research.google.com/github/quantumlib/Cirq/blob/master/docs/devices.ipynb\"><img src=\"https://quantumai.google/site-assets/images/buttons/colab_logo_1x.png\" />Run in Google Colab</a>\n </td>\n <td>\n <a target=\"_blank\" href=\"https://github.com/quantumlib/Cirq/blob/master/docs/devices.ipynb\"><img src=\"https://quantumai.google/site-assets/images/buttons/github_logo_1x.png\" />View source on GitHub</a>\n </td>\n <td>\n <a href=\"https://storage.googleapis.com/tensorflow_docs/Cirq/docs/devices.ipynb\"><img src=\"https://quantumai.google/site-assets/images/buttons/download_icon_1x.png\" />Download notebook</a>\n </td>\n</table>",
"_____no_output_____"
]
],
[
[
"try:\n import cirq\nexcept ImportError:\n print(\"installing cirq...\")\n !pip install --quiet cirq\n print(\"installed cirq.\")\n import cirq",
"_____no_output_____"
]
],
[
[
"## Validation basics\n\nWhen you are looking to run an algorithm on a real quantum computer (not a simulated one), there are often many additional constraints placed on the circuits you would like to run. Qubit connectivity, algorithm layout and the types of gates used in the circuit all become much more important. Cirq uses the abstract class `Device` to represent the constraints of an actual quantum processor. An example implementation of a device can be seen in the `cirq_google.Sycamore` class:",
"_____no_output_____"
]
],
[
[
"import cirq_google\nimport networkx as nx\n\nmy_device = cirq_google.Sycamore\nprint(my_device)",
"_____no_output_____"
]
],
[
[
"This string representation of the device indicates the structure of the device and the connectivity of the qubits. In Sycamore's case, two-qubit gates can only be executed on qubits that are adjacent in the grid. Other constraints, like supported gates, are not shown in this representation.\n\nYou can access all of the constraints indirectly by validating moments, operations and circuits with the `validate_***` method to verify if that structure would work on the device or not. In general, the `validate_***` method will tell you what part of your operation/moment/circuit does not fit the device's constraints, and why. All devices support this functionality. For the Sycamore device:",
"_____no_output_____"
]
],
[
[
"op1 = cirq.X(cirq.GridQubit(7, 7))\n\ntry:\n my_device.validate_operation(op1)\nexcept Exception as e:\n print(e)",
"_____no_output_____"
]
],
[
[
"The previous example used a qubit that wasn't on the device, making the operation invalid. Most `validate_operation` implementations also take into account things like supported gates and connectivity as well:",
"_____no_output_____"
]
],
[
[
"q1, q2, q3 = cirq.GridQubit(7, 4), cirq.GridQubit(7, 5), cirq.GridQubit(7, 6)\nop1 = cirq.H(q1)\nop2 = cirq_google.SYC(q1, q3)\n\ntry:\n my_device.validate_operation(op1)\nexcept Exception as e:\n print(e)\n\ntry:\n my_device.validate_operation(op2)\nexcept Exception as e:\n print(e)",
"_____no_output_____"
]
],
[
[
"These validation operations can also be used with moments of operations and full circuits:",
"_____no_output_____"
]
],
[
[
"op1 = cirq.X(q2)\nop2 = cirq_google.SYC(q1, q3)\ntry:\n my_device.validate_moment(cirq.Moment([op1, op2]))\nexcept Exception as e:\n print(e)\n\nmy_circuit = cirq.Circuit(\n cirq.PhasedXPowGate(phase_exponent=0.3)(q1),\n cirq.PhasedXPowGate(phase_exponent=0.3)(q2),\n cirq_google.SYC(q1, q2),\n cirq_google.SYC(q2, q3),\n)\nmy_device.validate_circuit(my_circuit)",
"_____no_output_____"
]
],
[
[
"`op1` is allowed on qubit `q2`, but `op2` has the same invalid qubit target error as before. `validate_moment` finds this error by iterating the moment and stopping once the invalid operation is found. On the other hand, `my_circuit` satisfies all the device constraints and could be run on a Sycamore device, so `validate_circuit` does not throw an exception for it.",
"_____no_output_____"
],
[
"## Metadata features\n\nSome devices will also expose additional information via the `metadata` property. Metadata is usually exposed via the an instance (or subclass instance) of the `cirq.DeviceMetadata` class. You can access the metadata information of the Sycamore device with the `metadata` attribute:",
"_____no_output_____"
]
],
[
[
"metadata = my_device.metadata\nprint(type(metadata))",
"_____no_output_____"
],
[
"issubclass(type(metadata), cirq.DeviceMetadata)",
"_____no_output_____"
]
],
[
[
"The Sycamore device is a 2d grid device that exposes a `cirq.GridDeviceMetadata` with a uniform set of gates across all the qubits as well as a planar nearest neighbor connectivity graph. You can explore the properties below, starting with `qubit_set` and `nx_graph`, which are common to all instances and subclasses of the `cirq.DeviceMetadata` class.\n\nFirst, the set of qubits available are available in the `qubit_set` attribute.",
"_____no_output_____"
]
],
[
[
"print(metadata.qubit_set)",
"_____no_output_____"
]
],
[
[
"The `nx_graph` attribute details which of the `54` different qubits are connected to one another. Connected qubit pairs can execute two-qubit gates between them.",
"_____no_output_____"
]
],
[
[
"print(metadata.nx_graph)",
"_____no_output_____"
]
],
[
[
"`cirq.GridDeviceMetadata` has some attributes that are not automatically included in `cirq.DeviceMetadata`, including `gateset`, which indicates the types and families of Cirq gates that are accepted by all qubits across the device.",
"_____no_output_____"
]
],
[
[
"print(metadata.gateset)",
"_____no_output_____"
]
],
[
[
"These metadata features can be useful when designing/building algorithms around certain device information in order to tailor them for that device.",
"_____no_output_____"
],
[
"## The `cirq.Device` interface\n\nFor advanced users (such as vendors) it is also possible to implement your own Device with its own unique constraints and metadata information. Below is an example of a fictitious custom device:",
"_____no_output_____"
]
],
[
[
"class MyDevice(cirq.Device):\n \"\"\"Five qubits on a line, supporting X/Y/Z and CZ between neighbors.\"\"\"\n\n def __init__(self):\n # Specify the qubits available to the device\n self._qubits = set(cirq.LineQubit.range(5))\n # Specify which gates are valid\n self._supported_gates = cirq.Gateset(\n cirq.XPowGate, cirq.YPowGate, cirq.ZPowGate, cirq.CZPowGate\n )\n\n def validate_operation(self, operation):\n \"\"\"Check to make sure `operation` is valid.\n\n `operation` must be on qubits found on the device\n and if it is a two qubit gate the qubits must be adjacent\n\n Raises:\n ValueError: if operation acts on qubits not found on the device.\n ValueError: if two qubit gates have non-local interactions.\n ValueError: if the operation is not in the supported gates.\n \"\"\"\n # Ensure that the operation's qubits are available on the device\n if any(x not in self._qubits for x in operation.qubits):\n raise ValueError(\"Using qubits not found on device.\")\n\n # Ensure that the operation's qubits are adjacent if there are two of them\n if len(operation.qubits) == 2:\n p, q = operation.qubits\n if not p.is_adjacent(q):\n raise ValueError('Non-local interaction: {}'.format(repr(operation)))\n\n # Ensure that the operation itself is a supported one\n if operation not in self._supported_gates:\n raise ValueError(\"Unsupported operation type.\")\n\n def validate_circuit(self, circuit):\n \"\"\"Check to make sure `circuit` is valid.\n\n Calls validate_operation on all operations as well as imposing\n a global limit on the total number of CZ gates.\n\n Raises:\n ValueError: if `validate_operation` raises for any operation in the\n circuit.\n ValueError: if there are more than 10 CZ gates in the entire circuit.\n \"\"\"\n # Call Device's `validate_operation`, which calls the `validate_operation`\n # function specified above on each operation in the circuit\n super().validate_circuit(circuit)\n # Ensure that no more than 10 two-qubit CZ gates exist in the circuit\n cz_count = sum(1 for mom in circuit for op in mom if len(op.qubits) == 2)\n if cz_count > 10:\n raise ValueError(\"Too many total CZs\")\n\n @property\n def metadata(self):\n \"\"\"MyDevice GridDeviceMetadata.\"\"\"\n # Since `MyDevice` is planar it is a good idea to subclass the\n # GridDeviceMetadata class to communicate additional device information to\n # the user.\n return cirq.GridDeviceMetadata(\n qubit_pairs=[(p, q) for p in self._qubits for q in self._qubits if p.is_adjacent(q)],\n gateset=self._supported_gates,\n )",
"_____no_output_____"
]
],
[
[
"At absolute minimum, when creating a custom `Device`, you should inherit from `cirq.Device` and overwrite the `__init__` and `validate_operation` methods. \n\nThis custom device can now be used to validate circuits:",
"_____no_output_____"
]
],
[
[
"my_custom_device = MyDevice()\n\nmy_circuit = cirq.Circuit(\n cirq.X(cirq.LineQubit(0)),\n cirq.X(cirq.LineQubit(2)),\n cirq.X(cirq.LineQubit(4)),\n cirq.CZ(*cirq.LineQubit.range(2)),\n)\ntoo_many_czs = cirq.Circuit(cirq.CZ(*cirq.LineQubit.range(2)) for _ in range(11))\n\n# my_circuit is valid for my_custom_device.\nmy_custom_device.validate_circuit(my_circuit)\n\n# each operation of too_many_czs is valid individually...\nfor moment in too_many_czs:\n for op in moment:\n my_custom_device.validate_operation(op)\n\n# But the device has global constraints which the circuit does not meet:\ntry:\n my_custom_device.validate_circuit(too_many_czs)\nexcept Exception as e:\n print(e)",
"_____no_output_____"
]
],
[
[
"By default, the `validate_circuit` method of the `cirq.Device` class simply calls `validate_moment` on all the moments, which calls `validate_operation` on all the operations. It is advisable to maintain this behavior in your custom device, which can be implemented as above, by calling `super().validate_***` when writing each method.\n\nDepending on the scoping of constraints the custom device has, certain less local constraints might be better placed in `validate_moment` and certain global constraints might belong in `validate_circuit`. In addition to this, you can also add metadata options to your device. You can define a metadata subclass of `cirq.DeviceMetadata` or you can use an inbuilt metadata class like `cirq.GridDeviceMetadata`:",
"_____no_output_____"
]
],
[
[
"my_metadata = my_custom_device.metadata\n\n# Display device graph:\nnx.draw(my_metadata.nx_graph)",
"_____no_output_____"
]
],
[
[
"# Summary\n\nDevices in Cirq are used to specify constraints on circuits that are imposed by quantum hardware devices. You can check that an operation, moment, or circuit is valid on a particular `cirq.Device` by using `validate_operation`, `validate_moment`, or `validate_circuit` respectively. You can also create your own custom device objects to specify constraints for a new or changed device. Device objects, custom and otherwise, also can carry around metadata that may be useful for the validation process or other processes.",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown"
] |
[
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown",
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
]
] |
4aeba4a53c68c7f608ac1b57e02a569912bf83be
| 43,994 |
ipynb
|
Jupyter Notebook
|
21_benchmark_client_implementations.ipynb
|
ephes/will_it_saturate
|
dafcfcb3aa2785b885f0533aff221ec2f38f0278
|
[
"Apache-2.0"
] | 1 |
2021-06-11T17:58:27.000Z
|
2021-06-11T17:58:27.000Z
|
21_benchmark_client_implementations.ipynb
|
ephes/will_it_saturate
|
dafcfcb3aa2785b885f0533aff221ec2f38f0278
|
[
"Apache-2.0"
] | null | null | null |
21_benchmark_client_implementations.ipynb
|
ephes/will_it_saturate
|
dafcfcb3aa2785b885f0533aff221ec2f38f0278
|
[
"Apache-2.0"
] | null | null | null | 51.575615 | 2,534 | 0.50716 |
[
[
[
"# hide\n\n%load_ext nb_black",
"_____no_output_____"
],
[
"# default_exp clients",
"_____no_output_____"
],
[
"from will_it_saturate.clients import BaseClient\nfrom will_it_saturate.registry import register_model",
"_____no_output_____"
],
[
"# export\n\nimport os\nimport math\nimport time\nimport httpx\nimport asyncio\nimport aiohttp\nimport subprocess\n\nfrom pathlib import Path\nfrom datetime import datetime\nfrom multiprocessing import Pool\nfrom multiprocessing import set_start_method\n\n# from will_it_saturate.old_core import Benchmark\nfrom will_it_saturate.servers import BaseServer",
"_____no_output_____"
],
[
"# os.environ[\"OBJC_DISABLE_INITIALIZE_FORK_SAFETY\"] = \"YES\"\n# set_start_method(\"fork\")\n# print(os.environ[\"OBJC_DISABLE_INITIALIZE_FORK_SAFETY\"])",
"_____no_output_____"
]
],
[
[
"## Caveats\n\nOn macOS increase open file limit with:\n\n```\nulimit -n 2048\n```\n\nBefore starting the fastAPI Server with:\n\n```\nuvicorn will_it_saturate.fastapi.main:app --reload\n```\n\nIt's not really possible to test forked client from this notebook. I don't know why. It works in the 03_run_benchmark script. Here I have to set_start_method(\"fork\") and other ugly stuff.",
"_____no_output_____"
]
],
[
[
"# dont_test\n\nbyte = 8\ngigabit = 10 ** 9\nbandwidth = gigabit / byte\n\n# file_sizes = [10 ** 7, 10 ** 6]\nfile_sizes = [10 ** 7, 10 ** 6, 10 ** 5]\n# file_sizes = [10 ** 7]\n\n# benchmark = Benchmark(\n# bandwidth=bandwidth,\n# duration=3,\n# file_sizes=file_sizes,\n# )\n# benchmark.create_epochs()",
"_____no_output_____"
],
[
"# export\n\n\n# just here because of broken nbdev confusing lua with python\ncounter = 0\nrequest = None\n\n\n@register_model\nclass HttpxClient(BaseClient):\n async def measure_server(self, epoch):\n print(\"measure server\")\n print(epoch.urls[0])\n max_connections = min(epoch.number_of_connections, 50)\n print(\"max_connections: \", max_connections)\n # max_connections = 10\n limits = httpx.Limits(\n max_keepalive_connections=10, max_connections=max_connections\n )\n timeout = httpx.Timeout(30.0, connect=60.0)\n start = time.perf_counter()\n async with httpx.AsyncClient(limits=limits, timeout=timeout) as client:\n responses = await asyncio.gather(*[client.get(url) for url in epoch.urls])\n elapsed = time.perf_counter() - start\n print(\"done: \", elapsed)\n print(\"responses status: \", responses[0].status_code)\n return elapsed, responses\n\n def measure_in_new_process(self, epoch):\n print(\"new process\")\n elapsed, responses = asyncio.run(self.measure_server(epoch))\n self.verify_checksums(epoch, responses)\n return elapsed\n\n def measure(self, epoch):\n print(\"measure\")\n with Pool(1) as p:\n [result] = p.map(self.measure_in_new_process, [epoch])\n return result\n\n\n# def run_httpx():\n# byte = 8\n# gigabit = 10 ** 9\n# bandwidth = gigabit / byte\n#\n# # file_sizes = [10 ** 7, 10 ** 6]\n# # file_sizes = [10 ** 7, 10 ** 6, 10 ** 5]\n# file_sizes = [10 ** 7]\n#\n# benchmark = Benchmark(\n# bandwidth=bandwidth,\n# duration=3,\n# file_sizes=file_sizes,\n# servers=[BenchmarkServer(name=\"uvicorn\")],\n# clients=[HttpxClient(name=\"httpx\")],\n# )\n# benchmark.create_rows()\n# benchmark.run()\n# print(benchmark.results_frame)",
"_____no_output_____"
],
[
"# export\n\nimport sys\nimport typer\n\nfrom will_it_saturate.hosts import Host\nfrom will_it_saturate.epochs import Epoch\nfrom will_it_saturate.servers import BaseServer\nfrom will_it_saturate.control.client import ControlClient\n\n\ndef run_httpx_with_args(exponent: int):\n print(\"running httpx\") \n typer.echo(f\"exponent {exponent}\")\n control_server_port, server_port = 8100, 5100\n server_host_name = \"192.168.178.113\"\n server = BaseServer(host=server_host_name, port=server_port)\n server_control_host = Host(name=server_host_name, port=control_server_port)\n server_control_client = ControlClient(host=server_control_host)\n epoch = Epoch(file_size=10 ** exponent, duration=10)\n epoch.files = server_control_client.get_or_create_files(epoch)\n epoch.create_urls_from_files(server)\n benchmark_client = HttpxClient(name=\"httpx\", host=server_host_name, port=server_port)\n elapsed = benchmark_client.measure(epoch)\n print(f\"elapsed: {elapsed}\")\n \n\n\ndef run_httpx():\n typer.run(run_httpx_with_args)",
"_____no_output_____"
],
[
"# dont_test\n\n# client = HttpxClient()\n# elapsed, responses = await client.measure_server(benchmark.epochs[0])\n# print(elapsed)",
"_____no_output_____"
]
],
[
[
"## aiohttp",
"_____no_output_____"
]
],
[
[
"# export\n\n\nclass AioHttpResponse:\n def __init__(self, url, content, started, stopped):\n self.url = url\n self.content = content\n self.started = started\n self.stopped = stopped\n\n\n@register_model\nclass AioHttpClient(BaseClient):\n timestamps = []\n\n def set_timestamps(self, responses):\n for response in responses:\n self.timestamps.append((response.started, response.stopped))\n\n async def fetch_page(self, session, url):\n async with session.get(url) as response:\n started = datetime.now()\n content = await response.read()\n stopped = datetime.now()\n return AioHttpResponse(url, content, started, stopped)\n\n async def measure_server(self, epoch):\n print(\"measure server\")\n print(epoch.urls[0])\n urls = epoch.urls\n max_connections = min(epoch.number_of_connections, 200)\n conn = aiohttp.TCPConnector(limit=max_connections)\n responses = []\n start = time.perf_counter()\n async with aiohttp.ClientSession(connector=conn) as session:\n tasks = [asyncio.create_task(self.fetch_page(session, url)) for url in urls]\n responses = await asyncio.gather(*tasks)\n elapsed = time.perf_counter() - start\n return elapsed, responses\n\n def measure_in_new_process(self, epoch):\n elapsed, responses = asyncio.run(self.measure_server(epoch))\n self.verify_checksums(epoch, responses)\n self.set_timestamps(responses)\n print(\"timestamps: \", len(self.timestamps))\n return elapsed, self.timestamps\n\n def measure(self, epoch):\n with Pool(1) as p:\n [result, timestamps] = p.map(self.measure_in_new_process, [epoch])\n return result, timestamps",
"_____no_output_____"
],
[
"# dont_test\n\nclient = AioHttpClient()\nelapsed, responses = await client.measure_server(benchmark.epochs[0])\nprint(elapsed)",
"_____no_output_____"
]
],
[
[
"## wrk",
"_____no_output_____"
]
],
[
[
"# export\n\n\n@register_model\nclass WrkClient(BaseClient):\n connections: int = 20\n # set duration to two minutes since it is 10 seconds by default and kills the benchmark\n duration: int = 120\n threads: int = 1\n host: str = \"localhost\"\n port: str = \"8000\"\n\n def create_urls_string(self, epoch):\n urls = []\n for bf in epoch.files:\n urls.append(f' {{path = \"/{bf.path}\"}},')\n return \"\\n\".join(urls)\n\n def create_lua_script(self, epoch):\n requests_head = \"requests = {\"\n requests_tail = \"}\"\n lua_body = \"\"\"\nprint(requests[1])\n\nif #requests <= 0 then\n print(\"multiplerequests: No requests found.\")\n os.exit()\nend\n\nprint(\"multiplerequests: Found \" .. #requests .. \" requests\")\n\ncounter = 1\nrequest = function()\n -- Get the next requests array element\n local request_object = requests[counter]\n\n -- Increment the counter\n counter = counter + 1\n\n -- If the counter is longer than the requests array length -> stop and exit\n if counter > #requests then\n wrk.thread:stop()\n os.exit()\n end\n\n -- Return the request object with the current URL path\n return wrk.format(request_object.method, request_object.path, request_object.headers, request_object.body)\nend\n \"\"\"\n urls = self.create_urls_string(epoch)\n lua = \"\\n\".join([requests_head, urls, requests_tail, lua_body])\n with Path(f\"wrk.lua\").open(\"w\") as f:\n f.write(lua)\n\n def run_wrk(self):\n kwargs = {\"capture_output\": True, \"text\": True}\n start = time.perf_counter()\n command = [\n \"wrk\",\n \"-d\",\n str(self.duration),\n \"-c\",\n str(self.connections),\n \"-t\",\n str(self.threads),\n \"-s\",\n \"wrk.lua\",\n f\"http://{self.host}:{self.port}\",\n ]\n print(\"command: \", \" \".join(command))\n output = subprocess.run(\n command,\n **kwargs,\n )\n elapsed = time.perf_counter() - start\n return elapsed\n\n def measure(self, epoch):\n print(\"measure? wtf?\")\n self.create_lua_script(epoch)\n elapsed = self.run_wrk()\n return elapsed",
"_____no_output_____"
]
],
[
[
"## Wrk CLI command\n\n```shell\ntime wrk -d 30 -c 20 -t 1 -s wrk.lua http://staging.wersdoerfer.de:5001\n```",
"_____no_output_____"
]
],
[
[
"%%time\n# dont_test\nkwargs = {\"capture_output\": True, \"text\": True}\noutput = subprocess.run([\"wrk\", \"-c20\", \"-t1\", \"-d2\", \"-s\", \"wrk.lua\", \"http://localhost:8000\"], **kwargs)\n# output = subprocess.run([\"wrk\", \"-d2\", \"http://localhost:8000\"], **kwargs)",
"_____no_output_____"
],
[
"# dont_test\nprint(output.stdout)",
"_____no_output_____"
],
[
"# dont_test\n\nclient = WrkClient()\nelapsed = client.measure(benchmark.epochs[0])\nprint(elapsed)",
"_____no_output_____"
],
[
"# hide\n# dont_test\n\nfrom nbdev.export import notebook2script\n\nnotebook2script()",
"Converted 00_index.ipynb.\nConverted 01_host.ipynb.\nConverted 02_file.ipynb.\nConverted 03_registry.ipynb.\nConverted 04_epochs.ipynb.\nConverted 10_servers.ipynb.\nConverted 11_views_for_fastapi_server.ipynb.\nConverted 12_views_for_django_server.ipynb.\nConverted 13_django_asgi.ipynb.\nConverted 14_django_async_file_response.ipynb.\nConverted 15_servers_started_locally.ipynb.\nConverted 16_servers_started_via_docker.ipynb.\nConverted 20_clients.ipynb.\nConverted 21_benchmark_client_implementations.ipynb.\nConverted 22_gevent_client.ipynb.\nConverted 30_control_server.ipynb.\nConverted 31_control_client.ipynb.\nConverted 32_control_cli.ipynb.\nConverted 40_results.ipynb.\nConverted 41_repositories.ipynb.\nConverted 42_sqlite_repository.ipynb.\nConverted 50_benchmark_without_benchmark.ipynb.\nConverted 51_benchmark_remote_control_server.ipynb.\nConverted 52_benchmark_from_config.ipynb.\nConverted 52_generate_files_for_benchmark.ipynb.\nConverted 53_analyze.ipynb.\nConverted 54_measure_with_plots.ipynb.\nConverted 54_measure_with_plots_not_gevent.ipynb.\nConverted 60_legacy.ipynb.\nConverted 61_run_benchmark.ipynb.\n"
]
]
] |
[
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code"
] |
[
[
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code"
],
[
"markdown"
],
[
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code"
]
] |
4aebaade52dfcd1c113956a41cc49c81fa43708d
| 86,905 |
ipynb
|
Jupyter Notebook
|
pbmc_all.ipynb
|
taliraj/ExosomeData
|
8a2cba5b547411d903a617a7e6dc8da4a7ab0cea
|
[
"MIT"
] | null | null | null |
pbmc_all.ipynb
|
taliraj/ExosomeData
|
8a2cba5b547411d903a617a7e6dc8da4a7ab0cea
|
[
"MIT"
] | null | null | null |
pbmc_all.ipynb
|
taliraj/ExosomeData
|
8a2cba5b547411d903a617a7e6dc8da4a7ab0cea
|
[
"MIT"
] | null | null | null | 38.953384 | 108 | 0.31615 |
[
[
[
"import pathlib\nimport pandas as pd\nfrom scipy.stats import ttest_ind, ttest_rel\nimport seaborn as sns",
"_____no_output_____"
],
[
"clinical = pd.read_csv(pathlib.Path('discovery_EV_microarray/discovery_full_design.csv'))\nclinical",
"_____no_output_____"
],
[
"clinical.columns",
"_____no_output_____"
],
[
"clinical = clinical[[\n 'Unnamed: 0', 'PatientID_cleaned', 'Clinical_Benefit', 'Exosomes', \n 'Sample.Type', 'pre', 'real_time'\n]]\nclinical",
"_____no_output_____"
],
[
"log = pd.read_csv(pathlib.Path('discovery_EV_microarray/discovery_log2_eset.csv'))\nlog",
"_____no_output_____"
],
[
"log.index = log['Unnamed: 0']\nlog = log.drop('Unnamed: 0', 1)\nlog",
"_____no_output_____"
],
[
"pbmc_benefit = clinical[\n (clinical['Sample.Type'] == 'PBMC ') & (clinical['Clinical_Benefit'] == 'ClinicalBenefit')]\npbmc_benefit",
"_____no_output_____"
],
[
"pbmc_nobenefit = clinical[\n (clinical['Sample.Type'] == 'PBMC ') & (clinical['Clinical_Benefit'] == 'NoClinicalBenefit')]\npbmc_nobenefit",
"_____no_output_____"
],
[
"log[pbmc_benefit['Unnamed: 0']]",
"_____no_output_____"
],
[
"data = {'gene': [], 'statistic': [], 'pvalue': []}\nfor i in log[pbmc_benefit['Unnamed: 0']].index:\n t = ttest_ind(log[pbmc_benefit['Unnamed: 0']].loc[i], log[pbmc_nobenefit['Unnamed: 0']].loc[i])\n if t[1] < 0.05:\n data['gene'].append(i)\n data['statistic'].append(t[0])\n data['pvalue'].append(t[1])\n\ndf = pd.DataFrame(data=data)",
"_____no_output_____"
],
[
"df",
"_____no_output_____"
]
]
] |
[
"code"
] |
[
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
]
] |
4aebb3e09cb2f03bb4c665a25966bb1b37b83952
| 5,822 |
ipynb
|
Jupyter Notebook
|
generate_words.ipynb
|
maremun/mix-attend-break-sticks
|
db8221447fb993194641ba781e85005180f55421
|
[
"MIT"
] | null | null | null |
generate_words.ipynb
|
maremun/mix-attend-break-sticks
|
db8221447fb993194641ba781e85005180f55421
|
[
"MIT"
] | null | null | null |
generate_words.ipynb
|
maremun/mix-attend-break-sticks
|
db8221447fb993194641ba781e85005180f55421
|
[
"MIT"
] | null | null | null | 27.990385 | 337 | 0.561147 |
[
[
[
"import torch\nimport mos.mos_data as data\nimport sys\nsys.path.append(\"./mos/\")",
"_____no_output_____"
],
[
"import os\nos.environ[\"CUDA_DEVICE_ORDER\"]=\"PCI_BUS_ID\"\nos.environ[\"CUDA_VISIBLE_DEVICES\"]=\"0\"",
"_____no_output_____"
],
[
"data_file = \"./data/penn/\"\nmodel_filename = \"./mos/PTB-20180531-133208/model.pt\"",
"_____no_output_____"
],
[
"model = torch.load(model_filename)\nmodel.eval()",
"_____no_output_____"
],
[
"if torch.cuda.is_available():\n model.cuda()\nelse:\n model.cpu()",
"_____no_output_____"
],
[
"corpus = data.Corpus(data_file)\nntokens = len(corpus.dictionary)\nhidden = model.init_hidden(1)",
"_____no_output_____"
],
[
"input = torch.rand(1, 1, requires_grad=False).mul(ntokens).long()\nif torch.cuda.is_available():\n input.data = input.data.cuda()",
"_____no_output_____"
],
[
"# input = Variable(torch.rand(1, 1).mul(ntokens).long(), volatile=True)\nnum_words = 100\ntemperature = 1.\noutput_string = \"\"\nfor i in range(num_words):\n output, hidden = model(input, hidden, return_prob=True)\n word_weights = output.squeeze().data.div(temperature).exp()\n word_idx = torch.multinomial(word_weights, 1)[0]\n input.data.fill_(word_idx)\n word = corpus.dictionary.idx2word[word_idx]\n# outf.write(word + ('\\n' if i % 20 == 19 else ' '))\n output_string = output_string + word\n if i % 20 == 19:\n output_string = output_string + \"\\n\"\n else:\n output_string = output_string + \" \"\nprint(output_string)",
"/home/katrutsa/anaconda2/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py:491: UserWarning: RNN module weights are not part of single contiguous chunk of memory. This means they need to be compacted at every call, possibly greatly increasing memory usage. To compact weights again call flatten_parameters().\n result = self.forward(*input, **kwargs)\n"
]
]
] |
[
"code"
] |
[
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
]
] |
4aebb49f39b55c6b9a2d87594f6981361c0534ef
| 2,440 |
ipynb
|
Jupyter Notebook
|
Demo_XRD_patterns_from_dpp/setup_for_notebooks.ipynb
|
SHDShim/P-MatRes
|
92440c11f2723861dbb82cecdc321fcef9de4443
|
[
"Apache-2.0"
] | null | null | null |
Demo_XRD_patterns_from_dpp/setup_for_notebooks.ipynb
|
SHDShim/P-MatRes
|
92440c11f2723861dbb82cecdc321fcef9de4443
|
[
"Apache-2.0"
] | null | null | null |
Demo_XRD_patterns_from_dpp/setup_for_notebooks.ipynb
|
SHDShim/P-MatRes
|
92440c11f2723861dbb82cecdc321fcef9de4443
|
[
"Apache-2.0"
] | null | null | null | 30.123457 | 282 | 0.579918 |
[
[
[
"# How to setup kernel for the notebooks in this folder\n\n- Run this notebook file under `PeakPo` conda environment. For detail, check instructions in this [website](https://github.com/SHDShim/PeakPo/wiki/Quick-Install).",
"_____no_output_____"
],
[
"# How to resolve dpp version issue",
"_____no_output_____"
],
[
"- As of April 2019, we have an issue with `dpp` incompatibility caused by `pyFAI`. If you made your `dpp` with `pyFAI` older than version `0.15`, then you cannot read them with `pyFAI` version `0.17` or later. The example files I provide here is made with an old `pyFAI`.\n\n- If you have an error in reading your dpp by: `model_dpp = dill.load(f)`, please follow the instruction below.\n\n - Do not change or remove your working `PeakPo` conda environment. Instead, we will clone it.\n ```bash\n conda create --name <new-env-with-old-pyFAI> --clone <your-existing-env-for-peakpo>\n \n conda activate <your-existing-env-for-peakpo>\n \n conda install pyfai==0.15\n ```\n\n\n - Now you can run `jupyter lab` and try this notebook with the new clonned environment.\n \n - If you do not see your new conda environment in the kernel list, please add your new conda environment following the instruction below.\n\n- How to add a conda kernel\n\n```bash\n$ conda install ipykernel # only if you do not have ipykernel installed.\n\n$ python -m ipykernel install --user --name <conda-env-to-add> --display-name <conda-env-to-add>\n\n```",
"_____no_output_____"
]
]
] |
[
"markdown"
] |
[
[
"markdown",
"markdown",
"markdown"
]
] |
4aebbd85154d76e76bc3d0d7c9a8632de422aef1
| 2,095 |
ipynb
|
Jupyter Notebook
|
Python-Standard-Library/RunningFeatures/sys/Low-level Thread Support.ipynb
|
gaufung/CodeBase
|
0292b06cfe002b3ad0299e43bb51192816a02c74
|
[
"MIT"
] | 1 |
2018-10-06T23:50:53.000Z
|
2018-10-06T23:50:53.000Z
|
Python-Standard-Library/RunningFeatures/sys/Low-level Thread Support.ipynb
|
wsgan001/CodeBase
|
0292b06cfe002b3ad0299e43bb51192816a02c74
|
[
"MIT"
] | null | null | null |
Python-Standard-Library/RunningFeatures/sys/Low-level Thread Support.ipynb
|
wsgan001/CodeBase
|
0292b06cfe002b3ad0299e43bb51192816a02c74
|
[
"MIT"
] | 1 |
2018-10-06T23:50:50.000Z
|
2018-10-06T23:50:50.000Z
| 22.287234 | 57 | 0.445346 |
[
[
[
"# Switch Interval",
"_____no_output_____"
]
],
[
[
"import sys\nimport threading\nfrom queue import Queue\n\n\ndef show_thread(q):\n for i in range(5):\n for j in range(1000000):\n pass\n q.put(threading.current_thread().name)\n return\n\n\ndef run_threads():\n interval = sys.getswitchinterval()\n print('interval = {:0.3f}'.format(interval))\n q = Queue()\n threads = [\n threading.Thread(target=show_thread,\n name='T{}'.format(i),\n args=(q,))\n for i in range(3)\n ]\n for t in threads:\n t.setDaemon(True)\n t.start()\n for t in threads:\n t.join()\n while not q.empty():\n print(q.get(), end=' ')\n print()\n return\n\n\nfor interval in [0.001, 0.1]:\n sys.setswitchinterval(interval)\n run_threads()\n print()",
"interval = 0.001\nT0 T1 T2 T0 T1 T2 T0 T1 T2 T0 T1 T2 T1 T0 T2 \n\ninterval = 0.100\nT0 T0 T0 T0 T0 T1 T1 T1 T1 T1 T2 T2 T2 T2 T2 \n\n"
]
]
] |
[
"markdown",
"code"
] |
[
[
"markdown"
],
[
"code"
]
] |
4aebd5cc20a242759a6522c9997f3c9d9f57d26b
| 62,692 |
ipynb
|
Jupyter Notebook
|
02 DSA and ML Optimisation/ALGO 02 Big O Notation 3 Linear Time.ipynb
|
Coding-Forest/2021-Algorithms
|
67d4d0f7acfc5db0129620585518531e543924f3
|
[
"Apache-2.0"
] | null | null | null |
02 DSA and ML Optimisation/ALGO 02 Big O Notation 3 Linear Time.ipynb
|
Coding-Forest/2021-Algorithms
|
67d4d0f7acfc5db0129620585518531e543924f3
|
[
"Apache-2.0"
] | null | null | null |
02 DSA and ML Optimisation/ALGO 02 Big O Notation 3 Linear Time.ipynb
|
Coding-Forest/2021-Algorithms
|
67d4d0f7acfc5db0129620585518531e543924f3
|
[
"Apache-2.0"
] | null | null | null | 130.336798 | 46,126 | 0.810821 |
[
[
[
"# 2.3 Linear Time\n\nHowever, finding the minimal value in an unordered array is not a constant time operation as scanning over each element in the array is needed in order to determine the minimal value. Hence it is a linear time operation, taking O(n) time. If the number of elements is known in advance and does not change, however, such an algorithm can still be said to run in constant time.",
"_____no_output_____"
]
],
[
[
"def find_max(unordered_list):\n max_value = unordered_list[0]\n\n for i in range(len(unordered_list)):\n if unordered_list[i] > max_value:\n max_value = unordered_list[i]\n return max_value",
"_____no_output_____"
],
[
"def timer(func, x):\n start_time = time.process_time()\n item = func(x)\n end_time = time.process_time()\n print(f'for a list of {len(x)} items: {end_time - start_time} seconds')\n return item",
"_____no_output_____"
],
[
"timer(find_max, short_list)\ntimer(find_max, long_list)",
"for a list of 3 items: 9.074999979929999e-06 seconds\nfor a list of 100000000 items: 7.474326055999995 seconds\n"
],
[
"for length in list_lengths:\n start = time.process_time()\n random_list = [np.random.randint(1, 100) for random_integer in range(length)]\n end = time.process_time()\n print('runtime for generating a list of {:,} elements: {} seconds'.format(length, (end-start))) \n \n start = time.process_time()\n find_max(random_list)\n end = time.process_time()\n poly_times.append(end - start)\n print('runtime for double for loop multiplication of {:,} items: {} seconds\\n'.format(length, (end-start)))",
"_____no_output_____"
],
[
"linear = pd.read_csv(\"/content/here/MyDrive/Data and Algorithms/ALGO02/linear_no_tpu.csv\")\nlinear_tpu = pd.read_csv(\"/content/here/MyDrive/Data and Algorithms/ALGO02/linear_tpu.csv\")",
"_____no_output_____"
],
[
"linear",
"_____no_output_____"
],
[
"linear_tpu",
"_____no_output_____"
],
[
"generate_list = linear['time: generate list'].to_numpy()\ngenerate_list_tpu = linear_tpu['time: generate list'].to_numpy()\n\nfind_max = linear['time: find max value'].to_numpy()\nfind_max_tpu = linear_tpu['time: find max value'].to_numpy()",
"_____no_output_____"
],
[
"fig, ax = plt.subplots(1, 2, figsize=(15, 6))\n\nparam = ['salmon', 'standard', 'darkred', 'TPU/High RAM']\n\nfor i in range(2):\n ax[i].plot(list_lengths, generate_list, c=param[0], label=param[1], linewidth=3)\n ax[i].plot(list_lengths, generate_list_tpu, c=param[2], label=param[3], linewidth=3)\n ax[i].legend()\nax[0].set_title(\"Time taken for generating list\", fontsize=15)\nax[1].set_title(\"Time taken for finding max value\", fontsize=15)\nplt.suptitle(\"Linear Time Comparison\", fontsize=25, fontweight='bold', y=1)",
"_____no_output_____"
]
],
[
[
"# Important Functions\n\n- `sns.lmplot(x='n', y='time', data=dataset, ci=None)`\n - lmplot = linear model (regression) plot\n - ci: confidence intreval\n- `pd.DataFrame(list(zip(list1, list2, ..., list_n))`\n - `list(zip(item1, item2 ... item_n))`\n- `time.process_time()`",
"_____no_output_____"
],
[
"References\n\nMy algorithm learning notebook following the live lesson series [**\"Data Structures, Algorithms, and Machine Learning Optimization\"**](https://learning.oreilly.com/videos/data-structures-algorithms/9780137644889/) by Dr. Jon Krohn. I adapted some and partially modified or added entirely new code. Notes largely based on and (some of them entirely) from Jon's notebooks and learning materials. The lesson and original notebook source code at:\n\nhttps://learning.oreilly.com/videos/data-structures-algorithms/9780137644889/\nhttps://github.com/jonkrohn/ML-foundations/blob/master/notebooks/7-algos-and-data-structures.ipynb",
"_____no_output_____"
]
]
] |
[
"markdown",
"code",
"markdown"
] |
[
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code",
"code"
],
[
"markdown",
"markdown"
]
] |
4aebee8735401fad731dafc524f16e626a36ba4d
| 662,093 |
ipynb
|
Jupyter Notebook
|
sim/Plot.ipynb
|
cculha4/COVID19Incubator
|
479b5c8d8f6c5069db2ff88578530ba6c84f8369
|
[
"MIT"
] | null | null | null |
sim/Plot.ipynb
|
cculha4/COVID19Incubator
|
479b5c8d8f6c5069db2ff88578530ba6c84f8369
|
[
"MIT"
] | null | null | null |
sim/Plot.ipynb
|
cculha4/COVID19Incubator
|
479b5c8d8f6c5069db2ff88578530ba6c84f8369
|
[
"MIT"
] | null | null | null | 408.699383 | 264,492 | 0.918261 |
[
[
[
"%load_ext autoreload\n%autoreload 2\n\n%matplotlib inline\n%config InlineBackend.print_figure_kwargs = {'bbox_inches':None}\n\nimport sys\nif '..' not in sys.path:\n sys.path.append('..')\n\n\nimport pandas as pd\nimport numpy as np\nimport networkx as nx\nimport copy\nimport scipy as sp\nimport math\nimport seaborn\nimport pickle\nimport warnings\nimport matplotlib\nimport matplotlib.pyplot as plt\nimport re\n# import multiprocessing\n\n# from lib.mobilitysim import MobilitySimulator\nfrom lib.dynamics import DiseaseModel\nfrom lib.distributions import CovidDistributions\nfrom lib.plot import Plotter\nfrom lib.data import collect_data_from_df\nfrom lib.measures import (\n MeasureList, \n BetaMultiplierMeasure, \n BetaMultiplierMeasureByType,\n SocialDistancingForAllMeasure, \n SocialDistancingForKGroups,\n SocialDistancingByAgeMeasure,\n SocialDistancingForPositiveMeasure, \n ComplianceForAllMeasure,\n Interval)\nfrom lib.runutils import *\nfrom IPython.display import display, HTML\n\n# from lib.mobilitysim import MobilitySimulator\n# from lib.town_data import generate_population, generate_sites, compute_distances\n# from lib.town_maps import MapIllustrator",
"_____no_output_____"
]
],
[
[
"## Zihan",
"_____no_output_____"
]
],
[
[
"summaries_SD_6 = load_summary('tracing_isolate_sftest_2trace_stochastic_20pctall_isohouse_40rpts_005betas_trace_friends_only_colleagues_tracehouse_housesites.pk')",
"_____no_output_____"
],
[
"'''\n(0) 0: SocialDistancingForAllMeasure`\n(1) 1: SocialDistancingForPositiveMeasure\n(2) 2: SocialDistancingByAgeMeasure`\n(3) 3: SocialDistancingForSmartTracing\n(4) 4: SocialDistancingForKGroups`\n(5) 5: UpperBoundCasesSocialDistancing`\n(6) 'resi/dead'\n(7) 'hosp'\n(8) 'site_measures'\n(9) not contained\n'''\nimport matplotlib.pyplot as plt\nrpts = 20\np_compliance = [0.0, 1.0]\nmeasures_deployed = [1,3,6,7]\nfor j, policy in enumerate(['advanced']):\n summaries_ = summaries_SD_6[policy]\n f,axs = plt.subplots(2,2,figsize = (13,13))\n num_expo_house = []\n num_expo_contact = []\n for s, summary in enumerate(summaries_):\n multi_3 = 0\n counts = np.zeros((10,))\n num_contacts = 0\n num_nega = np.sum(summary.state['nega'])\n num_posi = np.sum(summary.state['posi'])\n num_expo_house.append(summary.num_expo_house)\n num_expo_contact.append(summary.num_expo_contact)\n num_i_contained_infectious_true = 0\n num_j_contained_infectious_true = 0\n num_i_contained_infectious_false = 0\n num_j_contained_infectious_false = 0\n #axs[1,s].boxplot(summary.state_started_at['posi'][np.multiply(summary.state_started_at['posi']!=np.inf, summary.state_started_at['posi']!=-1)])\n for r in range(rpts):\n num_contacts += len(summary.mob[r])\n for contact in summary.mob[r]:\n if contact.data['i_contained_infectious']==True:\n num_i_contained_infectious_true += 1\n# if contact.data['j_contained_infectious']==True:\n# num_j_contained_infectious_true += 1\n if contact.data['i_contained_infectious']==False:\n num_i_contained_infectious_false += 1\n# if contact.data['j_contained_infectious']==False:\n# num_j_contained_infectious_false += 1\n if (not contact.data['i_contained']) and (not contact.data['j_contained'] ):\n counts[9] += 1\n else:\n# if (3 in contact.data['i_contained_by']) or (3 in contact.data['j_contained_by']):\n# if len()\n for i in range(6):\n if (i in contact.data['i_contained_by']) or (i in contact.data['j_contained_by']):\n counts[i] += 1\n if ('resi/dead' in contact.data['i_contained_by']) or ('resi/dead' in contact.data['j_contained_by']):\n counts[6] += 1\n if ('hosp' in contact.data['i_contained_by']) or ('hosp' in contact.data['j_contained_by']):\n counts[7] += 1\n if ('site_measures' in contact.data['i_contained_by']) or ('site_measures' in contact.data['j_contained_by']):\n counts[8] += 1\n counts /= num_contacts\n axs[0,s].bar(range(1,len(measures_deployed)+1),counts[measures_deployed])\n axs[0,s].set_title('Tracking compliance '+str(p_compliance[s])+', '+ str(round((1-counts[9])*100,2))+'\\% contained')\n axs[0,s].set_xlabel('contact status',fontsize = 20)\n axs[0,s].set_ylabel('proportion in sampled contacts',fontsize = 20)\n axs[0,s].set_xticks(range(1,len(measures_deployed)+1))\n axs[0,s].set_xticklabels(measures_deployed)\n axs[0,s].set_ylim(0,0.5)\n \n \n print('number of contacts:', num_contacts/rpts)\n print('Tracking compliance '+str(p_compliance[s])+', positive ', num_posi)\n print('Tracking compliance '+str(p_compliance[s])+', negative rate: ', num_nega/(num_nega+num_posi))\n print('i_contained_infectious true rate: ',num_i_contained_infectious_true/(num_i_contained_infectious_true+num_i_contained_infectious_false))\n #print('j_contained_infectious true rate: ',num_j_contained_infectious_true/(num_j_contained_infectious_true+num_j_contained_infectious_false))\n axs[1,0].boxplot(num_expo_house)\n axs[1,0].set_title('Household Exposures')\n axs[1,0].set_xlabel('compliance',fontsize = 20)\n axs[1,0].set_xticklabels(p_compliance)\n axs[1,0].set_ylabel('number of exposures',fontsize = 20)\n axs[1,1].boxplot(num_expo_contact)\n axs[1,1].set_title('Contact Exposures')\n axs[1,1].set_xlabel('compliance',fontsize = 20)\n axs[1,1].set_xticklabels(p_compliance)\n axs[1,1].set_ylabel('number of exposures',fontsize = 20)\n#plt.tight_layout()\nplt.savefig('plots/tracing_isolate_sf_tc1x_sup20_laura_isohouse_20rpts2_detail.png',dpi=300)\nplt.show()",
"_____no_output_____"
],
[
"# Plot results of experiments_server_7-1.py\nc=0\nrunstr = f'run{c}_'\nFIGSIZE=(6, 4)\n\np_compliance = [0.0,0.6,1.0]\nplotter = Plotter()\ntitles_SD_6_ = list(['Tracking compliance '+ str(int(p*100.0)) + ' \\%' for p in p_compliance])\nfor j, policy in enumerate(['basic']):\n summaries_ = summaries_SD_6[policy]\n plotter.compare_total_infections(\n summaries_, \n titles=titles_SD_6_, \n figtitle=(f'Infections for compliance levels for ' + policy + ' individuals compliant with contact-tracing'),\n filename=runstr + f'SD_6{j}'+'tracing_isolate_sftest_2trace_stochastic_20pctall_isohouse_40rpts_005betas_trace_friends_only_colleagues_tracehouse_housesites_highhomebeta', \n figsize=FIGSIZE, acc=500, \n ymax=1500, errorevery=14, start_date = '2020-03-08', show_legend=False)",
"_____no_output_____"
],
[
"'''\n0: 'education', 1: 'office', 2: 'social', 3: 'supermarket', 4: 'home'\n'''\n# sites where infections happen\nimport matplotlib.pyplot as plt\nrpts = 40\np_compliance = [0.0, 0.6, 1.0]\nfor j, policy in enumerate(['basic']):\n summaries_ = summaries_SD_6[policy]\n for s, summary in enumerate(summaries_):\n contact_sites = []\n num_contacts = 0\n num_nega = np.sum(summary.state['nega'])\n num_posi = np.sum(summary.state['posi'])\n num_i_contained_infectious_true = 0\n num_j_contained_infectious_true = 0\n num_i_contained_infectious_false = 0\n num_j_contained_infectious_false = 0\n #axs[1,s].boxplot(summary.state_started_at['posi'][np.multiply(summary.state_started_at['posi']!=np.inf, summary.state_started_at['posi']!=-1)])\n for r in range(rpts):\n num_contacts += len(summary.mob[r])\n for contact in summary.mob[r]:\n if (not contact.data['i_contained']) and (not contact.data['j_contained'] ):\n if contact.site >= 86:\n contact_sites.append(1)\n else:\n contact_sites.append(0)\n else:\n if contact.site >= 86:\n contact_sites.append(3)\n else:\n contact_sites.append(2)\n unique_sites, counts_sites = np.unique(contact_sites, return_counts=True)\n print(p_compliance[s], counts_sites[1]/(counts_sites[0]+counts_sites[1]))",
"0.0 0.17192580469176214\n0.6 0.14557604466249366\n1.0 0.11499631110938531\n"
],
[
"unique_sites",
"_____no_output_____"
]
],
[
[
"## Laura\n### Experiments_server_7-1 with essential workers",
"_____no_output_____"
]
],
[
[
"'''\n(0) 0: SocialDistancingForAllMeasure`\n(1) 1: SocialDistancingForPositiveMeasure\n(2) 2: SocialDistancingByAgeMeasure`\n(3) 3: SocialDistancingForSmartTracing\n(4) 4: SocialDistancingForKGroups`\n(5) 5: UpperBoundCasesSocialDistancing`\n(6) 'resi/dead'\n(7) 'hosp'\n(8) 'site_measures'\n(9) not contained\n'''\nimport matplotlib.pyplot as plt\np_compliance = [0.0, 1.0]\nmeasures_deployed = [1,3,6,7]\nsummaries_SD_6 = load_summary('summaries_contacts_supermarket_bh0.pk')\nfor j, policy in enumerate(['advanced']):\n summaries_ = summaries_SD_6[policy]\n f,axs = plt.subplots(1,2,figsize = (13,5))\n for s, summary in enumerate(summaries_):\n essential_counts = np.zeros((10,))\n essential_num_contacts = 0\n nonessential_counts = np.zeros((10,))\n nonessential_num_contacts = 0\n for r in range(summary.random_repeats):\n for contact in summary.mob[r]:\n if (summary.essential_workers[0][contact.indiv_j]==True):\n essential_num_contacts += 1\n counts = essential_counts\n else:\n nonessential_num_contacts += 1\n counts = nonessential_counts\n \n if (not contact.data['i_contained']) and (not contact.data['j_contained'] ):\n counts[9] += 1\n else:\n for i in range(6):\n if (i in contact.data['i_contained_by']) or (i in contact.data['j_contained_by']):\n counts[i] += 1\n if ('resi/dead' in contact.data['i_contained_by']) or ('resi/dead' in contact.data['j_contained_by']):\n counts[6] += 1\n if ('hosp' in contact.data['i_contained_by']) or ('hosp' in contact.data['j_contained_by']):\n counts[7] += 1\n if ('site_measures' in contact.data['i_contained_by']) or ('site_measures' in contact.data['j_contained_by']):\n counts[8] += 1\n \n essential_counts /= essential_num_contacts\n nonessential_counts /= nonessential_num_contacts\n width = 0.4\n xticks = np.arange(1,len(measures_deployed)+1)\n axs[s].bar(xticks-0.2,nonessential_counts[measures_deployed],width=width, label='Nonessential')\n axs[s].bar(xticks+0.2,essential_counts[measures_deployed],width=width, label='Essential')\n axs[s].set_title('Tracking compliance '+str(p_compliance[s])+', '+ str(round((1-counts[9])*100,2))+'\\% contained')\n axs[s].set_xlabel('contact status',fontsize = 20)\n axs[s].set_ylabel('proportion in sampled contacts',fontsize = 20)\n axs[s].set_xticks(range(1,len(measures_deployed)+1))\n axs[s].set_xticklabels(measures_deployed)\n axs[s].set_ylim(0,1.0)\n axs[s].legend()\n#plt.tight_layout()\n#plt.savefig('plots/contact_details.png',dpi=300)\nplt.show()",
"_____no_output_____"
],
[
"# Graph num infected\nc=0\nrunstr = f'run{c}_'\n# summaries_SD_6 = load_summary('contact_record_test_1.pk')\nFIGSIZE=(6, 4)\n\np_compliance = [0.0, 1.0]\nplotter = Plotter()\ntitles_ = list(['Tracking compliance '+ str(int(p*100.0)) + ' \\%' for p in p_compliance])\nfor j, policy in enumerate(['advanced']):\n summaries_list = summaries_SD_6[policy]\n plotter.compare_total_infections(\n summaries_list, \n titles=titles_, \n filename=runstr + f'experiments_7-1', \n figsize=FIGSIZE, acc=500, \n ymax=1000, errorevery=14)",
"_____no_output_____"
],
[
"for summ in summaries_SD_6['advanced']:\n df = make_summary_df(summ)\n display(df)",
"_____no_output_____"
]
],
[
[
"### Experiments_essential.py",
"_____no_output_____"
]
],
[
[
"# Plot results of experiments_essential.py\n'''\n(0) 0: SocialDistancingForAllMeasure`\n(1) 1: SocialDistancingForPositiveMeasure\n(2) 2: SocialDistancingByAgeMeasure`\n(3) 3: SocialDistancingForSmartTracing\n(4) 4: SocialDistancingForKGroups`\n(5) 5: UpperBoundCasesSocialDistancing`\n(6) 'resi/dead'\n(7) 'hosp'\n(8) 'site_measures'\n(9) not contained\n'''\nmeasures = np.array(['SDForAll', 'SDForPositive', 'SDByAge', 'SDForSmartTracing','SDForKGroups','UpperBound','resi/dead','hosp','site_measures','not contained'])\n\nimport matplotlib.pyplot as plt\np_compliance = [0.0, 0.5]\nmeasures_deployed = [1,3,6,7]\nsummaries_ = load_summary('summaries_r45.pk')\n\nf,axs = plt.subplots(2,2,figsize = (13,10))\nfor j, policy in enumerate(['random','essential']):\n for s in range(len(p_compliance)):\n summary = summaries_[(policy,p_compliance[s])]\n essential_counts = np.zeros((10,))\n essential_num_contacts = 0\n nonessential_counts = np.zeros((10,))\n nonessential_num_contacts = 0\n for r in range(summary.random_repeats):\n for contact in summary.mob[r]:\n if (summary.essential_workers[0][contact.indiv_j]==True):\n essential_num_contacts += 1\n counts = essential_counts\n else:\n nonessential_num_contacts += 1\n counts = nonessential_counts\n \n if (not contact.data['i_contained']) and (not contact.data['j_contained'] ):\n counts[9] += 1\n else:\n for i in range(6):\n if (i in contact.data['i_contained_by']) or (i in contact.data['j_contained_by']):\n counts[i] += 1\n if ('resi/dead' in contact.data['i_contained_by']) or ('resi/dead' in contact.data['j_contained_by']):\n counts[6] += 1\n if ('hosp' in contact.data['i_contained_by']) or ('hosp' in contact.data['j_contained_by']):\n counts[7] += 1\n if ('site_measures' in contact.data['i_contained_by']) or ('site_measures' in contact.data['j_contained_by']):\n counts[8] += 1\n \n essential_counts /= essential_num_contacts\n nonessential_counts /= nonessential_num_contacts\n width = 0.4\n xticks = np.arange(1,len(measures_deployed)+1)\n axs[j,s].bar(xticks-0.2,nonessential_counts[measures_deployed],width=width, label='Nonessential')\n axs[j,s].bar(xticks+0.2,essential_counts[measures_deployed],width=width, label='Essential')\n axs[j,s].set_title('Tracking compliance '+str(p_compliance[s])+', '+ str(round((1-counts[9])*100,2))+'\\% contained')\n axs[j,s].set_xlabel('contact status',fontsize = 20)\n axs[j,s].set_ylabel('proportion in sampled contacts',fontsize = 20)\n axs[j,s].set_xticks(range(1,len(measures_deployed)+1))\n axs[j,s].set_xticklabels(measures[measures_deployed],rotation=45,ha='right',fontsize=10)\n axs[j,s].set_ylim(0,1.0)\n axs[j,s].legend()\nplt.tight_layout()\n#plt.savefig('plots/contact_details.png',dpi=300)\nplt.show()",
"_____no_output_____"
],
[
"c=0\nrunstr = f'run{c}_'\n# summaries_ = load_summary('contact_record_test_1.pk')\nFIGSIZE=(6, 4)\n\nparams = [('random',0.0),('random',0.5),('essential',0.5)]\nplotter = Plotter()\ntitles_ = list(['Compliance '+ str(int(p*100.0)) + ' \\%'+' '+policy for (policy, p) in params])\nsummaries_list = [summaries_[param] for param in params]\nplotter.compare_total_infections(\n summaries_list, \n titles=titles_, \n filename=runstr + f'experiments_essential', \n figsize=FIGSIZE, acc=500, \n ymax=2000, errorevery=14)",
"_____no_output_____"
],
[
"for summ in summaries_list:\n df = make_summary_df(summ)\n display(df)",
"_____no_output_____"
]
],
[
[
"#### Experiments_essential_new with multiple worker types",
"_____no_output_____"
]
],
[
[
"# Plot results of experiments_essential.py\n'''\n(0) 0: SocialDistancingForAllMeasure`\n(1) 1: SocialDistancingForPositiveMeasure\n(2) 2: SocialDistancingByAgeMeasure`\n(3) 3: SocialDistancingForSmartTracing\n(4) 4: SocialDistancingForKGroups`\n(5) 5: UpperBoundCasesSocialDistancing`\n(6) 'resi/dead'\n(7) 'hosp'\n(8) 'site_measures'\n(9) not contained\n'''\nmeasures = np.array(['SDForAll', 'SDForPositive', 'SDByAge', 'SDForSmartTracing','SDForKGroups','UpperBound','resi/dead','hosp','site_measures','not contained'])\n\nimport matplotlib.pyplot as plt\np_compliance = [0.0, 0.5]\nmeasures_deployed = [1,3,6,7]\nsummaries_ = load_summary('summaries_r54.pk')\n\nf,axs = plt.subplots(1,4,figsize = (20,5))\nfor j, (policy,p) in enumerate([('None',0.0),('random',0.5),('essential',0.5),('None',1.0)]):\n summary = summaries_[(policy,p)]\n essential_counts = np.zeros((10,))\n essential_num_contacts = 0\n nonessential_counts = np.zeros((10,))\n nonessential_num_contacts = 0\n for r in range(summary.random_repeats):\n for contact in summary.mob[r]:\n if (summary.essential_workers[0][contact.indiv_j]==True):\n essential_num_contacts += 1\n counts = essential_counts\n else:\n nonessential_num_contacts += 1\n counts = nonessential_counts\n\n if (not contact.data['i_contained']) and (not contact.data['j_contained'] ):\n counts[9] += 1\n else:\n for i in range(6):\n if (i in contact.data['i_contained_by']) or (i in contact.data['j_contained_by']):\n counts[i] += 1\n if ('resi/dead' in contact.data['i_contained_by']) or ('resi/dead' in contact.data['j_contained_by']):\n counts[6] += 1\n if ('hosp' in contact.data['i_contained_by']) or ('hosp' in contact.data['j_contained_by']):\n counts[7] += 1\n if ('site_measures' in contact.data['i_contained_by']) or ('site_measures' in contact.data['j_contained_by']):\n counts[8] += 1\n\n essential_counts /= essential_num_contacts\n nonessential_counts /= nonessential_num_contacts\n width = 0.4\n xticks = np.arange(1,len(measures_deployed)+1)\n axs[j].bar(xticks-0.2,nonessential_counts[measures_deployed],width=width, label='Nonessential')\n axs[j].bar(xticks+0.2,essential_counts[measures_deployed],width=width, label='Essential')\n axs[j].set_title('Compliance '+policy+' '+str(p)+', '+ str(round((1-counts[9])*100,2))+'\\% contained')\n axs[j].set_xlabel('contact status',fontsize = 20)\n axs[j].set_ylabel('proportion in sampled contacts',fontsize = 20)\n axs[j].set_xticks(range(1,len(measures_deployed)+1))\n axs[j].set_xticklabels(measures[measures_deployed],rotation=45,ha='right',fontsize=10)\n axs[j].set_ylim(0,1.0)\n axs[j].legend()\nplt.tight_layout()\n#plt.savefig('plots/contact_details.png',dpi=300)\nplt.show()",
"_____no_output_____"
],
[
"c=0\nrunstr = f'run{c}_'\n# summaries_ = load_summary('contact_record_test_1.pk')\nFIGSIZE=(6, 4)\n\nparams = [('None',0.0),('random',0.5),('essential',0.5),('None',1.0)]\nplotter = Plotter()\ntitles_ = list(['Compliance '+ str(int(p*100.0)) + ' \\%'+' '+policy for (policy, p) in params])\nsummaries_list = [summaries_[param] for param in params]\nplotter.compare_total_infections(\n summaries_list, \n titles=titles_, \n filename=runstr + f'experiments_essential', \n figsize=FIGSIZE, acc=500, \n ymax=2000, errorevery=14)",
"_____no_output_____"
],
[
"for summ in summaries_list:\n df = make_summary_df(summ)\n display(df)",
"_____no_output_____"
]
],
[
[
"## Emma",
"_____no_output_____"
]
],
[
[
"# Plot results of experiments_server_7-1.py\nc=0\nrunstr = f'run{c}_'\nsummaries_SD_6 = load_summary('summaries_SD_5.pk')\nFIGSIZE=(6, 4)\n\np_compliance = [0.0, 0.6, 1.0]\nplotter = Plotter()\ntitles_SD_6_ = list(['Tracking compliance '+ str(int(p*100.0)) + ' \\%' for p in p_compliance])\nfor j, policy in enumerate(['basic']):\n summaries_ = summaries_SD_6[policy]\n plotter.compare_total_infections(\n summaries_, \n titles=titles_SD_6_, \n figtitle=(f'Infections for compliance levels for ' + policy + ' individuals compliant with contact-tracing'),\n filename=runstr + f'SD_6{j}'+'tracing_isolate_5sftest_5trace_sup20_isohouse_40rpts_010betas', \n figsize=FIGSIZE, acc=500, \n ymax=5000, errorevery=14)\nplt.show()",
"_____no_output_____"
],
[
"c=0\nrunstr = f'run{c}_'\nsummaries_SD_6 = load_summary('tracing_isolate_sftest_2trace_stochastic_20pctall_isohouse_40rpts_005betas_trace_friends_only_colleagues_tracehouse.pk')\n# titles_SD_6_ = list(['Tracking compliance '+ str(int(p*100.0)) + ' \\%' for p in p_compliance])",
"_____no_output_____"
],
[
"\n\np_compliance = [0.4]\nall_states = ['susc', 'expo', 'ipre', 'isym', 'iasy', 'posi', 'nega', 'resi', 'dead', 'hosp']\ninfectious_states = ['ipre', 'isym', 'iasy', 'posi']\nnoninfectious_states = ['susc', 'expo', 'nega', 'resi', 'dead', 'hosp']\nplot_states ='seperate_infectious_noninfectious' #'combine_infectious_states' #['susc', 'expo', 'ipre', 'isym', 'iasy', 'posi', 'resi']\n\nactive_measures = ['CT','posi_measure']\n\nalphas = np.linspace(0.6,0.3,num=len(plot_states))\nplotter = Plotter()\nfor j, policy in enumerate(['basic']):\n summaries_ = summaries_SD_6[policy]\n# f,axs = plt.subplots(1,len(p_compliance),figsize = (13,5)) \n for c, summary in enumerate(summaries_): # each compliance rate\n if c != 2: continue\n fig = plt.figure(figsize=(21,7))\n axs1 = fig.add_subplot(131)\n axs2 = fig.add_subplot(132)\n axs3 = fig.add_subplot(133)\n \n traced_times = {cur_measure: np.zeros(summary.n_people) for cur_measure in active_measures}\n traced_all_states = {cur_state: np.zeros(summary.n_people) for cur_state in all_states}\n traced_all_states_essential = {cur_state: np.zeros(summary.n_people) for cur_state in all_states}\n traced_all_states_normal = {cur_state: np.zeros(summary.n_people) for cur_state in all_states}\n traced_infectious_states = np.zeros(summary.n_people)\n traced_infectious_states_essential = np.zeros(summary.n_people)\n traced_infectious_states_normal = np.zeros(summary.n_people)\n traced_noninfectious_states = np.zeros(summary.n_people)\n traced_noninfectious_states_essential = np.zeros(summary.n_people)\n traced_noninfectious_states_normal = np.zeros(summary.n_people)\n sum_all_states = 0\n sum_all_states_essential = 0\n sum_all_states_normal = 0\n traced_all_states_ratio = {cur_state: np.zeros(1) for cur_state in all_states}\n traced_all_states_ratio_essential = {cur_state: np.zeros(1) for cur_state in all_states}\n traced_all_states_ratio_normal = {cur_state: np.zeros(1) for cur_state in all_states}\n traced_plot_states_ratio = {cur_state: np.zeros(1) for cur_state in plot_states}\n traced_plot_states_ratio_essential = {cur_state: np.zeros(1) for cur_state in plot_states}\n traced_plot_states_ratio_normal = {cur_state: np.zeros(1) for cur_state in plot_states}\n \n for r in range(summary.random_repeats): # each repeat\n for cur_measure in active_measures:\n traced_times[cur_measure] += summary.is_traced[cur_measure][r]\n for cur_state in all_states:\n traced_all_states[cur_state] += summary.is_traced_state[cur_state][r]\n \n \n for cur_measure in active_measures:\n traced_times[cur_measure] /= summary.random_repeats\n \n \n for cur_state in all_states:\n # traced times for all indiv at all states\n traced_all_states[cur_state] /= summary.random_repeats \n # seperate essential and normal\n traced_all_states_essential[cur_state] = np.multiply(traced_all_states[cur_state],summary.essential_workers[0])\n traced_all_states_normal[cur_state] = np.multiply(traced_all_states[cur_state],1-summary.essential_workers[0])\n \n# # sum_all_states += np.count_nonzero(avg_traced_all_states[cur_state])\n# # traced_all_states_ratio[cur_state] = np.count_nonzero(avg_traced_all_states[cur_state])\n# # sum_all_states_essential += np.count_nonzero(~np.isnan(avg_traced_all_states_essential[cur_state]))\n# # sum_all_states_normal += np.count_nonzero(~np.isnan(avg_traced_all_states_normal[cur_state]))\n# # traced_all_states_ratio_essential[cur_state] = np.count_nonzero(~np.isnan(avg_traced_all_states_essential[cur_state]))\n# # traced_all_states_ratio_normal[cur_state] = np.count_nonzero(~np.isnan(avg_traced_all_states_normal[cur_state]))\n sum_all_states += sum((traced_all_states[cur_state]))\n traced_all_states_ratio[cur_state] = sum((traced_all_states[cur_state])) # to be discussed\n sum_all_states_essential += sum((traced_all_states_essential[cur_state]))\n sum_all_states_normal += sum((traced_all_states_normal[cur_state]))\n traced_all_states_ratio_essential[cur_state] = sum((traced_all_states_essential[cur_state]))\n traced_all_states_ratio_normal[cur_state] = sum((traced_all_states_normal[cur_state]))\n \n for cur_state in all_states:\n if sum_all_states != 0:\n traced_all_states_ratio[cur_state] /= sum_all_states\n traced_all_states_ratio_essential[cur_state] /= sum_all_states_essential\n traced_all_states_ratio_normal[cur_state] /= sum_all_states_normal\n else:\n traced_all_states_ratio[cur_state] = 0\n traced_all_states_ratio_essential[cur_state] = 0\n traced_all_states_ratio_normal[cur_state] = 0\n \n \n# for cur_state in infectious_states:\n# traced_infectious_states += traced_all_states[cur_state]\n# traced_infectious_states_essential = np.multiply(traced_infectious_states,summary.essential_workers[0])\n# traced_infectious_states_normal = np.multiply(traced_infectious_states,1-summary.essential_workers[0])\n# traced_infectious_states_essential[traced_infectious_states_essential==0] = 'nan'\n# traced_infectious_states_normal[traced_infectious_states_normal==0] = 'nan'\n for cur_state in noninfectious_states:\n traced_noninfectious_states += traced_all_states[cur_state]\n traced_noninfectious_states_essential = np.multiply(traced_noninfectious_states,summary.essential_workers[0])\n traced_noninfectious_states_normal = np.multiply(traced_noninfectious_states,1-summary.essential_workers[0])\n traced_noninfectious_states_essential[traced_noninfectious_states_essential==0] = 'nan'\n traced_noninfectious_states_normal[traced_noninfectious_states_normal==0] = 'nan'\n # Zihan:\n traced_infectious_states = traced_times['CT'] - traced_noninfectious_states\n traced_infectious_states_essential = np.multiply(traced_infectious_states,summary.essential_workers[0])\n traced_infectious_states_normal = np.multiply(traced_infectious_states,1-summary.essential_workers[0])\n traced_infectious_states_essential[traced_infectious_states_essential==0] = 'nan'\n traced_infectious_states_normal[traced_infectious_states_normal==0] = 'nan' \n \n \n \n ## plot\n axs1.plot(traced_times['CT'],traced_times['CT'],linestyle='--',color='black',alpha=0.1)\n axs2.plot(traced_times['CT'],traced_times['CT'],linestyle='--',color='black',alpha=0.1)\n axs3.plot(traced_times['CT'],traced_times['CT'],linestyle='--',color='black',alpha=0.1)\n if plot_states == 'combine_infectious_states':\n axs1.scatter(traced_times, traced_infectious_states_essential, \n alpha=alphas[i], edgecolors=None, label=cur_state, color='tab:blue')\n axs1.scatter(traced_times, traced_infectious_states_essential, \n alpha=alphas[i], edgecolors=None, label=cur_state, color='tab:red') \n axs2.scatter(traced_times, traced_infectious_states_essential, \n alpha=alphas[i], edgecolors=None, label=cur_state, color='tab:red')\n axs3.scatter(traced_times, traced_infectious_states_normal, \n alpha=alphas[i], edgecolors=None, label=cur_state, color='tab:blue')\n axs1.set_title('infectious traced freq for all indiv')\n axs2.set_title('infectious traced freq for essential')\n axs3.set_title('infectious traced freq for non essential')\n elif plot_states == 'nonzero_states':\n for i, cur_state in enumerate(all_states):\n if sum(traced_all_states[cur_state]) != 0:\n axs.scatter(traced_times, traced_all_states[cur_state], \n alpha=alphas[i], edgecolors=None, label=cur_state)\n axs.legend()\n elif plot_states == 'seperate_infectious_noninfectious':\n alll = np.nansum(traced_noninfectious_states) + np.nansum(traced_infectious_states)\n axs1.scatter(traced_times['CT'], traced_noninfectious_states, \n alpha=0.6, edgecolors=None, label='non-infectious: '\n +str(round((np.nansum(traced_noninfectious_states)/alll)*100,2))+'\\%', color='tab:blue')\n axs1.scatter(traced_times['CT'], traced_infectious_states, \n alpha=0.3, edgecolors=None, label='infectious: '\n +str(round((np.nansum(traced_infectious_states)/alll)*100,2))+'\\%', color='tab:red') \n alll = np.nansum(traced_noninfectious_states_essential) + np.nansum(traced_infectious_states_essential)\n axs2.scatter(traced_times['CT'], traced_noninfectious_states_essential, \n alpha=0.6, edgecolors=None, label='non-infectious: '\n +str(round((np.nansum(traced_noninfectious_states_essential)/alll)*100,2))+'\\%', color='tab:blue')\n axs2.scatter(traced_times['CT'], traced_infectious_states_essential, \n alpha=0.3, edgecolors=None, label='infectious: '\n +str(round((np.nansum(traced_infectious_states_essential)/alll)*100,2))+'\\%', color='tab:red')\n alll = np.nansum(traced_noninfectious_states_normal) + np.nansum(traced_infectious_states_normal)\n axs3.scatter(traced_times['CT'], traced_noninfectious_states_normal,\n alpha=0.6, edgecolors=None, label='non-infectious: '\n +str(round((np.nansum(traced_noninfectious_states_normal)/alll)*100,2))+'\\%', color='tab:blue')\n axs3.scatter(traced_times['CT'], traced_infectious_states_normal, \n alpha=0.3, edgecolors=None, label='infectious: '\n +str(round((np.nansum(traced_infectious_states_normal)/alll)*100,2))+'\\%', color='tab:red')\n \n else:\n # compute relative state ratio\n sum_traced_plot_states_ratio = 0\n sum_traced_plot_states_ratio_essential = 0\n sum_traced_plot_states_ratio_normal = 0\n for cur_state in plot_states:\n sum_traced_plot_states_ratio += traced_all_states_ratio[cur_state]\n traced_plot_states_ratio[cur_state] = traced_all_states_ratio[cur_state]\n sum_traced_plot_states_ratio_essential += traced_all_states_ratio_essential[cur_state]\n traced_plot_states_ratio_essential[cur_state] = traced_all_states_ratio_essential[cur_state]\n sum_traced_plot_states_ratio_normal += traced_all_states_ratio_normal[cur_state]\n traced_plot_states_ratio_normal[cur_state] = traced_all_states_ratio_normal[cur_state]\n for cur_state in plot_states:\n traced_all_states_essential[cur_state][traced_all_states_essential[cur_state]==0] = 'nan'\n traced_all_states_normal[cur_state][traced_all_states_normal[cur_state]==0] = 'nan'\n if sum_traced_plot_states_ratio != 0:\n traced_plot_states_ratio[cur_state] /= sum_traced_plot_states_ratio\n traced_plot_states_ratio_essential[cur_state] /= sum_traced_plot_states_ratio_essential\n traced_plot_states_ratio_normal[cur_state] /= sum_traced_plot_states_ratio_normal\n # plot \n for i, cur_state in enumerate(plot_states):\n axs1.scatter(traced_times, traced_all_states[cur_state], \n alpha=alphas[i], edgecolors=None, label=cur_state+': '\n +str(round(traced_plot_states_ratio[cur_state]*100,2))+'\\%')\n axs2.scatter(traced_times, traced_all_states_essential[cur_state], \n alpha=alphas[i], edgecolors=None, label=cur_state+': '\n +str(round(traced_plot_states_ratio_essential[cur_state]*100,2))+'\\%')\n axs3.scatter(traced_times, traced_all_states_normal[cur_state], \n alpha=alphas[i], edgecolors=None, label=cur_state+': '\n +str(round(traced_plot_states_ratio_normal[cur_state]*100,2))+'\\%')\n \n \n \n# axs1.set_title('Stay home by Posi measure vs by CT for ' + r\"$\\bf{\" + 'all\\ indiv' + \"}$\")\n# axs2.set_title('Stay home by Posi measure vs by CT for ' + r\"$\\bf{\" + 'essential' + \"}$\")\n# axs3.set_title('Stay home by Posi measure vs by CT for ' + r\"$\\bf{\" + 'non-essential' + \"}$\")\n axs1.set_title('Infectious vs non-infectious stay home for ' + r\"$\\bf{\" + 'all\\ indiv' + \"}$\")\n axs2.set_title('Infectious vs non-infectious stay home for ' + r\"$\\bf{\" + 'essential' + \"}$\")\n axs3.set_title('Infectious vs non-infectious stay home for ' + r\"$\\bf{\" + 'non-essential' + \"}$\")\n axs1.legend()\n axs2.legend()\n axs3.legend()\n# axs1.set_xticks(range(0, int(max(traced_times['CT'])+1)))\n# axs2.set_xticks(range(0, int(max(traced_times['CT'])+1)))\n# axs3.set_xticks(range(0, int(max(traced_times['CT'])+1)))\n axs1.set_xlabel('traced frequency, [num of times]',fontsize = 15)\n axs2.set_xlabel('traced frequency, [num of times]',fontsize = 15)\n axs3.set_xlabel('traced frequency, [num of times]',fontsize = 15)\n axs1.set_ylabel('traced state frequency, [num of times]',fontsize = 15)\n# axs2.set_ylabel('traced state frequency, [num of times]',fontsize = 15)\n# axs3.set_ylabel('traced state frequency, [num of times]',fontsize = 15)\n \n print(traced_times)\n# print(avg_traced_infectious_states)\n# print(traced_all_states_ratio)\n\n \nplt.savefig('plots/tracing_isolate_sftest_2trace_stochastic_20pctall_isohouse_40rpts_005betas_trace_friends_only_colleagues_tracehouse_04compliance.png',dpi=300) \nplt.show()",
"{'CT': array([0.225, 0.05 , 0. , ..., 0. , 0. , 0. ]), 'posi_measure': array([0., 0., 0., ..., 0., 0., 0.])}\n"
],
[
"def computeAverageTraced(summary,cur_state,r,t):\n cur_num_of_traced_indiv = 0\n repeatr_trace_started_at = summary.trace_started_at[cur_state][r]\n repeatr_trace_ended_at = summary.trace_ended_at[cur_state][r]\n for i in range(summary.n_people): # each person\n if repeatr_trace_started_at[i]: # if person i is traced\n for cur_traced_time in range(len(repeatr_trace_started_at[i])):\n if (repeatr_trace_started_at[i][cur_traced_time]<t) and (repeatr_trace_ended_at[i][cur_traced_time])>t: # if i is home at t\n if (cur_traced_time ==0):\n cur_num_of_traced_indiv += 1\n if (cur_traced_time != 0) and (repeatr_trace_started_at[i][cur_traced_time] > \n (repeatr_trace_started_at[i][cur_traced_time-1]+24.0*7)):\n cur_num_of_traced_indiv += 1\n return cur_num_of_traced_indiv\n\n\n\n\nc=0\nrunstr = f'run{c}_'\nTO_HOURS = 24.0\nacc=500\nsummaries_SD_6 = load_summary('summaries_SD_5.pk')\n# titles_SD_6_ = list(['Tracking compliance '+ str(int(p*100.0)) + ' \\%' for p in p_compliance])\n\np_compliance = [0.0, 1.0]\nall_states = ['susc', 'expo', 'ipre', 'isym', 'iasy', 'posi', 'nega', 'resi', 'dead', 'hosp']\ninfectious_states = ['ipre', 'isym', 'iasy', 'posi']\nplot_states = infectious_states #'combine_infectious_states' #['susc', 'expo', 'ipre', 'isym', 'iasy', 'posi', 'resi']\nalphas = np.linspace(0.6,0.3,num=len(plot_states))\n\nplotter = Plotter()\nfor j, policy in enumerate(['basic','advanced']):\n summaries_ = summaries_SD_6[policy]\n# f,axs = plt.subplots(1,len(p_compliance),figsize = (13,5)) \n for c, summary in enumerate(summaries_): # each compliance rate\n fig = plt.figure(figsize=(10,6))\n ax = fig.add_subplot(111) \n \n ts_ipre, means_ipre, stds_ipre = [], [], []\n ts_isym, means_isym, stds_isym = [], [], []\n ts_iasy, means_iasy, stds_iasy = [], [], []\n ts_posi, means_posi, stds_posi = [], [], []\n ts_CT, means_CT, stds_CT = [], [], []\n cur_num_of_ipre_traced_indiv = np.zeros(summary.random_repeats)\n cur_num_of_isym_traced_indiv = np.zeros(summary.random_repeats)\n cur_num_of_iasy_traced_indiv = np.zeros(summary.random_repeats)\n cur_num_of_posi_traced_indiv = np.zeros(summary.random_repeats)\n \n for t in np.linspace(0.0, summary.max_time, num=acc, endpoint=True): # each time\n for r in range(summary.random_repeats): # each repeat\n cur_num_of_ipre_traced_indiv[r] = computeAverageTraced(summary,'ipre',r,t)\n cur_num_of_isym_traced_indiv[r] = computeAverageTraced(summary,'isym',r,t)\n cur_num_of_iasy_traced_indiv[r] = computeAverageTraced(summary,'iasy',r,t)\n cur_num_of_posi_traced_indiv[r] = computeAverageTraced(summary,'posi',r,t)\n \n \n# repeatr_ipre_trace_started_at = summary.trace_started_at['ipre'][r]\n# repeatr_ipre_trace_ended_at = summary.trace_ended_at['ipre'][r]\n# for i in range(summary.n_people): # each person\n# if repeatr_ipre_trace_started_at[i]: # if person i is traced\n \n# for cur_traced_time in range(len(repeatr_ipre_trace_started_at[i])):\n# if (repeatr_ipre_trace_started_at[i][cur_traced_time]<t) and (repeatr_CT_trace_ended_at[i][cur_traced_time])>t: # if i is home at t\n# if (cur_traced_time ==0):\n# cur_num_of_ipre_traced_indiv[r] += 1\n# if (cur_traced_time != 0) and (repeatr_ipre_trace_started_at[i][cur_traced_time] > \n# (repeatr_ipre_trace_started_at[i][cur_traced_time-1]+24.0*7)):\n# cur_num_of_ipre_traced_indiv[r] += 1\n\n \n# cur_num_of_CT_traced_indiv[r] += \n# np.sum([(repeatr_CT_trace_started_at[i][j]<t) and (repeatr_CT_trace_ended_at[i][j])>t \n# for j in range(len(repeatr_CT_trace_ended_at[i]))])\n\n cur_num_of_CT_traced_indiv = cur_num_of_ipre_traced_indiv+cur_num_of_isym_traced_indiv+cur_num_of_iasy_traced_indiv\n ts_CT.append(t/TO_HOURS)\n means_CT.append(np.mean(cur_num_of_CT_traced_indiv))\n stds_CT.append(np.std(cur_num_of_CT_traced_indiv))\n ts_ipre.append(t/TO_HOURS)\n means_ipre.append(np.mean(cur_num_of_ipre_traced_indiv))\n stds_ipre.append(np.std(cur_num_of_ipre_traced_indiv))\n ts_isym.append(t/TO_HOURS)\n means_isym.append(np.mean(cur_num_of_isym_traced_indiv))\n stds_isym.append(np.std(cur_num_of_isym_traced_indiv))\n ts_iasy.append(t/TO_HOURS)\n means_iasy.append(np.mean(cur_num_of_iasy_traced_indiv))\n stds_iasy.append(np.std(cur_num_of_iasy_traced_indiv))\n ts_posi.append(t/TO_HOURS)\n means_posi.append(np.mean(cur_num_of_posi_traced_indiv))\n stds_posi.append(np.std(cur_num_of_posi_traced_indiv))\n \n # ax.errorbar(ts_CT, means_CT, yerr=stds_CT)\n ax.plot(ts_CT,means_CT,label='CT')\n ax.plot(ts_posi,means_posi,label='posi measure')\n ax.set_xlabel('simulation time, [days]',fontsize = 15)\n ax.set_ylabel('infectious population stay home',fontsize = 15)\n ax.set_title('CT=1.0, '+ policy)\n ax.legend()\n \nplt.show()",
"_____no_output_____"
],
[
"fig = plt.figure(figsize=(10,6))\nax = fig.add_subplot(111)\n# ax.errorbar(ts_CT, means_CT, yerr=stds_CT)\nax.plot(ts_CT,means_CT,label='CT')\nax.plot(ts_posi,means_posi,label='posi measure')\nax.set_xlabel('simulation time, [days]',fontsize = 15)\nax.set_ylabel('infectious population stay home',fontsize = 15)\nax.set_title('CT=1.0, advanced')\nax.legend()\nplt.show()\n",
"_____no_output_____"
],
[
"'''\n(0) 1: SocialDistancingForAllMeasure`\n(1) 2: SocialDistancingForPositiveMeasure\n(2) 3: SocialDistancingByAgeMeasure`\n(3) 4: SocialDistancingForSmartTracing\n(4) 5: SocialDistancingForKGroups`\n(5) 6: UpperBoundCasesSocialDistancing`\n(6) 'resi/dead'\n(7) 'hosp'\n(8) 'site_measures'\n(9) not contained\n(10) contained_infectious\n'''\nimport matplotlib.pyplot as plt\nrpts = 2\np_compliance = [0.0, 1.0]\nmeasures_deployed = [0,1,3,6,7]\nmeasures_deployed_str = ['Shutdown','Posi Measure',\n 'Age Measure','CT',\n 'K groups','Upper Bound','resi/dead','hosp']\n# summaries_SD_6 = load_summary('summaries_SD_5_advanced.pk')\nsummaries_SD_6 = load_summary('summaries_r62.pk')\nfor j, policy in enumerate(['advanced']):\n summaries_ = summaries_SD_6[policy]\n f,axs = plt.subplots(1,2,figsize = (13,5))\n f1,axs1 = plt.subplots(1,2,figsize = (13,5))\n f2,axs2 = plt.subplots(1,2,figsize = (13,5))\n for s, summary in enumerate(summaries_):\n counts = np.zeros((11,))\n num_contacts = 0\n for r in range(rpts):\n num_contacts += len(summary.mob[r])\n for contact in summary.mob[r]: \n if (not contact.data['i_contained']) and (not contact.data['j_contained'] ):\n counts[9] += 1\n else:\n for i in range(6):\n if (i in contact.data['i_contained_by']) or (i in contact.data['j_contained_by']):\n counts[i] += 1\n if ('resi/dead' in contact.data['i_contained_by']) or ('resi/dead' in contact.data['j_contained_by']):\n counts[6] += 1\n if ('hosp' in contact.data['i_contained_by']) or ('hosp' in contact.data['j_contained_by']):\n counts[7] += 1\n if ('site_measures' in contact.data['i_contained_by']) or ('site_measures' in contact.data['j_contained_by']):\n counts[8] += 1\n if contact.data['i_contained_infectious'] or contact.data['j_contained_infectious']:\n counts[10] += 1\n \n counts /= num_contacts\n counts[10] = counts[10]/sum(counts[0:5])\n measure_distribution = counts[0:8]/sum(counts[0:8])\n print('infectious contained rate: ', counts[10])\n axs[s].bar(range(1,len(measures_deployed)+1),counts[measures_deployed])\n axs[s].set_title('CT '+str(p_compliance[s])+', '+ str(round((1-counts[9])*100,2))+'\\% contained, '+str(round(counts[10]*100,2))+'\\% are infectious')\n axs[s].set_xlabel('contact status',fontsize = 20)\n axs[s].set_ylabel('proportion in sampled contacts',fontsize = 20)\n axs[s].set_xticks(range(1,len(measures_deployed)+1))\n axs[s].set_xticklabels(measures_deployed)\n axs[s].set_ylim(0,0.8)\n \n# axs1[s].pie(measure_distribution,labels=measures_deployed_str)\n text = axs1[s].pie(measure_distribution,labels=measures_deployed_str,autopct='%.2f')[1]\n fixOverLappingText(text)\n# for label, t in zip(measures_deployed_str, text[1]):\n# x, y = t.get_position()\n# angle = int(math.degrees(math.atan2(y, x)))\n# ha = \"left\"\n# va = \"bottom\"\n\n# if angle > 90:\n# angle -= 180\n\n# if angle < 0:\n# va = \"top\"\n\n# if -45 <= angle <= 0:\n# ha = \"right\"\n# va = \"bottom\"\n\n# plt.annotate(label, xy=(x,y), rotation=angle, ha=ha, va=va, size=8)\n\n \n \n#plt.tight_layout()\n#plt.savefig('plots/contact_details.png',dpi=300)\nplt.show()\n\n\n\n",
"_____no_output_____"
]
]
] |
[
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code",
"markdown",
"code"
] |
[
[
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code"
],
[
"markdown"
],
[
"code",
"code",
"code",
"code",
"code",
"code"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.