Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
49b38fe7
Commit
49b38fe7
authored
Mar 11, 2015
by
ippei ito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed compile error build with VisualStudio2013 on windows.
REG_NONE defined in ml.hpp conflicts with defined in Winnt.h
parent
baf191fa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
ml.hpp
modules/ml/include/opencv2/ml.hpp
+1
-1
lr.cpp
modules/ml/src/lr.cpp
+3
-3
No files found.
modules/ml/include/opencv2/ml.hpp
View file @
49b38fe7
...
@@ -1339,7 +1339,7 @@ public:
...
@@ -1339,7 +1339,7 @@ public:
//! Regularization kinds
//! Regularization kinds
enum
RegKinds
{
enum
RegKinds
{
REG_
NON
E
=
-
1
,
//!< Regularization disabled
REG_
DISABL
E
=
-
1
,
//!< Regularization disabled
REG_L1
=
0
,
//!< %L1 norm
REG_L1
=
0
,
//!< %L1 norm
REG_L2
=
1
//!< %L2 norm
REG_L2
=
1
//!< %L2 norm
};
};
...
...
modules/ml/src/lr.cpp
View file @
49b38fe7
...
@@ -322,7 +322,7 @@ double LogisticRegressionImpl::compute_cost(const Mat& _data, const Mat& _labels
...
@@ -322,7 +322,7 @@ double LogisticRegressionImpl::compute_cost(const Mat& _data, const Mat& _labels
theta_b
=
_init_theta
(
Range
(
1
,
n
),
Range
::
all
());
theta_b
=
_init_theta
(
Range
(
1
,
n
),
Range
::
all
());
multiply
(
theta_b
,
theta_b
,
theta_c
,
1
);
multiply
(
theta_b
,
theta_b
,
theta_c
,
1
);
if
(
params
.
norm
!=
REG_NON
E
)
if
(
params
.
norm
!=
REG_DISABL
E
)
{
{
llambda
=
1
;
llambda
=
1
;
}
}
...
@@ -377,7 +377,7 @@ Mat LogisticRegressionImpl::compute_batch_gradient(const Mat& _data, const Mat&
...
@@ -377,7 +377,7 @@ Mat LogisticRegressionImpl::compute_batch_gradient(const Mat& _data, const Mat&
m
=
_data
.
rows
;
m
=
_data
.
rows
;
n
=
_data
.
cols
;
n
=
_data
.
cols
;
if
(
params
.
norm
!=
REG_NON
E
)
if
(
params
.
norm
!=
REG_DISABL
E
)
{
{
llambda
=
1
;
llambda
=
1
;
}
}
...
@@ -449,7 +449,7 @@ Mat LogisticRegressionImpl::compute_mini_batch_gradient(const Mat& _data, const
...
@@ -449,7 +449,7 @@ Mat LogisticRegressionImpl::compute_mini_batch_gradient(const Mat& _data, const
Mat
data_d
;
Mat
data_d
;
Mat
labels_l
;
Mat
labels_l
;
if
(
params
.
norm
!=
REG_NON
E
)
if
(
params
.
norm
!=
REG_DISABL
E
)
{
{
lambda_l
=
1
;
lambda_l
=
1
;
}
}
...
...
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