{"cells":[{"metadata":{"trusted":true},"cell_type":"code","source":"#Let p be probability of fake.\n#When 0.4 is assign to all output we get a result of: 0.71355\n#So p log 0.4 + (1-p) log 0.6 = -0.71355\n#Or p log (0.6667) = 0.71355 - log 0.6 = -0.20272437623\n#or p = 0.499979831 That is on final dataset there is a 50-50 split of fake and real videos!","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true},"cell_type":"markdown","source":"In this notebook, I am simply making a submission which assigns 0.5 probability for each video.\nSadly when I submit it it errors: \"Status: Submission Scoring Error\"\n\nI believe it has something to do with the way I am taking input.\n\n\nCould someone please helpm me fix this?\n\nThanks"},{"metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true},"cell_type":"code","source":"import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\n# Input data files are available in the \"../input/\" directory.\n# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\n\nimport os\n#print(\"Starting\")\n#for dirname, _, filenames in os.walk('./'):\n#    for filename in filenames:\n#        print(os.path.join(dirname, filename))\n\n# Any results you write to the current directory are saved as output.\n\nimport zipfile\nimport csv","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"testVidPath = \"/kaggle/input/deepfake-detection-challenge/test_videos/\"","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"mylist = []\nfor _, _, files in os.walk(testVidPath):\n    for fName in files:\n        if not fName.endswith(\"mp4\"):\n            continue\n        vidId = fName.split(\"/\")[-1]#.split(\".\")[0]\n        mylist.append(vidId)","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"df = pd.DataFrame(data={\"filename\": mylist, \"label\": [0.4]*len(mylist)})\ndf.to_csv(\"./submission.csv\", sep=',',index=False)","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"","execution_count":null,"outputs":[]}],"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":4,"nbformat_minor":1}