{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"# What is about ?\n\nFor selected protein e.g. CD36 we compare several simple Ridge based for predicting it:\n\nUse only one feature - own RNA for protein e.g. for CD36 protein  we use CD36 rna - and predict by Ridge only based on that model\n\nUse cell type (one-hot encoded for prediction) \n\nUse cell type + own RNA\n\nUse top 100  PCA feautures as predictors \n","metadata":{}},{"cell_type":"markdown","source":"**34 RNAs out of 140 had overlapping notations (e.g. CD36 and ENSG00000135218_CD36).**　","metadata":{}},{"cell_type":"markdown","source":"# Key Params","metadata":{"execution":{"iopub.status.busy":"2022-12-18T21:18:08.728359Z","iopub.execute_input":"2022-12-18T21:18:08.729709Z","iopub.status.idle":"2022-12-18T21:18:08.735176Z","shell.execute_reply.started":"2022-12-18T21:18:08.729662Z","shell.execute_reply":"2022-12-18T21:18:08.733772Z"}}},{"cell_type":"code","source":"target_name = 'CD36'","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2022-12-19T07:51:20.477847Z","iopub.execute_input":"2022-12-19T07:51:20.479023Z","iopub.status.idle":"2022-12-19T07:51:20.483474Z","shell.execute_reply.started":"2022-12-19T07:51:20.478981Z","shell.execute_reply":"2022-12-19T07:51:20.482050Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Preparations","metadata":{}},{"cell_type":"code","source":"import pandas as pd\n\n# Main results will be stored here: \ndf_scores = pd.DataFrame()","metadata":{"execution":{"iopub.status.busy":"2022-12-19T07:51:20.485326Z","iopub.execute_input":"2022-12-19T07:51:20.486001Z","iopub.status.idle":"2022-12-19T07:51:20.496489Z","shell.execute_reply.started":"2022-12-19T07:51:20.485965Z","shell.execute_reply":"2022-12-19T07:51:20.495216Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\nfrom sklearn.linear_model import Ridge\nfrom sklearn.model_selection import cross_val_score\nfrom sklearn.preprocessing import OneHotEncoder\n\nimport time\nt0start = time.time()\n\nimport os","metadata":{"execution":{"iopub.status.busy":"2022-12-19T07:51:20.498353Z","iopub.execute_input":"2022-12-19T07:51:20.499003Z","iopub.status.idle":"2022-12-19T07:51:21.173357Z","shell.execute_reply.started":"2022-12-19T07:51:20.498970Z","shell.execute_reply":"2022-12-19T07:51:21.172361Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Load data for target","metadata":{}},{"cell_type":"code","source":"%%time\ndf_y = pd.read_hdf('/kaggle/input/open-problems-multimodal/train_cite_targets.h5')\ndf_y","metadata":{"execution":{"iopub.status.busy":"2022-12-19T07:51:21.174672Z","iopub.execute_input":"2022-12-19T07:51:21.175047Z","iopub.status.idle":"2022-12-19T07:51:22.016149Z","shell.execute_reply.started":"2022-12-19T07:51:21.175016Z","shell.execute_reply":"2022-12-19T07:51:22.014790Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"y = df_y[target_name]\ny","metadata":{"execution":{"iopub.status.busy":"2022-12-19T07:51:22.019180Z","iopub.execute_input":"2022-12-19T07:51:22.019971Z","iopub.status.idle":"2022-12-19T07:51:22.043381Z","shell.execute_reply.started":"2022-12-19T07:51:22.019924Z","shell.execute_reply":"2022-12-19T07:51:22.041616Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_scores.loc['Mean', target_name ]  = np.mean(y)\ndf_scores.loc['Std', target_name ]  = np.std(y)\ndf_scores","metadata":{"execution":{"iopub.status.busy":"2022-12-19T07:51:22.044970Z","iopub.execute_input":"2022-12-19T07:51:22.045317Z","iopub.status.idle":"2022-12-19T07:51:22.068323Z","shell.execute_reply.started":"2022-12-19T07:51:22.045286Z","shell.execute_reply":"2022-12-19T07:51:22.067031Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def df_scores(target_name):\n    df_scores = pd.DataFrame()\n    y = df_y[target_name]\n    df_scores.loc['Mean', target_name ]  = np.mean(y)\n    df_scores.loc['Std', target_name ]  = np.std(y)\n    return(df_scores)","metadata":{"execution":{"iopub.status.busy":"2022-12-19T07:51:22.069874Z","iopub.execute_input":"2022-12-19T07:51:22.070224Z","iopub.status.idle":"2022-12-19T07:51:22.076740Z","shell.execute_reply.started":"2022-12-19T07:51:22.070195Z","shell.execute_reply":"2022-12-19T07:51:22.075472Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_scores(\"CD86\")","metadata":{"execution":{"iopub.status.busy":"2022-12-19T07:51:22.078625Z","iopub.execute_input":"2022-12-19T07:51:22.079021Z","iopub.status.idle":"2022-12-19T07:51:22.097146Z","shell.execute_reply.started":"2022-12-19T07:51:22.078988Z","shell.execute_reply":"2022-12-19T07:51:22.095819Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"list_test = df_y.columns\nprint(list_test)","metadata":{"execution":{"iopub.status.busy":"2022-12-19T07:51:22.098570Z","iopub.execute_input":"2022-12-19T07:51:22.098926Z","iopub.status.idle":"2022-12-19T07:51:22.105430Z","shell.execute_reply.started":"2022-12-19T07:51:22.098893Z","shell.execute_reply":"2022-12-19T07:51:22.104113Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"list_test_m = list(map(df_scores, list_test))","metadata":{"execution":{"iopub.status.busy":"2022-12-19T07:55:02.774052Z","iopub.execute_input":"2022-12-19T07:55:02.774448Z","iopub.status.idle":"2022-12-19T07:55:03.129100Z","shell.execute_reply.started":"2022-12-19T07:55:02.774415Z","shell.execute_reply":"2022-12-19T07:55:03.127478Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"values = np.array(list_test_m).reshape(-1,2).T.tolist()","metadata":{"execution":{"iopub.status.busy":"2022-12-19T08:10:06.690251Z","iopub.execute_input":"2022-12-19T08:10:06.690645Z","iopub.status.idle":"2022-12-19T08:10:06.697564Z","shell.execute_reply.started":"2022-12-19T08:10:06.690614Z","shell.execute_reply":"2022-12-19T08:10:06.696807Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"Df_scores = pd.DataFrame(values,index=['Mean','Std'],columns=df_y.columns)\nDf_scores","metadata":{"execution":{"iopub.status.busy":"2022-12-19T08:11:28.824079Z","iopub.execute_input":"2022-12-19T08:11:28.824452Z","iopub.status.idle":"2022-12-19T08:11:28.852834Z","shell.execute_reply.started":"2022-12-19T08:11:28.824424Z","shell.execute_reply":"2022-12-19T08:11:28.851797Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#  Predicting based on -  own RNA \n\ne.g. for CD36 protein we take CD36 as the only predictor ","metadata":{}},{"cell_type":"code","source":"%%time\ndf_rna = pd.read_hdf('/kaggle/input/open-problems-multimodal/train_cite_inputs.h5')\ndisplay(df_rna) ","metadata":{"execution":{"iopub.status.busy":"2022-12-19T08:20:15.378583Z","iopub.execute_input":"2022-12-19T08:20:15.378994Z","iopub.status.idle":"2022-12-19T08:20:48.201387Z","shell.execute_reply.started":"2022-12-19T08:20:15.378959Z","shell.execute_reply":"2022-12-19T08:20:48.200072Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"RNA_list = []\nfor t in df_rna.columns:\n    for u in list_test:\n        if t.split('_')[1] == u:\n            RNA_list.append(t)","metadata":{"execution":{"iopub.status.busy":"2022-12-19T08:53:16.517800Z","iopub.execute_input":"2022-12-19T08:53:16.518225Z","iopub.status.idle":"2022-12-19T08:53:17.765379Z","shell.execute_reply.started":"2022-12-19T08:53:16.518190Z","shell.execute_reply":"2022-12-19T08:53:17.764464Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"RNA_list","metadata":{"execution":{"iopub.status.busy":"2022-12-19T08:53:18.816795Z","iopub.execute_input":"2022-12-19T08:53:18.817656Z","iopub.status.idle":"2022-12-19T08:53:18.824276Z","shell.execute_reply.started":"2022-12-19T08:53:18.817614Z","shell.execute_reply":"2022-12-19T08:53:18.823497Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"%%time\nfrom sklearn.linear_model import RidgeCV\nfrom sklearn.linear_model import Ridge\nfrom sklearn.model_selection import cross_val_predict\nfrom sklearn.model_selection import KFold \nfrom sklearn.metrics import r2_score\nfrom sklearn.metrics import mean_squared_error","metadata":{"execution":{"iopub.status.busy":"2022-12-19T09:16:31.154516Z","iopub.execute_input":"2022-12-19T09:16:31.154950Z","iopub.status.idle":"2022-12-19T09:16:31.162265Z","shell.execute_reply.started":"2022-12-19T09:16:31.154914Z","shell.execute_reply":"2022-12-19T09:16:31.161267Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_scores_2 = pd.DataFrame()\nfor rna_name in RNA_list:\n    X = df_rna[[rna_name]]\n    y = df_y[rna_name.split('_')[1]]\n    \n    s = np.corrcoef(y,X.iloc[:,0])[0,1]\n    df_scores_2.loc['Corr ownRNA', rna_name.split('_')[1] ]  = s\n    \n    model = RidgeCV(alphas=[1e-1, 1, 1e1,1e2,1e3,1e4,1e5]).fit(X, y)\n    alpha_selected = model.alpha_\n\n    model = Ridge(alpha = alpha_selected )\n    kf = KFold(n_splits=3,  shuffle=True, random_state= 0 )\n    y_pred = cross_val_predict(model, X, y, cv=kf)\n    s1 = r2_score(y,y_pred)\n    df_scores_2.loc['r2 Ridge ownRNA', rna_name.split('_')[1] ]  = s1\n    s2 = np.corrcoef(y,y_pred)[0,1]\n    df_scores_2.loc['Corr Ridge ownRNA', rna_name.split('_')[1] ]  = s2\n    s3 = mean_squared_error(y,y_pred, squared=False) # squared=False -> RMSE, not MSE \n    df_scores_2.loc['RMSE Ridge ownRNA', rna_name.split('_')[1] ]  = s3\ndf_scores_2","metadata":{"execution":{"iopub.status.busy":"2022-12-19T09:19:13.573305Z","iopub.execute_input":"2022-12-19T09:19:13.573783Z","iopub.status.idle":"2022-12-19T09:19:18.577064Z","shell.execute_reply.started":"2022-12-19T09:19:13.573726Z","shell.execute_reply":"2022-12-19T09:19:18.575766Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#  Predicting based on - cell type information ","metadata":{}},{"cell_type":"code","source":"%%time\ndf_meta = pd.read_csv('/kaggle/input/feature-shop-for-multimodal-singlecell-competition/_citeseq_meta_all_text_also.csv', index_col = 0 )\ndf_meta = df_meta[df_meta['Train0OrTest1']==0]\ndf_meta","metadata":{"execution":{"iopub.status.busy":"2022-12-19T09:20:46.359732Z","iopub.execute_input":"2022-12-19T09:20:46.360154Z","iopub.status.idle":"2022-12-19T09:20:46.646207Z","shell.execute_reply.started":"2022-12-19T09:20:46.360121Z","shell.execute_reply":"2022-12-19T09:20:46.645417Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"X = df_meta[['HSC cell_type', 'EryP cell_type', 'NeuP cell_type','MasP cell_type', 'MkP cell_type', 'BP cell_type', 'MoP cell_type' ]]\nX ","metadata":{"execution":{"iopub.status.busy":"2022-12-19T09:20:50.909956Z","iopub.execute_input":"2022-12-19T09:20:50.910659Z","iopub.status.idle":"2022-12-19T09:20:50.927264Z","shell.execute_reply.started":"2022-12-19T09:20:50.910621Z","shell.execute_reply":"2022-12-19T09:20:50.926206Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"%%time\nfrom sklearn.linear_model import RidgeCV\nfrom sklearn.linear_model import Ridge\nfrom sklearn.model_selection import cross_val_predict\nfrom sklearn.model_selection import KFold \nfrom sklearn.metrics import r2_score\nfrom sklearn.metrics import mean_squared_error","metadata":{"execution":{"iopub.status.busy":"2022-12-19T09:21:06.833976Z","iopub.execute_input":"2022-12-19T09:21:06.834379Z","iopub.status.idle":"2022-12-19T09:21:06.841079Z","shell.execute_reply.started":"2022-12-19T09:21:06.834340Z","shell.execute_reply":"2022-12-19T09:21:06.839787Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_scores_3 = pd.DataFrame()\nfor rna_name in RNA_list:\n    X = df_meta[['HSC cell_type', 'EryP cell_type', 'NeuP cell_type','MasP cell_type', 'MkP cell_type', 'BP cell_type', 'MoP cell_type' ]]\n    y = df_y[rna_name.split('_')[1]]\n    \n    model = RidgeCV(alphas=[1e-1, 1, 1e1,1e2,1e3,1e4,1e5]).fit(X, y)\n    alpha_selected = model.alpha_\n\n    model = Ridge(alpha = alpha_selected )\n    kf = KFold(n_splits=3,  shuffle=True, random_state= 0 )\n    y_pred = cross_val_predict(model, X, y, cv=kf)\n    s = r2_score(y,y_pred)\n    df_scores_3.loc['r2 Ridge cell types', rna_name.split('_')[1]  ]  = s\n    s = np.corrcoef(y,y_pred)[0,1]\n    df_scores_3.loc['Corr Ridge cell types', rna_name.split('_')[1]  ]  = s\n    s = mean_squared_error(y,y_pred, squared=False) # squared=False -> RMSE, not MSE \n    df_scores_3.loc['RMSE Ridge cell types', rna_name.split('_')[1]  ]  = s\n\n\ndf_scores_3","metadata":{"execution":{"iopub.status.busy":"2022-12-19T09:24:22.213549Z","iopub.execute_input":"2022-12-19T09:24:22.214128Z","iopub.status.idle":"2022-12-19T09:24:30.135595Z","shell.execute_reply.started":"2022-12-19T09:24:22.214080Z","shell.execute_reply":"2022-12-19T09:24:30.132733Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Predicting based on - cell type +  own RNA \n\n(own RNA -   RNA corresponding to the protein, e.g. for CD36 we take CD36  )","metadata":{}},{"cell_type":"code","source":"%%time\nfrom sklearn.linear_model import RidgeCV\nfrom sklearn.linear_model import Ridge\nfrom sklearn.model_selection import cross_val_predict\nfrom sklearn.model_selection import KFold \nfrom sklearn.metrics import r2_score\nfrom sklearn.metrics import mean_absolute_error\nfrom sklearn.metrics import mean_squared_error","metadata":{"execution":{"iopub.status.busy":"2022-12-19T09:25:38.118883Z","iopub.execute_input":"2022-12-19T09:25:38.119460Z","iopub.status.idle":"2022-12-19T09:25:38.127215Z","shell.execute_reply.started":"2022-12-19T09:25:38.119419Z","shell.execute_reply":"2022-12-19T09:25:38.125916Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_scores_4 = pd.DataFrame()\nfor rna_name in RNA_list:\n    df_tmp = df_meta[['HSC cell_type', 'EryP cell_type', 'NeuP cell_type','MasP cell_type', 'MkP cell_type', 'BP cell_type', 'MoP cell_type' ]]\n    X = pd.concat([ df_rna[[rna_name]],  df_tmp ], axis = 1)\n    y = df_y[rna_name.split('_')[1]]\n    \n    model = RidgeCV(alphas=[1e-1, 1, 1e1,1e2,1e3,1e4,1e5]).fit(X, y)\n    alpha_selected = model.alpha_\n\n    model = Ridge(alpha = alpha_selected )\n    kf = KFold(n_splits=3,  shuffle=True, random_state= 0 )\n    y_pred = cross_val_predict(model, X, y, cv=kf)\n    s = r2_score(y,y_pred)\n    df_scores_4.loc['r2 Ridge CT + ownRNA', rna_name.split('_')[1]  ]  = s\n    s = np.corrcoef(y,y_pred)[0,1]\n    df_scores_4.loc['Corr Ridge CT + ownRNA', rna_name.split('_')[1]  ]  = s\n    s = mean_squared_error(y,y_pred, squared=False) # squared=False -> RMSE, not MSE \n    df_scores_4.loc['RMSE Ridge CT + ownRNA', rna_name.split('_')[1]  ]  = s\n\n\ndf_scores_4","metadata":{"execution":{"iopub.status.busy":"2022-12-19T09:33:01.902601Z","iopub.execute_input":"2022-12-19T09:33:01.903551Z","iopub.status.idle":"2022-12-19T09:33:11.346619Z","shell.execute_reply.started":"2022-12-19T09:33:01.903487Z","shell.execute_reply":"2022-12-19T09:33:11.344904Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_tmp = df_meta[['HSC cell_type', 'EryP cell_type', 'NeuP cell_type','MasP cell_type', 'MkP cell_type', 'BP cell_type', 'MoP cell_type' ]]\nX = pd.concat([ df_rna[[rna_name]],  df_tmp ], axis = 1)","metadata":{"execution":{"iopub.status.busy":"2022-12-18T21:30:04.45418Z","iopub.execute_input":"2022-12-18T21:30:04.45504Z","iopub.status.idle":"2022-12-18T21:30:04.513498Z","shell.execute_reply.started":"2022-12-18T21:30:04.454978Z","shell.execute_reply":"2022-12-18T21:30:04.511896Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Predicting based on PCA top 100 features","metadata":{}},{"cell_type":"code","source":"%%time\ndf_pca = pd.read_csv('/kaggle/input/feature-shop-for-multimodal-singlecell-competition/citeseq_train_and_test_PCA200.csv', index_col = 0 )\ndf_pca","metadata":{"execution":{"iopub.status.busy":"2022-12-19T09:27:27.596891Z","iopub.execute_input":"2022-12-19T09:27:27.597276Z","iopub.status.idle":"2022-12-19T09:27:35.685010Z","shell.execute_reply.started":"2022-12-19T09:27:27.597244Z","shell.execute_reply":"2022-12-19T09:27:35.683976Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_scores_5 = pd.DataFrame()\nfor rna_name in RNA_list:\n    df_tmp = df_meta[['HSC cell_type', 'EryP cell_type', 'NeuP cell_type','MasP cell_type', 'MkP cell_type', 'BP cell_type', 'MoP cell_type' ]]\n    X = df_pca.iloc[:len(y), :100]\n    y = df_y[rna_name.split('_')[1]]\n    \n    model = RidgeCV(alphas=[1e-1, 1, 1e1,1e2,1e3,1e4,1e5]).fit(X, y)\n    alpha_selected = model.alpha_\n\n    model = Ridge(alpha = alpha_selected )\n    kf = KFold(n_splits=3,  shuffle=True, random_state= 0 )\n    y_pred = cross_val_predict(model, X, y, cv=kf)\n    s = r2_score(y,y_pred)\n    df_scores_5.loc['r2 Ridge pca100', rna_name.split('_')[1]  ]  = s\n    s = np.corrcoef(y,y_pred)[0,1]\n    df_scores_5.loc['Corr Ridge pca100', rna_name.split('_')[1]  ]  = s\n    s = mean_squared_error(y,y_pred, squared=False) # squared=False -> RMSE, not MSE \n    df_scores_5.loc['RMSE Ridge pca100', rna_name.split('_')[1]  ]  = s\n\n\ndf_scores_5","metadata":{"execution":{"iopub.status.busy":"2022-12-19T09:32:00.215056Z","iopub.execute_input":"2022-12-19T09:32:00.215474Z","iopub.status.idle":"2022-12-19T09:33:01.895433Z","shell.execute_reply.started":"2022-12-19T09:32:00.215440Z","shell.execute_reply":"2022-12-19T09:33:01.893937Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"**Merge DataFrame**","metadata":{}},{"cell_type":"code","source":"DF = pd.concat([Df_scores, df_scores_2, df_scores_3, df_scores_4, df_scores_5],axis=0)\nDF","metadata":{"execution":{"iopub.status.busy":"2022-12-19T09:35:28.420915Z","iopub.execute_input":"2022-12-19T09:35:28.421361Z","iopub.status.idle":"2022-12-19T09:35:28.470644Z","shell.execute_reply.started":"2022-12-19T09:35:28.421323Z","shell.execute_reply":"2022-12-19T09:35:28.469570Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"DF['CD36']","metadata":{"execution":{"iopub.status.busy":"2022-12-19T09:35:55.689218Z","iopub.execute_input":"2022-12-19T09:35:55.690366Z","iopub.status.idle":"2022-12-19T09:35:55.698064Z","shell.execute_reply.started":"2022-12-19T09:35:55.690314Z","shell.execute_reply":"2022-12-19T09:35:55.697274Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"DF.to_csv('Scores_all_proteins.csv')","metadata":{"execution":{"iopub.status.busy":"2022-12-18T21:30:11.17413Z","iopub.execute_input":"2022-12-18T21:30:11.174601Z","iopub.status.idle":"2022-12-18T21:30:11.185536Z","shell.execute_reply.started":"2022-12-18T21:30:11.174538Z","shell.execute_reply":"2022-12-18T21:30:11.184022Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"t = time.time()-t0start\nprint('%.1f hours  = %.1f minutes = %.1f seconds passed total '%( t/3600,t/60, t ) )","metadata":{"execution":{"iopub.status.busy":"2022-12-18T21:33:15.600758Z","iopub.execute_input":"2022-12-18T21:33:15.601173Z","iopub.status.idle":"2022-12-18T21:33:15.608624Z","shell.execute_reply.started":"2022-12-18T21:33:15.601141Z","shell.execute_reply":"2022-12-18T21:33:15.60733Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}