Phase diagram construction using a csv file

How to create a csv file

Instead of inputting the data as an array, we can obtain the proposals using a prepared csv file. The type of a csv file which can be inputed to AIPHAD is explained.

For example, when investigating a two-variable phase diagram (two-dimensional phase diagram), the following table is used as a csv file.

X

Y

phase

300

0

300

1

:

:

:

300

10

a

350

0

350

1

:

:

:

350

10

400

0

b

400

1

:

:

:

400

10

:

:

:

700

0

700

1

:

:

:

700

10

In the top row, the name of each variable can be noted. From the left, the name of the variable is written (in the above example, “X” and “Y”). If we increase the number of variables, we need to increase the column. In the last column, the text of “phase” is entered.

From the next row, all candidate points in the discretized phase diagram are described. There are no blanks in the variable columns. On the other hand, if the candidate point has a label name (if the phase is identified), the label name is specified on the far right column. In the above example, “a” and “b” are entered, but we can specify either the phase name or an integer index. Note that even if we enter an integer value, it will be treated as text, so the handling is different from General d-dimensional (d-variable) phase diagram .

The order of the labels can be found below.

print("label_name :", pdc.phase_id_dict.items())

Execution using csv file

When reading a csv file and creating a phase diagram, the csv file is specified as follows. The following code corresponds to the case where the prepared csv file is data.csv.

pdc  = pdc_sampler(estimation = "LP", sampling = "LC", proposal = 1, input_data = "data.csv")

pdc.fit()
pdc.us()

We do not need to give X and y to pdc.fit() because the data is already specified by a csv file. Since the name of the phase can be written in the csv file, it is not possible to specify the name using phase_id_option.