<jupyter_start><jupyter_text>Loading scaler and MLP<jupyter_code>with open('Blazhko-BLG-StandardScaler.pkl', 'rb') as fid:
    clf_sca = pickle.load(fid)
    
with open('MLP-Blazhko-BLG.pkl', 'rb') as fid:
    clf_cla = pickle.load(fid)<jupyter_output><empty_output><jupyter_text>Photometric data from the OGLE survey for the Galactic bulge<jupyter_code># http://www.astrouw.edu.pl/ogle/ogle4/OCVS/blg/rrlyr/RRab.dat
# --- with replaced "-" by 0.0

data = ascii.read("RRab.dat")

## Header ## 
## ID I V Per ePer M0 Amp R21 phi21 R31 phi31 ##

per = data["col4"]
amp = data["col7"]
r21 = data["col8"]
phi21 = data["col9"]
r31 = data["col10"]
phi31 = data["col11"]

test_sample = np.vstack([per, amp, r21, phi21, r31, phi31]).T<jupyter_output><empty_output><jupyter_text>MLP Magic<jupyter_code>X_test_scaled = clf_sca.transform(test_sample)
y_scoreMLP = clf_cla.predict(X_test_scaled)
y_scoreMLP_proba = clf_cla.predict_proba(X_test_scaled)
%matplotlib

plt.scatter(r31[np.where(y_scoreMLP == 0)], phi21[np.where(y_scoreMLP == 0)], 
            s=1,zorder=-100, c="C3", label="Modulated-class")
plt.scatter(r31[np.where(y_scoreMLP == 1)], phi21[np.where(y_scoreMLP == 1)], 
            s=1, c="C0", label="Non-modulated-class")
plt.legend()
plt.show()<jupyter_output>Using matplotlib backend: Qt5Agg<jupyter_text>Writting stuff<jupyter_code>data["Class"] = y_scoreMLP
data["ClassProba_0"] = y_scoreMLP_proba[:,0]
data["ClassProba_1"] = y_scoreMLP_proba[:,1]
data.write('RRab-classified.dat', overwrite=True, format="ascii")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16688144329896906, 'fraction_numerical': 0.03865979381443299, 'mean_word_length': 6.123853211009174, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, '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': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '168765', 'license': 'MIT', 'n_tokens_mistral': 717, 'n_tokens_neox': 675, 'n_words': 99, 'path': 'Classification game.ipynb', 'repo_name': 'ZdenekPrudil/Detection-of-the-Blazhko-effect', 'size': '1552'}