libpappsomspp
Library for mass spectrometry
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
LinearRegression
33
{
34
public
:
35
LinearRegression
(
const
Trace &data);
36
double
getYfromX
(
double
score)
const
;
37
double
getIntercept
()
const
;
38
double
getSlope
()
const
;
39
40
/** @brief get Root-Mean-Square Deviation
41
*/
42
double
getRmsd
(
const
Trace &data)
const
;
43
/** @brief get Normalized Root-Mean-Square Deviation
44
*/
45
double
getNrmsd
(
const
Trace &data)
const
;
46
/** @brief get Coefficient of determination (R2)
47
*/
48
double
getCoefficientOfDetermination
(
const
Trace &data)
const
;
49
50
private
:
51
double
_slope
= 0;
52
double
_intercept
= 0;
53
};
54
}
// namespace pappso
pappso::LinearRegression::getYfromX
double getYfromX(double score) const
Definition:
linearregression.cpp:73
pappso::LinearRegression::getCoefficientOfDetermination
double getCoefficientOfDetermination(const Trace &data) const
get Coefficient of determination (R2)
Definition:
linearregression.cpp:105
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks
Definition:
aa.cpp:39
pappso::LinearRegression::_intercept
double _intercept
Definition:
linearregression.h:88
pappso::LinearRegression::_slope
double _slope
Definition:
linearregression.h:87
trace.h
pappso::LinearRegression::getSlope
double getSlope() const
Definition:
linearregression.cpp:68
pappso::LinearRegression::getNrmsd
double getNrmsd(const Trace &data) const
get Normalized Root-Mean-Square Deviation
Definition:
linearregression.cpp:98
pappso::LinearRegression::getRmsd
double getRmsd(const Trace &data) const
get Root-Mean-Square Deviation
Definition:
linearregression.cpp:79
pappso::LinearRegression::getIntercept
double getIntercept() const
Definition:
linearregression.cpp:63
pappso::LinearRegression::LinearRegression
LinearRegression(const Trace &data)
Definition:
linearregression.cpp:32
pappsomspp
trace
linearregression.h
Generated on Mon Aug 24 2020 17:42:19 for libpappsomspp by
1.8.18