wrapped up lines and some minor corrections

This commit is contained in:
jeffinsam
2019-05-11 09:25:31 +05:30
parent 0f0d76ae47
commit c1ef30fed5
3 changed files with 2 additions and 8 deletions
-4
View File
@@ -29,10 +29,6 @@ void LoadARFF(const std::string& filename,
// First, open the file.
std::ifstream ifs;
ifs.open(filename, std::ios::in | std::ios::binary);
if (!ifs.is_open())
{
Log::Fatal << "Cannot open file '" << filename << "'. " << std::endl;
}
// if file is not open throw an error (file not found).
if (!ifs.is_open())
+1 -3
View File
@@ -2,8 +2,7 @@
* @file one_hot_encoding.hpp
* @author Jeffin Sam
*
* One hot encoding functions
* The purpose of this function is to convert
* One hot encoding functions .The purpose of this function is to convert
* categorical variables as binary vectors.
*
* mlpack is free software; you may redistribute it and/or modify it under the
@@ -33,7 +32,6 @@ template<typename eT, typename RowType>
void OneHotEncoding(const RowType& labelsIn,
arma::Mat<eT>& output);
} // namespace data
} // namespace mlpack
+1 -1
View File
@@ -920,7 +920,7 @@ BOOST_AUTO_TEST_CASE(OneHotEncodingTest)
"1 0;"
"0 1;"
"1 0;";
// output matrix
// Output matrix to save onehotencoding results.
arma::Mat<size_t> output;
arma::irowvec labels("-1 1 -1 -1 -1 -1 1 -1");
data::OneHotEncoding(labels, output);