Objects of this class act as Model factories
Model class
Objects of this class represent a cluster expansion model.
Parameters:
basis
: string (Default: "trigonometric"
)Basis set used to calculate the matrix of cluster correlations. For a detailed
description and possible values of this parameter, look at the documentation
for parameter basis
in CorrelationsCalculator
selector_type
: stringCluster selector type. For the possible values, look at the
documentation for the parameter selector_type
in the
ClustersSelector
class.
selector_opts
: dictionaryCluster selector options. For the possible values, look at the
documentation for the parameter selector_opts
in the
ClustersSelector
class.
estimator_type
: stringEstimator type. For the possible values, look at the documentation
for the parameter estimator_type
in the
EstimatorFactory
class.
estimator_opts
: dictionaryEstimator options. For the possible values, look at the documentation
for the parameter estimator_opts
in the
EstimatorFactory
class.
filepath
: string (default: None)If not None, it must be the path to a pickle file generated with ModelBuilder.serialize(). All other parameters are overriden
standardize
: Boolean (defaut:False
)Whether to standardize the input. Uses StandardScaler of scikit-learn.
Build optimal cluster expansion model
Acts as a Model factory.
Parameters:
sset
: StructuresSet objectstructures set used for model training.
cpool
: ClustersPool objectclusters pool from which to select the best model using the method
indicated in selector_type
.
prop
: StringProperty name. Must be a valid name as stored in sset
. The list of names
can be obtained using sset.get_property_names()
.
corrc
: CorrelationsCalculator object (default: None)If not None, cpool and basis are overriden
Return estimator object used to create the optimal model
Return initial correlation matrix
Return the initial correlation matrix, i.e. the full correlation matrix before cluster selection is performed.
Return optimal clusters pool found in build.
When the build
method is called, a ClustersSelector
object
is created to perform the cluster selection task. The selected clusters pool
can be obtained by calling this function.
Return selector used in build.
When the build
method is called, a ClustersSelector
object
is created to perform the cluster selection task. This selector
can be obtained by calling this function.
Serialize model into pickle file
Only pickle format is supported.
Parameters:
filepath
: string (default: “MODELBDR.pickle”)file path of the pickle file to serialize the model builder object