Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
0b6d5df5
"...git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "e3f3672f46877c18aa4088d852988b35fc4d1e1b"
Commit
0b6d5df5
authored
Nov 10, 2017
by
Davis King
Browse files
merged
parents
2b0a4a6f
8b5c04d0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
9 deletions
+19
-9
dlib/cmake_utils/dlibConfig.cmake.in
dlib/cmake_utils/dlibConfig.cmake.in
+2
-3
dlib/test/dnn.cpp
dlib/test/dnn.cpp
+1
-0
tools/python/src/decision_functions.cpp
tools/python/src/decision_functions.cpp
+5
-0
tools/python/src/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)
...
@@ -28,9 +28,8 @@ if(NOT TARGET dlib-shared AND NOT dlib_BINARY_DIR)
include("${dlib_CMAKE_DIR}/dlib.cmake")
include("${dlib_CMAKE_DIR}/dlib.cmake")
endif()
endif()
find_library(dlib_LIBRARIES dlib HINTS "@CMAKE_INSTALL_FULL_LIBDIR@")
set(dlib_LIBRARIES dlib::dlib)
set(dlib_LIBRARIES ${dlib_LIBRARIES} "@dlib_needed_libraries@")
set(dlib_LIBS dlib::dlib)
set(dlib_LIBS ${dlib_LIBRARIES} "@dlib_needed_libraries@")
set(dlib_INCLUDE_DIRS "@CMAKE_INSTALL_FULL_INCLUDEDIR@" "@dlib_needed_includes@")
set(dlib_INCLUDE_DIRS "@CMAKE_INSTALL_FULL_INCLUDEDIR@" "@dlib_needed_includes@")
mark_as_advanced(dlib_LIBRARIES)
mark_as_advanced(dlib_LIBRARIES)
...
...
dlib/test/dnn.cpp
View file @
0b6d5df5
...
@@ -2167,6 +2167,7 @@ namespace
...
@@ -2167,6 +2167,7 @@ namespace
void
test_simple_linear_regression_with_mult_prev
()
void
test_simple_linear_regression_with_mult_prev
()
{
{
srand
(
1234
);
print_spinner
();
print_spinner
();
const
int
num_samples
=
1000
;
const
int
num_samples
=
1000
;
::
std
::
vector
<
matrix
<
double
>>
x
(
num_samples
);
::
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)
...
@@ -116,6 +116,7 @@ std::string regression_test__str__(const regression_test& item)
{
{
std
::
ostringstream
sout
;
std
::
ostringstream
sout
;
sout
<<
"mean_squared_error: "
<<
item
.
mean_squared_error
<<
" R_squared: "
<<
item
.
R_squared
;
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
();
return
sout
.
str
();
}
}
std
::
string
regression_test__repr__
(
const
regression_test
&
item
)
{
return
"< "
+
regression_test__str__
(
item
)
+
" >"
;}
std
::
string
regression_test__repr__
(
const
regression_test
&
item
)
{
return
"< "
+
regression_test__str__
(
item
)
+
" >"
;}
...
@@ -247,6 +248,10 @@ void bind_decision_functions()
...
@@ -247,6 +248,10 @@ void bind_decision_functions()
class_
<
regression_test
>
(
"_regression_test"
)
class_
<
regression_test
>
(
"_regression_test"
)
.
def
(
"__str__"
,
regression_test__str__
)
.
def
(
"__str__"
,
regression_test__str__
)
.
def
(
"__repr__"
,
regression_test__repr__
)
.
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
,
.
add_property
(
"mean_squared_error"
,
&
regression_test
::
mean_squared_error
,
"The mean squared error of a regression function on a dataset."
)
"The mean squared error of a regression function on a dataset."
)
.
add_property
(
"R_squared"
,
&
regression_test
::
R_squared
,
.
add_property
(
"R_squared"
,
&
regression_test
::
R_squared
,
...
...
tools/python/src/testing_results.h
View file @
0b6d5df5
...
@@ -19,14 +19,19 @@ struct binary_test
...
@@ -19,14 +19,19 @@ struct binary_test
struct
regression_test
struct
regression_test
{
{
regression_test
()
:
mean_squared_error
(
0
),
R_squared
(
0
)
{}
regression_test
()
=
default
;
regression_test
(
regression_test
(
const
dlib
::
matrix
<
double
,
1
,
2
>&
m
const
dlib
::
matrix
<
double
,
1
,
4
>&
m
)
:
mean_squared_error
(
m
(
0
)),
)
:
mean_squared_error
(
m
(
0
)),
R_squared
(
m
(
1
))
{}
R_squared
(
m
(
1
)),
mean_average_error
(
m
(
2
)),
double
mean_squared_error
;
mean_error_stddev
(
m
(
3
))
double
R_squared
;
{}
double
mean_squared_error
=
0
;
double
R_squared
=
0
;
double
mean_average_error
=
0
;
double
mean_error_stddev
=
0
;
};
};
struct
ranking_test
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