Skip to content

Commit

Permalink
fixed class docs
Browse files Browse the repository at this point in the history
  • Loading branch information
swapsha96 committed Jul 11, 2019
1 parent f4e780a commit 7da8c56
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 28 deletions.
14 changes: 5 additions & 9 deletions mirapy/classifiers/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ def train(self, x_train, y_train, epochs, batch_size, reset_weights,
:param epochs: Integer. Number of epochs during training.
:param batch_size: Number of samples per gradient update.
:param reset_weights: Boolean. Set true to reset the weights of model.
:param class_weight: Dictionary. Weights of classes in loss function
during training.
:param class_weight: Dictionary. Weights of classes in loss function.
:param validation_data: Numpy array of validation data.
:param verbose: Value is 0, 1, or 2.
"""
Expand Down Expand Up @@ -134,8 +133,7 @@ def train(self, x_train, y_train, epochs=50, batch_size=100,
:param epochs: Integer. Number of epochs during training.
:param batch_size: Number of samples per gradient update.
:param reset_weights: Boolean. Set true to reset the weights of model.
:param class_weight: Dictionary. Weights of classes in loss function
during training.
:param class_weight: Dictionary. Weights of classes in loss function during training.
:param validation_data: Numpy array of validation data.
:param verbose: Value is 0, 1, or 2.
"""
Expand All @@ -160,7 +158,7 @@ def predict(self, x):

class AtlasVarStarClassifier(Classifier):
"""
Classification model for ATLAS variable stars
Classification model for ATLAS variable stars.
:param activation: String (activation function name).
:param input_size: Integer. Dimension of Feature Vector.
Expand Down Expand Up @@ -202,8 +200,7 @@ def train(self, x_train, y_train, epochs=50, batch_size=100,
:param epochs: Integer. Number of epochs during training.
:param batch_size: Number of samples per gradient update.
:param reset_weights: Boolean. Set true to reset the weights of model.
:param class_weight: Dictionary. Weights of classes in loss function
during training.
:param class_weight: Dictionary. Weights of classes in loss function during training.
:param validation_data: Numpy array of validation data.
:param verbose: Value is 0, 1, or 2.
"""
Expand Down Expand Up @@ -268,8 +265,7 @@ def train(self, x_train, y_train, epochs=50, batch_size=100,
:param epochs: Integer. Number of epochs during training.
:param batch_size: Number of samples per gradient update.
:param reset_weights: Boolean. Set true to reset the weights of model.
:param class_weight: Dictionary. Weights of classes in loss function
during training.
:param class_weight: Dictionary. Weights of classes in loss function.
:param validation_data: Numpy array of validation data.
:param verbose: Value is 0, 1, or 2.
"""
Expand Down
20 changes: 10 additions & 10 deletions mirapy/fitting/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@


class Model1D:
"""
Base class for 1-D model.
"""
def __init__(self):
"""
Base class for 1-D model.
"""
pass

def __call__(self, x):
Expand Down Expand Up @@ -42,14 +42,14 @@ def get_params_as_array(self):


class Gaussian1D(Model1D):
def __init__(self, amplitude=1., mean=0., stddev=1.):
"""
One dimensional Gaussian model.
"""
One dimensional Gaussian model.
:param amplitude: Amplitude.
:param mean: Mean.
:param stddev: Standard deviation.
"""
:param amplitude: Amplitude.
:param mean: Mean.
:param stddev: Standard deviation.
"""
def __init__(self, amplitude=1., mean=0., stddev=1.):
self.amplitude = amplitude
self.mean = mean
self.stddev = stddev
Expand Down
18 changes: 9 additions & 9 deletions mirapy/fitting/optimizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@


class ParameterEstimation:
"""
Base class of parameter estimation of a model using regression.
:param x: Array of input values.
:param y: Array of target values.
:param model: Model instance.
:param loss_function: Instance of loss function.
:param callback: Callback function.
"""
def __init__(self, x, y, model, loss_function, callback=None):
"""
Base class of parameter estimation of a model using regression.
:param x: Array of input values.
:param y: Array of target values.
:param model: Model instance.
:param loss_function: Instance of loss function.
:param callback: Callback function.
"""
self.x = x
self.y = y
self.init_model = deepcopy(model)
Expand Down

0 comments on commit 7da8c56

Please sign in to comment.