Commit 731f6ef6 authored by Serrière Guillaume's avatar Serrière Guillaume

Fix warning in classification compilation.

Signed-off-by: default avatarSerrière Guillaume <guillaume.serriere@inria.fr>
parent 47a260ff
......@@ -319,7 +319,7 @@ boolean CAlgorithmClassifierMLP::train(const IFeatureVectorSet &rFeatureVectorSe
boolean CAlgorithmClassifierMLP::classify(const IFeatureVector &rFeatureVector, float64 &rf64Class, IVector &rDistanceValue, IVector &rProbabilityValue)
{
if(rFeatureVector.getSize() != m_oInputWeight.cols())
if(rFeatureVector.getSize() != static_cast<uint32>(m_oInputWeight.cols()))
{
this->getLogManager() << LogLevel_Error << "Classifier expected " << static_cast<uint32>(m_oInputWeight.cols()) << " features, got " << rFeatureVector.getSize() << "\n";
return false;
......@@ -492,9 +492,9 @@ void CAlgorithmClassifierMLP::dumpData(XML::IXMLNode *pNode, float64 f64Value)
pNode->setPCData(l_sData.str().c_str());
}
void CAlgorithmClassifierMLP::loadData(XML::IXMLNode *pNode, MatrixXd &rMatrix, OpenViBE::int64 ui32RowCount, OpenViBE::int64 ui32ColCount)
void CAlgorithmClassifierMLP::loadData(XML::IXMLNode *pNode, MatrixXd &rMatrix, OpenViBE::int64 i64RowCount, OpenViBE::int64 i64ColCount)
{
rMatrix = MatrixXd(ui32RowCount, ui32ColCount);
rMatrix = MatrixXd(i64RowCount, i64ColCount);
std::stringstream l_sData(pNode->getPCData());
std::vector < float64 > l_vCoefficients;
......@@ -505,11 +505,11 @@ void CAlgorithmClassifierMLP::loadData(XML::IXMLNode *pNode, MatrixXd &rMatrix,
}
size_t index=0;
for(int64 i =0; i < ui32RowCount; ++i)
for(int64 i =0; i < i64RowCount; ++i)
{
for(int64 j=0; j < ui32ColCount; ++j)
for(int64 j=0; j < i64ColCount; ++j)
{
rMatrix(i,j) = l_vCoefficients[index];
rMatrix(static_cast<int32>(i) ,static_cast<int32>(j)) = l_vCoefficients[index];
++index;
}
......
......@@ -52,7 +52,7 @@ namespace OpenViBEPlugins
void dumpData (XML::IXMLNode *pNode, OpenViBE::int64 i64Value);
void dumpData (XML::IXMLNode *pNode, OpenViBE::float64 f64Value);
void loadData (XML::IXMLNode *pNode, Eigen::MatrixXd &rMatrix, OpenViBE::int64 ui32RowCount, OpenViBE::int64 ui32ColCount);
void loadData (XML::IXMLNode *pNode, Eigen::MatrixXd &rMatrix, OpenViBE::int64 i64RowCount, OpenViBE::int64 i64ColCount);
void loadData (XML::IXMLNode *pNode, Eigen::VectorXd &rVector);
void loadData (XML::IXMLNode *pNode, OpenViBE::int64 &i64Value);
void loadData (XML::IXMLNode *pNode, OpenViBE::float64 &f64Value);
......
......@@ -528,7 +528,6 @@ boolean CBoxAlgorithmClassifierTrainer::printConfusionMatrix(const CMatrix& oMat
OpenViBEToolkit::Tools::Matrix::clearContent(l_oRowSum);
for(uint32 i=0;i<l_ui32Rows;i++) {
float64 l_f64RowSum = 0;
for(uint32 j=0;j<l_ui32Rows;j++) {
l_oRowSum[i] += l_oTmp[i*l_ui32Rows+j];
}
......
......@@ -9,7 +9,7 @@ IF(WIN32)
ELSE(WIN32)
SET(EXT sh)
SET(OS_FLAGS "")
SET(OV_LOGFILE "$ENV{HOME}/.config/openvibe/log/openvibe-designer.log")
SET(OV_LOGFILE "$ENV{HOME}/.config/openvibe/log/openvibe-designer.log")
ENDIF(WIN32)
SET(TEST_SCENARIOS LDA-OneVsOne-HT-Test LDA-OneVsOne-PKPD-Test LDA-OneVsOne-Voting-Test LDA-OneVsAll-Test sLDA-OneVsOne-HT-Test sLDA-OneVsOne-PKPD-Test sLDA-OneVsOne-Voting-Test sLDA-OneVsAll-Test SVM-Native-Test SVM-OneVsOne-Voting-Test SVM-OneVsOne-HT-Test SVM-OneVsOne-PKPD-Test SVM-OneVsAll-Test MLP-Native-Test MLP-OneVsOne-Voting-Test MLP-OneVsOne-HT-Test MLP-OneVsOne-PKPD-Test MLP-OneVsAll-Test)
......
......@@ -43,6 +43,6 @@ IF(SIKULI)
SET_TESTS_PROPERTIES(run_Evaluation_ROC PROPERTIES DEPENDS clean_Evaluation_ROC)
SET_TESTS_PROPERTIES(run_Evaluation_ROC PROPERTIES ATTACHED_FILES_ON_FAIL ${OV_LOGFILE})
SET_TESTS_PROPERTIES(run_Evaluation_ROC PROPERTIES ATTACHED_FILES_ON_FAIL "screenshot.png")
SET_TESTS_PROPERTIES(run_Evaluation_ROC PROPERTIES ATTACHED_FILES_ON_FAIL ${CTEST_SOURCE_DIRECTORY}/plugins/processing/evaluation/test/screenshot.png)
ENDIF(UNIX)
ENDIF(SIKULI)
\ No newline at end of file
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