<jupyter_start><jupyter_text>Teste dos resultados<jupyter_code>X_valid_keep = X_valid.loc[:,keep_columns]
predictions_valid = pd.DataFrame(m.predict(X_valid_keep))
test_valid = pd.concat([predictions_valid, y_valid], axis=1)
test_valid.to_csv('teste_RF.csv', index=False, float_format='%.1f')
np.mean((np.array(y_valid) - np.concatenate(np.array(predictions_valid)))**2)
accuracy_score(y_valid, predictions_valid)<jupyter_output><empty_output><jupyter_text>Regressão Linear<jupyter_code>from sklearn.linear_model import LinearRegression
lm = LinearRegression()
lm.fit(X_train, y_train)
pred_train = lm.predict(X_valid)
np.mean((np.array(y_valid) - pred_train)**2)
accuracy_score(np.array(y_valid), pred_train)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13937753721244925, 'fraction_numerical': 0.005412719891745603, 'mean_word_length': 11.982456140350877, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '400038', 'license': 'MIT', 'n_tokens_mistral': 291, 'n_tokens_neox': 285, 'n_words': 31, 'path': 'notebooks/Untitled.ipynb', 'repo_name': 'luizfdflores/clients_recommendation_streamlit', 'size': '739'}