Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
4f367471
Commit
4f367471
authored
Apr 01, 2016
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a member function to get the line intercept from running_gradient.
parent
3165ff28
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
running_gradient.h
dlib/statistics/running_gradient.h
+12
-0
running_gradient_abstract.h
dlib/statistics/running_gradient_abstract.h
+13
-0
No files found.
dlib/statistics/running_gradient.h
View file @
4f367471
...
...
@@ -72,6 +72,18 @@ namespace dlib
return
w
(
0
);
}
double
intercept
(
)
const
{
// make sure requires clause is not broken
DLIB_ASSERT
(
current_n
()
>
0
,
"
\t
double running_gradient::intercept()"
<<
"
\n\t
You must add more values into this object before calling this function."
<<
"
\n\t
this: "
<<
this
);
return
w
(
1
);
}
double
standard_error
(
)
const
{
...
...
dlib/statistics/running_gradient_abstract.h
View file @
4f367471
...
...
@@ -65,6 +65,19 @@ namespace dlib
of this line.
!*/
double
intercept
(
)
const
;
/*!
requires
- current_n() > 0
ensures
- This class fits a line to the time series data given to add(). This
function returns the intercept of that line while gradient() returns the
slope of that line. This means that, for example, the next point that
add() will see, as predicted by this best fit line, is the value
intercept() + current_n()*gradient().
!*/
double
standard_error
(
)
const
;
/*!
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment