<jupyter_start><jupyter_text>Welcome to Jupyter!<jupyter_code>import pandas as pd
from matplotlib import pyplot as plt
%matplotlib inline
import numpy as np
df = pd.read_csv("insurance_data.csv")
df.head()
plt.scatter(df.age, df.bought_insurance, marker='+', color='red')
from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(df[['age']], df.bought_insurance, test_size=0.1)
X_test
X_train
from sklearn.linear_model import LogisticRegression
model = LogisticRegression()
model.fit(X_train, y_train)
model.predict(X_test)
model.score(X_test, y_test)
model.predict_proba(X_test)
model.predict(np.array([56]).reshape(1, 1))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12125534950071326, 'fraction_numerical': 0.008559201141226819, 'mean_word_length': 8.75, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '647818', 'license': 'MIT', 'n_tokens_mistral': 273, 'n_tokens_neox': 268, 'n_words': 52, 'path': 'LogisticRegressionInsuranceData.ipynb', 'repo_name': 'Zumran58/Kmeans-and-logistic-regression', 'size': '701'}