libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
linearregression.h
Go to the documentation of this file.
1
/**
2
* \file utils/linearregression.h
3
* \date 17/9/2016
4
* \author Olivier Langella
5
* \brief compute linear regression
6
*/
7
8
/*******************************************************************************
9
* Copyright (c) 2016 Olivier Langella <Olivier.Langella@u-psud.fr>.
10
*
11
* This file is part of peptider.
12
*
13
* peptider is free software: you can redistribute it and/or modify
14
* it under the terms of the GNU General Public License as published by
15
* the Free Software Foundation, either version 3 of the License, or
16
* (at your option) any later version.
17
*
18
* peptider is distributed in the hope that it will be useful,
19
* but WITHOUT ANY WARRANTY; without even the implied warranty of
20
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
* GNU General Public License for more details.
22
*
23
* You should have received a copy of the GNU General Public License
24
* along with peptider. If not, see <http://www.gnu.org/licenses/>.
25
*
26
******************************************************************************/
27
#pragma once
28
#include "
trace.h
"
29
30
namespace
pappso
31
{
32
class
PMSPP_LIB_DECL
LinearRegression
33
{
34
public
:
35
LinearRegression
(
const
Trace
&data);
36
LinearRegression
(
const
LinearRegression
&other);
37
double
getYfromX(
double
score)
const
;
38
double
getIntercept()
const
;
39
double
getSlope()
const
;
40
41
/** @brief get Root-Mean-Square Deviation
42
*/
43
double
getRmsd()
const
;
44
45
/** @brief get Normalized Root-Mean-Square Deviation
46
*/
47
double
getNrmsd()
const
;
48
49
/** @brief get Coefficient of determination (R2)
50
*/
51
double
getCoefficientOfDetermination()
const
;
52
53
/** @brief get data size
54
*/
55
std::size_t getSize()
const
;
56
57
private
:
58
double
m_slope = 0;
59
double
m_intercept = 0;
60
Trace
m_data
;
61
};
62
}
// namespace pappso
pappso::LinearRegression
Definition
linearregression.h:33
pappso::LinearRegression::m_data
Trace m_data
Definition
linearregression.h:60
pappso::Trace
A simple container of DataPoint instances.
Definition
trace.h:148
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition
exportinmportconfig.h:14
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition
aa.cpp:39
trace.h
pappsomspp
trace
linearregression.h
Generated on Fri Jul 19 2024 14:40:15 for libpappsomspp by
1.9.8