Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F64622638
Data2DLayer.hpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, May 28, 05:53
Size
5 KB
Mime Type
text/x-c
Expires
Thu, May 30, 05:53 (2 d)
Engine
blob
Format
Raw Data
Handle
17934326
Attached To
R8820 scATAC-seq
Data2DLayer.hpp
View Options
#ifndef DATA2DLAYER_HPP
#define DATA2DLAYER_HPP
#include <DataLayer.hpp>
#include <Matrix2D.hpp>
#include <Matrix3D.hpp>
#include <Matrix4D.hpp>
typedef
std
::
vector
<
double
>
vector_d
;
class
Data2DLayer
:
public
DataLayer
{
public
:
/*!
* \brief Constructs an empty object.
*/
Data2DLayer
()
;
/*!
* \brief Constructs an object with the
* given data.
* An empty model is not initialised yet
* as the model number of categories
* depends on the final class.
* \param data the data.
* \param n_class the number of classes
* of the model.
* \param n_shift the number of shift
* states of the model.
* \param flip whether flipping is allowed.
* \param bckg_class should the last class
* of the model is constant and models the
* background.
*/
Data2DLayer
(
const
Matrix2D
<
int
>&
data
,
size_t
n_class
,
size_t
n_shift
,
bool
flip
,
bool
bckg_class
)
;
/*!
* \brief Constructs an object with the
* given data.
* An empty model is not initialised yet
* as the model number of categories
* depends on the final class.
* \param data the data.
* \param n_class the number of classes
* of the model.
* \param n_shift the number of shift
* states of the model.
* \param flip whether flipping is allowed.
* \param bckg_class should the last class
* of the model is constant and models the
* background.
*/
Data2DLayer
(
Matrix2D
<
int
>&&
data
,
size_t
n_class
,
size_t
n_shift
,
bool
flip
,
bool
bckg_class
)
;
/*!
* \brief Constructs an object with the
* given data and model.
* The model dimensions set the number of
* classes and the shifting freedom.
* \param data the data.
* \param the model.
* \param flip whether flipping is allowed.
* \param bckg_class should the last class
* of the model is constant and models the
* background.
*/
Data2DLayer
(
const
Matrix2D
<
int
>&
data
,
const
Matrix3D
<
double
>&
model
,
bool
flip
,
bool
bckg_class
)
;
/*!
* \brief Constructs an object with the
* given data and model.
* The model dimensions set the number of
* classes and the shifting freedom.
* \param data the data.
* \param the model.
* \param flip whether flipping is allowed.
* \param bckg_class should the last class
* of the model is constant and models the
* background.
*/
Data2DLayer
(
Matrix2D
<
int
>&&
data
,
Matrix3D
<
double
>&&
model
,
bool
flip
,
bool
bckg_class
)
;
/*!
* \brief Destructor.
*/
virtual
~
Data2DLayer
()
;
protected
:
/*!
* \brief Checks the argument has compatible
* dimensions with the data and models. If this is
* not the case, throw a std::invalid_argument with
* a relevant message.
* \param logliklihood a matrix to store the
* results. It should have the following dimensions :
* 1st : same as the data row number
* 2nd : same as the model class number
* 3rd : same as the shift state number
* 4th : same as the flip state number
* \throw std::invalid_argument if the dimensions are
* incorrect.
*/
virtual
void
check_loglikelihood_dim
(
const
Matrix4D
<
double
>&
loglikelihood
)
const
override
;
/*!
* \brief Checks that the argument has compatible
* dimensions with the data and models. If this is
* not the case, throw a std::invalid_argument with
* a relevant message.
* \param loglikelihood_max a vector containing the
* max value for each row of log_likelihood.
* It should have a length equal to the number of
* the data row number.
* \throw std::invalid_argument if the dimensions are
* incorrect.
*/
virtual
void
check_loglikelihood_max_dim
(
const
vector_d
&
loglikelihood_max
)
const
override
;
/*!
* \brief Checks the argument has compatible
* dimensions with the data and models. If this is
* not the case, throw a std::invalid_argument with
* a relevant message.
* \param posterior_prob a matrix to store the
* results. It should have the following dimensions :
* 1st : same as the data row number
* 2nd : same as the model class number
* 3rd : same as the shift state number
* 4th : same as the flip state number
* \throw std::invalid_argument if the dimensions are
* incorrect.
*/
virtual
void
check_posterior_prob_dim
(
const
Matrix4D
<
double
>&
posterior_prob
)
const
override
;
/*!
* \brief the data.
*/
Matrix2D
<
int
>
data
;
/*!
* \brief the number of row in the data.
*/
size_t
n_row
;
/*!
* \brief the number of columns in the data.
*/
size_t
n_col
;
}
;
#endif
// DATA2DLAYER_HPP
Event Timeline
Log In to Comment