aiphad module
- aiphad.aiphad.make_color_list(u_score_list)[source]
create color list for figure
- Parameters
u_score_list (numpy.ndarray) – uncertainty score
- Returns
hex_color_list – list of hex color
- Return type
list
- class aiphad.aiphad.pdc_sampler(page_type=None, input_data=None, estimation=None, gamma=None, sampling=None, phase_id_option=None, proposal=None, parameter_constraint=None, prev_point=None, multi_method=None, NE_k=None)[source]
Bases:
object
pdc_sampler instance
- Parameters
page_type (string) – specify page type from “two_variables”, “three_variables”, “ternary_section”, “ternary”, and “quaternary_section”
input_data (numpy.ndarray) – label for the phase (“-1” is used at the point with no label)
estimation (string) – specify estimation method from ‘LP’ ,’LS’
sampling (string) – specify sampling method from ‘LC’, ‘MS’, ‘EA’, and ‘RS’
phase_id_option (dict) – label name. e.g. {“Fe”: 0, “Cr”: 1, “Ni”: 2}
proposal (integer) – number of proposals
parameter_constraint (bool) – whether parameter constraint is used / not used
prev_point (list) – previous experimental point
multi_method (string) – specify multi uncertainty score option from ‘OU’ or ‘NE’
NE_k (integer) – exclusion of NE_k nearest neighbors from proposals
- calculate()[source]
calculate with machine learning method (label spreading or label propagation) which is specified by user
- Returns
lp_model (sklearn.semi_supervised._label_spreading.LabelSpreading)
or
sklearn.semi_supervised._label_propagation.LabelPropagation
- cross_selection(prev_data, unlabeled_index_list, data_list)[source]
use option to fix one variable for proposals
- Parameters
prev_data (numpy.ndarray) – previous experimental point
unlabeled_index_list (list) – indexces of uncertain points
data_list (numpy.ndarray) – all data points
- Returns
candidate_index_list (list) – Candicate indexes will be return if there are candidate points such that one variable is not changed.
unlabeled_index_list (list) – Unlabeled indexes will be return if there are no candidate points such that one variable is not changed.
- fit(X=[], y=[])[source]
perform phase diagram estimation using the label propagation method for inputted X and y
- Parameters
X (numpy.ndarray) – data points in phase diagram
y (numpy.ndarray) – label for the phase (“-1” is used at the point with no label)
- make_data(reader)[source]
create label and numeric data from input file or array then convert data list (e.g. a, b, c points to x, y points)
- Parameters
reader (_csv.reader) – all inputs. (input from csv file or array)
- make_data_labelbefore(reader)[source]
create label and numeric data from input file or array
transform from compositions to Cartesian coordinates
- Parameters
reader (_csv.reader) – all inputs (input from csv file or array)
- make_label()[source]
create label automatically depending on input file or value, specifined label or not