Skip to content

Commit

Permalink
adjusting doxygen documentation; there are might be some warnings still
Browse files Browse the repository at this point in the history
git-svn-id: https://ipvs.informatik.uni-stuttgart.de/SGpp/repos/trunk@4826 4eea3252-f0fb-4393-894d-40516dce545b
  • Loading branch information
Fabian Franzelin committed Aug 20, 2015
1 parent aebd70d commit 53acb80
Show file tree
Hide file tree
Showing 32 changed files with 141 additions and 142 deletions.
2 changes: 1 addition & 1 deletion datadriven/python/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (C) 2008-today The SG++ project
# This file is part of the SG++ project. For conditions of distribution and
# use, please see the copyright notice provided with SG++ or at
# use, please see the copyright notice provided with SG++ or at
# sgpp.sparsegrids.org

__all__ = ['controller', 'data', 'learner', 'uq']
6 changes: 3 additions & 3 deletions datadriven/python/controller/CheckpointController.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def setGrid(self, grid):


## Setter for the current LearnedKnowledge object
# @param knowledge: @link python.pysgpp_datadriven.learner.LearnedKnowledge.LearnedKnowledge LearnedKnowledge @endlink object
# @param knowledge: @link python..learner.LearnedKnowledge.LearnedKnowledge LearnedKnowledge @endlink object
def setLearnedKnowledge(self, knowledge):
self.knowledge = knowledge

Expand All @@ -206,7 +206,7 @@ def loadGrid(self, iteration):

## Loads knowledge from the checkpoint of given iteration
#@param iteration: integer iteration number
# @return @link python.pysgpp_datadriven.learner.LearnedKnowledge.LearnedKnowledge LearnedKnowledge @endlink object
# @return @link python..learner.LearnedKnowledge.LearnedKnowledge LearnedKnowledge @endlink object
def loadLearnedKnowledge(self, iteration):
knowledgeFile = self.composeName(iteration) + ".arff.gz"
knowledgeMemento = LearnedKnowledgeFormatter().deserializeFromFile(knowledgeFile)
Expand Down Expand Up @@ -289,7 +289,7 @@ def __loadLearner(self, iteration):
return learner


# # Learning event @link python.pysgpp_datadriven.controller.LearnerEventController.LearnerEventController.handleLearningEvent handler routine @endlink of LearnerEventController
# # Learning event @link python..controller.LearnerEventController.LearnerEventController.handleLearningEvent handler routine @endlink of LearnerEventController
def handleLearningEvent(self, subject, status):
if status == LearnerEvents.LEARNING_STEP_COMPLETE or status == LearnerEvents.LEARNING_WITH_TESTING_STEP_COMPLETE:
if subject.iteration % self.interval == 0:
Expand Down
4 changes: 2 additions & 2 deletions datadriven/python/controller/InfoToScreenRegressor.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
from pysgpp.extensions.datadriven.controller.InfoToScreen import InfoToScreen
from pysgpp.extensions.datadriven.learner.Learner import LearnerEvents

# @package python.pysgpp_datadriven.controller
# @package python..controller
## Prints some regression specific information together with information
# processed by @link python.pysgpp_datadriven.controller.InfoToScreen.InfoToScreen InfoToScreen @endlink
# processed by @link python..controller.InfoToScreen.InfoToScreen InfoToScreen @endlink
class InfoToScreenRegressor(InfoToScreen):


Expand Down
2 changes: 1 addition & 1 deletion datadriven/python/controller/LearnerEventController.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

## Abstract class of Subscribers of LearnerEvents. The classes that wants to obtain
# the progress notifications from Learner should implement this class. See @link
# python.pysgpp_datadriven.learner.Learner.Learner documentation of Learner@endlink for details.
# python..learner.Learner.Learner documentation of Learner@endlink for details.
class LearnerEventController(object):

##
Expand Down
2 changes: 1 addition & 1 deletion datadriven/python/controller/SolverEventController.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

