{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.12.12","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"gpu","dataSources":[{"sourceId":118765,"databundleVersionId":15231210,"sourceType":"competition"},{"sourceId":752789,"sourceType":"modelInstanceVersion","isSourceIdPinned":true,"modelInstanceId":574789,"modelId":587114}],"dockerImageVersionId":31259,"isInternetEnabled":false,"language":"python","sourceType":"notebook","isGpuEnabled":true}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"# 📑 Introduction\n**The Stanford RNA 3D Folding Part 2 Competition serves as a global platform that challenges participants to apply computational methods in predicting RNA three-dimensional structures. This competition not only highlights the importance of RNA folding in biological research but also encourages innovation in algorithm design and scientific collaboration.**\n\n# 🔍 Background of the Competition\n**RNA molecules play a crucial role in cellular processes, and their biological functions are determined by their three-dimensional structures. However, predicting RNA folding remains a complex problem due to the vast conformational space and computational limitations. The Stanford competition was established to accelerate progress in this field by motivating researchers to explore novel approaches, share insights, and push the boundaries of bioinformatics and structural biology.**\n\n# 🎯 Research Objectives & Challenges \n**The objective of this research is to design and refine computational models that can accurately predict RNA 3D structures under competitive conditions. The main challenges include achieving high accuracy while maintaining computational efficiency, integrating energy-based and constraint-driven methods, and validating predictions against experimental data. By addressing these challenges, the competition aims to advance RNA structural prediction and contribute to future applications in molecular medicine, drug discovery, and synthetic biology.**\n\n","metadata":{}},{"cell_type":"code","source":"import datetime       \nimport logging        \nimport random         \nimport numpy as np    \nfrom sklearn.metrics import accuracy_score, f1_score\nfrom sklearn.model_selection import train_test_split  \nfrom sklearn.linear_model import LogisticRegression   \n\n# Konfigurasi logging\nlogging.basicConfig(filename=\"submission_log.txt\",\n                    level=logging.INFO,\n                    format=\"%(asctime)s - %(message)s\")\n\nclass RNAClassificationStatus:\n    def __init__(self):\n        self.latest_score = None\n        self.best_score = None\n        self.daily_submissions = 0\n        self.max_submissions = 5\n\n    def submit(self, score):\n        if self.daily_submissions == 0:\n            self.latest_score = score\n            self.best_score = max(self.best_score or score, score)\n            self.daily_submissions += 1\n            print(f\"Submission 1 accepted. Score: {score}\")\n            logging.info(f\"Submission 1 accepted. Score: {score}\")\n        elif self.daily_submissions == 1:\n            self.latest_score = score\n            self.best_score = max(self.best_score, score)\n            self.daily_submissions += 1\n            print(f\"Submission 2 accepted. Score: {score}\")\n            logging.info(f\"Submission 2 accepted. Score: {score}\")\n        elif self.daily_submissions == 2:\n            self.latest_score = score\n            self.best_score = max(self.best_score, score)\n            self.daily_submissions += 1\n            print(f\"Submission 3 accepted. Score: {score}\")\n            logging.info(f\"Submission 3 accepted. Score: {score}\")\n        elif self.daily_submissions == 3:\n            self.latest_score = score\n            self.best_score = max(self.best_score, score)\n            self.daily_submissions += 1\n            print(f\"Submission 4 accepted. Score: {score}\")\n            logging.info(f\"Submission 4 accepted. Score: {score}\")\n        elif self.daily_submissions == 4:\n            self.latest_score = score\n            self.best_score = max(self.best_score, score)\n            self.daily_submissions += 1\n            print(f\"Submission 5 accepted. Score: {score}\")\n            logging.info(f\"Submission 5 accepted. Score: {score}\")\n        else:\n            print(\"Daily submission limit reached.\")\n            logging.warning(\"Daily submission limit reached.\")\n\n    def display_status(self):\n        print(\"=== Fold Wars: Stanford RNA 3D Challenge Part 2 ===\")\n        print(f\"Latest Score     : {self.latest_score if self.latest_score is not None else '-'}\")\n        print(f\"Best Score       : {self.best_score if self.best_score is not None else '-'}\")\n        print(f\"Daily Submissions: {self.daily_submissions} / {self.max_submissions} used\")\n        logging.info(f\"Status checked: Latest={self.latest_score}, Best={self.best_score}, Submissions={self.daily_submissions}\")\n\n\n\nchallenge = RNAClassificationStatus()\nchallenge.display_status()\n\n\nX = np.random.rand(100, 5)\ny = np.random.randint(0, 2, 100)\n\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)\nmodel = LogisticRegression()\nmodel.fit(X_train, y_train)\ny_pred = model.predict(X_test)\n\nscore = accuracy_score(y_test, y_pred) * 100\nchallenge.submit(score)\nchallenge.display_status()","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true,"execution":{"iopub.status.busy":"2026-02-16T01:59:35.505423Z","iopub.execute_input":"2026-02-16T01:59:35.506382Z","iopub.status.idle":"2026-02-16T01:59:36.902846Z","shell.execute_reply.started":"2026-02-16T01:59:35.506348Z","shell.execute_reply":"2026-02-16T01:59:36.90137Z"}},"outputs":[],"execution_count":null}]}