<jupyter_start><jupyter_text>Interpretation<jupyter_code>r8 = pd.read_csv('posinf8_500_readings.csv')
from sklearn.neural_network import MLPRegressor
from sklearn.preprocessing import StandardScaler
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestRegressor

X_train, X_test, y_train, y_test = train_test_split(r8[[str(i) for i in range(72)]], r8['X'])

regr = RandomForestRegressor(max_depth=5, random_state=0)
regr.fit(X_train, y_train)
plt.scatter(y_train, regr.predict(X_train), alpha=0.3)
plt.scatter(y_test, regr.predict(X_test).clip(0, 5), alpha=0.6)
plt.plot([1, 2, 3, 4, 5], [1, 2, 3, 4, 5])
from sklearn.metrics import mean_absolute_error
mean_absolute_error(y_test, regr.predict(X_test))
math.sqrt(np.mean((regr.predict(X_test) - y_test) ** 2))
scaler = StandardScaler()
scaler.fit(X_train)
X_train = scaler.transform(X_train)
X_test = scaler.transform(X_test)

mlpc = MLPRegressor(hidden_layer_sizes=(20, 20, 20), max_iter=100)
mlpc.fit(X_train, y_train)

plt.scatter(y_train, mlpc.predict(X_train), alpha=0.3)
plt.scatter(y_test, mlpc.predict(X_test).clip(0, 5), alpha=0.6)
plt.plot([1, 2, 3, 4, 5], [1, 2, 3, 4, 5])
math.sqrt(np.mean((mlpc.predict(X_test) - y_test) ** 2))
A = (np.abs(regr.predict(X_test) - y_test)/5).tolist()
np.mean(A)
import seaborn as sns
xe = A
ax = sns.distplot(xe);
ax.set_xlabel('Error relative to radius')
ax.set_ylabel('Occurence')
plt.savefig('ring_of_8_error_distribution.png')
plt.scatter(r8['Y'], r8['39'], alpha=0.3)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16059817945383614, 'fraction_numerical': 0.04031209362808843, 'mean_word_length': 7.409836065573771, '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': '351181', 'license': 'MIT', 'n_tokens_mistral': 697, 'n_tokens_neox': 651, 'n_words': 114, 'path': 'Summary Notebooks/Summary - Position Inference.ipynb', 'repo_name': 'johnowhitaker/CIRTS', 'size': '1538'}