Hoelder Means

Calculate hoelder means of various descriptors

  • Takes elemental property values and calculates the Hoelder means for given exponentials, could also calculate weighted Hoelder means.

  • This file is a part of Personal Programming Project (PPP) coursework in Computational Materials Science (CMS) M.Sc. course in Technische Universität Bergakademie Freiberg.

This file is a part of the project titled Application of statistical learning to predict material properties.

class hoelderMeans.HoelderMeans(comp_descriptors, verbose, source_file, file, max_components)

Bases: object

Class to represent Hoelder means of descriptors.

:meth:`eval_means()` : Method that acts as a wrapper for other methods,

it checks the availability on the disk and then calls relevant methods to either notify or compute new data and write to files.

:meth:`get_alpha()` : Method to compute a multiplier present in the

computation of generalized means.

:meth:`compute_means()` : Method that performs the computations of

generalized data.

:meth:`combine_dft_data()` : Method that uses available source data to

add the data obtained through DFT post-processing to the computed generalized means of composition descriptors. This completes the dataset of independent variables.

:meth:`write_to_file()` : Method that writes computed data to

disk with a given file name.

combine_dft_data(file_name)

Combines structural descriptors data from DFT and post-processing with Hoelder means data obtained for composition descriptors.

Parameters:

self (object of class DataProcessing)

Returns:

  • int

  • Status indicator.

compute_mean(values, weights=None, exponent=None, alpha=None, norm_method=None) float

Compute the hoelder mean of the values provided per given exponent.

Parameters:
  • values (list or array) – Values upon which means are computed.

  • weights (list or array) – Optional array of weights to be considered.

  • exponent (float) – Exponent corresponding to Hoelder means.

  • alpha (float) – First part of equation computed by get_alpha() method.

  • norm_method (str) – Normalization method.

Returns:

Computed mean

Return type:

float

eval_means(source, file_name, exponents=array([-4, -3, -2, -1, 0, 1, 2, 3, 4])) int

To evaluate Hoelder means of the given data.

self
Type:

Object of class HoelderMeans

exponents

Array of exponents upon which means are evaluated.

Type:

NDArray

Returns:

  • int

  • Status indicator.

get_alpha(weights, norm_method, values) float

Computes a part of the equation to get Hoelder means.

Parameters:
  • weights (list or array) – List of array of weights

  • norm_method (str) – Normalization method.

  • values (list or array) – Values upon which the means are to be calculated

Returns:

alpha – Computed first part of the equation.

Return type:

float

write_to_file(file_name=None) int

Method to write data to file.

Parameters:

self (Object of HoelderMeans)

Returns:

  • int

  • A status indicator.