I am running a tree algorithms in python and it is now sucessfully give me results which are "tree structure variables which is an object type" and "scoring variables which is an decimal (ex. x = Decimal('0.123' )).
Now, I am looking for the way that I can store these result variables. So, next time I don't have to run the model over and over again. what would be the way that I can store these variables and reuse it...
User Profile
Collapse
-
store results varibles in python
-
Thank you for all of your answer, I have couple more questions though.
1. could you point me to the source of references related to this kind of variable? (is that call recursion or generator)
2. to view structure of "tree" variable, the only way is to write the code like the one that you provided in the previous post right?
Thank you in advance and thank you for patient with the newbie -
Thank you bvdet,
however the object "tree" that I got is kind da class for binary tree. It seem like there are a lot of objects (node data) in just one main object.
sorry for a little confuse question I post the code for you here
...Code:mydata = [['slashdot', 'USA', 'yes', '18', 'None'], ['google', 'France', 'yes', '23', 'Premium'], ['digg', 'USA', 'yes', '24', 'Basic'],Leave a comment:
-
view data in python class
I am following some code written for the binary tree.
The tree variable is the class object.
The program is running fine. however, I really confuse with the way that python storing the data in object. I can not view the data store in this tree the only thing that I can see when try to print is:
>> print tree
<treepredict.de cisionnode instance at 0x03E0E6C0>
what is the way to view all... -
-
Python function for reading and manipulate sqlite table
I am new in python and pysqlite. Right now, I am reallly trying to figure it out the way that I can make python function read the table in sqlite database and calculate data using SQL language.
For example:
I do have database name "CART.sqlit e" with table name "oritab"
now I do write the function in python as follow (real code is indented)
*************** *************** *************** *************** ************...
No activity results to display
Show More
Leave a comment: