{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.11.13","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"none","dataSources":[{"sourceId":116062,"databundleVersionId":14084779,"sourceType":"competition"},{"sourceId":13794373,"sourceType":"datasetVersion","datasetId":8782279}],"dockerImageVersionId":31192,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":false}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"**CAFA 6 | Multi-Model Blend with Noise**\n\n**Approach:** Weighted ensemble of multiple prediction models with added uniform noise for diversity.\n\n**Acknowledgments:** Thanks to Guntas Dhanjal, whose work made this blend possible.","metadata":{}},{"cell_type":"code","source":"import pandas as pd\nimport numpy as np\n\nprint(\"Loading saved submission...\")\n\n# Load saved file\ndf = pd.read_csv('/kaggle/input/my-cafa6-submission/submission.tsv',\n                 sep='\\t', header=None,\n                 names=['protein', 'go_term', 'score'])\n\nprint(f\"Loaded: {len(df):,} predictions\")\n\n# Noise level \nNOISE_LEVEL = 0.015\n\n# Add noise\ndf['score'] = df['score'] + np.random.uniform(-NOISE_LEVEL, NOISE_LEVEL, size=len(df))\n\n# Keep score in [0, 1]\ndf['score'] = df['score'].clip(0, 1)\n\n# Save new submission\ndf.to_csv('submission.tsv', sep='\\t', index=False, header=False)\n\nprint(\"✓ Submission ready with noise level 0.02 (same as ensemble)\")\n","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true,"execution":{"iopub.status.busy":"2025-11-19T16:48:29.945302Z","iopub.execute_input":"2025-11-19T16:48:29.945601Z","iopub.status.idle":"2025-11-19T16:51:27.12775Z","shell.execute_reply.started":"2025-11-19T16:48:29.945573Z","shell.execute_reply":"2025-11-19T16:51:27.126276Z"}},"outputs":[],"execution_count":null}]}