Forum Stats

  • 3,826,338 Users
  • 2,260,628 Discussions
  • 7,896,907 Comments

Discussions

ML+APEX->PREDICTION does not work?

Jose M. Sivianes
Jose M. Sivianes Member Posts: 9 Green Ribbon

Hi, I am testing ML with Apex Oracle and one step is not working correctly for me. I have generated several prediction models with a sample data set on OML table. If I launch this query on this table:

SQL1-> select nh_id, age, COORDINATION, SKILL, STRENGTH, PSYCHOLOGY, DISCIPLINE, INITIAL TEST, TRAINING, PREDICTION (N1_CLASS_MODEL_TD USING *) from oml

I get these results (the prediction value alternates between 0 and 1, and I put only an example of the first 2 rows)

1 23 8 5 5 5 3 3 1 -> Prediction 1

2 33 8 5 5 3 7 2 2 -> Prediction 0

However, if I launch the query on another table from APEX, to predict the value, the prediction value is always 1 !. I am trying to force a 0 with the following query and neither.

SQL2-> select 2 NH, 33 age, 8 COORDINATION, 5 SKILL, 5 STRENGTH, 3 PSYCHOLOGY, 7 DISCIPLINE, 2 INITIAL TEST, 2 TRAINING, PREDICTION (N1_CLASS_MODEL_TD USING d1. *) PREDICTION from i_datosgenerales d1

2 33 8 5 5 3 7 2 2 -> Prediction 1

What am I doing wrong? I can't get a prediction with value 0.

Because the same query gives me different results.

SQL1-> 2 33 8 5 5 3 7 2 2 -> Prediction 0

SQL2-> 2 33 8 5 5 3 7 2 2 -> Prediction 1

Both queries are launched from APEX

Best regards

Answers

  • Jose M. Sivianes
    Jose M. Sivianes Member Posts: 9 Green Ribbon

    I found error, I have to change the sql2 to this sql

    select nh, edad,COORDINACION,habilidad,fuerza,PSICOLOGIA,TEST_INICIAL,ENTRENAMIENTO, PREDICTION(N1_CLASS_MODEL_TD USING *),PREDICCION from (select NH,EDAD,8 COORDINACION,5 HABILIDAD,5 FUERZA,3 PSICOLOGIA,5 DISCIPLINA,2 TEST_INICIAL,1 ENTRENAMIENTO from i_datosgenerales d1)

    Now, it's works fine!