Is it possible make predicate from List?
I use SWI-Prolog
I have lists like this
[sunny,hot,high,weak,no]
and
[outlook,temperature,humidity,wind,play_tennis]
I want to ma开发者_JAVA百科ke a predicate like
run(no, [outlook=sunny, temp=hot, humidity=high, wind=weak ]).
Is it possible?
Yes, but you're going to have to implement the appropriate machine learning algorithm (your example looks identical to the ones found in Mitchell's machine learning book, is this a homework assignment?).
Note that you can use the =..
operator to turn a list into a predicate, which might help you if I've misunderstood your original question. In other words, A=..[a,b,c]
binds a(b,c)
to A
精彩评论