Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F60952526
ConsensusSequenceLayer.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
Fri, May 3, 14:11
Size
3 KB
Mime Type
text/x-c
Expires
Sun, May 5, 14:11 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
17444653
Attached To
R8820 scATAC-seq
ConsensusSequenceLayer.hpp
View Options
#ifndef CONSENSUSSEQUENCELAYER_HPP
#define CONSENSUSSEQUENCELAYER_HPP
#include <SequenceLayer.hpp>
class
ConsensusSequenceLayer
:
public
SequenceLayer
{
public
:
/*!
* \brief Constructs an object with the
* given data and an empty (0 values)
* model.
* \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.
*/
ConsensusSequenceLayer
(
const
Matrix3D
<
double
>&
data
,
size_t
n_class
,
size_t
n_shift
,
bool
flip
,
bool
bckg_class
)
;
/*!
* \brief Constructs an object with the
* given data and an empty (0 values)
* model.
* \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.
*/
ConsensusSequenceLayer
(
Matrix2D
<
int
>&&
data
,
size_t
n_class
,
size_t
n_shift
,
bool
flip
,
bool
bckg_class
)
;
/*!
* \brief Destructor.
*/
virtual
~
ConsensusSequenceLayer
()
;
/*!
* \brief Computes the log likelihood of the data
* given the current model parameters.
* \param logliklihood a matrix to store the
* results. It should have the following dimensions :
* 1st : same as the data number of row
* 2nd : same as the model number of classes
* 3rd : same as the number of shifts
* 4th : same as the number of flip states
* \param loglikelihood_max a vector containing the
* max value for each row of loglikelihood.
* Its length should be equal to the data row number.
* \throw std::invalid_argument if the dimensions are
* incorrect.
*/
virtual
void
compute_loglikelihoods
(
Matrix4D
<
double
>&
loglikelihood
,
vector_d
&
loglikelihood_max
,
ThreadPool
*
threads
=
nullptr
)
const
override
;
/*!
* \brief Updates the model given the posterior
* probabilities (the probabilities of each row
* in the data to be assigned to each class,
* for each shift and flip state).
* \param posterior_prob the data assignment probabilities to
* the different classes.
*/
virtual
void
update_model
(
const
Matrix4D
<
double
>&
posterior_prob
,
ThreadPool
*
threads
=
nullptr
)
override
;
protected
:
}
;
#endif
// CONSENSUSSEQUENCELAYER_HPP
Event Timeline
Log In to Comment