Skip to content

Commit e47f1c7

Browse files
author
Olcay Taner YILDIZ
committed
Updated the documentation.
1 parent 3cd01f3 commit e47f1c7

41 files changed

Lines changed: 325 additions & 17 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Classification/Classifier/Bagging.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,8 @@ def train(self,
3535
self.model = TreeEnsembleModel(forest)
3636

3737
def loadModel(self, fileName: str):
38+
"""
39+
Loads the Bagging ensemble model from an input file.
40+
:param fileName: File name of the decision tree model.
41+
"""
3842
self.model = TreeEnsembleModel(fileName)

Classification/Classifier/C45.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,8 @@ def train(self,
3434
self.model = tree
3535

3636
def loadModel(self, fileName: str):
37+
"""
38+
Loads the decision tree model from an input file.
39+
:param fileName: File name of the decision tree model.
40+
"""
3741
self.model = DecisionTree(fileName)

Classification/Classifier/C45Stump.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,8 @@ def train(self,
2424
isStump=True))
2525

2626
def loadModel(self, fileName: str):
27+
"""
28+
Loads the decision tree model from an input file.
29+
:param fileName: File name of the decision tree model.
30+
"""
2731
self.model = DecisionTree(fileName)

Classification/Classifier/DeepNetwork.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,8 @@ def train(self,
2929
parameters=parameters)
3030

3131
def loadModel(self, fileName: str):
32+
"""
33+
Loads the deep network model from an input file.
34+
:param fileName: File name of the deep network model.
35+
"""
3236
self.model = DeepNetworkModel(fileName)

Classification/Classifier/Dummy.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,8 @@ def train(self,
2323
self.model = DummyModel(trainSet)
2424

2525
def loadModel(self, fileName: str):
26+
"""
27+
Loads the dummy model from an input file.
28+
:param fileName: File name of the dummy model.
29+
"""
2630
self.model = DummyModel(fileName)

Classification/Classifier/KMeans.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ class KMeans(Classifier):
1010
def train(self,
1111
trainSet: InstanceList,
1212
parameters: KMeansParameter):
13+
"""
14+
Training algorithm for K-Means classifier. K-Means finds the mean of each class for training.
15+
:param trainSet: Training data given to the algorithm.
16+
:param parameters: distance metric used to calculate the distance between two instances.
17+
"""
1318
prior_distribution = trainSet.classDistribution()
1419
class_means = InstanceList()
1520
class_lists = Partition(trainSet)
@@ -20,4 +25,8 @@ def train(self,
2025
distanceMetric=parameters.getDistanceMetric())
2126

2227
def loadModel(self, fileName: str):
28+
"""
29+
Loads the K-means model from an input file.
30+
:param fileName: File name of the K-means model.
31+
"""
2332
self.model = KMeansModel(fileName)

Classification/Classifier/Knn.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,8 @@ def train(self,
2424
distanceMetric=parameters.getDistanceMetric())
2525

2626
def loadModel(self, fileName: str):
27+
"""
28+
Loads the K-nearest neighbor model from an input file.
29+
:param fileName: File name of the K-nearest neighbor model.
30+
"""
2731
self.model = KnnModel(fileName)

Classification/Classifier/Lda.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,8 @@ def train(self,
4848
self.model = LdaModel(prior_distribution, w, w0)
4949

5050
def loadModel(self, fileName: str):
51+
"""
52+
Loads the Lda model from an input file.
53+
:param fileName: File name of the Lda model.
54+
"""
5155
self.model = LdaModel(fileName)

Classification/Classifier/LinearPerceptron.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,8 @@ def train(self,
3131
parameters=parameters)
3232

3333
def loadModel(self, fileName: str):
34+
"""
35+
Loads the linear perceptron model from an input file.
36+
:param fileName: File name of the linear perceptron model.
37+
"""
3438
self.model = LinearPerceptronModel(fileName)

Classification/Classifier/MultiLayerPerceptron.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,8 @@ def train(self,
3131
parameters=parameters)
3232

3333
def loadModel(self, fileName: str):
34+
"""
35+
Loads the multi-layer perceptron model from an input file.
36+
:param fileName: File name of the multi-layer perceptron model.
37+
"""
3438
self.model = MultiLayerPerceptronModel(fileName)

0 commit comments

Comments
 (0)