Skip to content

Commit

Permalink
Update outdated docstring for X and Y
Browse files Browse the repository at this point in the history
Close #37
  • Loading branch information
sachaMorin committed Aug 7, 2023
1 parent 5a69dee commit 0051801
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 240 deletions.
10 changes: 3 additions & 7 deletions stepmix/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,22 +55,18 @@ def bootstrap(
----------
estimator : StepMix instance
A fitted StepMix estimator. Used as a template to clone bootstrap estimator.
X : array-like of shape (n_samples, n_columns)
Measurement data.
Y : array-like of shape (n_samples, n_columns_structural), default=None
Structural data.
X : array-like of shape (n_samples, n_features)
Y : array-like of shape (n_samples, n_features_structural), default=None
n_repetitions: int
Number of repetitions to fit.
sample_weight : array-like of shape(n_samples,), default=None
Array of weights that are assigned to individual samples.
If not provided, then each sample is given unit weight.
progress_bar : bool, default=True
Display a tqdm progress bar for repetitions.
Returns
----------
parameters: DataFrame
DataFrame of all repetitions. Follows the convention of StepMix.get_parameters_df() with an additional
'rep' index.
'rep' column.
stats: DataFrame
Various statistics of bootstrapped estimators.
"""
Expand Down
6 changes: 4 additions & 2 deletions stepmix/emission/emission.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def initialize(self, X, resp, random_state=None):
Parameters
----------
X : ndarray of shape (n_samples, n_columns)
X : ndarray of shape (n_samples, n_features)
Input data for this emission model.
resp : ndarray of shape (n_samples, n_components)
Responsibilities, i.e., posterior probabilities over the latent classes.
Expand Down Expand Up @@ -112,7 +112,7 @@ def m_step(self, X, resp):
Parameters
----------
X : ndarray of shape (n_samples, n_columns)
X : ndarray of shape (n_samples, n_features)
Input data for this emission model.
resp : ndarray of shape (n_samples, n_components)
Responsibilities, i.e., posterior probabilities over the latent classes of each point in X.
Expand Down Expand Up @@ -212,6 +212,8 @@ def print_parameters(
def get_parameters_df(self, feature_names=None):
"""Return self.parameters into a long dataframe.
Columns should be ["model_name", "param", "class_no", "variable", "value"].
Call self._to_df or implement custom method."""
return self._to_df(
param_dict=self.parameters,
Expand Down
Loading

0 comments on commit 0051801

Please sign in to comment.