## Abstract class of Subscribers of LinearSolverEvents. The classes that wants to obtain
# the progress notifications from LinearSolver subclasses should implement this class. See @link
# python.pysgpp_datadriven.learner.solver.LinearSolver.LinearSolver documentation of Learner@endlink for details.
# python..learner.solver.LinearSolver.LinearSolver documentation of Learner@endlink for details.
class SolverEventController(object):

##
Expand Down
2 changes: 1 addition & 1 deletion datadriven/python/learner/Learner.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
# - Concrete Observer: e.g. InfoToScreen
#
# Observer can also want to retrieve the process information from LinearSolver.
# See documentation of@link python.pysgpp_datadriven.learner.solver.LinearSolver.LinearSolver LinearSolver@endlink for more information.
# See documentation of@link python..learner.solver.LinearSolver.LinearSolver LinearSolver@endlink for more information.
#
class Learner(object):

Expand Down
24 changes: 12 additions & 12 deletions datadriven/python/learner/LearnerBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,41 +79,41 @@
# @li <code>adaptive</code>: <i>Using an adaptive Grid with NUM of refines</i> - @link StopPolicyDescriptor.withAdaptiveItarationLimit() <code>.withStopPolicy().withAdaptiveItarationLimit(10)</code> @endlink
# @li <code>adapt_points</code>: <i>Number of points in one refinement iteration</i> - @link SpecificationDescriptor.withAdaptPoints() <code>.withSpecification().withAdaptPoints(100)</code> @endlink
# @li <code>adapt_rate</code>: <i>Percentage of points from all refinable points in one refinement iteration</i> - @link SpecificationDescriptor.withAdaptRate() <code>.withSpecification().withAdaptRate(0.05)</code> @endlink
# @li <code>adapt_start</code>: <i>The index of adapt step to begin with</i> - Is know handled by loading the learner with specified iteration level from CheckpointController using @link python.pysgpp_datadriven.controller.CheckpointController.CheckpointController.loadAll() <code>checkpointController.loadAll(10)</code> @endlink
# @li <code>adapt_threshold</code>: @link python.pysgpp_datadriven.learner.TrainingSpecification.TrainingSpecification.setAdaptThreshold() <i>refinement threshold</i> @endlink - @link SpecificationDescriptor.withAdaptThreshold() .withSpecification().withAdaptThreshold(0.003) @endlink
# @li <code>adapt_start</code>: <i>The index of adapt step to begin with</i> - Is know handled by loading the learner with specified iteration level from CheckpointController using @link python..controller.CheckpointController.CheckpointController.loadAll() <code>checkpointController.loadAll(10)</code> @endlink
# @li <code>adapt_threshold</code>: @link python..learner.TrainingSpecification.TrainingSpecification.setAdaptThreshold() <i>refinement threshold</i> @endlink - @link SpecificationDescriptor.withAdaptThreshold() .withSpecification().withAdaptThreshold(0.003) @endlink
# @li <code>mode</code>: <i>Specifies the action to do</i> - Call corresponding method, i.e. @link Learner.Learner.applyData() applyData@endlink, @link Learner.Learner.learnData() learnData@endlink, @link Learner.Learner.learnDataWithTest() learnDataWithTest@endlink, @link Learner.Learner.learnDataWithFolding() learnDataWithFolding@endlink
# @li <code>zeh</code>: <i>Specifies the action to do</i> - @link SpecificationDescriptor.withIdentityOperator() .withSpecification().withIdentityOperator()@endlink or @link SpecificationDescriptor.withLaplaceOperator() .withSpecification().withLaplaceOperator()@endlink
# @li <code>foldlevel</code>: <i>specifies the number of sets generated</i> - Is set in @link LearnerBuilder.LearnerBuilder.FoldingDescriptor FoldingDescriptor@endlink: <code> builder.withSequentialFoldingPolicy().withLevel(level)</code>
# @li <code>onlyfoldnum</code>: <i>Run only fold I in n-fold cross-validation. Default: run all</i> - @link python.pysgpp_datadriven.controller.CheckpointController.CheckpointController.generateFoldValidationJob() checkpointController.generateFoldValidationJob()@endlink generates a set of independent learners and a job script to run as SGE job array. In this way all or individual jobs can be ran either with SGE jobs or in console.
# @li <code>onlyfoldnum</code>: <i>Run only fold I in n-fold cross-validation. Default: run all</i> - @link python..controller.CheckpointController.CheckpointController.generateFoldValidationJob() checkpointController.generateFoldValidationJob()@endlink generates a set of independent learners and a job script to run as SGE job array. In this way all or individual jobs can be ran either with SGE jobs or in console.
# @li <code>lambda</code>: <i>Lambda</i> - @link SpecificationDescriptor.withLambda() .withSpecification().withLambda(0.00001)@endlink
# @li <code>imax</code>: <i>Max number of iterations</i> - @link CGSolverDescriptor.withImax() .withCGSolver().withImax(500)@endlink
# @li <code>accuracy</code>: <i>Specifies the accuracy of the CG-Iteration</i> - @link CGSolverDescriptor.withAccuracy() .withCGSolver().withAccuracy(0.0001)@endlink
# @li <code>max_accuracy</code>: <i>If the norm of the residuum falls below ACCURACY, stop the CG iterations</i> - @link CGSolverDescriptor.withThreshold() .withCGSolver().withThreshold(0.0000000001)@endlink
# @li <code>%data</code>: <i>Filename for the Datafile.</i> - @link LearnerBuilder.withTrainingDataFromARFFFile() .withTestingDataFromARFFFile("./datasets/classifier.test.arff")@endlink
# @li <code>test</code>: <i>File containing the testdata</i> - @link LearnerBuilder.withTestingDataFromARFFFile() .withTestingDataFromARFFFile("./datasets/classifier.test.arff")@endlink
# @li <code>alpha</code>: <i>Filename for a file containing an alpha-Vector</i> - <code>%learner = builder.andGetResult()\n learner.knowledge = LearnedKnowledgeFileAdapter().load("./alphas.arff")</code>
# @li <code>outfile</code>: <i>Filename where the calculated alphas are stored</i> - <code>@link LearnerBuilder.withProgressPresenter() .withProgressPresenter@endlink(@link python.pysgpp_datadriven.controller.InfoToFile.InfoToFile InfoToFile@endlink("./presentor.test"))</code>
# @li <code>gnuplot</code>: <i>In 2D case, the generated can be stored in a gnuplot readable format</i> - Some Graphs can now be plotted with @link python.pysgpp_datadriven.controller.InfoToGraph.InfoToGraph InfoToGraph@endlink
# @li <code>outfile</code>: <i>Filename where the calculated alphas are stored</i> - <code>@link LearnerBuilder.withProgressPresenter() .withProgressPresenter@endlink(@link python..controller.InfoToFile.InfoToFile InfoToFile@endlink("./presentor.test"))</code>
# @li <code>gnuplot</code>: <i>In 2D case, the generated can be stored in a gnuplot readable format</i> - Some Graphs can now be plotted with @link python..controller.InfoToGraph.InfoToGraph InfoToGraph@endlink
# @li <code>resolution</code>: <i>Specifies the resolution of the gnuplotfile</i> - Not used, as <code>gnuplot</code> is not yet implemented
# @li <code>stats</code>: <i>In this file the statistics from the test are stored</i> - Can be implemented as subclass from @link python.pysgpp_datadriven.controller.LearnerEventController.LearnerEventController LearnerEventController@endlink
# @li <code>stats</code>: <i>In this file the statistics from the test are stored</i> - Can be implemented as subclass from @link python..controller.LearnerEventController.LearnerEventController LearnerEventController@endlink
# @li <code>polynom</code>: <i>Sets the maximum degree for basis functions</i> - @link GridDescriptor.withPolynomialBase() .withGrid().withPolynomialBase(2)@endlink
# @li <code>border</code> <i>Enables special border base functions</i> - @link GridDescriptor.withBorder() .withGrid().withBorder(Types.BorderTypes.TRAPEZOIDBOUNDARY)@endlink
# @li <code>trapezoid-boundary</code> <i>Enables boundary functions that have a point on the boundary for every inner point (Trapezoid)</i> - @link GridDescriptor.withBorder() .withGrid().withBorder(Types.BorderTypes.TRAPEZOIDBOUNDARY)@endlink
# @li <code>complete-boundary</code> <i>Enables boundary functions that have more points on the boundary than inner points</i> - @link GridDescriptor.withBorder() .withGrid().withBorder(Types.BorderTypes.COMPLETEBOUNDARY)@endlink
# @li <code>verbose</code>: <i>Provides extra output</i> - Set the suitable @link python.pysgpp_datadriven.controller.LearnerEventController.LearnerEventController LearnerEventController@endlink implementation, i.e. <code>.withProgressPresenter(InfoToScreen())</code>
# @li <code>normfile</code>: <i>For all modes that read %data via stdin. Normalizes %data according to boundaries in FILE</i> - Can be implemented as subclass of <code>@link python.pysgpp_datadriven.data.ARFFAdapter.ARFFAdapter ARFFAdapter@endlink</code>
# @li <code>reuse</code>: <i>Reuse alpha-values for CG</i> - @link python.pysgpp_datadriven.learner.LearnerBuilder.LearnerBuilder.CGSolverDescriptor.withAlphaReusing() <code>.withCGSolver().withAlphaReusing()</code>@endlink
# @li <code>verbose</code>: <i>Provides extra output</i> - Set the suitable @link python..controller.LearnerEventController.LearnerEventController LearnerEventController@endlink implementation, i.e. <code>.withProgressPresenter(InfoToScreen())</code>
# @li <code>normfile</code>: <i>For all modes that read %data via stdin. Normalizes %data according to boundaries in FILE</i> - Can be implemented as subclass of <code>@link python..data.ARFFAdapter.ARFFAdapter ARFFAdapter@endlink</code>
# @li <code>reuse</code>: <i>Reuse alpha-values for CG</i> - @link python..learner.LearnerBuilder.LearnerBuilder.CGSolverDescriptor.withAlphaReusing() <code>.withCGSolver().withAlphaReusing()</code>@endlink
# @li <code>seed</code>: <i>Random seed used for initializing</i> Is set in @link LearnerBuilder.LearnerBuilder.FoldingDescriptor FoldingDescriptor@endlink: <code>builder.withRandomFoldingPolicy().withSeed(level)</code>
# @li <code>regression</code>: <i>Use regression approach</i> - <code>@link buildRegressor() builder.buildRegressor()@endlink</code>
# @li <code>checkpoint</code>: <i>Filename for checkpointing</i> - <code> %controller = @link python.pysgpp_datadriven.controller.CheckpointController.CheckpointController.__init__ CheckpointController("classification_job")@endlink @link withCheckpointController() builder.withCheckpointController(controller)@endlink</code>
# @li <code>checkpoint</code>: <i>Filename for checkpointing</i> - <code> %controller = @link python..controller.CheckpointController.CheckpointController.__init__ CheckpointController("classification_job")@endlink @link withCheckpointController() builder.withCheckpointController(controller)@endlink</code>
# @li <code>grid</code>: <i>Filename for Grid-resume</i> - <code>@link GridDescriptor.fromFile() .withGrid.fromFile("gridfile.gz")@endlink</code>
# @li <code>epochs_limit</code>: <i>Number of refinement iterations (epochs), MSE of test %data have to increase, before refinement will stop</i> - <code>@link StopPolicyDescriptor.withEpochsLimit() .withStopPolicy().withEpochsLimit(20)@endlink</code>
# @li <code>mse_limit</code> <i>If MSE of test %data fall below this limit, refinement will stop</i> - <code>@link StopPolicyDescriptor.withMSELimit() .withStopPolicy().withMSELimit(0.0003)@endlink</code>, also <code>@link StopPolicyDescriptor.withAccuracyLimit() ..withStopPolicy().withAccuracyLimit(0.95)@endlink</code> for classification accuracy
# @li <code>grid_limit</code> <i>If the number of points on grid exceed grid_limit, refinement will stop</i> - <code>@link StopPolicyDescriptor.withGridSizeLimit() .withStopPolicy().withGridSizeLimit(40000)@endlink</code>
#
class LearnerBuilder(object):

