Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F62095317
ReferenceComputer.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 10, 21:21
Size
2 KB
Mime Type
text/x-c
Expires
Sun, May 12, 21:21 (2 d)
Engine
blob
Format
Raw Data
Handle
17602506
Attached To
R8820 scATAC-seq
ReferenceComputer.hpp
View Options
#ifndef REFERENCECOMPUTER_HPP
#define REFERENCECOMPUTER_HPP
#include <EMEngine.hpp>
#include <Matrix2D.hpp>
#include <Matrix4D.hpp>
/*!
* \brief The ReferenceComputer class is a wrapper around the
* EMEngine class that allows to compute the class references
* given the posterior probability matrix and the data without
* having to re-run the data classification.
*
* This class is typically made to be used in conjunction with
* an EMEngine instance, using the following pattern :
*
* Matrix2D<int> data = ... ;
* EMEngine em(data, ...) ;
* em.cluster() ;
* auto prob = em.get_posterior_prob() ;
* auto obj = ReferenceComputer(data, prob, ...) ;
* auto ll = obj.get_loglikelihood() ;
* auto ref = obj.get_references() ;
*/
class
ReferenceComputer
:
public
EMEngine
{
public
:
ReferenceComputer
()
=
delete
;
/*!
* \brief Constructs an obect and computes the references.
* \param the data for which the classification probabilities
* have been generated.
* \param the classification probabilities for the given data, as
* return by an EMEngine instance (see above).
* \param n_threads the number of threads dedicated to the
* computations.
*/
ReferenceComputer
(
const
Matrix2D
<
int
>&
data
,
const
Matrix4D
<
double
>&
posterior_prob
,
size_t
n_threads
)
;
/*!
* \brief Destructor.
*/
virtual
~
ReferenceComputer
()
override
;
/*!
* \brief Returns a matrix with the class class references
* (protypic signal), on each row.
* The 1st column contains the class probability, the
* following ones the class signal.
* \return a matrix containing the class references and their
* probabalities, on each row.
*/
virtual
Matrix2D
<
double
>
get_references
()
const
override
;
// removes the following methods from the public interface to restrict it
private
:
using
EMEngine
::
cluster
;
}
;
#endif
// REFERENCECOMPUTER_HPP
Event Timeline
Log In to Comment