Commit 7d215bee authored by Thomas Purcell's avatar Thomas Purcell
Browse files

Update file docstrings for C++ header files and standardize path names

parent 63884b07
......@@ -11,7 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "descriptor_identifier/SISSO_DI/SISSOLogRegressor.hpp"
#include "descriptor_identifier/solver/SISSOLogRegressor.hpp"
SISSOLogRegressor::SISSOLogRegressor(
const std::shared_ptr<FeatureSpace> feat_space,
......
......@@ -11,19 +11,19 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/** @file descriptor_identifier/SISSOLogRegressor.hpp
* @brief Perform SISSO on a previously generated Feature Space
*
* Takes in a feature space and performs SISSO on it while storing the selected features in _models
* @brief Defines a class for solving logarithmic regression problems with SISSO
*
* @author Thomas A. R. Purcell (tpurcell)
* @author Thomas A. R. Purcell (tpurcell90)
* @bug No known bugs.
*/
#ifndef SISSO_LOG_REGRESSOR
#define SISSO_LOG_REGRESSOR
#include "descriptor_identifier/Model/ModelLogRegressor.hpp"
#include "descriptor_identifier/SISSO_DI/SISSORegressor.hpp"
#include "descriptor_identifier/model/ModelLogRegressor.hpp"
#include "descriptor_identifier/solver/SISSORegressor.hpp"
#ifdef PY_BINDINGS
namespace np = boost::python::numpy;
......
......@@ -11,7 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "descriptor_identifier/SISSO_DI/SISSORegressor.hpp"
#include "descriptor_identifier/solver/SISSORegressor.hpp"
SISSORegressor::SISSORegressor(
const std::shared_ptr<FeatureSpace> feat_space,
......@@ -27,7 +27,7 @@ SISSORegressor::SISSORegressor(
const int n_models_store,
const bool fix_intercept
):
SISSO_DI(
SISSOSolver(
"regression",
feat_space,
prop_label,
......
......@@ -11,19 +11,19 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/** @file descriptor_identifier/SISSORegressor.hpp
* @brief Perform SISSO on a previously generated Feature Space
*
* Takes in a feature space and performs SISSO on it while storing the selected features in _models
* @brief Defines a class to solve regression problems with SISSO
*
* @author Thomas A. R. Purcell (tpurcell)
* @author Thomas A. R. Purcell (tpurcell90)
* @bug No known bugs.
*/
#ifndef SISSO_REGRESSOR
#define SISSO_REGRESSOR
#include "descriptor_identifier/Model/ModelRegressor.hpp"
#include "descriptor_identifier/SISSO_DI/SISSO_DI.hpp"
#include "descriptor_identifier/model/ModelRegressor.hpp"
#include "descriptor_identifier/solver/SISSOSolver.hpp"
#ifdef PY_BINDINGS
namespace np = boost::python::numpy;
......@@ -35,7 +35,7 @@
* @brief SISSO Regressor class, performs the SISSO algorithm and stores all selected models
*
*/
class SISSORegressor: public SISSO_DI
class SISSORegressor: public SISSOSolver
{
private:
std::vector<std::vector<ModelRegressor>> _models; //!< List of models
......
......@@ -11,9 +11,9 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "descriptor_identifier/SISSO_DI/SISSO_DI.hpp"
#include "descriptor_identifier/solver/SISSOSolver.hpp"
SISSO_DI::SISSO_DI(
SISSOSolver::SISSOSolver(
const std::string loss_type,
const std::shared_ptr<FeatureSpace> feat_space,
const std::string prop_label,
......
......@@ -11,19 +11,19 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/** @file descriptor_identifier/SISSO_DI/SISSO_DI.hpp
* @brief Base class used to perform SISSO on a previously generated Feature Space
*
* Takes in a feature space and performs SISSO on it while storing the selected features in _models
/** @file descriptor_identifier/solver/SISSOSolver.hpp
* @brief Defines the base class for creating solvers using SISSO
*
* @author Thomas A. R. Purcell (tpurcell)
* @author Thomas A. R. Purcell (tpurcell90)
* @bug No known bugs.
*/
#ifndef SISSO_DESCRIPTOR_ID
#define SISSO_DESCRIPTOR_ID
#include "feature_creation/feature_space/FeatureSpace.hpp"
#include "descriptor_identifier/Model/Model.hpp"
#include "descriptor_identifier/model/Model.hpp"
#ifdef PY_BINDINGS
namespace np = boost::python::numpy;
......@@ -35,7 +35,7 @@
* @brief SISSO Regressor class, performs the SISSO algorithm and stores all selected models
*
*/
class SISSO_DI
class SISSOSolver
{
protected:
const std::vector<int> _task_sizes_train; //!< Number of training samples per task
......@@ -73,7 +73,7 @@ public:
* @param n_models_store The number of models to output to files
* @param fix_intrecept If true the bias term is fixed at 0
*/
SISSO_DI(
SISSOSolver(
const std::string loss_type,
const std::shared_ptr<FeatureSpace> feat_space,
const std::string prop_label,
......@@ -165,7 +165,7 @@ public:
* @param n_models_store The number of models to output to files
* @param fix_intrecept If true the bias term is fixed at 0
*/
SISSO_DI(
SISSOSolver(
std::string loss_type,
std::shared_ptr<FeatureSpace> feat_space,
std::string prop_label,
......@@ -198,7 +198,7 @@ public:
* @param n_models_store The number of models to output to files
* @param fix_intrecept If true the bias term is fixed at 0
*/
SISSO_DI(
SISSOSolver(
std::string loss_type,
std::shared_ptr<FeatureSpace> feat_space,
std::string prop_label,
......
......@@ -897,7 +897,7 @@ void FeatureSpace::generate_feature_space()
std::vector<node_ptr> to_send(send_sizes[pp]);
std::copy_n(next_phi.begin() + total_sent, send_sizes[pp], to_send.begin());
_mpi_comm->send(pp, _mpi_comm->cantorTagGen(_mpi_comm->rank(), pp, 1, 0), to_send);
_mpi_comm->send(pp, _mpi_comm->cantor_tag_gen(_mpi_comm->rank(), pp, 1, 0), to_send);
total_sent += send_sizes[pp];
}
}
......@@ -932,7 +932,7 @@ void FeatureSpace::generate_feature_space()
}
std::vector<node_ptr> to_recv;
_mpi_comm->recv(pp, _mpi_comm->cantorTagGen(pp, _mpi_comm->rank(), 1, 0), to_recv);
_mpi_comm->recv(pp, _mpi_comm->cantor_tag_gen(pp, _mpi_comm->rank(), 1, 0), to_recv);
for(auto& feat : to_recv)
{
_phi.push_back(feat);
......
......@@ -11,12 +11,11 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/** @file feature_creation/feature_space/FeatureSpace.hpp
* @brief Create a feature space from an initial set of features and algebraic operators
*
* Use an initial set of features and combine them to generate more complicated algebraical features. SIS is also performed here
* @brief Defines the class for creating/operating on a feature space in SISSO
*
* @author Thomas A. R. Purcell (tpurcell)
* @author Thomas A. R. Purcell (tpurcell90)
* @bug No known bugs.
*/
......@@ -30,7 +29,7 @@
#include "feature_creation/node/utils.hpp"
#include "mpi_interface/MPI_Interface.hpp"
#include "mpi_interface/MPI_ops.hpp"
#include "mpi_interface/MPI_Ops.hpp"
#include "mpi_interface/serialize_tuple.h"
#include "utils/project.hpp"
......
......@@ -11,14 +11,16 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/** @file feature_creation/node/FeatureNode.hpp
* @brief The class for describing the initial features
*
* This class represents the leaves of all of the binary expression trees.
* @brief Defines the class that represent the primary features in SISSO
*
* @author Thomas A. R. Purcell (tpurcell)
* @author Thomas A. R. Purcell (tpurcell90)
* @bug No known bugs.
*
* This class represents the leaves of all of the binary expression trees.
*/
#ifndef FEATURE_NODE
#define FEATURE_NODE
......
......@@ -11,14 +11,17 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/** @file feature_creation/node/ModelNode.hpp
* @brief The base class for describing features selected in SISSO Models
*
* This is a standardized feature type for all features selected in SISSO Models. This is created to allow for easier I/O of the models
* @brief Defines the class used to transfer features (Nodes) to the Model objects
*
* @author Thomas A. R. Purcell (tpurcell)
* @author Thomas A. R. Purcell (tpurcell90)
* @bug No known bugs.
*
* This is the only Node object that does not use the central storage area defined in value_storage/node_value_containers
* All information that is normally calculated recursively is stored here directly.
*/
#ifndef MODEL_NODE
#define MODEL_NODE
......
......@@ -11,16 +11,18 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/** @file feature_creation/node/Node.hpp
* @brief The base class for describing features
* @brief Defines the base class for the objects that represent features
*
* @author Thomas A. R. Purcell (tpurcell90)
* @bug No known bugs.
*
* This package represents the features in SISSO as a binary expression tree and are accessible from the root node of that tree.
* The node class are the vertices of the tree and represent initial features (FeatureNode) and all algebraic operators (OperatorNodes).
* The edges are the represented via the _feats member in OperatorNode that store the features the operation acts on.
*
* @author Thomas A. R. Purcell (tpurcell)
* @bug No known bugs.
* The edges are the represented via the _feats member in OperatorNode that store the features the operation acts on (its children).
*/
#ifndef NODE
#define NODE
......
......@@ -11,14 +11,16 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/** @file feature_creation/node/operator_nodes/OperatorNode.hpp
* @brief Base class for representing all algebraic operators in the binary expression tree
*
* This class represents the non-leaf verticies in the binary expression tree. This also stores all edges of the graph
* @brief Defines the base class that represent all of the analytical operators in the Binary Expression Tree
*
* @author Thomas A. R. Purcell (tpurcell)
* @author Thomas A. R. Purcell (tpurcell90)
* @bug No known bugs.
*
* This class represents the non-leaf verticies in the binary expression tree. This also stores all edges of the graph through _feats
*/
#ifndef OPERATOR_NODE
#define OPERATOR_NODE
......
......@@ -11,14 +11,16 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/** @file feature_creation/node/operator_nodes/allowed_operator_nodes/absolute_value.hpp
* @brief Class describing the absolute value operator
*
* This class represents the unary operator -> |A|
* @brief Defines a class for the absolute value operator
*
* @author Thomas A. R. Purcell (tpurcell)
* @author Thomas A. R. Purcell (tpurcell90)
* @bug No known bugs.
*
* This class represents the unary operator -> |A|
*/
#ifndef ABS_VAL_NODE
#define ABS_VAL_NODE
......
......@@ -11,14 +11,16 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/** @file feature_creation/node/operator_nodes/allowed_operator_nodes/abs/parameterized_absolute_value.hpp
* @brief Class describing the parameterized absolute value operator
*
* This class represents the parameterized unary operator -> |alpha * A + a|
* @brief Defines a class for the parameterized version of the absolute value operator
*
* @author Thomas A. R. Purcell (tpurcell)
* @author Thomas A. R. Purcell (tpurcell90)
* @bug No known bugs.
*
* This class represents the parameterized unary operator -> |A + a|
*/
#ifndef PARAM_ABS_VAL_NODE
#define PARAM_ABS_VAL_NODE
......
......@@ -11,14 +11,16 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/** @file feature_creation/node/operator_nodes/allowed_operator_nodes/absolute_difference.hpp
* @brief Class describing the absolute difference operator
*
* This class represents the binary operator -> |A - B|
* @brief Defines a class for the absolute difference operator
*
* @author Thomas A. R. Purcell (tpurcell)
* @author Thomas A. R. Purcell (tpurcell90)
* @bug No known bugs.
*
* This class represents the binary operator -> |A - B|
*/
#ifndef ABS_DIFF_NODE
#define ABS_DIFF_NODE
......
......@@ -11,14 +11,16 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/** @file feature_creation/node/operator_nodes/allowed_operator_nodes/abs_diff/parameterized_absolute_difference.hpp
* @brief Class describing the parameterized absolute difference operator
*
* This class represents the parameterized unary operator -> |A - alpha * B + a|
* @brief Defines a class for the parameterized version of the absolute difference operator
*
* @author Thomas A. R. Purcell (tpurcell)
* @author Thomas A. R. Purcell (tpurcell90)
* @bug No known bugs.
*
* This class represents the parameterized unary operator -> |A - alpha * B + a|
*/
#ifndef PARAM_ABS_DIFF_NODE
#define PARAM_ABS_DIFF_NODE
......
......@@ -11,14 +11,16 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/** @file feature_creation/node/operator_nodes/allowed_operator_nodes/add.hpp
* @brief Class describing the addition operator
*
* This class represents the binary operator -> A + B
* @brief Defines a class for the addition operator
*
* @author Thomas A. R. Purcell (tpurcell)
* @author Thomas A. R. Purcell (tpurcell90)
* @bug No known bugs.
*
* This class represents the binary operator -> A + B
*/
#ifndef ADD_NODE
#define ADD_NODE
......
......@@ -11,14 +11,16 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/** @file feature_creation/node/operator_nodes/allowed_operator_nodes/add/parameterized_add.hpp
* @brief Class describing the parameterized addition operator
*
* This class represents the parameterized unary operator -> A + alpha * B + a
* @brief Defines a class for the parameterized version of the addition operator
*
* @author Thomas A. R. Purcell (tpurcell)
* @author Thomas A. R. Purcell (tpurcell90)
* @bug No known bugs.
*
* This class represents the parameterized unary operator -> A + alpha * B
*/
#ifndef PARAM_ADD_NODE
#define PARAM_ADD_NODE
......
......@@ -11,14 +11,16 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/** @file feature_creation/node/operator_nodes/allowed_operator_nodes/cube.hpp
* @brief Class describing the cube operator
*
* This class represents the unary operator -> (A)^3
* @brief Defines a class for the cube operator
*
* @author Thomas A. R. Purcell (tpurcell)
* @author Thomas A. R. Purcell (tpurcell90)
* @bug No known bugs.
*
* This class represents the unary operator -> (A)^3
*/
#ifndef CB_NODE
#define CB_NODE
......
......@@ -11,14 +11,16 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/** @file feature_creation/node/operator_nodes/allowed_operator_nodes/cb/parameterized_cube.hpp
* @brief Class describing the parameterized cube operator
*
* This class represents the parameterized unary operator -> (alpha * A + a)^3
* @brief Defines a class for the parameterized version of the cube operator
*
* @author Thomas A. R. Purcell (tpurcell)
* @author Thomas A. R. Purcell (tpurcell90)
* @bug No known bugs.
*
* This class represents the parameterized unary operator -> (A + a)^3
*/
#ifndef PARAM_CUBE_NODE
#define PARAM_CUBE_NODE
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment