Commit ba3783d2 authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

initial commit; ml has been refactored; it compiles and the tests run well; some…

initial commit; ml has been refactored; it compiles and the tests run well; some other modules, apps and samples do not compile; to be fixed
parent dce1824a
...@@ -1557,13 +1557,17 @@ static void _SVDcompute( InputArray _aarr, OutputArray _w, ...@@ -1557,13 +1557,17 @@ static void _SVDcompute( InputArray _aarr, OutputArray _w,
{ {
if( !at ) if( !at )
{ {
transpose(temp_u, _u); if( _u.needed() )
temp_v.copyTo(_vt); transpose(temp_u, _u);
if( _vt.needed() )
temp_v.copyTo(_vt);
} }
else else
{ {
transpose(temp_v, _u); if( _u.needed() )
temp_u.copyTo(_vt); transpose(temp_v, _u);
if( _vt.needed() )
temp_u.copyTo(_vt);
} }
} }
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
#include "precomp.hpp" #include "precomp.hpp"
#include <time.h> #include <time.h>
#if 0
#define pCvSeq CvSeq* #define pCvSeq CvSeq*
#define pCvDTreeNode CvDTreeNode* #define pCvDTreeNode CvDTreeNode*
...@@ -1359,3 +1361,6 @@ float CvGBTrees::predict( const cv::Mat& sample, const cv::Mat& _missing, ...@@ -1359,3 +1361,6 @@ float CvGBTrees::predict( const cv::Mat& sample, const cv::Mat& _missing,
return predict(&_sample, _missing.empty() ? 0 : &miss, 0, return predict(&_sample, _missing.empty() ? 0 : &miss, 0,
slice==cv::Range::all() ? CV_WHOLE_SEQ : cvSlice(slice.start, slice.end), k); slice==cv::Range::all() ? CV_WHOLE_SEQ : cvSlice(slice.start, slice.end), k);
} }
#endif
This diff is collapsed.
This diff is collapsed.
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
#include "precomp.hpp"
namespace cv
{
CV_INIT_ALGORITHM(EM, "StatModel.EM",
obj.info()->addParam(obj, "nclusters", obj.nclusters);
obj.info()->addParam(obj, "covMatType", obj.covMatType);
obj.info()->addParam(obj, "maxIters", obj.maxIters);
obj.info()->addParam(obj, "epsilon", obj.epsilon);
obj.info()->addParam(obj, "weights", obj.weights, true);
obj.info()->addParam(obj, "means", obj.means, true);
obj.info()->addParam(obj, "covs", obj.covs, true))
bool initModule_ml(void)
{
Ptr<Algorithm> em = createEM_ptr_hidden();
return em->info() != 0;
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#include "test_precomp.hpp" #include "test_precomp.hpp"
#if 0
#include <string> #include <string>
#include <fstream> #include <fstream>
#include <iostream> #include <iostream>
...@@ -284,3 +286,5 @@ void CV_GBTreesTest::run(int) ...@@ -284,3 +286,5 @@ void CV_GBTreesTest::run(int)
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
TEST(ML_GBTrees, regression) { CV_GBTreesTest test; test.safe_run(); } TEST(ML_GBTrees, regression) { CV_GBTreesTest test; test.safe_run(); }
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment