Discussion:
[Tutor] question / decision tree
matej taferner
2015-08-03 07:58:43 UTC
Permalink
hi guys,

I am wondering if there is a python solution for the problem I am currently
dealing with.
I need to build a decision tree based questionnaire which helps users to
find the right answer.

As a final product of this decision tree "app" I need a clickable buttons
ready to be embedded into the website which will guide customer(s) to
desired answer(s).

Thanks,

Matej
_______________________________________________
Tutor maillist - ***@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
Laura Creighton
2015-08-03 09:09:48 UTC
Permalink
Post by matej taferner
hi guys,
I am wondering if there is a python solution for the problem I am currently
dealing with.
I need to build a decision tree based questionnaire which helps users to
find the right answer.
As a final product of this decision tree "app" I need a clickable buttons
ready to be embedded into the website which will guide customer(s) to
desired answer(s).
Thanks,
Matej
I am assuming that your app will need to learn based on user input.
If you already know what all the answers are going to be, then the
problem is a lot simpler.

I have this book.
Russell & Norvig's "Artificial Intelligence: A Modern Approach"
http://www.amazon.com/Artificial-Intelligence-Modern-Approach-Edition/dp/01360\
42597

It's comprehensive, but expensive. Maybe you can borrow it from a library.
Chapters 18-20 are relevant.

It comes with this code:
http://aima-python.googlecode.com/svn/trunk/learning.py

If you google for 'python decision trees' you get many other hits, for
other code people have written to do this. This hit has some
explanation as well. http://www.onlamp.com/pub/a/python/2006/02/09/ai_decision_trees.html?page=1

I haven't tried any of them, so don't know how good any of them are.

If you know a good bit about machine learning, but don't know a lot
about Python, then you can probably test them yourself, and we can help
with getting the code to work, if you need help with that. If, on the
other hand, machine learning is new to you, you will need to understand
more about that first, and will probably need a textbook. The Russell and
Norvig book is very good, but there are other good ones out there.

Laura Creighton

_______________________________________________
Tutor maillist - ***@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
matej taferner
2015-08-03 09:36:34 UTC
Permalink
thanks for the reply. I'll definitely check the book.

The back end solution of the problem is more or less clear to me. What I
find difficult is the grasp the idea of o called front end dev. or better
to say what should I use to make buttons should I dig into django framework
or something else?
Post by matej taferner
Post by matej taferner
hi guys,
I am wondering if there is a python solution for the problem I am
currently
Post by matej taferner
dealing with.
I need to build a decision tree based questionnaire which helps users to
find the right answer.
As a final product of this decision tree "app" I need a clickable buttons
ready to be embedded into the website which will guide customer(s) to
desired answer(s).
Thanks,
Matej
I am assuming that your app will need to learn based on user input.
If you already know what all the answers are going to be, then the
problem is a lot simpler.
I have this book.
Russell & Norvig's "Artificial Intelligence: A Modern Approach"
http://www.amazon.com/Artificial-Intelligence-Modern-Approach-Edition/dp/01360\
42597
It's comprehensive, but expensive. Maybe you can borrow it from a library.
Chapters 18-20 are relevant.
http://aima-python.googlecode.com/svn/trunk/learning.py
If you google for 'python decision trees' you get many other hits, for
other code people have written to do this. This hit has some
explanation as well.
http://www.onlamp.com/pub/a/python/2006/02/09/ai_decision_trees.html?page=1
I haven't tried any of them, so don't know how good any of them are.
If you know a good bit about machine learning, but don't know a lot
about Python, then you can probably test them yourself, and we can help
with getting the code to work, if you need help with that. If, on the
other hand, machine learning is new to you, you will need to understand
more about that first, and will probably need a textbook. The Russell and
Norvig book is very good, but there are other good ones out there.
Laura Creighton
_______________________________________________
Tutor maillist - ***@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
matej taferner
2015-08-03 09:38:40 UTC
Permalink
Or maybe should I go with the tkinter?
Post by matej taferner
thanks for the reply. I'll definitely check the book.
The back end solution of the problem is more or less clear to me. What I
find difficult is the grasp the idea of o called front end dev. or better
to say what should I use to make buttons should I dig into django framework
or something else?
Post by matej taferner
Post by matej taferner
hi guys,
I am wondering if there is a python solution for the problem I am
currently
Post by matej taferner
dealing with.
I need to build a decision tree based questionnaire which helps users to
find the right answer.
As a final product of this decision tree "app" I need a clickable buttons
ready to be embedded into the website which will guide customer(s) to
desired answer(s).
Thanks,
Matej
I am assuming that your app will need to learn based on user input.
If you already know what all the answers are going to be, then the
problem is a lot simpler.
I have this book.
Russell & Norvig's "Artificial Intelligence: A Modern Approach"
http://www.amazon.com/Artificial-Intelligence-Modern-Approach-Edition/dp/01360\
42597
It's comprehensive, but expensive. Maybe you can borrow it from a library.
Chapters 18-20 are relevant.
http://aima-python.googlecode.com/svn/trunk/learning.py
If you google for 'python decision trees' you get many other hits, for
other code people have written to do this. This hit has some
explanation as well.
http://www.onlamp.com/pub/a/python/2006/02/09/ai_decision_trees.html?page=1
I haven't tried any of them, so don't know how good any of them are.
If you know a good bit about machine learning, but don't know a lot
about Python, then you can probably test them yourself, and we can help
with getting the code to work, if you need help with that. If, on the
other hand, machine learning is new to you, you will need to understand
more about that first, and will probably need a textbook. The Russell and
Norvig book is very good, but there are other good ones out there.
Laura Creighton
_______________________________________________
Tutor maillist - ***@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
memilanuk
2015-08-03 17:08:52 UTC
Permalink
Post by matej taferner
Or maybe should I go with the tkinter?
Post by matej taferner
As a final product of this decision tree "app" I need a clickable buttons
ready to be embedded into the website which will guide customer(s) to
desired answer(s).
The two aren't exactly compatible. Tkinter is for stand-alone desktop
applications. While they can run a call to open a browser to an
appropriate web page, if everything else is already on the web site it
seems like it would make sense to do the front-end the same way, rather
than have to deploy a separate application.
--
Shiny! Let's be bad guys.

Reach me @ memilanuk (at) gmail dot com

_______________________________________________
Tutor maillist - ***@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
Laura Creighton
2015-08-06 05:33:42 UTC
Permalink
Post by matej taferner
Or maybe should I go with the tkinter?
You have to decide whether what you want is a Stand Alone GUI Application
(in which case tkinter could be a fine idea) or a web app. It sounds
to me as if you want your customers to navigate to your site and then
fill out a questionaire. If this is the case, then it's a web app
you want to write.

You generally write buttons and the like in web apps in javascript,
not python. Then you connect them to whatever web framework you use.
Django, which you mentioned before, would work. So would web2py and
there are others, many, many others see:
https://wiki.python.org/moin/WebFrameworks (which isn't completely up
to date -- I know there have been 2015 releases for most of these
Frameworks).

Which one you should use is a very personal decision. There really
isn't anything to do but to try building a small app with every one
you are curious about and then see which you find most pleasant to
use. People differ enormously on this issue, and indeed the very
things that make the people who love <framework A> think it is
wonderful are the things that other people cannot stand about it, and
are the reasons why they never use the thing.

Laura
_______________________________________________
Tutor maillist - ***@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Loading...