/AIFriendly-ising

AI-Friendly learns the system's equilibrium Magnetization, Energy and Susceptibility for the general problem

Primary LanguagePython

AIFriendly-ising

AI-Friendly learns the system's equilibrium magnetization for the general problem



1) Generating a database

Simulations of the 2d Ising problem with a constant field or arbitrary intensity can be generated by running in the console:

bash generate_dataset.sh

(as it is very CPU-intensive and the final size is smaller than 1Mb it is here provided. An alternative for generating it is running in Google Colab the script called "for_colab.ipynb")

A subproduct of generating the database is generating a graph that presents the four variables of interest as a function of temperature: Energy (E), Magnetization (M), Specific Heat (C) and Susceptibility (X) in western natural reading order respect.


(other 2D and 3D plots are also generated for taking into account the effect of the magnetic field applied to the system)


2) Stating the classification problem


The classification task will be to recognize if the variables of interest exceed a certain threshold. It can be manually set by passing a float between 0 and 1 when training e.g.

If no argument is passed it defaults to 50%.
bash generate_networkfit.sh 0.75

(the threshold for magnetization is applied to the absolute value; e.g. abs(M)> 50% max(M))


3) Results for threshold at 50%


Results will be stored at the gallery, e.g. for the Heat Capacity over the testing set: (left) ROC-curve, (middle) output weights and (right) training metrics.


Another example: AIFriendly is able to detect if the Energy will be higher than the median of the dataset from the field intensity and the temperature


Classification results for the Energy


A view of the geometry that is being parametrized: the Energy is the only variable that is not linearly separable