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
0b6d5df5
Commit
0b6d5df5
authored
Nov 10, 2017
by
Davis King
Browse files
Options
Browse Files
Download
Plain Diff
merged
parents
2b0a4a6f
8b5c04d0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
9 deletions
+19
-9
dlibConfig.cmake.in
dlib/cmake_utils/dlibConfig.cmake.in
+2
-3
dnn.cpp
dlib/test/dnn.cpp
+1
-0
decision_functions.cpp
tools/python/src/decision_functions.cpp
+5
-0
testing_results.h
tools/python/src/testing_results.h
+11
-6
No files found.
dlib/cmake_utils/dlibConfig.cmake.in
View file @
0b6d5df5
...
...
@@ -28,9 +28,8 @@ if(NOT TARGET dlib-shared AND NOT dlib_BINARY_DIR)
include("${dlib_CMAKE_DIR}/dlib.cmake")
endif()
find_library(dlib_LIBRARIES dlib HINTS "@CMAKE_INSTALL_FULL_LIBDIR@")
set(dlib_LIBRARIES ${dlib_LIBRARIES} "@dlib_needed_libraries@")
set(dlib_LIBS ${dlib_LIBRARIES} "@dlib_needed_libraries@")
set(dlib_LIBRARIES dlib::dlib)
set(dlib_LIBS dlib::dlib)
set(dlib_INCLUDE_DIRS "@CMAKE_INSTALL_FULL_INCLUDEDIR@" "@dlib_needed_includes@")
mark_as_advanced(dlib_LIBRARIES)
...
...
dlib/test/dnn.cpp
View file @
0b6d5df5
...
...
@@ -2167,6 +2167,7 @@ namespace
void
test_simple_linear_regression_with_mult_prev
()
{
srand
(
1234
);
print_spinner
();
const
int
num_samples
=
1000
;
::
std
::
vector
<
matrix
<
double
>>
x
(
num_samples
);
...
...
tools/python/src/decision_functions.cpp
View file @
0b6d5df5
...
...
@@ -116,6 +116,7 @@ std::string regression_test__str__(const regression_test& item)
{
std
::
ostringstream
sout
;
sout
<<
"mean_squared_error: "
<<
item
.
mean_squared_error
<<
" R_squared: "
<<
item
.
R_squared
;
sout
<<
" mean_average_error: "
<<
item
.
mean_average_error
<<
" mean_error_stddev: "
<<
item
.
mean_error_stddev
;
return
sout
.
str
();
}
std
::
string
regression_test__repr__
(
const
regression_test
&
item
)
{
return
"< "
+
regression_test__str__
(
item
)
+
" >"
;}
...
...
@@ -247,6 +248,10 @@ void bind_decision_functions()
class_
<
regression_test
>
(
"_regression_test"
)
.
def
(
"__str__"
,
regression_test__str__
)
.
def
(
"__repr__"
,
regression_test__repr__
)
.
add_property
(
"mean_average_error"
,
&
regression_test
::
mean_average_error
,
"The mean average error of a regression function on a dataset."
)
.
add_property
(
"mean_error_stddev"
,
&
regression_test
::
mean_error_stddev
,
"The standard deviation of the absolute value of the error of a regression function on a dataset."
)
.
add_property
(
"mean_squared_error"
,
&
regression_test
::
mean_squared_error
,
"The mean squared error of a regression function on a dataset."
)
.
add_property
(
"R_squared"
,
&
regression_test
::
R_squared
,
...
...
tools/python/src/testing_results.h
View file @
0b6d5df5
...
...
@@ -19,14 +19,19 @@ struct binary_test
struct
regression_test
{
regression_test
()
:
mean_squared_error
(
0
),
R_squared
(
0
)
{}
regression_test
()
=
default
;
regression_test
(
const
dlib
::
matrix
<
double
,
1
,
2
>&
m
const
dlib
::
matrix
<
double
,
1
,
4
>&
m
)
:
mean_squared_error
(
m
(
0
)),
R_squared
(
m
(
1
))
{}
double
mean_squared_error
;
double
R_squared
;
R_squared
(
m
(
1
)),
mean_average_error
(
m
(
2
)),
mean_error_stddev
(
m
(
3
))
{}
double
mean_squared_error
=
0
;
double
R_squared
=
0
;
double
mean_average_error
=
0
;
double
mean_error_stddev
=
0
;
};
struct
ranking_test
...
...
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