Data Views Config Builders

class citrination_client.views.base_data_view_builder.BaseDataViewBuilder(additional_config)

A base class not intended to be instantiated directly.

__init__(additional_config)

Initialize self. See help(type(self)) for accurate signature.

add_formulation_descriptor(descriptor, dataview_client)

Add a formulation descriptor and automatically add ignored ingredient shares, component type and name categorical descriptors.

Parameters
  • descriptor – The formulation descriptor to add

  • dataview_client – The dataview client, this is needed to obtain the ingredient share names

add_raw_descriptor(descriptor)

Add a raw descriptor dictionary object.

Parameters

descriptor – A descriptor as a dictionary

build()

Returns a configuration object suitable for creating a data view.

Returns

See __init__ method for returned dict shape

Return type

:dict

dataset_ids(dataset_ids)

Sets the dataset ids to use for the view

Parameters

dataset_ids – Array of strings, one for each dataset id

get_dagre_graph()

Function to generate a DAGRE graph based on the descriptors and relations added to the builder

model_type(model_type)

Sets the model type for the view

Parameters

model_type – A string of either linear (for a linear model), or default (for Citrine’s default nonlinear model)

class citrination_client.views.data_view_builder.DataViewBuilder

A low dimensional interface for building data views. Choose datasets, add descriptors and other configuration options, then call build() to return the configuration object needed by the data views api

Inherits from the BaseDataViewBuilder

__init__()

Initialize self. See help(type(self)) for accurate signature.

add_descriptor(descriptor, role='ignore', group_by_key=False)

Add a descriptor column.

Parameters
  • descriptor – A Descriptor instance (e.g., RealDescriptor, InorganicDescriptor, etc.)

  • role – Specify a role (input, output, latentVariable, or ignore)

  • group_by_key – Whether or not to group by this key during cross validation

set_role(key, role)

Sets the role of a descriptor

Parameters
  • key (str) – A descriptor key

  • role (str) – (input, output, latentVariable, or ignore)

class citrination_client.views.advanced_data_view_builder.AdvancedDataViewBuilder

A more expressive interface for building data views with machine learning. Choose datasets, add descriptors, and specify relations, then call build() to return the configuration object needed by the data views API.

Inherits from the BaseDataViewBuilder

__init__()

Initialize self. See help(type(self)) for accurate signature.

add_descriptor(descriptor, group_by_key=False)

Add a descriptor column.

Parameters
  • descriptor – A Descriptor instance (e.g., RealDescriptor, InorganicDescriptor, etc.)

  • group_by_key – Whether or not to group by this key during cross validation

add_relation(inputs, output, relation_type='lolo')

Add a manual relation. If no relations are manually added, Citrination will automatically generate relations when the view is created.

Parameters
  • inputs – Array of strings or a single string of descriptor key(s) for the relation inputs

  • output – Single string descriptor key for the relation output

  • relation_type – Kind of relation, currently only ‘lolo’ is supported

class citrination_client.views.descriptors.descriptor.MaterialDescriptor(key, category)
__init__(key, category)

Initialize self. See help(type(self)) for accurate signature.

as_dict()
validate()
class citrination_client.views.descriptors.alloy_composition_descriptor.AlloyCompositionDescriptor(key, balance_element, basis=100, threshold=None)

Bases: citrination_client.views.descriptors.descriptor.MaterialDescriptor

__init__(key, balance_element, basis=100, threshold=None)

Initialize self. See help(type(self)) for accurate signature.

class citrination_client.views.descriptors.categorical_descriptor.CategoricalDescriptor(key, categories=[])

Bases: citrination_client.views.descriptors.descriptor.MaterialDescriptor

__init__(key, categories=[])

Initialize self. See help(type(self)) for accurate signature.

validate()
class citrination_client.views.descriptors.formulation_descriptor.FormulationDescriptor(key)

Bases: citrination_client.views.descriptors.descriptor.MaterialDescriptor

__init__(key)

Initialize self. See help(type(self)) for accurate signature.

class citrination_client.views.descriptors.inorganic_descriptor.InorganicDescriptor(key, threshold=1.0)

Bases: citrination_client.views.descriptors.descriptor.MaterialDescriptor

__init__(key, threshold=1.0)

Initialize self. See help(type(self)) for accurate signature.

class citrination_client.views.descriptors.organic_descriptor.OrganicDescriptor(key)

Bases: citrination_client.views.descriptors.descriptor.MaterialDescriptor

__init__(key)

Initialize self. See help(type(self)) for accurate signature.

class citrination_client.views.descriptors.real_descriptor.RealDescriptor(key, lower_bound, upper_bound, units='')

Bases: citrination_client.views.descriptors.descriptor.MaterialDescriptor

__init__(key, lower_bound, upper_bound, units='')

Initialize self. See help(type(self)) for accurate signature.

validate()