Skip to content

Commit

Permalink
Update method name from fit_individual_columns to fit_columns
Browse files Browse the repository at this point in the history
  • Loading branch information
pvk-developer committed Nov 1, 2024
1 parent fd1c977 commit 6d3dc4c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions copulas/multivariate/gaussian.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def fit(self, X):

# Validate the input data
X = self._validate_input(X)
columns, univariates = self._fit_individual_columns(X)
columns, univariates = self._fit_columns(X)

self.columns = columns
self.univariates = univariates
Expand All @@ -99,7 +99,7 @@ def _validate_input(self, X):

return X

def _fit_individual_columns(self, X):
def _fit_columns(self, X):
"""Fit each column to its distribution."""
columns = []
univariates = []
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/multivariate/test_gaussian.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,8 @@ def test__validate_input_with_non_dataframe(self):
pd.testing.assert_frame_equal(result, expected_df)

@patch('copulas.multivariate.gaussian.LOGGER')
def test__fit_individual_columns(self, mock_logger):
"""Test that `_fit_individual_columns` fits each column to its distribution."""
def test__fit_columns(self, mock_logger):
"""Test that `_fit_columns` fits each column to its distribution."""
# Setup
instance = GaussianMultivariate()
instance._get_distribution_for_column = Mock(return_value='normal')
Expand All @@ -386,7 +386,7 @@ def test__fit_individual_columns(self, mock_logger):
X = pd.DataFrame({'A': [1, 2, 3], 'B': [4, 5, 6]})

# Run
columns, univariates = instance._fit_individual_columns(X)
columns, univariates = instance._fit_columns(X)

# Assert
assert columns == ['A', 'B']
Expand Down

0 comments on commit 6d3dc4c

Please sign in to comment.