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
dd14dc5d
Commit
dd14dc5d
authored
Nov 29, 2010
by
Maria Dimashova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed #517; uncommented ertrees test and moved it to black llist
parent
894cde3f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
5 deletions
+23
-5
inner_functions.cpp
modules/ml/src/inner_functions.cpp
+0
-2
tree.cpp
modules/ml/src/tree.cpp
+21
-2
amltests.cpp
tests/ml/src/amltests.cpp
+1
-1
mltest_main.cpp
tests/ml/src/mltest_main.cpp
+1
-0
No files found.
modules/ml/src/inner_functions.cpp
View file @
dd14dc5d
...
@@ -431,8 +431,6 @@ cvPreprocessIndexArray( const CvMat* idx_arr, int data_arr_size, bool check_for_
...
@@ -431,8 +431,6 @@ cvPreprocessIndexArray( const CvMat* idx_arr, int data_arr_size, bool check_for_
if
(
idx_selected
==
0
)
if
(
idx_selected
==
0
)
CV_ERROR
(
CV_StsOutOfRange
,
"No components/input_variables is selected!"
);
CV_ERROR
(
CV_StsOutOfRange
,
"No components/input_variables is selected!"
);
//if( idx_selected == idx_total )
// EXIT;
break
;
break
;
case
CV_32SC1
:
case
CV_32SC1
:
// idx_arr is array of integer indices of selected components
// idx_arr is array of integer indices of selected components
...
...
modules/ml/src/tree.cpp
View file @
dd14dc5d
...
@@ -666,6 +666,8 @@ CvDTreeNode* CvDTreeTrainData::subsample_data( const CvMat* _subsample_idx )
...
@@ -666,6 +666,8 @@ CvDTreeNode* CvDTreeTrainData::subsample_data( const CvMat* _subsample_idx )
CvMat
*
isubsample_idx
=
0
;
CvMat
*
isubsample_idx
=
0
;
CvMat
*
subsample_co
=
0
;
CvMat
*
subsample_co
=
0
;
bool
isMakeRootCopy
=
true
;
CV_FUNCNAME
(
"CvDTreeTrainData::subsample_data"
);
CV_FUNCNAME
(
"CvDTreeTrainData::subsample_data"
);
__BEGIN__
;
__BEGIN__
;
...
@@ -674,9 +676,26 @@ CvDTreeNode* CvDTreeTrainData::subsample_data( const CvMat* _subsample_idx )
...
@@ -674,9 +676,26 @@ CvDTreeNode* CvDTreeTrainData::subsample_data( const CvMat* _subsample_idx )
CV_ERROR
(
CV_StsError
,
"No training data has been set"
);
CV_ERROR
(
CV_StsError
,
"No training data has been set"
);
if
(
_subsample_idx
)
if
(
_subsample_idx
)
{
CV_CALL
(
isubsample_idx
=
cvPreprocessIndexArray
(
_subsample_idx
,
sample_count
));
CV_CALL
(
isubsample_idx
=
cvPreprocessIndexArray
(
_subsample_idx
,
sample_count
));
if
(
!
isubsample_idx
)
if
(
isubsample_idx
->
cols
+
isubsample_idx
->
rows
-
1
==
sample_count
)
{
const
int
*
sidx
=
isubsample_idx
->
data
.
i
;
for
(
int
i
=
0
;
i
<
sample_count
;
i
++
)
{
if
(
sidx
[
i
]
!=
i
)
{
isMakeRootCopy
=
false
;
break
;
}
}
}
else
isMakeRootCopy
=
false
;
}
if
(
isMakeRootCopy
)
{
{
// make a copy of the root node
// make a copy of the root node
CvDTreeNode
temp
;
CvDTreeNode
temp
;
...
@@ -1588,7 +1607,7 @@ bool CvDTree::do_train( const CvMat* _subsample_idx )
...
@@ -1588,7 +1607,7 @@ bool CvDTree::do_train( const CvMat* _subsample_idx )
CV_CALL
(
try_split_node
(
root
));
CV_CALL
(
try_split_node
(
root
));
if
(
data
->
params
.
cv_folds
>
0
)
if
(
data
->
params
.
cv_folds
>
0
)
CV_CALL
(
prune_cv
());
CV_CALL
(
prune_cv
()
);
if
(
!
data
->
shared
)
if
(
!
data
->
shared
)
data
->
free_train_data
();
data
->
free_train_data
();
...
...
tests/ml/src/amltests.cpp
View file @
dd14dc5d
...
@@ -118,6 +118,6 @@ int CV_AMLTest::validate_test_results( int testCaseIdx )
...
@@ -118,6 +118,6 @@ int CV_AMLTest::validate_test_results( int testCaseIdx )
CV_AMLTest
amldtree
(
CV_DTREE
,
"adtree"
);
CV_AMLTest
amldtree
(
CV_DTREE
,
"adtree"
);
CV_AMLTest
amlboost
(
CV_BOOST
,
"aboost"
);
CV_AMLTest
amlboost
(
CV_BOOST
,
"aboost"
);
CV_AMLTest
amlrtrees
(
CV_RTREES
,
"artrees"
);
CV_AMLTest
amlrtrees
(
CV_RTREES
,
"artrees"
);
//
CV_AMLTest amlertrees( CV_ERTREES, "aertrees" );
CV_AMLTest
amlertrees
(
CV_ERTREES
,
"aertrees"
);
/* End of file. */
/* End of file. */
tests/ml/src/mltest_main.cpp
View file @
dd14dc5d
...
@@ -48,6 +48,7 @@ const char* blacklist[] =
...
@@ -48,6 +48,7 @@ const char* blacklist[] =
"adtree"
,
//ticket 662
"adtree"
,
//ticket 662
"artrees"
,
//ticket 460
"artrees"
,
//ticket 460
"aboost"
,
//ticket 474
"aboost"
,
//ticket 474
"aertrees"
,
0
0
};
};
...
...
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