<jupyter_start><jupyter_text>Subir los resultados a KaggleEl objetivo de este notebook es predecir la compra de los usuarios en el dataset *trocafone_kaggle_test.csv* y subir los resultados a kaggle.<jupyter_code>import pandas as pd
import subprocess
import os.path<jupyter_output><empty_output><jupyter_text>Los resultados se pueden subir a través de https://www.kaggle.com/c/trocafone/ o si se tiene instalada api de Kaggle:<jupyter_code>mensaje_de_submit = 'se precide con adaboost'
result = subprocess.run(['kaggle', 'competitions', 'submit', 'trocafone',\
                        '-f', 'predictions.csv', '-m', mensaje_de_submit],\
                        stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if result.returncode != 0:
    raise ValueError(result.stderr.decode('utf-8'))
else:
    print(result.stdout.decode('utf-8'))<jupyter_output>Warning: Your Kaggle API key is readable by otherusers on this system! To fix this, you can run'chmod 600 /home/seba/.kaggle/kaggle.json'
Successfully submitted to Predicting user conversions<jupyter_text>Vemos que score obtuvimos:<jupyter_code>result = subprocess.run(['kaggle', 'competitions', 'submissions', 'trocafone'],\
                        stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if result.returncode != 0:
    raise ValueError(result.stderr.decode('utf-8'))
else:
    print(result.stdout.decode('utf-8'))<jupyter_output>fileName         date                 description                                                     status    publicScore  privateScore  
---------------  -------------------  --------------------------------------------------------------  --------  -----------  ------------  
predictions.csv  2018-11-29 18:16:50  se precide con adaboost                                         complete  0.88072      None          
predictions.csv  2018-11-18 22:21:31  se precide con features de precios                              complete  0.85356      None          
predictions.csv  2018-11-18 17:00:52  se precide con num_round=100                                    complete  0.86243      None          
predictions.csv  2018-11-18 17:00:12  se precide con num_round=1000                                   complete  0.86243      None          
predictions.csv  2018-11-18 16:53:34  se agregan los nuevos features de fran                          complete  0.86340      None          
predictions.csv  201[...]<jupyter_text>Leaderboard:<jupyter_code>result = subprocess.run(['kaggle', 'competitions', 'leaderboard', 'trocafone', '--show'],\
                        stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if result.returncode != 0:
    raise ValueError(result.stderr.decode('utf-8'))
else:
    print(result.stdout.decode('utf-8'))<jupyter_output>teamId  teamName                   submissionDate       score    
-------  -------------------------  -------------------  -------  
2250774  Definitely NOT Trocafone   2018-11-27 15:45:11  0.88259  
2321761  #27 - RandomName           2018-11-29 18:16:50  0.88072  
2436185  Grupo 20                   2018-11-29 06:30:10  0.87890  
2158013  Reduce Map Fast            2018-11-29 17:36:52  0.87486  
2363956  <NAME>               2018-11-29 18:54:40  0.86939  
2160569  Datatouille                2018-11-29 06:44:42  0.86810  
2333633  <NAME>               2018-11-29 16:37:31  0.86734  
2160612  Mistery Data               2018-11-29 12:33:43  0.86636  
2382146  Criminal Data              2018-11-29 15:04:53  0.86444  
2173330  dataPhone                  2018-11-29 00:13:12  0.86349  
2414017  Datolar Blue               2018-11-24 03:51:18  0.86067  
2376912  The beauty and the data    2018-11-29 18:19:17  0.86028  
2441393  DataFlames                 2018-11-29 18:21:31  0.859[...]
{'fraction_non_alphanumeric': 0.13860589812332438, 'fraction_numerical': 0.12734584450402145, 'mean_word_length': 1.8655913978494623, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '405227', 'license': 'MIT', 'n_tokens_mistral': 1462, 'n_tokens_neox': 1161, 'n_words': 269, 'path': 'Subir los resultados.ipynb', 'repo_name': 'seblaz/7506-datos-tp2', 'size': '3742'}