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 bf378a3 commit f4e780a
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 46 deletions.
20 changes: 10 additions & 10 deletions mirapy/autoencoder/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@


class Autoencoder:
"""
Base Class for autoencoder models.
"""
def __init__(self):
"""
Base Class for autoencoder models.
"""
self.model = None
self.history = None
self.dim = None
Expand Down Expand Up @@ -89,14 +89,14 @@ def summary(self):


class DeNoisingAutoencoder(Autoencoder):
def __init__(self, img_dim, activation='relu', padding='same'):
"""
De-noising Autoencoder used for the astronomical image reconstruction.
"""
De-noising Autoencoder used for the astronomical image reconstruction.
:param img_dim: Set. Dimension of input and output image.
:param activation: String (activation function name).
:param padding: String (type of padding in convolution layers).
"""
:param img_dim: Set. Dimension of input and output image.
:param activation: String (activation function name).
:param padding: String (type of padding in convolution layers).
"""
def __init__(self, img_dim, activation='relu', padding='same'):
self.dim = img_dim
self.input_img = Input(shape=(*img_dim, 1))

Expand Down
70 changes: 34 additions & 36 deletions mirapy/classifiers/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@


class Classifier:
"""
Base class for classification models. It provides general abstract
methods required for applying a machine learning techniques.
"""
def __init__(self):
"""
Base class for classification models. It provides general abstract
methods required for applying a machine learning techniques.
"""

self.model = None
self.optimizer = None
Expand Down Expand Up @@ -96,12 +96,12 @@ def reset(self):


class XRayBinaryClassifier(Classifier):
def __init__(self, activation='relu'):
"""
Classification model for X-Ray Binaries.
"""
Classification model for X-Ray Binaries.
:param activation: String (activation function name).
"""
:param activation: String (activation function name).
"""
def __init__(self, activation='relu'):
self.activation = activation

model = Sequential()
Expand Down Expand Up @@ -159,15 +159,14 @@ def predict(self, x):


class AtlasVarStarClassifier(Classifier):
"""
Classification model for ATLAS variable stars
:param activation: String (activation function name).
:param input_size: Integer. Dimension of Feature Vector.
:param num_classes: Integer. Number of Classes.
"""
def __init__(self, activation='relu', input_size=22, num_classes=9):
"""
Classification model for ATLAS variable stars
:param activation: String (activation function name).
:param input_size: Integer. Dimension of Feature Vector.
:param num_classes: Integer. Number of Classes.
"""
self.activation = activation
self.history = None

Expand Down Expand Up @@ -228,16 +227,15 @@ def predict(self, x):


class OGLEClassifier(Classifier):

"""
Feature classification model for OGLE variable star
time-series dataset.
:param activation: String (activation function name).
:param input_size: Integer. Dimension of Feature Vector.
:param num_classes: Integer. Number of Classes.
"""
def __init__(self, activation='relu', input_size=50, num_classes=5):
"""
Feature classification model for OGLE variable star
time-series dataset.
:param activation: String (activation function name).
:param input_size: Integer. Dimension of Feature Vector.
:param num_classes: Integer. Number of Classes.
"""
self.activation = activation
self.history = None

Expand Down Expand Up @@ -295,19 +293,19 @@ def predict(self, x):


class HTRU1Classifier(Classifier):
"""
CNN Classification of pulsars and non-pulsars data released by HTRU
survey as Data Release 1. The dataset has same structure as CIFAR-10
dataset.
:param input_dim: Set. Dimension of input data.
:param activation: String. Activation function name.
:param padding: Sting. Padding type.
:param dropout: Float between 0 and 1. Dropout value.
:param num_classes: Integer. Number of classes.
"""
def __init__(self, input_dim, activation='relu', padding='same',
dropout=0.25, num_classes=2):
"""
CNN Classification of pulsars and non-pulsars data released by HTRU
survey as Data Release 1. The dataset has same structure as CIFAR-10
dataset.
:param input_dim: Set. Dimension of input data.
:param activation: String. Activation function name.
:param padding: Sting. Padding type.
:param dropout: Float between 0 and 1. Dropout value.
:param num_classes: Integer. Number of classes.
"""
self.input_dim = input_dim
self.activation = activation
self.padding = padding
Expand Down

0 comments on commit f4e780a

Please sign in to comment.