Good day!
I am currently learning Machine Learning and I am not good in coding.
I am trying to convert a generated model into If-else statements. The generated model is somewhat like this:
11AM_3 = 0
| 11AM_1 = 1
| | 4PM_1 = 3
| | | 4PM_2 = 0
| | | | 11AM_2 = 0 : 0 (0/0)
| | | | 11AM_2 = 2 : 3 (2/0)
| | 4PM_2 = 3
| | | 4PM_3 = 0
| | | | 11AM_2 = 3 : 1 (2/0)
| 11AM_1 = 2
| | 4PM_1 = 9 : 1 (1/0)
Since, the generated model is big, I want to create a program that will convert a model (having the above format) into If-else statement in VB.NET OR Java and output the created If-else statement into a new text file.
Example of If-else statement in VB.NET would be
If (11AM_3=0) then
If(11AM_1=1) then
If(4PM_1=3) then
If(4PM_2=0) then
If(11AM_2=0) then
return 0
Elseif(11AM_2=2) then
return 3
End if
end if
Elseif(4PM_2=3) then
If(4PM_3=0) then
If(11AM_2=3) then
return 1
end if
end if
End if
ElseIf(11AM_2=2) then
If(4PM_1=9) then
return 1
end if
end if
end if
Aucun commentaire:
Enregistrer un commentaire