MegaJoctan / MALE5

Machine Learning repository for MQL5
https://omegafx.co
MIT License
126 stars 33 forks source link

No able to obtain proper result from " Metrics::classification_report(y_train, train_predictions);" #7

Open Guitch82 opened 3 hours ago

Guitch82 commented 3 hours ago

With the last versionof MALE5 3-0.0 I got issue to compile the example previously share. I ahve updated the code to finally manage to compile :

/--- Normalizing the independent variables StandardizationScaler Scaler1;

X_train = Scaler1.fit_transform(X_train); // we fit the scaler on the training data and transform the data alltogether
X_test = Scaler1.transform(X_test); // we transform the new data this way

 Print("X_Train == ", X_train);

//--- Training the model

 decision_tree.fit(X_train, y_train); //The training function 

//--- Measuring predictive accuracy

 vector train_predictions = decision_tree.predict(X_train);

 Print("GC train prediction vector  == ", train_predictions);

 Print("Training results classification report");
 Metrics::classification_report(y_train, train_predictions);

//--- Evaluating the model on out-of-sample predictions

 vector test_predictions = decision_tree.predict(X_test);

 Print("Testing results classification report");
 Metrics::classification_report(y_test, test_predictions); 

//---

ArraySetAsSeries(rates, true);

However it looks like this step doesn't work as expected Metrics::classification_report(y_train, train_predictions). COuld you support?

MegaJoctan commented 3 hours ago

can you show the current outcome you are receiving from the classification report, and what were you expecting to see

Guitch82 commented 2 hours ago

if fact I see in the tester that the confusion matrix is full of zero ... Capture d’écran du 2024-10-22 12-27-40

Guitch82 commented 2 hours ago

then I see the classification report full of zero as well.. Capture d’écran du 2024-10-22 12-29-38

Guitch82 commented 2 hours ago

then I can see oall other valauble to zero. I enter in the function file Metrics to try to understant where wome from the issue... by adding some "print". Capture d’écran du 2024-10-22 12-31-11 thanks for your support