diff --git a/src/methods/adaboost/adaboost.cpp b/src/methods/adaboost/adaboost.cpp
index 11b16c20c21fbcf829507bfe6f388fa001a593e4..303c5cb1fa5aee68685ec9a1f89c460cdb913cb8 100644
--- a/src/methods/adaboost/adaboost.cpp
+++ b/src/methods/adaboost/adaboost.cpp
@@ -27,6 +27,9 @@ bool usingPerceptron = true;
 bool isPerceptronTrained = false;
 bool isDecisionStumpTrained = false;
 
+int trainedDataDimensionPerceptron = 0;
+int trainedDataDimensionDecisionStump = 0;
+
 
 // input: 	const MatType & 				data, 
 //			const arma::Row< size_t > & 	labels,
@@ -47,6 +50,13 @@ void initModelWithTraining(float *dataMatArr, SP_integer dataMatSize, SP_integer
 {
 	// convert the Prolog array to arma::mat
 	mat data = convertArrayToMat(dataMatArr, dataMatSize, dataMatRowNum);
+	// check if labels fit the data
+    if (data.n_cols != labelsArrSize)
+    {
+        raisePrologSystemExeption("The number of data points does not match the number of labels!");
+        return;
+    }
+
 	// convert the Prolog array to arma::rowvec
 	Row< size_t > labelsVector = convertArrayToVec(labelsArr, labelsArrSize);
 
@@ -55,12 +65,14 @@ void initModelWithTraining(float *dataMatArr, SP_integer dataMatSize, SP_integer
 		usingPerceptron = true;
 		adaBoostPerceptron = AdaBoost<Perceptron<>>(data, labelsVector, numClasses, perceptron::Perceptron<>(numClasses, 0UL, iterations), iterations, tolerance);
 		isPerceptronTrained = true;
+		trainedDataDimensionPerceptron = data.n_rows;
 	}
 	else if (strcmp(learner, "decision_stump") == 0)
 	{
 		usingPerceptron = false;
 		adaBoostDecisionStump = AdaBoost<DecisionTree<>>(data, labelsVector, numClasses, tree::DecisionTree<>(data,labelsVector, numClasses), iterations, tolerance);
 		isDecisionStumpTrained = true;
+		trainedDataDimensionDecisionStump = data.n_rows;
 	}
 	else
 	{
@@ -83,12 +95,14 @@ void initModelNoTraining(double tol = 1e-6,
 		usingPerceptron = true;
 		adaBoostPerceptron = AdaBoost<Perceptron<>>(tol);
 		isPerceptronTrained = false;
+		trainedDataDimensionPerceptron = 0;
 	}
 	else if (strcmp(learner, "decision_stump") == 0)
 	{
 		usingPerceptron = false;
 		adaBoostDecisionStump = AdaBoost<DecisionStump<>>(tol);
 		isDecisionStumpTrained = false;
+		trainedDataDimensionDecisionStump = 0;
 	}
 	else
 	{
@@ -98,8 +112,8 @@ void initModelNoTraining(double tol = 1e-6,
 
 
 // input: 	const MatType & 		test,
-//			arma::Row< size_t > & 	predictedLabels,
-//			arma::mat & 			probabilities
+//			arma::Row< size_t > & 	predictedLabels <-,
+//			arma::mat & 			probabilities <-
 // output: 
 // description: 
 //			Classifies the given data into the number of classes the model was trained for.
@@ -120,14 +134,18 @@ void classify(float *testMatArr, SP_integer testMatSize, SP_integer testMatRowNu
 	// run the classify function on the model depending on if perceptron was selected
 	if(usingPerceptron && isPerceptronTrained)
 	{
+		if (trainedDataDimensionPerceptron != test.n_rows)
+		{
+			raisePrologSystemExeption("The given Datapoints Dimension is diffrent than the trained Dimension!");
+			return;
+		}
 		try
 		{
 			adaBoostPerceptron.Classify(test, predicLabelsReturnVector, probsReturnMat);
 		}
 		catch(const std::exception& e)
 		{
-			std::cerr << e.what() << '\n';
-			raisePrologSystemExeption("The given data matrix has incorrect dimensions compared to the training data!");
+			raisePrologSystemExeption(e.what());
 			return;
 		}
 		
@@ -135,14 +153,18 @@ void classify(float *testMatArr, SP_integer testMatSize, SP_integer testMatRowNu
 	}
 	else if(!usingPerceptron && isDecisionStumpTrained)
 	{
+		if (trainedDataDimensionDecisionStump != test.n_rows)
+		{
+			raisePrologSystemExeption("The given Datapoints Dimension is diffrent than the trained Dimension!");
+			return;
+		}
 		try
 		{
 			adaBoostDecisionStump.Classify(test, predicLabelsReturnVector, probsReturnMat);
 		}
 		catch(const std::exception& e)
 		{
-			std::cerr << e.what() << '\n';
-			raisePrologSystemExeption("The given data matrix has incorrect dimensions compared to the training data!");
+			raisePrologSystemExeption(e.what());
 			return;
 		}
 	}
@@ -242,6 +264,13 @@ double train(float *dataMatArr, SP_integer dataMatSize, SP_integer dataMatRowNum
 {
 	// convert the Prolog array to arma::mat
 	mat data = convertArrayToMat(dataMatArr, dataMatSize, dataMatRowNum);
+	// check if labels fit the data
+    if (data.n_cols != labelsArrSize)
+    {
+        raisePrologSystemExeption("The number of data points does not match the number of labels!");
+        return 0.0;
+    }
+
 	// convert the Prolog array to arma::rowvec
 	Row< size_t > labelsVector = convertArrayToVec(labelsArr, labelsArrSize);
 
@@ -252,7 +281,9 @@ double train(float *dataMatArr, SP_integer dataMatSize, SP_integer dataMatRowNum
 		try
 		{
 			isPerceptronTrained = true;
-			return adaBoostPerceptron.Train(data, labelsVector, numClasses, Perceptron(), iterations, tolerance);
+			double error = adaBoostPerceptron.Train(data, labelsVector, numClasses, Perceptron(), iterations, tolerance);
+			trainedDataDimensionPerceptron = data.n_rows;
+			return error;
 		}
 		catch(const std::exception& e)
 		{
@@ -260,10 +291,6 @@ double train(float *dataMatArr, SP_integer dataMatSize, SP_integer dataMatRowNum
 			{
 				raisePrologSystemExeption("The values of the Label have to start at 0 and be >= 0 and < the given numClass!");
 			}
-			else if (strcmp(e.what(),"Row::subvec(): indices out of bounds or incorrectly used") == 0)
-			{
-				raisePrologSystemExeption("The given Labels Vector is too short!");
-			}
 			else
 			{
 				raisePrologSystemExeption(e.what());
@@ -277,7 +304,9 @@ double train(float *dataMatArr, SP_integer dataMatSize, SP_integer dataMatRowNum
 		try
 		{
 			isDecisionStumpTrained = true;
-			return adaBoostDecisionStump.Train(data, labelsVector, numClasses, DecisionStump<>(), iterations, tolerance);
+			double error = adaBoostDecisionStump.Train(data, labelsVector, numClasses, DecisionStump<>(), iterations, tolerance);
+			trainedDataDimensionDecisionStump = data.n_rows;
+			return error;
 		}
 		catch(const std::exception& e)
 		{
@@ -285,10 +314,6 @@ double train(float *dataMatArr, SP_integer dataMatSize, SP_integer dataMatRowNum
 			{
 				raisePrologSystemExeption("The values of the Label have to start at 0 and be >= 0 and < the given numClass!");
 			}
-			else if (strcmp(e.what(),"Row::subvec(): indices out of bounds or incorrectly used") == 0)
-			{
-				raisePrologSystemExeption("The given Labels Vector is too short!");
-			}
 			else
 			{
 				raisePrologSystemExeption(e.what());
diff --git a/src/methods/adaboost/adaboost_test.pl b/src/methods/adaboost/adaboost_test.pl
index fe9a54f870c2f58054d243e841179068756171e7..c5265642bd9761cfe08ea664cbd15a721ea9d126 100644
--- a/src/methods/adaboost/adaboost_test.pl
+++ b/src/methods/adaboost/adaboost_test.pl
@@ -40,8 +40,11 @@ test(initModelWithTraining_WrongIterations, fail) :-
 test(initModelWithTraining_WrongTol, fail) :-
         adaboost_initModelWithTraining([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0, 0, 1, 0], 2, perceptron, 50, -10.0).
 
-test(initModelWithTraining_MissmatchingLabels) :-
-        adaboost_initModelWithTraining([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0, 0, 1, 0, 1 ,1], 2, perceptron, 50, 0.0001).
+test(initModelWithTraining_Too_Few_Labels, [error(_, system_error('The number of data points does not match the number of labels!'))]) :-
+        adaboost_initModelWithTraining([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0, 1], 2, perceptron, 50, 0.0001).
+
+test(initModelWithTraining_Too_Many_Labels, [error(_, system_error('The number of data points does not match the number of labels!'))]) :-
+        adaboost_initModelWithTraining([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0, 1, 0, 1, 0, 1], 2, perceptron, 50, 0.0001).
 
 
 %% Successful Tests
@@ -90,12 +93,11 @@ test(classify_on_untrained_model, [error(_,system_error('The model is not traine
         reset_Model_No_Train(perceptron),
         adaboost_classify([3, 2, 0, 5, 1, 4, 0, 0, 4, 3, 3, 5, 0, 5, 5, 2, 5, 5, 0, 2], 4, _, _, _).
 
-test(classify_with_bad_data_input_perceptron, [error(_,system_error('The given data matrix has incorrect dimensions compared to the training data!'))]) :-
+test(classify_with_bad_data_input_perceptron, [error(_,system_error('The given Datapoints Dimension is diffrent than the trained Dimension!'))]) :-
         reset_Model_With_Train(perceptron),
         adaboost_classify([3, 2, 0, 5, 1, 4, 0, 0, 4, 3, 3, 5, 0, 5, 5, 2, 5, 5, 0, 2], 2, _, _, _).
 
-%% should cause an exeption but doesnt TODO:
-test(classify_with_bad_data_input_decision_stump) :-
+test(classify_with_bad_data_input_decision_stump, [error(_,system_error('The given Datapoints Dimension is diffrent than the trained Dimension!'))]) :-
         reset_Model_With_Train(decision_stump),
         adaboost_classify([3, 2, 0, 5, 1, 4, 0, 0, 4, 3, 3, 5, 0, 5, 5, 2, 5, 5, 0, 2], 5, _, _, _).
         
@@ -258,25 +260,13 @@ test(train_With_Bad_Tol_Input, fail) :-
         reset_Model_No_Train(perceptron),
         adaboost_train([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,0,0,0], 2, perceptron, 50, -0.0001, _).
 
-test(train_With_Bad_Labels_Too_Many_Classes, [error(_,system_error('The values of the Label have to start at 0 and be >= 0 and < the given numClass!'))]) :-
-        reset_Model_No_Train(perceptron),
-        adaboost_train([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,0,2], 2, perceptron, 50, 0.0001, _).
-
-test(train_With_Bad_Labels_Negative_Perceptron, [error(_,system_error('The values of the Label have to start at 0 and be >= 0 and < the given numClass!'))]) :-
-        reset_Model_No_Train(perceptron),
-        adaboost_train([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,-1,0,-1], 2, perceptron, 50, 0.0001, _).
-
-%% should cause an exeption but doesnt TODO:
-test(train_With_Bad_Labels_Negative_Decision_Stump) :-
-        reset_Model_No_Train(decision_stump),
-        adaboost_train([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,-1,0,-1], 2, decision_stump, 50, 0.0001, _).
 
 %% seems to be allowed
-test(train_With_Too_Many_Labels) :-
+test(train_With_Too_Many_Labels, [error(_,system_error('The number of data points does not match the number of labels!'))]) :-
         reset_Model_No_Train(perceptron),
         adaboost_train([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,0,0,0,1], 2, perceptron, 50, 0.0001, _).
 
-test(train_With_Too_Little_Labels, [error(_,system_error('The given Labels Vector is too short!'))]) :-
+test(train_With_Too_Little_Labels, [error(_,system_error('The number of data points does not match the number of labels!'))]) :-
         reset_Model_No_Train(decision_stump),
         adaboost_train([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1], 2, decision_stump, 50, 0.0001, _).
 
diff --git a/src/methods/bayesian_linear_regression/bayesian_linear_regression_test.pl b/src/methods/bayesian_linear_regression/bayesian_linear_regression_test.pl
index 6f7fa10437a5e9e3c2306d979ddd563a712701df..4db1610ff1b4dc0c0e56c0b6e8e6e361f8f186b6 100644
--- a/src/methods/bayesian_linear_regression/bayesian_linear_regression_test.pl
+++ b/src/methods/bayesian_linear_regression/bayesian_linear_regression_test.pl
@@ -350,10 +350,6 @@ test(bay_lin_reg_Train_Too_Large_Label_Dims, [error(_,system_error('Target dim d
         reset_Model,
         blr_train([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,0,1,0,0,0]).
 
-%% doesnt cause an Exception
-test(bay_lin_reg_Train_Wrong_Label_Value) :-
-        reset_Model,
-        blr_train([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,5,0,-1]).
 
 %% Successful Tests
 
diff --git a/src/methods/decision_tree/decision_tree.cpp b/src/methods/decision_tree/decision_tree.cpp
index 8e6e7e794ce7e07ca7661c09fb35fb538df32084..23f67179c973cd6d93535925c5b2c6c99735be70 100644
--- a/src/methods/decision_tree/decision_tree.cpp
+++ b/src/methods/decision_tree/decision_tree.cpp
@@ -18,7 +18,7 @@ using namespace mlpack::tree;
 // Global Variable of the DecisionTree object so it can be accessed from all functions
 DecisionTree decisionTreeObj;
 
-// TODO: 
+
 // input:   const arma::mat & 	            dataset,
 //          const arma::vec &            	labels,
 //          const size_t 	                numClasses,
@@ -33,6 +33,12 @@ void initModel( float *dataMatArr, SP_integer dataMatSize, SP_integer dataMatRow
 {
     // convert the Prolog array to arma::mat
     mat data = convertArrayToMat(dataMatArr, dataMatSize, dataMatRowNum);
+    // check if labels fit the data
+    if (data.n_cols != labelsArrSize)
+    {
+        raisePrologSystemExeption("The number of data points does not match the number of labels!");
+        return;
+    }
 
     // convert the Prolog array to arma::rowvec
     Row<size_t> labelsVector = convertArrayToVec(labelsArr, labelsArrSize);
@@ -41,16 +47,16 @@ void initModel( float *dataMatArr, SP_integer dataMatSize, SP_integer dataMatRow
     {
         decisionTreeObj = DecisionTree(data, labelsVector, numClasses, minimumLeafSize, minimumGainSplit, maximumDepth);
     }
-    catch(const std::out_of_range& e)
+    catch(const std::exception& e)
     {
-        raisePrologSystemExeption("Labels Vector is too short or its values are incorrect: should fit into [0,numClasses)!");
+        raisePrologSystemExeption(e.what());
         return;
     }
     
     decisionTreeObj = DecisionTree(data, labelsVector, numClasses, minimumLeafSize, minimumGainSplit, maximumDepth);
 }
 
-// TODO: 
+
 // input:   const arma::mat & 	dataset,
 //          arma::Row< size_t > & 	predictions <-,
 //          arma::rowvec & 	probabilities <-
@@ -88,7 +94,7 @@ void classifyPoint( float *pointArr, SP_integer pointArrSize,
     returnVectorInformation(probsReturnVector, probsArr, probsArrSize);
 }
 
-// TODO: 
+
 // input:   const arma::mat & 	dataset,
 //          arma::Row< size_t > & 	predictions <-,
 //          arma::rowvec & 	probabilities <-
@@ -125,7 +131,7 @@ void classifyMatrix(float *dataMatArr, SP_integer dataMatSize, SP_integer dataMa
     
 }
 
-// TODO: 
+
 // input:   MatType 	            dataset,
 //          LabelsType 	            labels,
 //          const size_t 	        numClasses,
@@ -142,7 +148,13 @@ double train(   float *dataMatArr, SP_integer dataMatSize, SP_integer dataMatRow
 {
     // convert the Prolog array to arma::mat
     mat data = convertArrayToMat(dataMatArr, dataMatSize, dataMatRowNum);
-    
+    // check if labels fit the data
+    if (data.n_cols != labelsArrSize)
+    {
+        raisePrologSystemExeption("The number of data points does not match the number of labels!");
+        return 0.0;
+    }
+
     // convert the Prolog array to arma::rowvec
     Row<size_t> labelsVector = convertArrayToVec(labelsArr, labelsArrSize);
 
@@ -150,7 +162,7 @@ double train(   float *dataMatArr, SP_integer dataMatSize, SP_integer dataMatRow
     {
         return decisionTreeObj.Train(data, labelsVector, numClasses, minimumLeafSize, minimumGainSplit, maximumDepth);
     }
-    catch(const std::invalid_argument& e)
+    catch(const std::exception& e)
     {
         raisePrologSystemExeption(e.what());
         return 0.0;
diff --git a/src/methods/decision_tree/decision_tree_test.pl b/src/methods/decision_tree/decision_tree_test.pl
index c5ed2ac305808a67b434a58f156f234210933655..fa13df2133b555e6a69508a979b3984354b43a82 100644
--- a/src/methods/decision_tree/decision_tree_test.pl
+++ b/src/methods/decision_tree/decision_tree_test.pl
@@ -31,16 +31,12 @@ test(decision_tree_Too_High_GainSplit, fail) :-
 test(decision_tree_Negative_MaxDepth, fail) :-
         decision_tree_initModel([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,0,0,0], 1, 1, 0.5, -1).
 
-test(decision_tree_Init_With_Wrong_Label_Dims1, [error(_,system_error('Labels Vector is too short or its values are incorrect: should fit into [0,numClasses)!'))]) :-
+test(decision_tree_Init_With_Wrong_Label_Dims1, [error(_,system_error('The number of data points does not match the number of labels!'))]) :-
         decision_tree_initModel([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,0], 1, 1, 0.5, 1).
 
-%% If the label vector is to long it seems to cause no problems
-test(decision_tree_Init_With_Wrong_Label_Dims2) :-
+test(decision_tree_Init_With_Wrong_Label_Dims2, [error(_,system_error('The number of data points does not match the number of labels!'))]) :-
         decision_tree_initModel([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,0,0,0,0,0], 1, 1, 0.5, 1).
 
-%% The same when the label values are out of range
-test(decision_tree_Init_With_Wrong_Label_Value) :-
-        decision_tree_initModel([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,5,0,-1], 1, 1, 0.5, 1).
         
 
 %% Successful Tests
@@ -120,13 +116,6 @@ test(classify_Matrix_With_Wrong_Dims2) :-
 
 %% Successful Tests
 
-test(classify_Matrix_Wierd_Trained_Labels) :-
-        decision_tree_initModel([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,5,0,-1], 1, 1, 0.5, 1),
-        decision_tree_classifyMatrix([5.1,3.5,1.4, 5.1,3.5,1.4, 5.1,3.5,1.4, 5.1,3.5,1.4, 5.1,3.5,1.4], 3, PredictionList, ProbsList, _),
-        print(PredictionList),
-        print('\n'),
-        print(ProbsList).
-
 test(classify_Matrix_Direkt_Input1) :-
         reset_Model_With_Train,
         decision_tree_classifyMatrix([5.1,3.5,1.4, 5.1,3.5,1.4, 5.1,3.5,1.4, 5.1,3.5,1.4, 5.1,3.5,1.4], 3, PredictionList, ProbsList, _),
@@ -175,15 +164,11 @@ test(decision_tree_Train_Too_High_GainSplit, fail) :-
 test(decision_tree_Train_Negative_MaxDepth, fail) :-
         decision_tree_train([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,0,0,0], 1, 1, 0.5, -1, _).
 
-test(decision_tree_Train_Wrong_Label_Dims1, [error(_,system_error('DecisionTree::Train(): number of points (4) does not match number of labels (2)!\n'))]) :-
+test(decision_tree_Train_Wrong_Label_Dims1, [error(_,system_error('The number of data points does not match the number of labels!'))]) :-
         decision_tree_train([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,0], 1, 1, 0.5, 1, _).
 
-test(decision_tree_Train_Wrong_Label_Dims2, [error(_,system_error('DecisionTree::Train(): number of points (4) does not match number of labels (6)!\n'))]) :-
+test(decision_tree_Train_Wrong_Label_Dims2, [error(_,system_error('The number of data points does not match the number of labels!'))]) :-
         decision_tree_train([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,0,0,0,0,0], 1, 1, 0.5, 1, _).
-
-%% there seems to be no check for the label values
-test(decision_tree_Train_Wrong_Labels) :-
-        decision_tree_train([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [-1,0,0,5], 1, 1, 0.5, 1, _).
         
 
 %% Successful Tests
diff --git a/src/methods/hoeffding_tree/hoeffding_tree_test.pl b/src/methods/hoeffding_tree/hoeffding_tree_test.pl
index 280b7cb233a184da4d8822f1dbe5c6d7014e2e99..b273566f3a6859c330c02784aa208dfb8a37d524 100644
--- a/src/methods/hoeffding_tree/hoeffding_tree_test.pl
+++ b/src/methods/hoeffding_tree/hoeffding_tree_test.pl
@@ -52,14 +52,6 @@ test(hoeffding_Init_With_Wrong_Label_Dims1, [error(_,system_error('The number of
 
 test(hoeffding_Init_With_Wrong_Label_Dims2, [error(_,system_error('The number of data points does not match the number of labels!'))]) :-
         hoeffding_tree_initAndBuildModel(gini_binary, [5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,0,1,0,0,1], 2, 0, 0.95, 5000, 100, 100, 10, 100).
-
-%% doesnt cause an error
-test(hoeffding_Init_With_Wrong_Label_Value) :-
-        hoeffding_tree_initAndBuildModel(gini_binary, [5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,-1,0,-1], 2, 0, 0.95, 5000, 100, 100, 10, 100).
-
-%% doesnt cause an error
-test(hoeffding_Init_With_Too_Many_Label_Value) :-
-        hoeffding_tree_initAndBuildModel(gini_binary, [5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [1,1,0,2], 2, 0, 0.95, 5000, 100, 100, 10, 100).
         
 
 %% Successful Tests
@@ -176,15 +168,6 @@ test(hoeffding_Train_With_Wrong_Label_Dims2, [error(_,system_error('The number o
         reset_Model,
         hoeffding_tree_train([3, 2, 0, 5, 1, 4, 1, 0, 4, 3, 3, 5, 0, 5, 5, 2, 5, 5, 0, 2], 4, [0,1,0,1,0,0,1], 0).
 
-
-%% all 3 test dont cause an error
-test(hoeffding_Train_With_Wrong_Label_Value) :-
-        reset_Model,
-        hoeffding_tree_train([3, 2, 0, 5, 1, 4, 1, 0, 4, 3, 3, 5, 0, 5, 5, 2, 5, 5, 0, 2], 4, [0,-1,0,-1,0], 0).
-
-test(hoeffding_Train_With_Too_Many_Label_Value) :-
-        reset_Model,
-        hoeffding_tree_train([3, 2, 0, 5, 1, 4, 1, 0, 4, 3, 3, 5, 0, 5, 5, 2, 5, 5, 0, 2], 4, [1,1,0,2,3], 0).
         
 test(hoeffding_Train_Bad_Data_Dims) :-
         reset_Model,
diff --git a/src/methods/lars/lars_test.pl b/src/methods/lars/lars_test.pl
index 7332dbd3a788c8a98025522daca365dcea7ca8eb..2cabcf01dff413700f4303a4727eab0ff36b6e41 100644
--- a/src/methods/lars/lars_test.pl
+++ b/src/methods/lars/lars_test.pl
@@ -30,10 +30,6 @@ test(lars_initAndTrainModel_Too_Few_Labels, [error(_,system_error('The number of
 test(lars_initAndTrainModel_Too_Many_Labels, [error(_,system_error('The number of data points does not match the number of labels!'))]) :-
         lars_initAndTrainModel(0, 0.0, 0.0, 1.0e-16, [5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,0,1,0,1], 0, _).
 
-%% doesnt cause an error
-test(lars_initAndTrainModel_Too_Many_Labelclasses) :-
-        lars_initAndTrainModel(0, 0.0, 0.0, 1.0e-16, [5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,2,3], 0, _).
-
 
 test(lars_initAndTrainModel_Wrongly_Transposed, [error(_,system_error('The number of data points does not match the number of labels!'))]) :-
         lars_initAndTrainModel(0, 0.0, 0.0, 1.0e-16, [5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,0,1], 1, _).
@@ -126,11 +122,6 @@ test(lars_ComputeError_Too_Many_Labels, [error(_,system_error('The number of dat
         reset_Model_WithTrain,
         lars_computeError([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,0,1,0,1], 1, _).
 
-%% doenst cause an error
-test(lars_ComputeError_Too_Many_Labelclasses) :-
-        reset_Model_WithTrain,
-        lars_computeError([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,2,3], 1, _).
-
 
 %% Successful Tests
 
diff --git a/src/methods/linear_SVM/linear_SVM_test.pl b/src/methods/linear_SVM/linear_SVM_test.pl
index b61f720f36f794ba10e7ff9970107c68bf576fad..155be25c3aa9a87a95eb61cda3f90a78cb8524c8 100644
--- a/src/methods/linear_SVM/linear_SVM_test.pl
+++ b/src/methods/linear_SVM/linear_SVM_test.pl
@@ -39,10 +39,6 @@ test(linear_SVM_InitModelWithTrain_Too_Few_Labels, [error(_,system_error('The nu
 
 test(linear_SVM_InitModelWithTrain_Too_Many_Labels, [error(_,system_error('The number of data points does not match the number of labels!'))]) :-
         linear_SVM_initModelWithTrain([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,0,1,0,1], 2, 0.0001, 1.0, 0, lbfgs).
-
-%% doesnt cause error
-test(linear_SVM_InitModelWithTrain_Too_Many_LabelClasses) :-
-        linear_SVM_initModelWithTrain([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,2,3], 2, 0.0001, 1.0, 0, lbfgs).
         
 
 %% Successful Tests
@@ -200,11 +196,6 @@ test(linear_SVM_ComputeAccuracy_Too_Many_Labels, [error(_,system_error('The numb
         reset_Model_WithTrain,
         linear_SVM_computeAccuracy([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,0,1,0,1], _).
 
-%% doesnt cause error
-test(linear_SVM_ComputeAccuracy_Too_Many_LabelClasses) :-
-        reset_Model_WithTrain,
-        linear_SVM_computeAccuracy([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,2,3], _).
-
 test(linear_SVM_ComputeAccuracy_Wrong_Data_Dims, [error(_,system_error('The given Datapoints Dimension is != the trained Datapoints Dimension!'))]) :-
         reset_Model_WithTrain,
         linear_SVM_computeAccuracy([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 4, [0,1,0], _).
@@ -258,11 +249,6 @@ test(linear_SVM_Train_Too_Few_Labels, [error(_,system_error('The number of data
 test(linear_SVM_Train_Too_Many_Labels, [error(_,system_error('The number of data points does not match the number of labels!'))]) :-
         reset_Model_NoTrain,
         linear_SVM_train([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,0,1,0,1], 2, lbfgs, _).
-
-%% doesnt cause error
-test(linear_SVM_Train_Too_Many_LabelClasses) :-
-        reset_Model_NoTrain,
-        linear_SVM_train([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,2,3], 2, lbfgs, _).
         
 
 %% Successful Tests
diff --git a/src/methods/linear_regression/linear_regression_test.pl b/src/methods/linear_regression/linear_regression_test.pl
index 507c2546697122a8889f6472968ce7b9dfc37a76..45af09ecfcd49d0ca585f3b13b4c9693dff4dc36 100644
--- a/src/methods/linear_regression/linear_regression_test.pl
+++ b/src/methods/linear_regression/linear_regression_test.pl
@@ -27,9 +27,6 @@ test(linear_regression_InitModel_Too_Few_Labels, [error(_, system_error('The num
 test(linear_regression_InitModel_Too_Many_Labels, [error(_, system_error('The number of data points does not match the number of labels!'))]) :-
         linear_regression_initModel([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,0,1,0,1], 0.0, 1).
 
-%% doesnt cause error
-test(linear_regression_InitModel_Too_Many_Labelclasses) :-
-        linear_regression_initModel([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,2,3], 0.0, 1).
 
 
 %% Successful Tests
@@ -59,10 +56,6 @@ test(linear_regression_InitModelWithWeights_Too_Few_Labels, [error(_, system_err
 test(linear_regression_InitModelWithWeights_Too_Many_Labels, [error(_, system_error('The number of data points does not match the number of labels!'))]) :-
         linear_regression_initModelWithWeights([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,0,1,0,1], [0.2,0.1,0.2,0.5], 0.0, 1).
 
-%% doesnt cause error
-test(linear_regression_InitModelWithWeights_Too_Many_Labelclasses) :-
-        linear_regression_initModelWithWeights([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,2,3], [0.2,0.1,0.2,0.5], 0.0, 1).
-
 
 test(linear_regression_InitModelWithWeights_Too_Few_Weights, [error(_, system_error('The number of data points does not match the number of weights!'))]) :-
         linear_regression_initModelWithWeights([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,0,1], [0.2,0.5], 0.0, 1).
@@ -100,11 +93,6 @@ test(linear_regression_ComputeError_Too_Many_Labels, [error(_, system_error('The
         reset_Model,
         linear_regression_computeError([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,0,1,0,1], _).
 
-%% doesnt cause error
-test(linear_regression_ComputeError_Too_Many_Labelclasses) :-
-        reset_Model,
-        linear_regression_computeError([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,2,3], _).
-
 
 %% Successful Tests
 
@@ -224,10 +212,6 @@ test(linear_regression_Train_Too_Few_Labels, [error(_, system_error('The number
 test(linear_regression_Train_Too_Many_Labels, [error(_, system_error('The number of data points does not match the number of labels!'))]) :-
         linear_regression_train([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,0,1,0,1], 1, _).
 
-%% doesnt cause error
-test(linear_regression_Train_Too_Many_Labelclasses) :-
-        linear_regression_train([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,2,3], 1, _).
-
 
 %% Successful Tests
 
@@ -260,10 +244,6 @@ test(linear_regression_TrainWithWeights_Too_Few_Labels, [error(_, system_error('
 test(linear_regression_TrainWithWeights_Too_Many_Labels, [error(_, system_error('The number of data points does not match the number of labels!'))]) :-
         linear_regression_trainWithWeights([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,0,1,0,1], [0.2,0.1,0.2,0.5], 1 ,_).
 
-%% doesnt cause error
-test(linear_regression_TrainWithWeights_Too_Many_Labelclasses) :-
-        linear_regression_trainWithWeights([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,2,3], [0.2,0.1,0.2,0.5], 1 ,_).
-
 
 test(linear_regression_TrainWithWeights_Too_Few_Weights, [error(_, system_error('The number of data points does not match the number of weights!'))]) :-
         linear_regression_trainWithWeights([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,0,1], [0.2,0.5], 1 ,_).
diff --git a/src/methods/lmnn/lmnn_test.pl b/src/methods/lmnn/lmnn_test.pl
index e3d59378f5485645b3b0b1158a4856871995b6ec..4f47f86d71df06483091a084a5403a1cc725aff3 100644
--- a/src/methods/lmnn/lmnn_test.pl
+++ b/src/methods/lmnn/lmnn_test.pl
@@ -54,9 +54,6 @@ test(lmnn_Negative_Too_Few_Labels, [error(_, system_error('The number of data po
 test(lmnn_Negative_Too_Many_Labels, [error(_, system_error('The number of data points does not match the number of labels!'))]) :-
         lmnn(lbfgs, [5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,0,1,0,1], 2, 0.5, 0.01, 50, 100000, 0.000001, 0, 0, 50, 1, 0, _, _).
 
-test(lmnn_Negative_Too_Many_LabelClasses, [error(_, system_error('fatal error; see Log::Fatal output'))]) :-
-        lmnn(lbfgs, [5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,2,3], 2, 0.5, 0.01, 50, 100000, 0.000001, 0, 0, 50, 1, 0, _, _).
-
         
 
 %% Successful Tests
diff --git a/src/methods/logistic_regression/logistic_regression_test.pl b/src/methods/logistic_regression/logistic_regression_test.pl
index e1371f81228731216ade9c65577a40a98d0f05df..91407c517185ba46762ad8a1cee5d6b7e702ac2c 100644
--- a/src/methods/logistic_regression/logistic_regression_test.pl
+++ b/src/methods/logistic_regression/logistic_regression_test.pl
@@ -204,10 +204,6 @@ test(logistic_regression_ComputeAccuracy_Too_Few_Labels, [error(_, system_error(
 test(logistic_regression_ComputeAccuracy_Too_Many_Labels, [error(_, system_error('The number of data points does not match the number of labels!'))]) :-
         logistic_regression_computeAccuracy([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,0,1,0,1], 0.5, _).
 
-%% doesnt cause error
-test(logistic_regression_computeAccuracy_Too_Many_Labelclasses) :-
-        logistic_regression_computeAccuracy([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,2,3], 0.5, _).
-
 %% Successful Tests
 
 test(logistic_regression_ComputeAccuracy_Normal_Use) :-
diff --git a/src/methods/naive_bayes_classifier/naive_bayes_classifier_test.pl b/src/methods/naive_bayes_classifier/naive_bayes_classifier_test.pl
index 7db8158f4d11593cf93f8bc3f870c48f665fd91b..427a548dcb75cf9c91f940f38f4c6bfd35433d9c 100644
--- a/src/methods/naive_bayes_classifier/naive_bayes_classifier_test.pl
+++ b/src/methods/naive_bayes_classifier/naive_bayes_classifier_test.pl
@@ -57,9 +57,6 @@ test(nbc_InitModelWithTrain_Too_Short_Label, [error(_,system_error('The number o
 
 test(nbc_InitModelWithTrain_Too_Long_Label, [error(_,system_error('The number of data points does not match the number of labels!'))]) :-
         nbc_initModelWithTrain([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,0,1,0,1], 2, 0, 0.000001).
-
-test(nbc_InitModelWithTrain_Too_Many_Label_Classes, [error(_,system_error('The given Labels dont fit the format [0,Numclasses-1]!'))]) :-
-        nbc_initModelWithTrain([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,2,3], 2, 0, 0.000001).
         
 
 %% Successful Tests
@@ -184,10 +181,6 @@ test(nbc_TrainMatrix_Too_Short_Label, [error(_,system_error('The number of data
 test(nbc_TrainMatrix_Too_Long_Label, [error(_,system_error('The number of data points does not match the number of labels!'))]) :-
         reset_Model_NoTrain,
         nbc_trainMatrix([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,0,1,0,1], 2, 0).
-
-test(nbc_TrainMatrix_Too_Many_Label_Classes, [error(_,system_error('The given Labels dont fit the format [0,Numclasses-1]!'))]) :-
-        reset_Model_NoTrain,
-        nbc_trainMatrix([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,2,3], 2, 0).
         
 test(nbc_TrainMatrix_After_InitTrain, [error(_,system_error('The Datapoints Dimensionality doesnt fit the trained Dimensionality!'))]) :-
         reset_Model_WithTrain,
diff --git a/src/methods/nca/nca_test.pl b/src/methods/nca/nca_test.pl
index a6aff525a2b2cc25ab29c8b46a3e5055561bc7f8..a59dd90bcae2dbb24f1838f3b118b4a64a453939 100644
--- a/src/methods/nca/nca_test.pl
+++ b/src/methods/nca/nca_test.pl
@@ -53,10 +53,6 @@ test(nca_Too_Short_Label, [error(_,system_error('The number of data points does
 
 test(nca_Too_Long_Label, [error(_,system_error('The number of data points does not match the number of labels!'))]) :-
         nca(lbfgs, 0.01, 500000, 0.00001, 1, 5, 0.0001, 0.9, 50, 0.000000001, 100000000, 50, [5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,0,1,0,1], _, _).
-
-%% Doesnt cause an error
-test(nca_Too_Many_Label_Classes) :-
-        nca(lbfgs, 0.01, 500000, 0.00001, 1, 5, 0.0001, 0.9, 50, 0.000000001, 100000000, 50, [5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,2,3], _, _).
         
 
 %% Successful Tests
diff --git a/src/methods/perceptron/perceptron_test.pl b/src/methods/perceptron/perceptron_test.pl
index bd77ad9516396237224c309b45c16e70d18388a5..680ea3dc51f96c5e977e3b854372cd7ebb786a28 100644
--- a/src/methods/perceptron/perceptron_test.pl
+++ b/src/methods/perceptron/perceptron_test.pl
@@ -63,9 +63,6 @@ test(random_forest_InitModelWithTrainNoWeights_Too_Short_Label, [error(_,system_
 
 test(random_forest_InitModelWithTrainNoWeights_Too_Long_Label, [error(_,system_error('The number of data points does not match the number of labels!'))]) :-
         perceptron_initModelWithTrain([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,0,1,0,1], 2, 1000).
-
-test(random_forest_InitModelWithTrainNoWeights_Too_Many_Label_Classes, [error(_,system_error('The given Labels dont fit the format [0,Numclasses-1]!'))]) :-
-        perceptron_initModelWithTrain([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,2,3], 2, 1000).
         
 
 %% Successful Tests
@@ -166,10 +163,6 @@ test(perceptron_Train_Too_Long_Label, [error(_,system_error('The number of data
         reset_Model_NoTrain,
         perceptron_train([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,0,1,0,1], 2, [0.1,0.2,0.3,0.4]).
 
-test(perceptron_Train_Too_Many_Label_Classes, [error(_,system_error('The given Labels dont fit the format [0,Numclasses-1]!'))]) :-
-        reset_Model_NoTrain,
-        perceptron_train([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,2,3], 2, [0.1,0.2,0.3,0.4]).
-
 
 test(perceptron_Train_Too_Short_Weights, [error(_,system_error('The number of data points does not match the number of weights!'))]) :-
         reset_Model_NoTrain,
diff --git a/src/methods/random_forest/random_forest_test.pl b/src/methods/random_forest/random_forest_test.pl
index 249a498ba53a9b18a08eef3237c1f8792b4e8181..0320daf1db80678a4a0b9cc1fa0a3a54d129158e 100644
--- a/src/methods/random_forest/random_forest_test.pl
+++ b/src/methods/random_forest/random_forest_test.pl
@@ -57,9 +57,6 @@ test(random_forest_InitModelWithTrainNoWeights_Too_Short_Label, [error(_,system_
 
 test(random_forest_InitModelWithTrainNoWeights_Too_Long_Label, [error(_,system_error('The number of data points does not match the number of labels!'))]) :-
         random_forest_initModelWithTrainNoWeights([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,0,1,0,1], 2, 20, 1, 0.0000001, 0).
-
-test(random_forest_InitModelWithTrainNoWeights_Too_Many_Label_Classes, [error(_,system_error('The given Labels dont fit the format [0,Numclasses-1]!'))]) :-
-        random_forest_initModelWithTrainNoWeights([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,2,3], 2, 20, 1, 0.0000001, 0).
         
 
 %% Successful Tests
@@ -105,9 +102,6 @@ test(random_forest_InitModelWithTrainWithWeights_Too_Short_Label, [error(_,syste
 test(random_forest_InitModelWithTrainWithWeights_Too_Long_Label, [error(_,system_error('The number of data points does not match the number of labels!'))]) :-
         random_forest_initModelWithTrainWithWeights([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,0,1,0,1], 2, [0.5,0.1,0.7,1.2], 20, 1, 0.0000001, 0).
 
-test(random_forest_InitModelWithTrainWithWeights_Too_Many_Label_Classes, [error(_,system_error('The given Labels dont fit the format [0,Numclasses-1]!'))]) :-
-        random_forest_initModelWithTrainWithWeights([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,2,3], 2, [0.5,0.1,0.7,1.2], 20, 1, 0.0000001, 0).
-
 
 test(random_forest_InitModelWithTrainWithWeights_Too_Short_Weights, [error(_,system_error('The number of data points does not match the number of weights!'))]) :-
         random_forest_initModelWithTrainWithWeights([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,0,1], 2, [0.5,0.1], 20, 1, 0.0000001, 0).
@@ -280,10 +274,6 @@ test(random_forest_TrainNoWeights_Too_Short_Label, [error(_,system_error('The nu
 test(random_forest_TrainNoWeights_Too_Long_Label, [error(_,system_error('The number of data points does not match the number of labels!'))]) :-
         reset_Model_NoTrain,
         random_forest_trainNoWeights([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,0,1,0,1], 2, 20, 1, 0.0000001, 0, _).
-
-test(random_forest_TrainNoWeights_Too_Many_Label_Classes, [error(_,system_error('The given Labels dont fit the format [0,Numclasses-1]!'))]) :-
-        reset_Model_NoTrain,
-        random_forest_trainNoWeights([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,2,3], 2, 20, 1, 0.0000001, 0, _).
         
 
 %% Successful Tests
@@ -342,10 +332,6 @@ test(random_forest_TrainWithWeights_Too_Long_Label, [error(_,system_error('The n
         reset_Model_NoTrain,
         random_forest_trainWithWeights([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,0,1,0,1], 2, [0.5,0.1,0.7,1.2], 20, 1, 0.0000001, 0, _).
 
-test(random_forest_TrainWithWeights_Too_Many_Label_Classes, [error(_,system_error('The given Labels dont fit the format [0,Numclasses-1]!'))]) :-
-        reset_Model_NoTrain,
-        random_forest_trainWithWeights([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,2,3], 2, [0.5,0.1,0.7,1.2], 20, 1, 0.0000001, 0, _).
-
 
 test(random_forest_TrainWithWeights_Too_Short_Weights, [error(_,system_error('The number of data points does not match the number of weights!'))]) :-
         reset_Model_NoTrain,
diff --git a/src/methods/softmax_regression/softmax_regression.cpp b/src/methods/softmax_regression/softmax_regression.cpp
index a4505f21a2b058a1881979db6c51b4b4fa8109be..97a8f94e36ad6590a4bd0add228d62368dc13f29 100644
--- a/src/methods/softmax_regression/softmax_regression.cpp
+++ b/src/methods/softmax_regression/softmax_regression.cpp
@@ -51,6 +51,13 @@ void initModelWithTrain(float *dataMatArr, SP_integer dataMatSize, SP_integer da
 {
     // convert the Prolog array to arma::mat
     mat data = convertArrayToMat(dataMatArr, dataMatSize, dataMatRowNum);
+    // check if labels fit the data
+    if (data.n_cols != labelsArrSize)
+    {
+        raisePrologSystemExeption("The number of data points does not match the number of labels!");
+        return;
+    }
+
     // convert the Prolog array to arma::rowvec
     Row< size_t > labelsVector = convertArrayToVec(labelsArr, labelsArrSize);
 
@@ -148,6 +155,13 @@ double computeAccuracy(float *dataMatArr, SP_integer dataMatSize, SP_integer dat
 {
     // convert the Prolog array to arma::mat
     mat data = convertArrayToMat(dataMatArr, dataMatSize, dataMatRowNum);
+    // check if labels fit the data
+    if (data.n_cols != labelsArrSize)
+    {
+        raisePrologSystemExeption("The number of data points does not match the number of labels!");
+        return 0.0;
+    }
+
     // convert the Prolog array to arma::rowvec
     Row< size_t > labelsVector = convertArrayToVec(labelsArr, labelsArrSize);
 
@@ -156,11 +170,6 @@ double computeAccuracy(float *dataMatArr, SP_integer dataMatSize, SP_integer dat
     {
         return softmaxRegression.ComputeAccuracy(data, labelsVector);
     }
-    catch(const std::out_of_range& e)
-    {
-        raisePrologSystemExeption("The Labels Vector has the wrong Dimension!");
-        return 0.0;
-    }
     catch(const std::exception& e)
     {
         raisePrologSystemExeption(e.what());
@@ -210,6 +219,13 @@ double train(float *dataMatArr, SP_integer dataMatSize, SP_integer dataMatRowNum
 {
     // convert the Prolog array to arma::mat
     mat data = convertArrayToMat(dataMatArr, dataMatSize, dataMatRowNum);
+    // check if labels fit the data
+    if (data.n_cols != labelsArrSize)
+    {
+        raisePrologSystemExeption("The number of data points does not match the number of labels!");
+        return 0.0;
+    }
+
     // convert the Prolog array to arma::rowvec
     Row< size_t > labelsVector = convertArrayToVec(labelsArr, labelsArrSize);
     
diff --git a/src/methods/softmax_regression/softmax_regression_test.pl b/src/methods/softmax_regression/softmax_regression_test.pl
index 99dd60b36c20b2cf2a6bff6779112143fc378ce9..19275ffa86cb539c95ea03d8fd238b059fe07ad3 100644
--- a/src/methods/softmax_regression/softmax_regression_test.pl
+++ b/src/methods/softmax_regression/softmax_regression_test.pl
@@ -51,20 +51,12 @@ test(softmax_InitWithTrain_Negative_NumClass, fail) :-
 test(softmax_InitWithTrain_Negative_Lambda, fail) :-
         softmax_regression_initModelWithTrain([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,0,1], 2, -0.0001, 0).
 
-test(softmax_InitWithTrain_Wrong_Label_Dims1, [error(_,system_error('element-wise multiplication: incompatible matrix dimensions: 2x4 and 2x2'))]) :-
+test(softmax_InitWithTrain_Wrong_Label_Dims1, [error(_,system_error('The number of data points does not match the number of labels!'))]) :-
         softmax_regression_initModelWithTrain([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1], 2, 0.0001, 0).
 
 
-test(softmax_InitWithTrain_Wrong_Label_Dims2, [error(_,system_error('element-wise multiplication: incompatible matrix dimensions: 2x4 and 2x7'))]) :-
+test(softmax_InitWithTrain_Wrong_Label_Dims2, [error(_,system_error('The number of data points does not match the number of labels!'))]) :-
         softmax_regression_initModelWithTrain([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,0,1,0,0,1], 2, 0.0001, 0).
-
-%% Doesnt cause exception
-test(softmax_InitWithTrain_Wrong_Label_Value) :-
-        softmax_regression_initModelWithTrain([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,-1,0,-1], 2, 0.0001, 0).
-
-%% Doesnt cause exception
-test(softmax_InitWithTrain_Too_Many_Label_Value) :-
-        softmax_regression_initModelWithTrain([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [1,1,0,2], 2, 0.0001, 0).
         
 
 %% Successful Tests
@@ -168,25 +160,15 @@ test(softmax_ComputeAccuracy_On_Untrained_Model) :-
         reset_Model_NoTrain,
         softmax_regression_computeAccuracy([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,0,1], _).
 
-test(softmax_ComputeAccuracy_Wrong_Label_Dims1, [error(_,system_error('The Labels Vector has the wrong Dimension!'))]) :-
+test(softmax_ComputeAccuracy_Wrong_Label_Dims1, [error(_,system_error('The number of data points does not match the number of labels!'))]) :-
         reset_Model_WithTrain,
         softmax_regression_computeAccuracy([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1], _).
 
 %% Doesnt cause exception
-test(softmax_ComputeAccuracy_Wrong_Label_Dims2) :-
+test(softmax_ComputeAccuracy_Wrong_Label_Dims2, [error(_,system_error('The number of data points does not match the number of labels!'))]) :-
         reset_Model_WithTrain,
         softmax_regression_computeAccuracy([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,0,1,0,0,1], _).
 
-%% The same when the label values are out of range
-test(softmax_ComputeAccuracy_Wrong_Label_Value) :-
-        reset_Model_WithTrain,
-        softmax_regression_computeAccuracy([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,-1,0,-1], _).
-
-%% Doesnt cause an exception
-test(softmax_ComputeAccuracy_Too_Many_Label_Value) :-
-        reset_Model_WithTrain,
-        softmax_regression_computeAccuracy([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [1,1,0,2], _).
-
 test(softmax_ComputeAccuracy_Wrong_Data_Dims, [error(_,system_error('SoftmaxRegression::Classify(): dataset has 4 dimensions, but model has 3 dimensions!'))]) :-
         reset_Model_WithTrain,
         softmax_regression_computeAccuracy([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 4, [0,1,0], Accuracy),
@@ -292,25 +274,15 @@ test(softmax_Train_Negative_NumClass, fail) :-
         reset_Model_NoTrain,
         softmax_regression_train([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,0,1], -1, _).
 
-test(softmax_Train_Wrong_Label_Dims1, [error(_,system_error('element-wise multiplication: incompatible matrix dimensions: 2x4 and 2x2'))]) :-
+test(softmax_Train_Wrong_Label_Dims1, [error(_,system_error('The number of data points does not match the number of labels!'))]) :-
         reset_Model_NoTrain,
         softmax_regression_train([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1], 2, _).
 
 %% If the label vector is to long it seems to cause no problems
-test(softmax_Train_Wrong_Label_Dims2, [error(_,system_error('element-wise multiplication: incompatible matrix dimensions: 2x4 and 2x7'))]) :-
+test(softmax_Train_Wrong_Label_Dims2, [error(_,system_error('The number of data points does not match the number of labels!'))]) :-
         reset_Model_NoTrain,
         softmax_regression_train([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,1,0,1,0,0,1], 2, _).
 
-%% The same when the label values are out of range
-test(softmax_Train_Wrong_Label_Value) :-
-        reset_Model_NoTrain,
-        softmax_regression_train([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [0,-1,0,-1], 2, _).
-
-%% doesnt cause a exeption
-test(softmax_Train_Too_Many_Label_Value) :-
-        reset_Model_NoTrain,
-        softmax_regression_train([5.1,3.5,1.4,4.9,3.0,1.4,4.7,3.2,1.3,4.6,3.1,1.5], 3, [1,1,0,2], 2, _).
-
 %% doesnt cause a exeption
 test(softmax_Train_Wrong_Data_Dims) :-
         reset_Model_NoTrain,