# #created @link python.pysgpp_datadriven.learner.Learner.Learner Learner @endlink object
# #created @link python..learner.Learner.Learner Learner @endlink object
__learner = None

# #@link python.pysgpp.extensions.datadriven.controller.CheckpointController.CheckpointController
Expand Down Expand Up @@ -482,7 +482,7 @@ def withPolynomialBase(self, deg):
##
# Defines the border type of the grid
#
# @param type: border type as definpysgpp_datadriven.datadriven.learner.Types.BorderTypes
# @param type: border type as defin.datadriven.learner.Types.BorderTypes
# @return: GridDescriptor itself
##
def withBorder(self, type):
Expand Down
2 changes: 1 addition & 1 deletion datadriven/python/learner/formatter/GridFormatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# business logic from the text representation that can be saved into file.
# The class is a part of <a href="http://en.wikipedia.org/wiki/Memento_pattern"
# target="new">Memento design pattern</a> described in details in @link
# python.pysgpp_datadriven.controller.CheckpointController.CheckpointController CheckpointController
# python..controller.CheckpointController.CheckpointController CheckpointController
# @endlink.
#
# However strict separation of grid object and its representation is not
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# business logic from the text representation that can be saved into file.
# The class is a part of <a href="http://en.wikipedia.org/wiki/Memento_pattern"
# target="new">Memento design pattern</a> described in details in @link
# python.pysgpp_datadriven.controller.CheckpointController.CheckpointController CheckpointController
# python..controller.CheckpointController.CheckpointController CheckpointController
# @endlink.
#
# Currently, the LearnerKnowledge memento object is DataVector object with
Expand Down
10 changes: 5 additions & 5 deletions datadriven/python/learner/solver/CGSolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

