pymks/mks_homogenization_model.py
def score(self, X, y, periodic_axes=None, confidence_index=None):
        """
        The score function for the MKSHomogenizationModel. It formats the
        data and uses the score method from the property_linker.

        Args:
            X (ND array): The microstructure, an `(n_samples, n_x, ...)`
                shaped array where `n_samples` is the number of samples and
                `n_x` is the spatial discretization.
            y (1D array): The material property associated with `X`.
            periodic_axes (list, optional): axes that are periodic. (0, 2)
                would indicate that axes x and z are periodic in a 3D
                microstrucure.
            confidence_index (ND array, optional): array with same shape as X
                used to assign a confidence value for each data point.

        Returns:
             Score for MKSHomogenizationModel from the selected
             property_linker.
        """
        if periodic_axes is None:
            periodic_axes = []
        if not callable(getattr(self._linker, "score", None)):
            raise RuntimeError(
                "property_linker does not have score() method.")
        X_corr = self._correlate(X, periodic_axes, confidence_index)
        X_reshaped = self._reduce_shape(X_corr)
        X_reduced = self.dimension_reducer.transform(X_reshaped)
        return self._linker.score(X_reduced, y)

        The score function for the MKSHomogenizationModel. It formats the
        data and uses the score method from the property_linker.

        Args:
            X (ND array): The microstructure, an `(n_samples, n_x, ...)`
                shaped array where `n_samples` is the number of samples and
                `n_x` is the spatial discretization.
            y (1D array): The material property associated with `X`.
            periodic_axes (list, optional): axes that are periodic. (0, 2)
                would indicate that axes x and z are periodic in a 3D
                microstrucure.
            confidence_index (ND array, optional): array with same shape as X
                used to assign a confidence value for each data point.

        Returns:
             Score for MKSHomogenizationModel from the selected
             property_linker.
        
The score function for the MKSHomogenizationModel. It formats the
data and uses the score method from the property_linker.
The score function for the MKSHomogenizationModel . It formats the data and uses the score method from the property_linker .
def score(self, X, y, periodic_axes=None, confidence_index=None):
        if periodic_axes is None:
            periodic_axes = []
        if not callable(getattr(self._linker, "score", None)):
            raise RuntimeError(
                "property_linker does not have score() method.")
        X_corr = self._correlate(X, periodic_axes, confidence_index)
        X_reshaped = self._reduce_shape(X_corr)
        X_reduced = self.dimension_reducer.transform(X_reshaped)
        return self._linker.score(X_reduced, y)
def score ( self , X , y , periodic_axes = None , confidence_index = None ) : if periodic_axes is None : periodic_axes = [ ] if not callable ( getattr ( self . _linker , "score" , None ) ) : raise RuntimeError ( "property_linker does not have score() method." ) X_corr = self . _correlate ( X , periodic_axes , confidence_index ) X_reshaped = self . _reduce_shape ( X_corr ) X_reduced = self . dimension_reducer . transform ( X_reshaped ) return self . _linker . score ( X_reduced , y )
The score function for the MKSHomogenizationModel.
The score function for the MKSHomogenizationModel .
"""
        The score function for the MKSHomogenizationModel. It formats the
        data and uses the score method from the property_linker.

        Args:
            X (ND array): The microstructure, an `(n_samples, n_x, ...)`
                shaped array where `n_samples` is the number of samples and
                `n_x` is the spatial discretization.
            y (1D array): The material property associated with `X`.
            periodic_axes (list, optional): axes that are periodic. (0, 2)
                would indicate that axes x and z are periodic in a 3D
                microstrucure.
            confidence_index (ND array, optional): array with same shape as X
                used to assign a confidence value for each data point.

        Returns:
             Score for MKSHomogenizationModel from the selected
             property_linker.
        """
Score for MKSHomogenizationModel from the selected
property_linker.
Score for MKSHomogenizationModel from the selected property_linker .
self
X
The microstructure, an `(n_samples, n_x, ...)`
shaped array where `n_samples` is the number of samples and
`n_x` is the spatial discretization.
The microstructure an ` ( n_samples n_x ... ) ` shaped array where ` n_samples ` is the number of samples and ` n_x ` is the spatial discretization .
y
The material property associated with `X`.
The material property associated with ` X ` .
periodic_axes
axes that are periodic. (0, 2)
would indicate that axes x and z are periodic in a 3D
microstrucure.
axes that are periodic . ( 0 2 ) would indicate that axes x and z are periodic in a 3D microstrucure .
confidence_index
array with same shape as X
used to assign a confidence value for each data point.
array with same shape as X used to assign a confidence value for each data point .