<jupyter_start><jupyter_text>Cargar datos<jupyter_code>df = pd.read_csv('sexo.csv')
df.head()<jupyter_output><empty_output><jupyter_text>Obtener subconjunto de atributos<jupyter_code>data=df.values[:,1:4]
data<jupyter_output><empty_output><jupyter_text>Obtener subconjunto de clases<jupyter_code>target=df.values[:,0]
target<jupyter_output><empty_output><jupyter_text>Entrenar modelo<jupyter_code>gnb = GaussianNB()
gnb.fit(data, target)

pred = [6,190,9]
y_pred = gnb.predict([pred])
y_pred<jupyter_output><empty_output><jupyter_text>Realizar prediccionesSe quieren clasificar los siguientes ejemplos:    - Estatura: 5- Peso: 120- Pie: 7- Estatura: 6.5- Peso: 160- Pie: 9- Estatura: 5.5- Peso: 130- Pie: 6<jupyter_code>pred = [[5,120,7],[6.5,160,9],[5.5,130,6]]
y_pred = gnb.predict(pred)
y_pred<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15375302663438256, 'fraction_numerical': 0.05084745762711865, 'mean_word_length': 9.209876543209877, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '593626', 'license': 'Apache-2.0', 'n_tokens_mistral': 392, 'n_tokens_neox': 368, 'n_words': 49, 'path': 'tp3/Sexo.ipynb', 'repo_name': 'xRUIZxMATIASx/inteligencia-artificial', 'size': '826'}