## This is a <a href="http://en.wikipedia.org/wiki/Decorator_pattern" target="new">decorator</a> for sg::ConjugateGradients class.
# The ConjugateGradients solver is enhanced with methods of concrete subject of <a href="http://en.wikipedia.org/wiki/Observer_pattern" target="new">the observer design pattern</a>
# described in @link python.pysgpp_datadriven.learner.solver.LinearSolver LinearSolver@endlink and function for serialization
# described in @link python..learner.solver.LinearSolver LinearSolver@endlink and function for serialization
# end deserialization.
#
# In order to combine high performance of C++ code and flexibility of Subscription pattern
Expand Down Expand Up @@ -56,15 +56,15 @@ def setReuse(self, value):
self.__reuse = value


# # Returns the @link python.pysgpp_datadriven.learner.solver.CGSolver.CGSolver.max_threshold threshold@endlink parameter
# @return the @link python.pysgpp_datadriven.learner.solver.CGSolver.CGSolver.max_threshold threshold@endlink parameter
# # Returns the @link python..learner.solver.CGSolver.CGSolver.max_threshold threshold@endlink parameter
# @return the @link python..learner.solver.CGSolver.CGSolver.max_threshold threshold@endlink parameter
def getThreshold(self):
return self.max_threshold


# #Sets the @link python.pysgpp_datadriven.learner.solver.CGSolver.CGSolver.max_threshold threshold@endlink parameter
# #Sets the @link python..learner.solver.CGSolver.CGSolver.max_threshold threshold@endlink parameter
#
# @param threshold: float value of @link python.pysgpp_datadriven.learner.solver.CGSolver.CGSolver.max_threshold threshold@endlink parameter
# @param threshold: float value of @link python..learner.solver.CGSolver.CGSolver.max_threshold threshold@endlink parameter
# @return: CG Solver itself
def setThreshold(self, threshold):
self.max_threshold = threshold
Expand Down
2 changes: 1 addition & 1 deletion datadriven/python/learner/solver/LinearSolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# - Concrete Observer: e.g. InfoToScreen
#
# Observer can also want to retrieve the process information from Learner. See documentation of
# @link python.pysgpp_datadriven.learner.Learner.Learner Learner@endlink for more information.
# @link python..learner.Learner.Learner Learner@endlink for more information.
class LinearSolver(object):

##list of object listening to the solver events
Expand Down
Loading

0 comments on commit 53acb80

Please sign in to comment.