-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Index
-
-
-
A
- |
B
- |
C
- |
D
- |
E
- |
F
- |
G
- |
I
- |
J
- |
M
- |
N
- |
O
- |
P
- |
R
- |
S
- |
T
- |
V
-
-
-
A
-
-
-
B
-
-
-
C
-
-
-
D
-
-
-
E
-
-
-
F
-
-
-
G
-
-
-
I
-
-
-
J
-
-
-
M
-
-
-
N
-
-
-
O
-
-
-
P
-
-
-
-
- PyCTBN.network_graph
-
-
-
- PyCTBN.parameters_estimator
-
-
-
- PyCTBN.sample_path
-
-
-
- PyCTBN.set_of_cims
-
-
-
- PyCTBN.structure
-
-
-
- PyCTBN.structure_estimator
-
-
-
- PyCTBN.trajectory
-
-
-
-
-
-
R
-
-
-
S
-
-
-
T
-
-
-
V
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/documentation/_build/html/objects.inv b/documentation/_build/html/objects.inv
deleted file mode 100644
index 46976fa..0000000
Binary files a/documentation/_build/html/objects.inv and /dev/null differ
diff --git a/documentation/_build/html/searchindex.js b/documentation/_build/html/searchindex.js
deleted file mode 100644
index 4b24da6..0000000
--- a/documentation/_build/html/searchindex.js
+++ /dev/null
@@ -1 +0,0 @@
-Search.setIndex({docnames:["PyCTBN","examples","index","modules"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,sphinx:56},filenames:["PyCTBN.rst","examples.rst","index.rst","modules.rst"],objects:{"":{PyCTBN:[0,0,0,"-"]},"PyCTBN.abstract_importer":{AbstractImporter:[0,1,1,""]},"PyCTBN.abstract_importer.AbstractImporter":{build_list_of_samples_array:[0,2,1,""],build_sorter:[0,2,1,""],clear_concatenated_frame:[0,2,1,""],compute_row_delta_in_all_samples_frames:[0,2,1,""],compute_row_delta_sigle_samples_frame:[0,2,1,""],concatenated_samples:[0,2,1,""],dataset_id:[0,2,1,""],file_path:[0,2,1,""],sorter:[0,2,1,""],structure:[0,2,1,""],variables:[0,2,1,""]},"PyCTBN.cache":{Cache:[0,1,1,""]},"PyCTBN.cache.Cache":{clear:[0,2,1,""],find:[0,2,1,""],put:[0,2,1,""]},"PyCTBN.conditional_intensity_matrix":{ConditionalIntensityMatrix:[0,1,1,""]},"PyCTBN.conditional_intensity_matrix.ConditionalIntensityMatrix":{cim:[0,2,1,""],compute_cim_coefficients:[0,2,1,""],state_residence_times:[0,2,1,""],state_transition_matrix:[0,2,1,""]},"PyCTBN.json_importer":{JsonImporter:[0,1,1,""]},"PyCTBN.json_importer.JsonImporter":{build_sorter:[0,2,1,""],clear_data_frame_list:[0,2,1,""],dataset_id:[0,2,1,""],import_data:[0,2,1,""],import_sampled_cims:[0,2,1,""],import_structure:[0,2,1,""],import_trajectories:[0,2,1,""],import_variables:[0,2,1,""],normalize_trajectories:[0,2,1,""],one_level_normalizing:[0,2,1,""],read_json_file:[0,2,1,""]},"PyCTBN.network_graph":{NetworkGraph:[0,1,1,""]},"PyCTBN.network_graph.NetworkGraph":{add_edges:[0,2,1,""],add_nodes:[0,2,1,""],build_p_comb_structure_for_a_node:[0,2,1,""],build_time_columns_filtering_for_a_node:[0,2,1,""],build_time_scalar_indexing_structure_for_a_node:[0,2,1,""],build_transition_filtering_for_a_node:[0,2,1,""],build_transition_scalar_indexing_structure_for_a_node:[0,2,1,""],edges:[0,2,1,""],fast_init:[0,2,1,""],get_node_indx:[0,2,1,""],get_ordered_by_indx_set_of_parents:[0,2,1,""],get_parents_by_id:[0,2,1,""],get_positional_node_indx:[0,2,1,""],get_states_number:[0,2,1,""],nodes:[0,2,1,""],nodes_indexes:[0,2,1,""],nodes_values:[0,2,1,""],p_combs:[0,2,1,""],time_filtering:[0,2,1,""],time_scalar_indexing_strucure:[0,2,1,""],transition_filtering:[0,2,1,""],transition_scalar_indexing_structure:[0,2,1,""]},"PyCTBN.parameters_estimator":{ParametersEstimator:[0,1,1,""]},"PyCTBN.parameters_estimator.ParametersEstimator":{compute_parameters_for_node:[0,2,1,""],compute_state_res_time_for_node:[0,2,1,""],compute_state_transitions_for_a_node:[0,2,1,""],fast_init:[0,2,1,""]},"PyCTBN.sample_path":{SamplePath:[0,1,1,""]},"PyCTBN.sample_path.SamplePath":{build_structure:[0,2,1,""],build_trajectories:[0,2,1,""],structure:[0,2,1,""],total_variables_count:[0,2,1,""],trajectories:[0,2,1,""]},"PyCTBN.set_of_cims":{SetOfCims:[0,1,1,""]},"PyCTBN.set_of_cims.SetOfCims":{actual_cims:[0,2,1,""],build_cims:[0,2,1,""],build_times_and_transitions_structures:[0,2,1,""],filter_cims_with_mask:[0,2,1,""],get_cims_number:[0,2,1,""],p_combs:[0,2,1,""]},"PyCTBN.structure":{Structure:[0,1,1,""]},"PyCTBN.structure.Structure":{edges:[0,2,1,""],get_node_id:[0,2,1,""],get_node_indx:[0,2,1,""],get_positional_node_indx:[0,2,1,""],get_states_number:[0,2,1,""],nodes_indexes:[0,2,1,""],nodes_labels:[0,2,1,""],nodes_values:[0,2,1,""],total_variables_number:[0,2,1,""]},"PyCTBN.structure_estimator":{StructureEstimator:[0,1,1,""]},"PyCTBN.structure_estimator.StructureEstimator":{adjacency_matrix:[0,2,1,""],build_complete_graph:[0,2,1,""],complete_test:[0,2,1,""],ctpc_algorithm:[0,2,1,""],generate_possible_sub_sets_of_size:[0,2,1,""],independence_test:[0,2,1,""],one_iteration_of_CTPC_algorithm:[0,2,1,""],save_results:[0,2,1,""]},"PyCTBN.trajectory":{Trajectory:[0,1,1,""]},"PyCTBN.trajectory.Trajectory":{complete_trajectory:[0,2,1,""],size:[0,2,1,""],times:[0,2,1,""],trajectory:[0,2,1,""]},PyCTBN:{abstract_importer:[0,0,0,"-"],cache:[0,0,0,"-"],conditional_intensity_matrix:[0,0,0,"-"],json_importer:[0,0,0,"-"],network_graph:[0,0,0,"-"],parameters_estimator:[0,0,0,"-"],sample_path:[0,0,0,"-"],set_of_cims:[0,0,0,"-"],structure:[0,0,0,"-"],structure_estimator:[0,0,0,"-"],trajectory:[0,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"]},objtypes:{"0":"py:module","1":"py:class","2":"py:method"},terms:{"abstract":[0,1],"boolean":0,"class":[0,1],"float":0,"import":[0,2],"int":0,"null":0,"return":[0,1],"super":1,"true":[0,1],"var":1,HAS:0,Has:0,NOT:0,The:[0,1],Use:1,__init__:1,_actual_cach:0,_actual_cim:0,_actual_trajectori:0,_aggregated_info_about_nodes_par:0,_array_indx:0,_cach:0,_cim:0,_complete_graph:0,_concatenated_sampl:0,_df_samples_list:[0,1],_df_structur:[0,1],_df_variabl:[0,1],_file_path:1,_graph:[0,1],_import:0,_list_of_sets_of_par:0,_net_graph:0,_node:0,_node_id:0,_nodes_indx:0,_nodes_v:0,_p_combs_structur:0,_raw_data:0,_sample_path:0,_single_set_of_cim:0,_sorter:[0,1],_state_residence_tim:0,_structur:0,_structure_label:0,_time:0,_time_filt:0,_time_scalar_indexing_structur:0,_total_variables_count:0,_trajectori:0,_transition_filt:0,_transition_matric:0,_transition_scalar_indexing_structur:0,_variables_label:0,abc:0,about:0,abstract_import:[1,2,3],abstractimport:[0,1],act:0,actual:0,actual_cim:[0,1],add:0,add_edg:0,add_nod:0,added:0,addit:0,adjac:[0,1],adjacency_matrix:[0,1],after:0,aggreg:0,algorithm:[0,1],all:[0,1],alreadi:1,also:0,anoth:0,append:0,arc:0,arrai:[0,1],axi:1,base:0,belong:0,between:0,bool:0,both:0,bound:0,build:[0,1],build_cim:0,build_complete_graph:0,build_list_of_samples_arrai:0,build_p_comb_structure_for_a_nod:0,build_sort:[0,1],build_structur:[0,1],build_time_columns_filtering_for_a_nod:0,build_time_scalar_indexing_structure_for_a_nod:0,build_times_and_transitions_structur:0,build_trajectori:[0,1],build_transition_filtering_for_a_nod:0,build_transition_scalar_indexing_structure_for_a_nod:0,built:0,cach:[2,3],call:[0,1],cardin:0,cardinalit:0,caridin:0,caridinalit:0,chang:0,chi:0,chi_test:0,chi_test_alfa:0,child:0,child_states_numb:0,cim1:0,cim2:0,cim:[0,1],cims_kei:0,clear:0,clear_concatenated_fram:0,clear_data_frame_list:0,coeffici:0,col:0,cols_filt:0,column:[0,1],columns_head:0,comb:0,combin:0,combinatori:0,common:0,complet:0,complete_test:0,complete_trajectori:0,comput:[0,1],compute_cim_coeffici:0,compute_parameters_for_nod:[0,1],compute_row_delta_in_all_samples_fram:[0,1],compute_row_delta_sigle_samples_fram:0,compute_state_res_time_for_nod:0,compute_state_transitions_for_a_nod:0,concatanated_sampl:0,concaten:0,concatenated_sampl:0,condit:0,conditional_intensity_matrix:[2,3],conditionalintensitymatrix:0,consid:0,construct:[0,1],conta:0,contain:0,content:[2,3],convert:0,copi:0,core:0,correct:0,count:0,creat:[0,1],csv:1,csvimport:1,ctpc:[0,1],ctpc_algorithm:[0,1],current:0,cut:0,dafram:0,data:[0,2],data_fram:0,datafram:[0,1],dataset:0,dataset_id:[0,1],datfram:0,def:1,definit:0,delta:0,demonstr:1,desir:0,df_samples_list:0,dict:[0,1],dictionari:0,differ:0,digraph:0,dimens:0,dir:1,direct:0,doc:0,doubl:0,drop:1,duplic:0,dyn:1,each:0,edg:[0,1],edges_list:0,end:0,entir:0,equal:0,est:1,estim:[0,2],everi:0,exam:1,exampl:[0,2],exclud:0,exctract:0,exp_test_alfa:0,exponenti:0,expos:0,extend:1,extens:0,extract:0,fals:0,fast_init:[0,1],file:[0,1],file_path:[0,1],filepath:0,fill:[0,1],filter:0,filter_cims_with_mask:0,find:0,first:[0,1],follow:0,form:0,format:1,found:0,frame:0,from:[0,1],from_nod:0,gener:0,generate_possible_sub_sets_of_s:0,get_cims_numb:0,get_node_id:0,get_node_indx:0,get_ordered_by_indx_set_of_par:0,get_parents_by_id:0,get_positional_node_indx:0,get_states_numb:0,given:0,glob:1,graph:[0,1],graph_struct:0,grid:0,grpah:1,has:[0,1],have:0,header:0,hold:0,hypothesi:0,identifi:0,iff:0,implement:[0,2],import_data:[0,1],import_sampled_cim:0,import_structur:[0,1],import_trajectori:0,import_vari:[0,1],independ:0,independence_test:0,index:[0,1,2],indic:0,indx:0,info:[0,1],inform:0,init:1,initi:[0,1],inplac:1,input:0,insid:1,instal:2,interest:0,intes:0,iter:0,join:1,json:[0,1],json_import:[1,2,3],jsonarrai:0,jsonimport:[0,1],keep:0,kei:0,label:0,level:0,list:[0,1],list_of_column:0,list_of_edg:0,list_of_nod:0,load:0,loop:0,main:1,mask:0,mask_arr:0,matric:0,matrix:[0,1],member:0,mention:0,merg:0,method:0,modul:[2,3],multipl:0,name:[0,1],ndarrai:0,necessari:0,nest:0,net:[0,1],net_graph:0,network:0,network_graph:[1,2,3],networkgraph:[0,1],networkx:0,node:[0,1],node_id:0,node_index:0,node_indx:0,node_states_numb:0,nodes_index:0,nodes_indexes_arr:0,nodes_label:0,nodes_labels_list:0,nodes_vals_arr:0,nodes_valu:[0,1],none:[0,1],normal:0,normalize_trajectori:0,number:0,numpi:0,obj:1,object:[0,1],one:0,one_iteration_of_ctpc_algorithm:0,one_level_norm:0,onli:0,origin:0,original_cols_numb:0,otherwis:0,out:0,outer:[0,1],over:0,own:2,p_comb:0,p_indx:0,packag:[2,3],page:2,panda:[0,1],param:0,paramet:[0,2],parameters_estim:[1,2,3],parametersestim:[0,1],parent:0,parent_label:0,parent_set:0,parents_cardin:0,parents_comb:0,parents_index:0,parents_label:0,parents_states_numb:0,parents_v:0,parents_valu:0,particular:0,pass:1,path:[0,1],peest:1,perform:0,place:0,posit:0,possibl:0,prepar:0,present:0,print:1,process:0,properli:0,properti:0,put:0,pyctbn:1,q_xx:0,raw:0,raw_data:0,read:[0,1],read_csv:1,read_csv_fil:1,read_fil:1,read_json_fil:0,real:[0,1],refer:0,reject:0,rel:0,relat:0,remain:0,remov:0,repres:0,represent:0,res:0,resid:0,result:[0,1],results_:0,rtype:0,same:0,sampl:[0,1],sample_fram:[0,1],sample_path:[1,2,3],samplepath:[0,1],samples_label:0,save:[0,1],save_result:[0,1],scalar_index:0,scalar_indexes_struct:0,se1:1,search:2,see:0,select:1,self:[0,1],sep_set:0,set:0,set_of_cim:[2,3],setofcim:[0,1],shift:0,shifted_cols_head:0,signific:0,simbol:0,simpl:1,size:0,socim:0,sofc1:1,sorter:0,specif:1,start:0,state:0,state_res_tim:0,state_residence_tim:0,state_transition_matrix:0,str:[0,1],string:0,structrur:0,structur:[2,3],structure_estim:[1,2,3],structure_estimation_exampl:1,structure_label:0,structureestim:[0,1],structut:0,submodul:[2,3],subset:0,symbol:0,synthet:0,take:1,task:0,ternari:1,test:0,test_child:0,test_par:0,tha:0,them:0,thi:[0,1],three:1,time:[0,1],time_filt:0,time_kei:0,time_scalar_indexing_strucur:0,timestamp:0,to_nod:0,tot_vars_count:0,total:0,total_variables_count:0,total_variables_numb:0,traj:0,trajectori:[1,2,3],trajectories_kei:0,trajectri:1,transit:0,transition_filt:0,transition_matric:0,transition_scalar_indexing_structur:0,tri:0,tupl:0,two:0,type:[0,1],uniqu:0,unus:0,usag:2,used:0,using:0,valu:[0,1],values_list:1,var_id:0,variabl:[0,1],variable_cardin:0,variable_label:0,variables_kei:0,variables_label:0,vector:0,want:1,where:0,which:0,without:0,word:0,you:1,your:2},titles:["PyCTBN package","Examples","Welcome to PyCTBN\u2019s documentation!","PyCTBN"],titleterms:{"import":1,abstract_import:0,cach:0,conditional_intensity_matrix:0,content:0,data:1,document:2,estim:1,exampl:1,implement:1,indic:2,instal:1,json_import:0,modul:0,network_graph:0,own:1,packag:0,paramet:1,parameters_estim:0,pyctbn:[0,2,3],sample_path:0,set_of_cim:0,structur:[0,1],structure_estim:0,submodul:0,tabl:2,trajectori:0,usag:1,welcom:2,your:1}})
\ No newline at end of file
diff --git a/parameters_estimation_example.py b/examples/parameters_estimation_example.py
similarity index 76%
rename from parameters_estimation_example.py
rename to examples/parameters_estimation_example.py
index be97a28..f5aa3ce 100644
--- a/parameters_estimation_example.py
+++ b/examples/parameters_estimation_example.py
@@ -3,14 +3,14 @@ import os
import glob
-from PyCTBN.PyCTBN.json_importer import JsonImporter
-from PyCTBN.PyCTBN.sample_path import SamplePath
-from PyCTBN.PyCTBN.network_graph import NetworkGraph
-from PyCTBN.PyCTBN.parameters_estimator import ParametersEstimator
+from PyCTBN.classes.json_importer import JsonImporter
+from PyCTBN.classes.sample_path import SamplePath
+from PyCTBN.classes.network_graph import NetworkGraph
+from PyCTBN.classes.parameters_estimator import ParametersEstimator
def main():
- read_files = glob.glob(os.path.join('./data', "*.json")) #Take all json files in this dir
+ read_files = glob.glob(os.path.join('../data', "*.json")) #Take all json files in this dir
#import data
importer = JsonImporter(read_files[0], 'samples', 'dyn.str', 'variables', 'Time', 'Name')
importer.import_data(0)
diff --git a/structure_estimation_example.py b/examples/structure_estimation_example.py
similarity index 78%
rename from structure_estimation_example.py
rename to examples/structure_estimation_example.py
index cc8ce75..b1ef609 100644
--- a/structure_estimation_example.py
+++ b/examples/structure_estimation_example.py
@@ -1,15 +1,15 @@
import os
import glob
-from PyCTBN.PyCTBN.json_importer import JsonImporter
-from PyCTBN.PyCTBN.sample_path import SamplePath
-from PyCTBN.PyCTBN.structure_estimator import StructureEstimator
+from PyCTBN.classes.json_importer import JsonImporter
+from PyCTBN.classes.sample_path import SamplePath
+from PyCTBN.classes.structure_estimator import StructureEstimator
def structure_estimation_example():
# read the json files in ./data path
- read_files = glob.glob(os.path.join('./data', "*.json"))
+ read_files = glob.glob(os.path.join('../data', "*.json"))
# initialize a JsonImporter object for the first file
importer = JsonImporter(read_files[0], 'samples', 'dyn.str', 'variables', 'Time', 'Name')
# import the data at index 0 of the outer json array
diff --git a/setup.py b/setup.py
index d15d928..fbb2182 100644
--- a/setup.py
+++ b/setup.py
@@ -1,5 +1,7 @@
from setuptools import setup, find_packages
+print(find_packages('.', exclude=['PyCTBN.tests']))
+
setup(name='PyCTBN',
version='1.0',
url='https://github.com/philipMartini/PyCTBN',
@@ -7,11 +9,14 @@ setup(name='PyCTBN',
author=['Alessandro Bregoli', 'Filippo Martini'],
author_email=['a.bregoli1@campus.unimib.it', 'f.martini@campus.unimib.it'],
description='A Continuous Time Bayesian Networks Library',
- packages=find_packages(exclude=['tests', 'data']),
+ packages=find_packages('.', exclude=['PyCTBN.tests']),
+ #packages=['PyCTBN.classes'],
install_requires=[
'numpy', 'pandas', 'networkx', 'scipy', 'tqdm'],
dependency_links=['https://github.com/numpy/numpy', 'https://github.com/pandas-dev/pandas',
'https://github.com/networkx/networkx', 'https://github.com/scipy/scipy',
'https://github.com/tqdm/tqdm'],
long_description=open('README.md').read(),
- zip_safe=False)
+ zip_safe=False,
+ python_requires='>=3.6')
+
diff --git a/documentation/Makefile b/sphinx_output/Makefile
similarity index 100%
rename from documentation/Makefile
rename to sphinx_output/Makefile
diff --git a/sphinx_output/_build/doctrees/classes.doctree b/sphinx_output/_build/doctrees/classes.doctree
new file mode 100644
index 0000000..2b806b1
Binary files /dev/null and b/sphinx_output/_build/doctrees/classes.doctree differ
diff --git a/sphinx_output/_build/doctrees/environment.pickle b/sphinx_output/_build/doctrees/environment.pickle
new file mode 100644
index 0000000..81de167
Binary files /dev/null and b/sphinx_output/_build/doctrees/environment.pickle differ
diff --git a/documentation/_build/doctrees/examples.doctree b/sphinx_output/_build/doctrees/examples.doctree
similarity index 90%
rename from documentation/_build/doctrees/examples.doctree
rename to sphinx_output/_build/doctrees/examples.doctree
index 8408d0b..e83c409 100644
Binary files a/documentation/_build/doctrees/examples.doctree and b/sphinx_output/_build/doctrees/examples.doctree differ
diff --git a/documentation/_build/doctrees/index.doctree b/sphinx_output/_build/doctrees/index.doctree
similarity index 90%
rename from documentation/_build/doctrees/index.doctree
rename to sphinx_output/_build/doctrees/index.doctree
index 12971da..6d9f356 100644
Binary files a/documentation/_build/doctrees/index.doctree and b/sphinx_output/_build/doctrees/index.doctree differ
diff --git a/documentation/_build/doctrees/modules.doctree b/sphinx_output/_build/doctrees/modules.doctree
similarity index 85%
rename from documentation/_build/doctrees/modules.doctree
rename to sphinx_output/_build/doctrees/modules.doctree
index 854d01e..32c63d2 100644
Binary files a/documentation/_build/doctrees/modules.doctree and b/sphinx_output/_build/doctrees/modules.doctree differ
diff --git a/documentation/_build/html/.buildinfo b/sphinx_output/_build/html/.buildinfo
similarity index 100%
rename from documentation/_build/html/.buildinfo
rename to sphinx_output/_build/html/.buildinfo
diff --git a/sphinx_output/_build/html/_sources/classes.rst.txt b/sphinx_output/_build/html/_sources/classes.rst.txt
new file mode 100644
index 0000000..ad26a8c
--- /dev/null
+++ b/sphinx_output/_build/html/_sources/classes.rst.txt
@@ -0,0 +1,101 @@
+classes package
+===============
+
+Submodules
+----------
+
+classes.abstract\_importer module
+---------------------------------
+
+.. automodule:: classes.abstract_importer
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+classes.cache module
+--------------------
+
+.. automodule:: classes.cache
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+classes.conditional\_intensity\_matrix module
+---------------------------------------------
+
+.. automodule:: classes.conditional_intensity_matrix
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+classes.json\_importer module
+-----------------------------
+
+.. automodule:: classes.json_importer
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+classes.network\_graph module
+-----------------------------
+
+.. automodule:: classes.network_graph
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+classes.parameters\_estimator module
+------------------------------------
+
+.. automodule:: classes.parameters_estimator
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+classes.sample\_path module
+---------------------------
+
+.. automodule:: classes.sample_path
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+classes.set\_of\_cims module
+----------------------------
+
+.. automodule:: classes.set_of_cims
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+classes.structure module
+------------------------
+
+.. automodule:: classes.structure
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+classes.structure\_estimator module
+-----------------------------------
+
+.. automodule:: classes.structure_estimator
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+classes.trajectory module
+-------------------------
+
+.. automodule:: classes.trajectory
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+Module contents
+---------------
+
+.. automodule:: classes
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff --git a/documentation/_build/html/_sources/examples.rst.txt b/sphinx_output/_build/html/_sources/examples.rst.txt
similarity index 94%
rename from documentation/_build/html/_sources/examples.rst.txt
rename to sphinx_output/_build/html/_sources/examples.rst.txt
index a30e4c7..01c6630 100644
--- a/documentation/_build/html/_sources/examples.rst.txt
+++ b/sphinx_output/_build/html/_sources/examples.rst.txt
@@ -10,7 +10,7 @@ Implementing your own data importer
.. code-block:: python
"""This example demonstrates the implementation of a simple data importer the extends the class abstract importer to import data in csv format.
- The net in exam has three ternary nodes.
+ The net in exam has three ternary nodes and no prior net structure.
"""
from .abstract_importer import AbstractImporter
@@ -25,7 +25,6 @@ Implementing your own data importer
self.read_csv_file()
self._sorter = self.build_sorter(self._df_samples_list[0])
self.import_variables()
- self.import_structure()
self.compute_row_delta_in_all_samples_frames(self._df_samples_list)
def read_csv_file(self):
@@ -43,10 +42,6 @@ Implementing your own data importer
def build_sorter(self, sample_frame: pd.DataFrame) -> typing.List:
return list(sample_frame.columns)[1:]
- def import_structure(self):
- data = {'From':['X','Y','Z'], 'To':['Z','Z','Y']}
- self._df_structure = pd.DataFrame(data)
-
def dataset_id(self) -> object:
pass
diff --git a/documentation/_build/html/_sources/index.rst.txt b/sphinx_output/_build/html/_sources/index.rst.txt
similarity index 86%
rename from documentation/_build/html/_sources/index.rst.txt
rename to sphinx_output/_build/html/_sources/index.rst.txt
index fe88b2e..cc4dc2d 100644
--- a/documentation/_build/html/_sources/index.rst.txt
+++ b/sphinx_output/_build/html/_sources/index.rst.txt
@@ -1,5 +1,5 @@
.. PyCTBN documentation master file, created by
- sphinx-quickstart on Mon Dec 7 15:11:12 2020.
+ sphinx-quickstart on Mon Dec 14 20:33:17 2020.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
@@ -10,7 +10,7 @@ Welcome to PyCTBN's documentation!
:maxdepth: 2
:caption: Contents:
- PyCTBN
+ classes
examples
Indices and tables
diff --git a/documentation/_build/html/_sources/modules.rst.txt b/sphinx_output/_build/html/_sources/modules.rst.txt
similarity index 53%
rename from documentation/_build/html/_sources/modules.rst.txt
rename to sphinx_output/_build/html/_sources/modules.rst.txt
index 447544d..6af3efe 100644
--- a/documentation/_build/html/_sources/modules.rst.txt
+++ b/sphinx_output/_build/html/_sources/modules.rst.txt
@@ -1,7 +1,7 @@
-PyCTBN
-======
+classes
+=======
.. toctree::
:maxdepth: 4
- PyCTBN
+ classes
diff --git a/sphinx_output/_build/html/_static/alabaster.css b/sphinx_output/_build/html/_static/alabaster.css
new file mode 100644
index 0000000..0eddaeb
--- /dev/null
+++ b/sphinx_output/_build/html/_static/alabaster.css
@@ -0,0 +1,701 @@
+@import url("basic.css");
+
+/* -- page layout ----------------------------------------------------------- */
+
+body {
+ font-family: Georgia, serif;
+ font-size: 17px;
+ background-color: #fff;
+ color: #000;
+ margin: 0;
+ padding: 0;
+}
+
+
+div.document {
+ width: 940px;
+ margin: 30px auto 0 auto;
+}
+
+div.documentwrapper {
+ float: left;
+ width: 100%;
+}
+
+div.bodywrapper {
+ margin: 0 0 0 220px;
+}
+
+div.sphinxsidebar {
+ width: 220px;
+ font-size: 14px;
+ line-height: 1.5;
+}
+
+hr {
+ border: 1px solid #B1B4B6;
+}
+
+div.body {
+ background-color: #fff;
+ color: #3E4349;
+ padding: 0 30px 0 30px;
+}
+
+div.body > .section {
+ text-align: left;
+}
+
+div.footer {
+ width: 940px;
+ margin: 20px auto 30px auto;
+ font-size: 14px;
+ color: #888;
+ text-align: right;
+}
+
+div.footer a {
+ color: #888;
+}
+
+p.caption {
+ font-family: inherit;
+ font-size: inherit;
+}
+
+
+div.relations {
+ display: none;
+}
+
+
+div.sphinxsidebar a {
+ color: #444;
+ text-decoration: none;
+ border-bottom: 1px dotted #999;
+}
+
+div.sphinxsidebar a:hover {
+ border-bottom: 1px solid #999;
+}
+
+div.sphinxsidebarwrapper {
+ padding: 18px 10px;
+}
+
+div.sphinxsidebarwrapper p.logo {
+ padding: 0;
+ margin: -10px 0 0 0px;
+ text-align: center;
+}
+
+div.sphinxsidebarwrapper h1.logo {
+ margin-top: -10px;
+ text-align: center;
+ margin-bottom: 5px;
+ text-align: left;
+}
+
+div.sphinxsidebarwrapper h1.logo-name {
+ margin-top: 0px;
+}
+
+div.sphinxsidebarwrapper p.blurb {
+ margin-top: 0;
+ font-style: normal;
+}
+
+div.sphinxsidebar h3,
+div.sphinxsidebar h4 {
+ font-family: Georgia, serif;
+ color: #444;
+ font-size: 24px;
+ font-weight: normal;
+ margin: 0 0 5px 0;
+ padding: 0;
+}
+
+div.sphinxsidebar h4 {
+ font-size: 20px;
+}
+
+div.sphinxsidebar h3 a {
+ color: #444;
+}
+
+div.sphinxsidebar p.logo a,
+div.sphinxsidebar h3 a,
+div.sphinxsidebar p.logo a:hover,
+div.sphinxsidebar h3 a:hover {
+ border: none;
+}
+
+div.sphinxsidebar p {
+ color: #555;
+ margin: 10px 0;
+}
+
+div.sphinxsidebar ul {
+ margin: 10px 0;
+ padding: 0;
+ color: #000;
+}
+
+div.sphinxsidebar ul li.toctree-l1 > a {
+ font-size: 120%;
+}
+
+div.sphinxsidebar ul li.toctree-l2 > a {
+ font-size: 110%;
+}
+
+div.sphinxsidebar input {
+ border: 1px solid #CCC;
+ font-family: Georgia, serif;
+ font-size: 1em;
+}
+
+div.sphinxsidebar hr {
+ border: none;
+ height: 1px;
+ color: #AAA;
+ background: #AAA;
+
+ text-align: left;
+ margin-left: 0;
+ width: 50%;
+}
+
+div.sphinxsidebar .badge {
+ border-bottom: none;
+}
+
+div.sphinxsidebar .badge:hover {
+ border-bottom: none;
+}
+
+/* To address an issue with donation coming after search */
+div.sphinxsidebar h3.donation {
+ margin-top: 10px;
+}
+
+/* -- body styles ----------------------------------------------------------- */
+
+a {
+ color: #004B6B;
+ text-decoration: underline;
+}
+
+a:hover {
+ color: #6D4100;
+ text-decoration: underline;
+}
+
+div.body h1,
+div.body h2,
+div.body h3,
+div.body h4,
+div.body h5,
+div.body h6 {
+ font-family: Georgia, serif;
+ font-weight: normal;
+ margin: 30px 0px 10px 0px;
+ padding: 0;
+}
+
+div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; }
+div.body h2 { font-size: 180%; }
+div.body h3 { font-size: 150%; }
+div.body h4 { font-size: 130%; }
+div.body h5 { font-size: 100%; }
+div.body h6 { font-size: 100%; }
+
+a.headerlink {
+ color: #DDD;
+ padding: 0 4px;
+ text-decoration: none;
+}
+
+a.headerlink:hover {
+ color: #444;
+ background: #EAEAEA;
+}
+
+div.body p, div.body dd, div.body li {
+ line-height: 1.4em;
+}
+
+div.admonition {
+ margin: 20px 0px;
+ padding: 10px 30px;
+ background-color: #EEE;
+ border: 1px solid #CCC;
+}
+
+div.admonition tt.xref, div.admonition code.xref, div.admonition a tt {
+ background-color: #FBFBFB;
+ border-bottom: 1px solid #fafafa;
+}
+
+div.admonition p.admonition-title {
+ font-family: Georgia, serif;
+ font-weight: normal;
+ font-size: 24px;
+ margin: 0 0 10px 0;
+ padding: 0;
+ line-height: 1;
+}
+
+div.admonition p.last {
+ margin-bottom: 0;
+}
+
+div.highlight {
+ background-color: #fff;
+}
+
+dt:target, .highlight {
+ background: #FAF3E8;
+}
+
+div.warning {
+ background-color: #FCC;
+ border: 1px solid #FAA;
+}
+
+div.danger {
+ background-color: #FCC;
+ border: 1px solid #FAA;
+ -moz-box-shadow: 2px 2px 4px #D52C2C;
+ -webkit-box-shadow: 2px 2px 4px #D52C2C;
+ box-shadow: 2px 2px 4px #D52C2C;
+}
+
+div.error {
+ background-color: #FCC;
+ border: 1px solid #FAA;
+ -moz-box-shadow: 2px 2px 4px #D52C2C;
+ -webkit-box-shadow: 2px 2px 4px #D52C2C;
+ box-shadow: 2px 2px 4px #D52C2C;
+}
+
+div.caution {
+ background-color: #FCC;
+ border: 1px solid #FAA;
+}
+
+div.attention {
+ background-color: #FCC;
+ border: 1px solid #FAA;
+}
+
+div.important {
+ background-color: #EEE;
+ border: 1px solid #CCC;
+}
+
+div.note {
+ background-color: #EEE;
+ border: 1px solid #CCC;
+}
+
+div.tip {
+ background-color: #EEE;
+ border: 1px solid #CCC;
+}
+
+div.hint {
+ background-color: #EEE;
+ border: 1px solid #CCC;
+}
+
+div.seealso {
+ background-color: #EEE;
+ border: 1px solid #CCC;
+}
+
+div.topic {
+ background-color: #EEE;
+}
+
+p.admonition-title {
+ display: inline;
+}
+
+p.admonition-title:after {
+ content: ":";
+}
+
+pre, tt, code {
+ font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
+ font-size: 0.9em;
+}
+
+.hll {
+ background-color: #FFC;
+ margin: 0 -12px;
+ padding: 0 12px;
+ display: block;
+}
+
+img.screenshot {
+}
+
+tt.descname, tt.descclassname, code.descname, code.descclassname {
+ font-size: 0.95em;
+}
+
+tt.descname, code.descname {
+ padding-right: 0.08em;
+}
+
+img.screenshot {
+ -moz-box-shadow: 2px 2px 4px #EEE;
+ -webkit-box-shadow: 2px 2px 4px #EEE;
+ box-shadow: 2px 2px 4px #EEE;
+}
+
+table.docutils {
+ border: 1px solid #888;
+ -moz-box-shadow: 2px 2px 4px #EEE;
+ -webkit-box-shadow: 2px 2px 4px #EEE;
+ box-shadow: 2px 2px 4px #EEE;
+}
+
+table.docutils td, table.docutils th {
+ border: 1px solid #888;
+ padding: 0.25em 0.7em;
+}
+
+table.field-list, table.footnote {
+ border: none;
+ -moz-box-shadow: none;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+
+table.footnote {
+ margin: 15px 0;
+ width: 100%;
+ border: 1px solid #EEE;
+ background: #FDFDFD;
+ font-size: 0.9em;
+}
+
+table.footnote + table.footnote {
+ margin-top: -15px;
+ border-top: none;
+}
+
+table.field-list th {
+ padding: 0 0.8em 0 0;
+}
+
+table.field-list td {
+ padding: 0;
+}
+
+table.field-list p {
+ margin-bottom: 0.8em;
+}
+
+/* Cloned from
+ * https://github.com/sphinx-doc/sphinx/commit/ef60dbfce09286b20b7385333d63a60321784e68
+ */
+.field-name {
+ -moz-hyphens: manual;
+ -ms-hyphens: manual;
+ -webkit-hyphens: manual;
+ hyphens: manual;
+}
+
+table.footnote td.label {
+ width: .1px;
+ padding: 0.3em 0 0.3em 0.5em;
+}
+
+table.footnote td {
+ padding: 0.3em 0.5em;
+}
+
+dl {
+ margin: 0;
+ padding: 0;
+}
+
+dl dd {
+ margin-left: 30px;
+}
+
+blockquote {
+ margin: 0 0 0 30px;
+ padding: 0;
+}
+
+ul, ol {
+ /* Matches the 30px from the narrow-screen "li > ul" selector below */
+ margin: 10px 0 10px 30px;
+ padding: 0;
+}
+
+pre {
+ background: #EEE;
+ padding: 7px 30px;
+ margin: 15px 0px;
+ line-height: 1.3em;
+}
+
+div.viewcode-block:target {
+ background: #ffd;
+}
+
+dl pre, blockquote pre, li pre {
+ margin-left: 0;
+ padding-left: 30px;
+}
+
+tt, code {
+ background-color: #ecf0f3;
+ color: #222;
+ /* padding: 1px 2px; */
+}
+
+tt.xref, code.xref, a tt {
+ background-color: #FBFBFB;
+ border-bottom: 1px solid #fff;
+}
+
+a.reference {
+ text-decoration: none;
+ border-bottom: 1px dotted #004B6B;
+}
+
+/* Don't put an underline on images */
+a.image-reference, a.image-reference:hover {
+ border-bottom: none;
+}
+
+a.reference:hover {
+ border-bottom: 1px solid #6D4100;
+}
+
+a.footnote-reference {
+ text-decoration: none;
+ font-size: 0.7em;
+ vertical-align: top;
+ border-bottom: 1px dotted #004B6B;
+}
+
+a.footnote-reference:hover {
+ border-bottom: 1px solid #6D4100;
+}
+
+a:hover tt, a:hover code {
+ background: #EEE;
+}
+
+
+@media screen and (max-width: 870px) {
+
+ div.sphinxsidebar {
+ display: none;
+ }
+
+ div.document {
+ width: 100%;
+
+ }
+
+ div.documentwrapper {
+ margin-left: 0;
+ margin-top: 0;
+ margin-right: 0;
+ margin-bottom: 0;
+ }
+
+ div.bodywrapper {
+ margin-top: 0;
+ margin-right: 0;
+ margin-bottom: 0;
+ margin-left: 0;
+ }
+
+ ul {
+ margin-left: 0;
+ }
+
+ li > ul {
+ /* Matches the 30px from the "ul, ol" selector above */
+ margin-left: 30px;
+ }
+
+ .document {
+ width: auto;
+ }
+
+ .footer {
+ width: auto;
+ }
+
+ .bodywrapper {
+ margin: 0;
+ }
+
+ .footer {
+ width: auto;
+ }
+
+ .github {
+ display: none;
+ }
+
+
+
+}
+
+
+
+@media screen and (max-width: 875px) {
+
+ body {
+ margin: 0;
+ padding: 20px 30px;
+ }
+
+ div.documentwrapper {
+ float: none;
+ background: #fff;
+ }
+
+ div.sphinxsidebar {
+ display: block;
+ float: none;
+ width: 102.5%;
+ margin: 50px -30px -20px -30px;
+ padding: 10px 20px;
+ background: #333;
+ color: #FFF;
+ }
+
+ div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p,
+ div.sphinxsidebar h3 a {
+ color: #fff;
+ }
+
+ div.sphinxsidebar a {
+ color: #AAA;
+ }
+
+ div.sphinxsidebar p.logo {
+ display: none;
+ }
+
+ div.document {
+ width: 100%;
+ margin: 0;
+ }
+
+ div.footer {
+ display: none;
+ }
+
+ div.bodywrapper {
+ margin: 0;
+ }
+
+ div.body {
+ min-height: 0;
+ padding: 0;
+ }
+
+ .rtd_doc_footer {
+ display: none;
+ }
+
+ .document {
+ width: auto;
+ }
+
+ .footer {
+ width: auto;
+ }
+
+ .footer {
+ width: auto;
+ }
+
+ .github {
+ display: none;
+ }
+}
+
+
+/* misc. */
+
+.revsys-inline {
+ display: none!important;
+}
+
+/* Make nested-list/multi-paragraph items look better in Releases changelog
+ * pages. Without this, docutils' magical list fuckery causes inconsistent
+ * formatting between different release sub-lists.
+ */
+div#changelog > div.section > ul > li > p:only-child {
+ margin-bottom: 0;
+}
+
+/* Hide fugly table cell borders in ..bibliography:: directive output */
+table.docutils.citation, table.docutils.citation td, table.docutils.citation th {
+ border: none;
+ /* Below needed in some edge cases; if not applied, bottom shadows appear */
+ -moz-box-shadow: none;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+
+
+/* relbar */
+
+.related {
+ line-height: 30px;
+ width: 100%;
+ font-size: 0.9rem;
+}
+
+.related.top {
+ border-bottom: 1px solid #EEE;
+ margin-bottom: 20px;
+}
+
+.related.bottom {
+ border-top: 1px solid #EEE;
+}
+
+.related ul {
+ padding: 0;
+ margin: 0;
+ list-style: none;
+}
+
+.related li {
+ display: inline;
+}
+
+nav#rellinks {
+ float: right;
+}
+
+nav#rellinks li+li:before {
+ content: "|";
+}
+
+nav#breadcrumbs li+li:before {
+ content: "\00BB";
+}
+
+/* Hide certain items when printing */
+@media print {
+ div.related {
+ display: none;
+ }
+}
\ No newline at end of file
diff --git a/documentation/_build/html/_static/basic.css b/sphinx_output/_build/html/_static/basic.css
similarity index 100%
rename from documentation/_build/html/_static/basic.css
rename to sphinx_output/_build/html/_static/basic.css
diff --git a/documentation/_build/html/_static/css/badge_only.css b/sphinx_output/_build/html/_static/css/badge_only.css
similarity index 100%
rename from documentation/_build/html/_static/css/badge_only.css
rename to sphinx_output/_build/html/_static/css/badge_only.css
diff --git a/documentation/_build/html/_static/css/darker.css b/sphinx_output/_build/html/_static/css/darker.css
similarity index 100%
rename from documentation/_build/html/_static/css/darker.css
rename to sphinx_output/_build/html/_static/css/darker.css
diff --git a/documentation/_build/html/_static/css/pdj.css b/sphinx_output/_build/html/_static/css/pdj.css
similarity index 100%
rename from documentation/_build/html/_static/css/pdj.css
rename to sphinx_output/_build/html/_static/css/pdj.css
diff --git a/documentation/_build/html/_static/css/theme.css b/sphinx_output/_build/html/_static/css/theme.css
similarity index 100%
rename from documentation/_build/html/_static/css/theme.css
rename to sphinx_output/_build/html/_static/css/theme.css
diff --git a/sphinx_output/_build/html/_static/custom.css b/sphinx_output/_build/html/_static/custom.css
new file mode 100644
index 0000000..2a924f1
--- /dev/null
+++ b/sphinx_output/_build/html/_static/custom.css
@@ -0,0 +1 @@
+/* This file intentionally left blank. */
diff --git a/documentation/_build/html/_static/doctools.js b/sphinx_output/_build/html/_static/doctools.js
similarity index 100%
rename from documentation/_build/html/_static/doctools.js
rename to sphinx_output/_build/html/_static/doctools.js
diff --git a/documentation/_build/html/_static/documentation_options.js b/sphinx_output/_build/html/_static/documentation_options.js
similarity index 100%
rename from documentation/_build/html/_static/documentation_options.js
rename to sphinx_output/_build/html/_static/documentation_options.js
diff --git a/documentation/_build/html/_static/file.png b/sphinx_output/_build/html/_static/file.png
similarity index 100%
rename from documentation/_build/html/_static/file.png
rename to sphinx_output/_build/html/_static/file.png
diff --git a/documentation/_build/html/_static/fonts/fontawesome-webfont.eot b/sphinx_output/_build/html/_static/fonts/fontawesome-webfont.eot
similarity index 100%
rename from documentation/_build/html/_static/fonts/fontawesome-webfont.eot
rename to sphinx_output/_build/html/_static/fonts/fontawesome-webfont.eot
diff --git a/documentation/_build/html/_static/fonts/fontawesome-webfont.svg b/sphinx_output/_build/html/_static/fonts/fontawesome-webfont.svg
similarity index 100%
rename from documentation/_build/html/_static/fonts/fontawesome-webfont.svg
rename to sphinx_output/_build/html/_static/fonts/fontawesome-webfont.svg
diff --git a/documentation/_build/html/_static/fonts/fontawesome-webfont.ttf b/sphinx_output/_build/html/_static/fonts/fontawesome-webfont.ttf
similarity index 100%
rename from documentation/_build/html/_static/fonts/fontawesome-webfont.ttf
rename to sphinx_output/_build/html/_static/fonts/fontawesome-webfont.ttf
diff --git a/documentation/_build/html/_static/fonts/fontawesome-webfont.woff b/sphinx_output/_build/html/_static/fonts/fontawesome-webfont.woff
similarity index 100%
rename from documentation/_build/html/_static/fonts/fontawesome-webfont.woff
rename to sphinx_output/_build/html/_static/fonts/fontawesome-webfont.woff
diff --git a/documentation/_build/html/_static/img/porao-branco.png b/sphinx_output/_build/html/_static/img/porao-branco.png
similarity index 100%
rename from documentation/_build/html/_static/img/porao-branco.png
rename to sphinx_output/_build/html/_static/img/porao-branco.png
diff --git a/documentation/_build/html/_static/jquery-3.5.1.js b/sphinx_output/_build/html/_static/jquery-3.5.1.js
similarity index 100%
rename from documentation/_build/html/_static/jquery-3.5.1.js
rename to sphinx_output/_build/html/_static/jquery-3.5.1.js
diff --git a/documentation/_build/html/_static/jquery.js b/sphinx_output/_build/html/_static/jquery.js
similarity index 100%
rename from documentation/_build/html/_static/jquery.js
rename to sphinx_output/_build/html/_static/jquery.js
diff --git a/documentation/_build/html/_static/js/pdj.js b/sphinx_output/_build/html/_static/js/pdj.js
similarity index 100%
rename from documentation/_build/html/_static/js/pdj.js
rename to sphinx_output/_build/html/_static/js/pdj.js
diff --git a/documentation/_build/html/_static/js/theme.js b/sphinx_output/_build/html/_static/js/theme.js
similarity index 100%
rename from documentation/_build/html/_static/js/theme.js
rename to sphinx_output/_build/html/_static/js/theme.js
diff --git a/documentation/_build/html/_static/language_data.js b/sphinx_output/_build/html/_static/language_data.js
similarity index 100%
rename from documentation/_build/html/_static/language_data.js
rename to sphinx_output/_build/html/_static/language_data.js
diff --git a/documentation/_build/html/_static/minus.png b/sphinx_output/_build/html/_static/minus.png
similarity index 100%
rename from documentation/_build/html/_static/minus.png
rename to sphinx_output/_build/html/_static/minus.png
diff --git a/documentation/_build/html/_static/plus.png b/sphinx_output/_build/html/_static/plus.png
similarity index 100%
rename from documentation/_build/html/_static/plus.png
rename to sphinx_output/_build/html/_static/plus.png
diff --git a/documentation/_build/html/_static/pygments.css b/sphinx_output/_build/html/_static/pygments.css
similarity index 100%
rename from documentation/_build/html/_static/pygments.css
rename to sphinx_output/_build/html/_static/pygments.css
diff --git a/documentation/_build/html/_static/searchtools.js b/sphinx_output/_build/html/_static/searchtools.js
similarity index 100%
rename from documentation/_build/html/_static/searchtools.js
rename to sphinx_output/_build/html/_static/searchtools.js
diff --git a/documentation/_build/html/_static/underscore-1.3.1.js b/sphinx_output/_build/html/_static/underscore-1.3.1.js
similarity index 100%
rename from documentation/_build/html/_static/underscore-1.3.1.js
rename to sphinx_output/_build/html/_static/underscore-1.3.1.js
diff --git a/documentation/_build/html/_static/underscore.js b/sphinx_output/_build/html/_static/underscore.js
similarity index 100%
rename from documentation/_build/html/_static/underscore.js
rename to sphinx_output/_build/html/_static/underscore.js
diff --git a/documentation/_build/html/PyCTBN.html b/sphinx_output/_build/html/classes.html
similarity index 63%
rename from documentation/_build/html/PyCTBN.html
rename to sphinx_output/_build/html/classes.html
index ea85fb6..fe1061d 100644
--- a/documentation/_build/html/PyCTBN.html
+++ b/sphinx_output/_build/html/classes.html
@@ -8,7 +8,7 @@
-
PyCTBN package — PyCTBN 1.0 documentation
+
classes package — PyCTBN 1.0 documentation
@@ -62,20 +62,20 @@
Contents:
-PyCTBN package
+classes package
Examples
@@ -125,16 +125,16 @@
-
-
PyCTBN package
+
+
classes package
Submodules
-
-
PyCTBN.abstract_importer module
+
+
classes.abstract_importer module
-
-class PyCTBN.abstract_importer.
AbstractImporter
( file_path : str )
+
+class classes.abstract_importer.
AbstractImporter
( file_path : str )
Bases: abc.ABC
Abstract class that exposes all the necessary methods to process the trajectories and the net structure.
@@ -166,8 +166,8 @@ Header of _df_variables = [Variable_Label | Variable_Cardinality]
See :class:JsonImporter
for an example implementation
-
-build_list_of_samples_array
( data_frame : pandas.core.frame.DataFrame ) → List
+
+build_list_of_samples_array
( data_frame : pandas.core.frame.DataFrame ) → List
Builds a List containing the columns of data_frame and converts them to a numpy array.
Parameters
@@ -183,8 +183,8 @@ Header of _df_variables = [Variable_Label | Variable_Cardinality]
-
-abstract build_sorter
( sample_frame : pandas.core.frame.DataFrame ) → List
+
+abstract build_sorter
( sample_frame : pandas.core.frame.DataFrame ) → List
Initializes the _sorter
class member from a trajectory dataframe, exctracting the header of the frame
and keeping ONLY the variables symbolic labels, cutting out the time label in the header.
@@ -201,14 +201,14 @@ and keeping ONLY the variables symbolic labels, cutting out the time label in th
-
-clear_concatenated_frame
( ) → None
+
+clear_concatenated_frame
( ) → None
Removes all values in the dataframe concatenated_samples.
-
-compute_row_delta_in_all_samples_frames
( df_samples_list : List ) → None
+
+compute_row_delta_in_all_samples_frames
( df_samples_list : List ) → None
Calls the method compute_row_delta_sigle_samples_frame
on every dataframe present in the list
df_samples_list
.
Concatenates the result in the dataframe concatanated_samples
@@ -231,8 +231,8 @@ and merged trajectories
-
-compute_row_delta_sigle_samples_frame
( sample_frame : pandas.core.frame.DataFrame , columns_header : List , shifted_cols_header : List ) → pandas.core.frame.DataFrame
+
+compute_row_delta_sigle_samples_frame
( sample_frame : pandas.core.frame.DataFrame , columns_header : List , shifted_cols_header : List ) → pandas.core.frame.DataFrame
Computes the difference between each value present in th time column.
Copies and shift by one position up all the values present in the remaining columns.
@@ -258,45 +258,45 @@ Header of sample_frame = [Time | Variable values]
-
-property concatenated_samples
+
+property concatenated_samples
-
-abstract dataset_id
( ) → object
+
+abstract dataset_id
( ) → object
If the original dataset contains multiple dataset, this method returns a unique id to identify the current
dataset
-
-property file_path
+
+property file_path
-
-property sorter
+
+property sorter
-
-property structure
+
+property structure
-
-property variables
+
+property variables
-
-
PyCTBN.cache module
+
+
classes.cache module
-
-class PyCTBN.cache.
Cache
+
+class classes.cache.
Cache
Bases: object
This class acts as a cache of SetOfCims
objects for a node.
@@ -309,14 +309,14 @@ index is related
-
-clear
( ) → None
+
+clear
( ) → None
Clear the contents both of _actual_cache
and _list_of_sets_of_parents
.
-
-find
( parents_comb : Set ) → PyCTBN.set_of_cims.SetOfCims
+
+find
( parents_comb : Set ) → classes.set_of_cims.SetOfCims
Tries to find in cache given the symbolic parents combination parents_comb
the SetOfCims
related to that parents_comb
.
@@ -328,21 +328,21 @@ related to that par
None otherwise.
Return type
-SetOfCims
+SetOfCims
-
-put
( parents_comb : Set , socim : PyCTBN.set_of_cims.SetOfCims ) → None
+
+put
( parents_comb : Set , socim : classes.set_of_cims.SetOfCims ) → None
Place in cache the SetOfCims
object, and the related symbolic index parents_comb
in
_list_of_sets_of_parents
.
Parameters
parents_comb (Set ) – the symbolic set index
-socim (SetOfCims ) – the related SetOfCims object
+socim (SetOfCims ) – the related SetOfCims object
@@ -351,11 +351,11 @@ None otherwise.
-
-
PyCTBN.conditional_intensity_matrix module
+
+
classes.conditional_intensity_matrix module
-
-class PyCTBN.conditional_intensity_matrix.
ConditionalIntensityMatrix
( state_residence_times : numpy.array , state_transition_matrix : numpy.array )
+
+class classes.conditional_intensity_matrix.
ConditionalIntensityMatrix
( state_residence_times : numpy.array , state_transition_matrix : numpy.array )
Bases: object
Abstracts the Conditional Intesity matrix of a node as aggregation of the state residence times vector
and state transition matrix and the actual CIM matrix.
@@ -371,36 +371,36 @@ and state transition matrix and the actual CIM matrix.
-
-property cim
+
+property cim
-
-compute_cim_coefficients
( ) → None
+
+compute_cim_coefficients
( ) → None
Compute the coefficients of the matrix _cim by using the following equality q_xx’ = M[x, x’] / T[x].
The class member _cim
will contain the computed cim
-
-property state_residence_times
+
+property state_residence_times
-
-property state_transition_matrix
+
+property state_transition_matrix
-
-
PyCTBN.json_importer module
+
+
classes.json_importer module
-
-class PyCTBN.json_importer.
JsonImporter
( file_path : str , samples_label : str , structure_label : str , variables_label : str , time_key : str , variables_key : str )
-Bases: PyCTBN.abstract_importer.AbstractImporter
+
+class classes.json_importer.
JsonImporter
( file_path : str , samples_label : str , structure_label : str , variables_label : str , time_key : str , variables_key : str )
+Bases: classes.abstract_importer.AbstractImporter
Implements the abstracts methods of AbstractImporter and adds all the necessary methods to process and prepare
the data in json extension.
@@ -425,27 +425,27 @@ the data in json extension.
-
-build_sorter
( sample_frame : pandas.core.frame.DataFrame ) → List
+
+build_sorter
( sample_frame : pandas.core.frame.DataFrame ) → List
Implements the abstract method build_sorter of the AbstractImporter
for this dataset.
-
-clear_data_frame_list
( ) → None
+
+clear_data_frame_list
( ) → None
Removes all values present in the dataframes in the list _df_samples_list
.
-
-dataset_id
( ) → object
+
+dataset_id
( ) → object
If the original dataset contains multiple dataset, this method returns a unique id to identify the current
dataset
-
-import_data
( indx : int ) → None
+
+import_data
( indx : int ) → None
Implements the abstract method of AbstractImporter
.
Parameters
@@ -455,8 +455,8 @@ dataset
-
-import_sampled_cims
( raw_data : List , indx : int , cims_key : str ) → Dict
+
+import_sampled_cims
( raw_data : List , indx : int , cims_key : str ) → Dict
Imports the synthetic CIMS in the dataset in a dictionary, using variables labels
as keys for the set of CIMS of a particular node.
@@ -477,8 +477,8 @@ as keys for the set of CIMS of a particular node.
-
-import_structure
( raw_data : List ) → pandas.core.frame.DataFrame
+
+import_structure
( raw_data : List ) → pandas.core.frame.DataFrame
Imports in a dataframe the data in the list raw_data at the key _structure_label
Parameters
@@ -494,8 +494,8 @@ as keys for the set of CIMS of a particular node.
-
-import_trajectories
( raw_data : List ) → List
+
+import_trajectories
( raw_data : List ) → List
Imports the trajectories from the list of dicts raw_data
.
Parameters
@@ -511,8 +511,8 @@ as keys for the set of CIMS of a particular node.
-
-import_variables
( raw_data : List ) → pandas.core.frame.DataFrame
+
+import_variables
( raw_data : List ) → pandas.core.frame.DataFrame
Imports the data in raw_data
at the key _variables_label
.
Parameters
@@ -528,8 +528,8 @@ as keys for the set of CIMS of a particular node.
-
-normalize_trajectories
( raw_data : List , indx : int , trajectories_key : str ) → List
+
+normalize_trajectories
( raw_data : List , indx : int , trajectories_key : str ) → List
Extracts the trajectories in raw_data
at the index index
at the key trajectories key
.
Parameters
@@ -549,8 +549,8 @@ as keys for the set of CIMS of a particular node.
-
-one_level_normalizing
( raw_data : List , indx : int , key : str ) → pandas.core.frame.DataFrame
+
+one_level_normalizing
( raw_data : List , indx : int , key : str ) → pandas.core.frame.DataFrame
Extracts the one-level nested data in the list raw_data
at the index indx
at the key key
.
Parameters
@@ -570,8 +570,8 @@ as keys for the set of CIMS of a particular node.
-
-read_json_file
( ) → List
+
+read_json_file
( ) → List
Reads the JSON file in the path self.filePath.
Returns
@@ -586,17 +586,17 @@ as keys for the set of CIMS of a particular node.
-
-
PyCTBN.network_graph module
+
+
classes.network_graph module
-
-class PyCTBN.network_graph.
NetworkGraph
( graph_struct : PyCTBN.structure.Structure )
+
+class classes.network_graph.
NetworkGraph
( graph_struct : classes.structure.Structure )
Bases: object
Abstracts the infos contained in the Structure class in the form of a directed graph.
Has the task of creating all the necessary filtering and indexing structures for parameters estimation
Parameters
-graph_struct (Structure ) – the Structure
object from which infos about the net will be extracted
+graph_struct (Structure ) – the Structure
object from which infos about the net will be extracted
_graph
directed graph
@@ -623,8 +623,8 @@ from one state to another
-
-add_edges
( list_of_edges : List ) → None
+
+add_edges
( list_of_edges : List ) → None
Add the edges to the _graph
contained in the list list_of_edges
.
Parameters
@@ -634,8 +634,8 @@ from one state to another
-
-add_nodes
( list_of_nodes : List ) → None
+
+add_nodes
( list_of_nodes : List ) → None
Adds the nodes to the _graph
contained in the list of nodes list_of_nodes
.
Sets all the properties that identify a nodes (index, positional index, cardinality)
@@ -646,8 +646,8 @@ Sets all the properties that identify a nodes (index, positional index, cardinal
-
-build_p_comb_structure_for_a_node
( parents_values : List ) → numpy.ndarray
+
+static build_p_comb_structure_for_a_node
( parents_values : List ) → numpy.ndarray
Builds the combinatorial structure that contains the combinations of all the values contained in
parents_values
.
@@ -664,8 +664,8 @@ Sets all the properties that identify a nodes (index, positional index, cardinal
-
-build_time_columns_filtering_for_a_node
( node_indx : int , p_indxs : List ) → numpy.ndarray
+
+static build_time_columns_filtering_for_a_node
( node_indx : int , p_indxs : List ) → numpy.ndarray
Builds the necessary structure to filter the desired columns indicated by node_indx
and p_indxs
in the dataset.
This structute will be used in the computation of the state res times.
@@ -678,13 +678,13 @@ This structute will be used in the computation of the state res times.
-
-build_time_scalar_indexing_structure_for_a_node
( node_id : str , parents_vals : List ) → numpy.ndarray
+
+static build_time_scalar_indexing_structure_for_a_node
( node_states : int , parents_vals : List ) → numpy.ndarray
Builds an indexing structure for the computation of state residence times values.
Parameters
-node_id (string ) – the node label
+node_states (int ) – the node cardinality
parents_vals (List ) – the caridinalites of the node’s parents
@@ -698,8 +698,8 @@ This structute will be used in the computation of the state res times.
-
-build_transition_filtering_for_a_node
( node_indx : int , p_indxs : List ) → numpy.ndarray
+
+static build_transition_filtering_for_a_node
( node_indx : int , p_indxs : List , nodes_number : int ) → numpy.ndarray
Builds the necessary structure to filter the desired columns indicated by node_indx
and p_indxs
in the dataset.
This structure will be used in the computation of the state transitions values.
@@ -707,18 +707,20 @@ This structure will be used in the computation of the state transitions values.
:type node_indx: int
:param p_indxs: the indexes of the node’s parents
:type p_indxs: List
+:param nodes_number: the total number of nodes in the dataset
+:type nodes_number: int
:return: The filtering structure for transitions estimation
:rtype: numpy.ndArray
-
-build_transition_scalar_indexing_structure_for_a_node
( node_id : str , parents_vals : List ) → numpy.ndarray
+
+static build_transition_scalar_indexing_structure_for_a_node
( node_states_number : int , parents_vals : List ) → numpy.ndarray
Builds an indexing structure for the computation of state transitions values.
Parameters
-node_id (string ) – the node label
+node_states_number (int ) – the node cardinality
parents_vals (List ) – the caridinalites of the node’s parents
@@ -732,13 +734,19 @@ This structure will be used in the computation of the state transitions values.
-
-property edges
+
+clear_indexing_filtering_structures
( ) → None
+Initialize all the filtering/indexing structures.
+
+
+
+
+property edges
-
-fast_init
( node_id : str ) → None
+
+fast_init
( node_id : str ) → None
Initializes all the necessary structures for parameters estimation of the node identified by the label
node_id
@@ -749,13 +757,13 @@ node_id
-
-get_node_indx
( node_id ) → int
+
+get_node_indx
( node_id ) → int
-
-get_ordered_by_indx_set_of_parents
( node : str ) → Tuple
+
+get_ordered_by_indx_set_of_parents
( node : str ) → Tuple
Builds the aggregated structure that holds all the infos relative to the parent set of the node, namely
(parents_labels, parents_indexes, parents_cardinalities).
@@ -772,8 +780,8 @@ node_id
-
-get_parents_by_id
( node_id ) → List
+
+get_parents_by_id
( node_id ) → List
Returns a list of labels of the parents of the node node_id
Parameters
@@ -789,71 +797,78 @@ node_id
-
-get_positional_node_indx
( node_id ) → int
+
+get_positional_node_indx
( node_id ) → int
-
-get_states_number
( node_id ) → int
+
+get_states_number
( node_id ) → int
-
-property nodes
+
+property nodes
-
-property nodes_indexes
+
+property nodes_indexes
-
-property nodes_values
+
+property nodes_values
-
-property p_combs
+
+property p_combs
-
-property time_filtering
+
+remove_node
( node_id : str ) → None
+Remove the node node_id
from all the class members.
+Initialize all the filtering/indexing structures.
+
+
+
+
+property time_filtering
-
-property time_scalar_indexing_strucure
+
+property time_scalar_indexing_strucure
-
-property transition_filtering
+
+property transition_filtering
-
-property transition_scalar_indexing_structure
+
+property transition_scalar_indexing_structure
-
-
PyCTBN.parameters_estimator module
+
+
classes.parameters_estimator module
-
-class PyCTBN.parameters_estimator.
ParametersEstimator
( trajectories : PyCTBN.trajectory.Trajectory , net_graph : PyCTBN.network_graph.NetworkGraph )
+
+class classes.parameters_estimator.
ParametersEstimator
( trajectories : classes.trajectory.Trajectory , net_graph : classes.network_graph.NetworkGraph )
Bases: object
Has the task of computing the cims of particular node given the trajectories and the net structure
in the graph _net_graph
.
Parameters
_single_set_of_cims
@@ -861,8 +876,8 @@ in the graph _net_g
-
-compute_parameters_for_node
( node_id : str ) → PyCTBN.set_of_cims.SetOfCims
+
+compute_parameters_for_node
( node_id : str ) → classes.set_of_cims.SetOfCims
Compute the CIMS of the node identified by the label node_id
.
Parameters
@@ -872,14 +887,14 @@ in the graph _net_g
A SetOfCims object filled with the computed CIMS
Return type
-SetOfCims
+SetOfCims
-
-compute_state_res_time_for_node
( node_indx : int , times : numpy.ndarray , trajectory : numpy.ndarray , cols_filter : numpy.ndarray , scalar_indexes_struct : numpy.ndarray , T : numpy.ndarray ) → None
+
+static compute_state_res_time_for_node
( times : numpy.ndarray , trajectory : numpy.ndarray , cols_filter : numpy.ndarray , scalar_indexes_struct : numpy.ndarray , T : numpy.ndarray ) → None
Compute the state residence times for a node and fill the matrix T
with the results
Parameters
@@ -896,8 +911,8 @@ in the graph _net_g
-
-compute_state_transitions_for_a_node
( node_indx : int , trajectory : numpy.ndarray , cols_filter : numpy.ndarray , scalar_indexing : numpy.ndarray , M : numpy.ndarray )
+
+static compute_state_transitions_for_a_node
( node_indx : int , trajectory : numpy.ndarray , cols_filter : numpy.ndarray , scalar_indexing : numpy.ndarray , M : numpy.ndarray ) → None
Compute the state residence times for a node and fill the matrices M
with the results.
Parameters
@@ -913,8 +928,8 @@ in the graph _net_g
-
-fast_init
( node_id : str ) → None
+
+fast_init
( node_id : str ) → None
Initializes all the necessary structures for the parameters estimation for the node node_id
.
Parameters
@@ -926,18 +941,18 @@ in the graph _net_g
-
-
PyCTBN.sample_path module
+
+
classes.sample_path module
-
-class PyCTBN.sample_path.
SamplePath
( importer : PyCTBN.abstract_importer.AbstractImporter )
+
+class classes.sample_path.
SamplePath
( importer : classes.abstract_importer.AbstractImporter )
Bases: object
Aggregates all the informations about the trajectories, the real structure of the sampled net and variables
cardinalites. Has the task of creating the objects Trajectory
and Structure
that will
contain the mentioned data.
Parameters
-importer (AbstractImporter ) – the Importer object which contains the imported and processed data
+importer (AbstractImporter ) – the Importer object which contains the imported and processed data
_trajectories
the Trajectory
object that will contain all the concatenated trajectories
@@ -950,41 +965,41 @@ contain the mentioned data.
-
-build_structure
( ) → None
+
+build_structure
( ) → None
Builds the Structure
object that aggregates all the infos about the net.
-
-build_trajectories
( ) → None
+
+build_trajectories
( ) → None
Builds the Trajectory object that will contain all the trajectories.
Clears all the unused dataframes in _importer
Object
-
-property structure
+
+property structure
-
-property total_variables_count
+
+property total_variables_count
-
-property trajectories
+
+property trajectories
-
-
PyCTBN.set_of_cims module
+
+
classes.set_of_cims module
-
-class PyCTBN.set_of_cims.
SetOfCims
( node_id : str , parents_states_number : List , node_states_number : int , p_combs : numpy.ndarray )
+
+class classes.set_of_cims.
SetOfCims
( node_id : str , parents_states_number : List , node_states_number : int , p_combs : numpy.ndarray )
Bases: object
Aggregates all the CIMS of the node identified by the label _node_id.
@@ -1007,13 +1022,13 @@ Clears all the unused dataframes in <
-
-property actual_cims
+
+property actual_cims
-
-build_cims
( state_res_times : numpy.ndarray , transition_matrices : numpy.ndarray ) → None
+
+build_cims
( state_res_times : numpy.ndarray , transition_matrices : numpy.ndarray ) → None
Build the ConditionalIntensityMatrix
objects given the state residence times and transitions matrices.
Compute the cim coefficients.The class member _actual_cims
will contain the computed cims.
@@ -1027,14 +1042,14 @@ Compute the cim coefficients.The class member
-
-build_times_and_transitions_structures
( ) → None
+
+build_times_and_transitions_structures
( ) → None
Initializes at the correct dimensions the state residence times matrix and the state transition matrices.
-
-filter_cims_with_mask
( mask_arr : numpy.ndarray , comb : List ) → numpy.ndarray
+
+filter_cims_with_mask
( mask_arr : numpy.ndarray , comb : List ) → numpy.ndarray
Filter the cims contained in the array _actual_cims
given the boolean mask mask_arr
and the index
comb
.
@@ -1054,23 +1069,23 @@ Compute the cim coefficients.The class member
-
-get_cims_number
( )
+
+get_cims_number
( )
-
-property p_combs
+
+property p_combs
-
-
PyCTBN.structure module
+
+
classes.structure module
-
-class PyCTBN.structure.
Structure
( nodes_labels_list : List , nodes_indexes_arr : numpy.ndarray , nodes_vals_arr : numpy.ndarray , edges_list : List , total_variables_number : int )
+
+class classes.structure.
Structure
( nodes_labels_list : List , nodes_indexes_arr : numpy.ndarray , nodes_vals_arr : numpy.ndarray , edges_list : List , total_variables_number : int )
Bases: object
Contains all the infos about the network structure(nodes labels, nodes caridinalites, edges, indexes)
@@ -1080,18 +1095,18 @@ Compute the cim coefficients.The class member
-
-property edges
+
+property edges
-
-get_node_id
( node_indx : int ) → str
+
+get_node_id
( node_indx : int ) → str
Given the node_index
returns the node label.
Parameters
@@ -1107,8 +1122,8 @@ Compute the cim coefficients.The class member
-
-get_node_indx
( node_id : str ) → int
+
+get_node_indx
( node_id : str ) → int
Given the node_index
returns the node label.
Parameters
@@ -1124,13 +1139,13 @@ Compute the cim coefficients.The class member
-
-get_positional_node_indx
( node_id : str ) → int
+
+get_positional_node_indx
( node_id : str ) → int
-
-get_states_number
( node : str ) → int
+
+get_states_number
( node : str ) → int
Given the node label node
returns the cardinality of the node.
Parameters
@@ -1146,39 +1161,46 @@ Compute the cim coefficients.The class member
-
-property nodes_indexes
+
+property nodes_indexes
-
-property nodes_labels
+
+property nodes_labels
-
-property nodes_values
+
+property nodes_values
-
-property total_variables_number
+
+remove_node
( node_id : str ) → None
+Remove the node node_id
from all the class members.
+The class member _total_variables_number
since it refers to the total number of variables in the dataset.
+
+
+
+
+property total_variables_number
-
-
PyCTBN.structure_estimator module
+
+
classes.structure_estimator module
-
-class PyCTBN.structure_estimator.
StructureEstimator
( sample_path : PyCTBN.sample_path.SamplePath , exp_test_alfa : float , chi_test_alfa : float )
+
+class classes.structure_estimator.
StructureEstimator
( sample_path : classes.sample_path.SamplePath , exp_test_alfa : float , chi_test_alfa : float )
Bases: object
Has the task of estimating the network structure given the trajectories in samplepath
.
Parameters
-sample_path (SamplePath ) – the _sample_path object containing the trajectories and the real structure
+sample_path (SamplePath ) – the _sample_path object containing the trajectories and the real structure
exp_test_alfa (float ) – the significance level for the exponential Hp test
chi_test_alfa (float ) – the significance level for the chi Hp test
@@ -1200,8 +1222,8 @@ Compute the cim coefficients.The class member
-
-adjacency_matrix
( ) → numpy.ndarray
+
+adjacency_matrix
( ) → numpy.ndarray
Converts the estimated structrure _complete_graph
to a boolean adjacency matrix representation.
Returns
@@ -1214,8 +1236,8 @@ Compute the cim coefficients.The class member
-
-build_complete_graph
( node_ids : List ) → networkx.classes.digraph.DiGraph
+
+static build_complete_graph
( node_ids : List ) → networkx.classes.digraph.DiGraph
Builds a complete directed graph (no self loops) given the nodes labels in the list node_ids
:
Parameters
@@ -1231,8 +1253,8 @@ Compute the cim coefficients.The class member
-
-complete_test
( test_parent : str , test_child : str , parent_set : List , child_states_numb : int , tot_vars_count : int ) → bool
+
+complete_test
( test_parent : str , test_child : str , parent_set : List , child_states_numb : int , tot_vars_count : int ) → bool
Performs a complete independence test on the directed graphs G1 = {test_child U parent_set}
G2 = {G1 U test_parent} (added as an additional parent of the test_child).
Generates all the necessary structures and datas to perform the tests.
@@ -1256,14 +1278,14 @@ Generates all the necessary structures and datas to perform the tests.
-
-ctpc_algorithm
( ) → None
+
+ctpc_algorithm
( ) → None
Compute the CTPC algorithm over the entire net.
-
-generate_possible_sub_sets_of_size
( u : List , size : int , parent_label : str ) → Iterator
+
+static generate_possible_sub_sets_of_size
( u : List , size : int , parent_label : str ) → Iterator
Creates a list containing all possible subsets of the list u
of size size
,
that do not contains a the node identified by parent_label
.
@@ -1284,8 +1306,8 @@ that do not contains a the node identified by
-
-independence_test
( child_states_numb : int , cim1 : PyCTBN.conditional_intensity_matrix.ConditionalIntensityMatrix , cim2 : PyCTBN.conditional_intensity_matrix.ConditionalIntensityMatrix ) → bool
+
+independence_test
( child_states_numb : int , cim1 : classes.conditional_intensity_matrix.ConditionalIntensityMatrix , cim2 : classes.conditional_intensity_matrix.ConditionalIntensityMatrix ) → bool
Compute the actual independence test using two cims.
It is performed first the exponential test and if the null hypothesis is not rejected,
it is performed also the chi_test.
@@ -1293,8 +1315,8 @@ it is performed also the chi_test.
Parameters
Returns
@@ -1307,8 +1329,8 @@ it is performed also the chi_test.
-
-one_iteration_of_CTPC_algorithm
( var_id : str , tot_vars_count : int ) → None
+
+one_iteration_of_CTPC_algorithm
( var_id : str , tot_vars_count : int ) → None
Performs an iteration of the CTPC algorithm using the node var_id
as test_child
.
Parameters
@@ -1321,8 +1343,8 @@ it is performed also the chi_test.
-
-save_results
( ) → None
+
+save_results
( ) → None
Save the estimated Structure to a .json file in the path where the data are loaded from.
The file is named as the input dataset but the results_ word is appended to the results file.
@@ -1330,14 +1352,14 @@ The file is named as the input dataset but the results_ word is app
-
-
PyCTBN.trajectory module
+
+
classes.trajectory module
-
-class PyCTBN.trajectory.
Trajectory
( list_of_columns : List , original_cols_number : int )
+
+class classes.trajectory.
Trajectory
( list_of_columns : List , original_cols_number : int )
Bases: object
-Abstracts the infos about a complete set of trajectories, represented as a numpy array of doubles (the time deltas)
-and a numpy matrix of ints (the changes of states).
+Abstracts the infos about a complete set of trajectories, represented as a numpy array of doubles
+(the time deltas) and a numpy matrix of ints (the changes of states).
Parameters
@@ -1353,30 +1375,30 @@ and a numpy matrix of ints (the changes of states).
-
-property complete_trajectory
+
+property complete_trajectory
-
-size
( )
+
+size
( )
-
-property times
+
+property times
-
-property trajectory
+
+property trajectory
-
-
Module contents
+
+
Module contents
diff --git a/documentation/_build/html/examples.html b/sphinx_output/_build/html/examples.html
similarity index 86%
rename from documentation/_build/html/examples.html
rename to sphinx_output/_build/html/examples.html
index ad2af74..48fdb42 100644
--- a/documentation/_build/html/examples.html
+++ b/sphinx_output/_build/html/examples.html
@@ -27,7 +27,7 @@
href="genindex.html"/>
-
+
@@ -61,20 +61,20 @@
Contents:
-PyCTBN package
-Submodules
-PyCTBN.abstract_importer module
-PyCTBN.cache module
-PyCTBN.conditional_intensity_matrix module
-PyCTBN.json_importer module
-PyCTBN.network_graph module
-PyCTBN.parameters_estimator module
-PyCTBN.sample_path module
-PyCTBN.set_of_cims module
-PyCTBN.structure module
-PyCTBN.structure_estimator module
-PyCTBN.trajectory module
-Module contents
+classes package
Examples
@@ -132,7 +132,7 @@
Implementing your own data importer
"""This example demonstrates the implementation of a simple data importer the extends the class abstract importer to import data in csv format.
-The net in exam has three ternary nodes.
+The net in exam has three ternary nodes and no prior net structure.
"""
from .abstract_importer import AbstractImporter
@@ -147,7 +147,6 @@
self . read_csv_file ()
self . _sorter = self . build_sorter ( self . _df_samples_list [ 0 ])
self . import_variables ()
- self . import_structure ()
self . compute_row_delta_in_all_samples_frames ( self . _df_samples_list )
def read_csv_file ( self ):
@@ -165,10 +164,6 @@
def build_sorter ( self , sample_frame : pd . DataFrame ) -> typing . List :
return list ( sample_frame . columns )[ 1 :]
- def import_structure ( self ):
- data = { 'From' :[ 'X' , 'Y' , 'Z' ], 'To' :[ 'Z' , 'Z' , 'Y' ]}
- self . _df_structure = pd . DataFrame ( data )
-
def dataset_id ( self ) -> object :
pass
@@ -252,7 +247,7 @@
diff --git a/sphinx_output/_build/html/genindex.html b/sphinx_output/_build/html/genindex.html
new file mode 100644
index 0000000..b2d8623
--- /dev/null
+++ b/sphinx_output/_build/html/genindex.html
@@ -0,0 +1,675 @@
+
+
+
+
+
+
+
+
+
+
+
Index — PyCTBN 1.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Porão do Juca
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index
+
+
+
A
+ |
B
+ |
C
+ |
D
+ |
E
+ |
F
+ |
G
+ |
I
+ |
J
+ |
M
+ |
N
+ |
O
+ |
P
+ |
R
+ |
S
+ |
T
+ |
V
+
+
+
A
+
+
+
B
+
+
+
C
+
+
+
D
+
+
+
E
+
+
+
F
+
+
+
G
+
+
+
I
+
+
+
J
+
+
+
M
+
+
+
N
+
+
+
O
+
+
+
P
+
+
+
R
+
+
+
S
+
+
+
T
+
+
+
V
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/documentation/_build/html/index.html b/sphinx_output/_build/html/index.html
similarity index 62%
rename from documentation/_build/html/index.html
rename to sphinx_output/_build/html/index.html
index 73820c3..260c534 100644
--- a/documentation/_build/html/index.html
+++ b/sphinx_output/_build/html/index.html
@@ -27,7 +27,7 @@
href="genindex.html"/>
-
+
@@ -61,20 +61,20 @@
Contents:
-PyCTBN package
-Submodules
-PyCTBN.abstract_importer module
-PyCTBN.cache module
-PyCTBN.conditional_intensity_matrix module
-PyCTBN.json_importer module
-PyCTBN.network_graph module
-PyCTBN.parameters_estimator module
-PyCTBN.sample_path module
-PyCTBN.set_of_cims module
-PyCTBN.structure module
-PyCTBN.structure_estimator module
-PyCTBN.trajectory module
-Module contents
+classes package
Examples
@@ -129,20 +129,20 @@
Contents:
-PyCTBN package
-Submodules
-PyCTBN.abstract_importer module
-PyCTBN.cache module
-PyCTBN.conditional_intensity_matrix module
-PyCTBN.json_importer module
-PyCTBN.network_graph module
-PyCTBN.parameters_estimator module
-PyCTBN.sample_path module
-PyCTBN.set_of_cims module
-PyCTBN.structure module
-PyCTBN.structure_estimator module
-PyCTBN.trajectory module
-Module contents
+classes package
Examples
@@ -170,7 +170,7 @@
diff --git a/documentation/_build/html/modules.html b/sphinx_output/_build/html/modules.html
similarity index 56%
rename from documentation/_build/html/modules.html
rename to sphinx_output/_build/html/modules.html
index 738a3ad..7d537d9 100644
--- a/documentation/_build/html/modules.html
+++ b/sphinx_output/_build/html/modules.html
@@ -8,7 +8,7 @@
- PyCTBN — PyCTBN 1.0 documentation
+ classes — PyCTBN 1.0 documentation
@@ -60,20 +60,20 @@
Contents:
-PyCTBN package
-Submodules
-PyCTBN.abstract_importer module
-PyCTBN.cache module
-PyCTBN.conditional_intensity_matrix module
-PyCTBN.json_importer module
-PyCTBN.network_graph module
-PyCTBN.parameters_estimator module
-PyCTBN.sample_path module
-PyCTBN.set_of_cims module
-PyCTBN.structure module
-PyCTBN.structure_estimator module
-PyCTBN.trajectory module
-Module contents
+classes package
Examples
@@ -123,24 +123,24 @@
-
-
PyCTBN
+
+
classes
-PyCTBN package
diff --git a/sphinx_output/_build/html/objects.inv b/sphinx_output/_build/html/objects.inv
new file mode 100644
index 0000000..973ae93
Binary files /dev/null and b/sphinx_output/_build/html/objects.inv differ
diff --git a/documentation/_build/html/py-modindex.html b/sphinx_output/_build/html/py-modindex.html
similarity index 65%
rename from documentation/_build/html/py-modindex.html
rename to sphinx_output/_build/html/py-modindex.html
index 6863ac0..992f6c0 100644
--- a/documentation/_build/html/py-modindex.html
+++ b/sphinx_output/_build/html/py-modindex.html
@@ -63,20 +63,20 @@
Contents:
-PyCTBN package
-Submodules
-PyCTBN.abstract_importer module
-PyCTBN.cache module
-PyCTBN.conditional_intensity_matrix module
-PyCTBN.json_importer module
-PyCTBN.network_graph module
-PyCTBN.parameters_estimator module
-PyCTBN.sample_path module
-PyCTBN.set_of_cims module
-PyCTBN.structure module
-PyCTBN.structure_estimator module
-PyCTBN.trajectory module
-Module contents
+classes package
Examples
@@ -130,73 +130,73 @@
Python Module Index
diff --git a/documentation/_build/html/search.html b/sphinx_output/_build/html/search.html
similarity index 74%
rename from documentation/_build/html/search.html
rename to sphinx_output/_build/html/search.html
index 9e9bc1a..20481f3 100644
--- a/documentation/_build/html/search.html
+++ b/sphinx_output/_build/html/search.html
@@ -60,20 +60,20 @@
Contents:
-PyCTBN package
-Submodules
-PyCTBN.abstract_importer module
-PyCTBN.cache module
-PyCTBN.conditional_intensity_matrix module
-PyCTBN.json_importer module
-PyCTBN.network_graph module
-PyCTBN.parameters_estimator module
-PyCTBN.sample_path module
-PyCTBN.set_of_cims module
-PyCTBN.structure module
-PyCTBN.structure_estimator module
-PyCTBN.trajectory module
-Module contents
+classes package
Examples
diff --git a/sphinx_output/_build/html/searchindex.js b/sphinx_output/_build/html/searchindex.js
new file mode 100644
index 0000000..894e9c5
--- /dev/null
+++ b/sphinx_output/_build/html/searchindex.js
@@ -0,0 +1 @@
+Search.setIndex({docnames:["classes","examples","index","modules"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,sphinx:56},filenames:["classes.rst","examples.rst","index.rst","modules.rst"],objects:{"":{classes:[0,0,0,"-"]},"classes.abstract_importer":{AbstractImporter:[0,1,1,""]},"classes.abstract_importer.AbstractImporter":{build_list_of_samples_array:[0,2,1,""],build_sorter:[0,2,1,""],clear_concatenated_frame:[0,2,1,""],compute_row_delta_in_all_samples_frames:[0,2,1,""],compute_row_delta_sigle_samples_frame:[0,2,1,""],concatenated_samples:[0,2,1,""],dataset_id:[0,2,1,""],file_path:[0,2,1,""],sorter:[0,2,1,""],structure:[0,2,1,""],variables:[0,2,1,""]},"classes.cache":{Cache:[0,1,1,""]},"classes.cache.Cache":{clear:[0,2,1,""],find:[0,2,1,""],put:[0,2,1,""]},"classes.conditional_intensity_matrix":{ConditionalIntensityMatrix:[0,1,1,""]},"classes.conditional_intensity_matrix.ConditionalIntensityMatrix":{cim:[0,2,1,""],compute_cim_coefficients:[0,2,1,""],state_residence_times:[0,2,1,""],state_transition_matrix:[0,2,1,""]},"classes.json_importer":{JsonImporter:[0,1,1,""]},"classes.json_importer.JsonImporter":{build_sorter:[0,2,1,""],clear_data_frame_list:[0,2,1,""],dataset_id:[0,2,1,""],import_data:[0,2,1,""],import_sampled_cims:[0,2,1,""],import_structure:[0,2,1,""],import_trajectories:[0,2,1,""],import_variables:[0,2,1,""],normalize_trajectories:[0,2,1,""],one_level_normalizing:[0,2,1,""],read_json_file:[0,2,1,""]},"classes.network_graph":{NetworkGraph:[0,1,1,""]},"classes.network_graph.NetworkGraph":{add_edges:[0,2,1,""],add_nodes:[0,2,1,""],build_p_comb_structure_for_a_node:[0,2,1,""],build_time_columns_filtering_for_a_node:[0,2,1,""],build_time_scalar_indexing_structure_for_a_node:[0,2,1,""],build_transition_filtering_for_a_node:[0,2,1,""],build_transition_scalar_indexing_structure_for_a_node:[0,2,1,""],clear_indexing_filtering_structures:[0,2,1,""],edges:[0,2,1,""],fast_init:[0,2,1,""],get_node_indx:[0,2,1,""],get_ordered_by_indx_set_of_parents:[0,2,1,""],get_parents_by_id:[0,2,1,""],get_positional_node_indx:[0,2,1,""],get_states_number:[0,2,1,""],nodes:[0,2,1,""],nodes_indexes:[0,2,1,""],nodes_values:[0,2,1,""],p_combs:[0,2,1,""],remove_node:[0,2,1,""],time_filtering:[0,2,1,""],time_scalar_indexing_strucure:[0,2,1,""],transition_filtering:[0,2,1,""],transition_scalar_indexing_structure:[0,2,1,""]},"classes.parameters_estimator":{ParametersEstimator:[0,1,1,""]},"classes.parameters_estimator.ParametersEstimator":{compute_parameters_for_node:[0,2,1,""],compute_state_res_time_for_node:[0,2,1,""],compute_state_transitions_for_a_node:[0,2,1,""],fast_init:[0,2,1,""]},"classes.sample_path":{SamplePath:[0,1,1,""]},"classes.sample_path.SamplePath":{build_structure:[0,2,1,""],build_trajectories:[0,2,1,""],structure:[0,2,1,""],total_variables_count:[0,2,1,""],trajectories:[0,2,1,""]},"classes.set_of_cims":{SetOfCims:[0,1,1,""]},"classes.set_of_cims.SetOfCims":{actual_cims:[0,2,1,""],build_cims:[0,2,1,""],build_times_and_transitions_structures:[0,2,1,""],filter_cims_with_mask:[0,2,1,""],get_cims_number:[0,2,1,""],p_combs:[0,2,1,""]},"classes.structure":{Structure:[0,1,1,""]},"classes.structure.Structure":{edges:[0,2,1,""],get_node_id:[0,2,1,""],get_node_indx:[0,2,1,""],get_positional_node_indx:[0,2,1,""],get_states_number:[0,2,1,""],nodes_indexes:[0,2,1,""],nodes_labels:[0,2,1,""],nodes_values:[0,2,1,""],remove_node:[0,2,1,""],total_variables_number:[0,2,1,""]},"classes.structure_estimator":{StructureEstimator:[0,1,1,""]},"classes.structure_estimator.StructureEstimator":{adjacency_matrix:[0,2,1,""],build_complete_graph:[0,2,1,""],complete_test:[0,2,1,""],ctpc_algorithm:[0,2,1,""],generate_possible_sub_sets_of_size:[0,2,1,""],independence_test:[0,2,1,""],one_iteration_of_CTPC_algorithm:[0,2,1,""],save_results:[0,2,1,""]},"classes.trajectory":{Trajectory:[0,1,1,""]},"classes.trajectory.Trajectory":{complete_trajectory:[0,2,1,""],size:[0,2,1,""],times:[0,2,1,""],trajectory:[0,2,1,""]},classes:{abstract_importer:[0,0,0,"-"],cache:[0,0,0,"-"],conditional_intensity_matrix:[0,0,0,"-"],json_importer:[0,0,0,"-"],network_graph:[0,0,0,"-"],parameters_estimator:[0,0,0,"-"],sample_path:[0,0,0,"-"],set_of_cims:[0,0,0,"-"],structure:[0,0,0,"-"],structure_estimator:[0,0,0,"-"],trajectory:[0,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"]},objtypes:{"0":"py:module","1":"py:class","2":"py:method"},terms:{"abstract":[0,1],"boolean":0,"class":[1,2],"float":0,"import":[0,2],"int":0,"null":0,"return":[0,1],"static":0,"super":1,"true":[0,1],"var":1,HAS:0,Has:0,NOT:0,The:[0,1],Use:1,__init__:1,_actual_cach:0,_actual_cim:0,_actual_trajectori:0,_aggregated_info_about_nodes_par:0,_array_indx:0,_cach:0,_cim:0,_complete_graph:0,_concatenated_sampl:0,_df_samples_list:[0,1],_df_structur:0,_df_variabl:[0,1],_file_path:1,_graph:[0,1],_import:0,_list_of_sets_of_par:0,_net_graph:0,_node:0,_node_id:0,_nodes_indx:0,_nodes_v:0,_p_combs_structur:0,_raw_data:0,_sample_path:0,_single_set_of_cim:0,_sorter:[0,1],_state_residence_tim:0,_structur:0,_structure_label:0,_time:0,_time_filt:0,_time_scalar_indexing_structur:0,_total_variables_count:0,_total_variables_numb:0,_trajectori:0,_transition_filt:0,_transition_matric:0,_transition_scalar_indexing_structur:0,_variables_label:0,abc:0,about:0,abstract_import:[1,2,3],abstractimport:[0,1],act:0,actual:0,actual_cim:[0,1],add:0,add_edg:0,add_nod:0,added:0,addit:0,adjac:[0,1],adjacency_matrix:[0,1],after:0,aggreg:0,algorithm:[0,1],all:[0,1],alreadi:1,also:0,anoth:0,append:0,arc:0,arrai:[0,1],axi:1,base:0,belong:0,between:0,bool:0,both:0,bound:0,build:[0,1],build_cim:0,build_complete_graph:0,build_list_of_samples_arrai:0,build_p_comb_structure_for_a_nod:0,build_sort:[0,1],build_structur:[0,1],build_time_columns_filtering_for_a_nod:0,build_time_scalar_indexing_structure_for_a_nod:0,build_times_and_transitions_structur:0,build_trajectori:[0,1],build_transition_filtering_for_a_nod:0,build_transition_scalar_indexing_structure_for_a_nod:0,built:0,cach:[2,3],call:[0,1],cardin:0,cardinalit:0,caridin:0,caridinalit:0,chang:0,chi:0,chi_test:0,chi_test_alfa:0,child:0,child_states_numb:0,cim1:0,cim2:0,cim:[0,1],cims_kei:0,clear:0,clear_concatenated_fram:0,clear_data_frame_list:0,clear_indexing_filtering_structur:0,coeffici:0,col:0,cols_filt:0,column:[0,1],columns_head:0,comb:0,combin:0,combinatori:0,common:0,complet:0,complete_test:0,complete_trajectori:0,comput:[0,1],compute_cim_coeffici:0,compute_parameters_for_nod:[0,1],compute_row_delta_in_all_samples_fram:[0,1],compute_row_delta_sigle_samples_fram:0,compute_state_res_time_for_nod:0,compute_state_transitions_for_a_nod:0,concatanated_sampl:0,concaten:0,concatenated_sampl:0,condit:0,conditional_intensity_matrix:[2,3],conditionalintensitymatrix:0,consid:0,construct:[0,1],conta:0,contain:0,content:[2,3],convert:0,copi:0,core:0,correct:0,count:0,creat:[0,1],csv:1,csvimport:1,ctpc:[0,1],ctpc_algorithm:[0,1],current:0,cut:0,dafram:0,data:[0,2],data_fram:0,datafram:[0,1],dataset:0,dataset_id:[0,1],datfram:0,def:1,definit:0,delta:0,demonstr:1,desir:0,df_samples_list:0,dict:[0,1],dictionari:0,differ:0,digraph:0,dimens:0,dir:1,direct:0,doc:0,doubl:0,drop:1,duplic:0,dyn:1,each:0,edg:[0,1],edges_list:0,end:0,entir:0,equal:0,est:1,estim:[0,2],everi:0,exam:1,exampl:[0,2],exclud:0,exctract:0,exp_test_alfa:0,exponenti:0,expos:0,extend:1,extens:0,extract:0,fals:0,fast_init:[0,1],file:[0,1],file_path:[0,1],filepath:0,fill:[0,1],filter:0,filter_cims_with_mask:0,find:0,first:[0,1],follow:0,form:0,format:1,found:0,frame:0,from:[0,1],from_nod:0,gener:0,generate_possible_sub_sets_of_s:0,get_cims_numb:0,get_node_id:0,get_node_indx:0,get_ordered_by_indx_set_of_par:0,get_parents_by_id:0,get_positional_node_indx:0,get_states_numb:0,given:0,glob:1,graph:[0,1],graph_struct:0,grid:0,grpah:1,has:[0,1],have:0,header:0,hold:0,hypothesi:0,identifi:0,iff:0,implement:[0,2],import_data:[0,1],import_sampled_cim:0,import_structur:0,import_trajectori:0,import_vari:[0,1],independ:0,independence_test:0,index:[0,1,2],indic:0,indx:0,info:[0,1],inform:0,init:1,initi:[0,1],inplac:1,input:0,insid:1,instal:2,interest:0,intes:0,iter:0,join:1,json:[0,1],json_import:[1,2,3],jsonarrai:0,jsonimport:[0,1],keep:0,kei:0,label:0,level:0,list:[0,1],list_of_column:0,list_of_edg:0,list_of_nod:0,load:0,loop:0,main:1,mask:0,mask_arr:0,matric:0,matrix:[0,1],member:0,mention:0,merg:0,method:0,modul:[2,3],multipl:0,name:[0,1],ndarrai:0,necessari:0,nest:0,net:[0,1],net_graph:0,network:0,network_graph:[1,2,3],networkgraph:[0,1],networkx:0,node:[0,1],node_id:0,node_index:0,node_indx:0,node_st:0,node_states_numb:0,nodes_index:0,nodes_indexes_arr:0,nodes_label:0,nodes_labels_list:0,nodes_numb:0,nodes_vals_arr:0,nodes_valu:[0,1],none:[0,1],normal:0,normalize_trajectori:0,number:0,numpi:0,obj:1,object:[0,1],one:0,one_iteration_of_ctpc_algorithm:0,one_level_norm:0,onli:0,origin:0,original_cols_numb:0,otherwis:0,out:0,outer:[0,1],over:0,own:2,p_comb:0,p_indx:0,packag:[2,3],page:2,panda:[0,1],param:0,paramet:[0,2],parameters_estim:[1,2,3],parametersestim:[0,1],parent:0,parent_label:0,parent_set:0,parents_cardin:0,parents_comb:0,parents_index:0,parents_label:0,parents_states_numb:0,parents_v:0,parents_valu:0,particular:0,pass:1,path:[0,1],peest:1,perform:0,place:0,posit:0,possibl:0,prepar:0,present:0,print:1,prior:1,process:0,properli:0,properti:0,put:0,pyctbn:1,q_xx:0,raw:0,raw_data:0,read:[0,1],read_csv:1,read_csv_fil:1,read_fil:1,read_json_fil:0,real:[0,1],refer:0,reject:0,rel:0,relat:0,remain:0,remov:0,remove_nod:0,repres:0,represent:0,res:0,resid:0,result:[0,1],results_:0,rtype:0,same:0,sampl:[0,1],sample_fram:[0,1],sample_path:[1,2,3],samplepath:[0,1],samples_label:0,save:[0,1],save_result:[0,1],scalar_index:0,scalar_indexes_struct:0,se1:1,search:2,see:0,select:1,self:[0,1],sep_set:0,set:0,set_of_cim:[2,3],setofcim:[0,1],shift:0,shifted_cols_head:0,signific:0,simbol:0,simpl:1,sinc:0,size:0,socim:0,sofc1:1,sorter:0,specif:1,start:0,state:0,state_res_tim:0,state_residence_tim:0,state_transition_matrix:0,str:[0,1],string:0,structrur:0,structur:[2,3],structure_estim:[1,2,3],structure_estimation_exampl:1,structure_label:0,structureestim:[0,1],structut:0,submodul:[2,3],subset:0,symbol:0,synthet:0,take:1,task:0,ternari:1,test:0,test_child:0,test_par:0,tha:0,them:0,thi:[0,1],three:1,time:[0,1],time_filt:0,time_kei:0,time_scalar_indexing_strucur:0,timestamp:0,to_nod:0,tot_vars_count:0,total:0,total_variables_count:0,total_variables_numb:0,traj:0,trajectori:[1,2,3],trajectories_kei:0,trajectri:1,transit:0,transition_filt:0,transition_matric:0,transition_scalar_indexing_structur:0,tri:0,tupl:0,two:0,type:[0,1],uniqu:0,unus:0,usag:2,used:0,using:0,valu:[0,1],values_list:1,var_id:0,variabl:[0,1],variable_cardin:0,variable_label:0,variables_kei:0,variables_label:0,vector:0,want:1,where:0,which:0,without:0,word:0,you:1,your:2},titles:["classes package","Examples","Welcome to PyCTBN\u2019s documentation!","classes"],titleterms:{"class":[0,3],"import":1,abstract_import:0,cach:0,conditional_intensity_matrix:0,content:0,data:1,document:2,estim:1,exampl:1,implement:1,indic:2,instal:1,json_import:0,modul:0,network_graph:0,own:1,packag:0,paramet:1,parameters_estim:0,pyctbn:2,sample_path:0,set_of_cim:0,structur:[0,1],structure_estim:0,submodul:0,tabl:2,trajectori:0,usag:1,welcom:2,your:1}})
\ No newline at end of file
diff --git a/sphinx_output/classes.rst b/sphinx_output/classes.rst
new file mode 100644
index 0000000..ad26a8c
--- /dev/null
+++ b/sphinx_output/classes.rst
@@ -0,0 +1,101 @@
+classes package
+===============
+
+Submodules
+----------
+
+classes.abstract\_importer module
+---------------------------------
+
+.. automodule:: classes.abstract_importer
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+classes.cache module
+--------------------
+
+.. automodule:: classes.cache
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+classes.conditional\_intensity\_matrix module
+---------------------------------------------
+
+.. automodule:: classes.conditional_intensity_matrix
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+classes.json\_importer module
+-----------------------------
+
+.. automodule:: classes.json_importer
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+classes.network\_graph module
+-----------------------------
+
+.. automodule:: classes.network_graph
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+classes.parameters\_estimator module
+------------------------------------
+
+.. automodule:: classes.parameters_estimator
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+classes.sample\_path module
+---------------------------
+
+.. automodule:: classes.sample_path
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+classes.set\_of\_cims module
+----------------------------
+
+.. automodule:: classes.set_of_cims
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+classes.structure module
+------------------------
+
+.. automodule:: classes.structure
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+classes.structure\_estimator module
+-----------------------------------
+
+.. automodule:: classes.structure_estimator
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+classes.trajectory module
+-------------------------
+
+.. automodule:: classes.trajectory
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+Module contents
+---------------
+
+.. automodule:: classes
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff --git a/documentation/conf.py b/sphinx_output/conf.py
similarity index 100%
rename from documentation/conf.py
rename to sphinx_output/conf.py
diff --git a/documentation/examples.rst b/sphinx_output/examples.rst
similarity index 94%
rename from documentation/examples.rst
rename to sphinx_output/examples.rst
index a30e4c7..01c6630 100644
--- a/documentation/examples.rst
+++ b/sphinx_output/examples.rst
@@ -10,7 +10,7 @@ Implementing your own data importer
.. code-block:: python
"""This example demonstrates the implementation of a simple data importer the extends the class abstract importer to import data in csv format.
- The net in exam has three ternary nodes.
+ The net in exam has three ternary nodes and no prior net structure.
"""
from .abstract_importer import AbstractImporter
@@ -25,7 +25,6 @@ Implementing your own data importer
self.read_csv_file()
self._sorter = self.build_sorter(self._df_samples_list[0])
self.import_variables()
- self.import_structure()
self.compute_row_delta_in_all_samples_frames(self._df_samples_list)
def read_csv_file(self):
@@ -43,10 +42,6 @@ Implementing your own data importer
def build_sorter(self, sample_frame: pd.DataFrame) -> typing.List:
return list(sample_frame.columns)[1:]
- def import_structure(self):
- data = {'From':['X','Y','Z'], 'To':['Z','Z','Y']}
- self._df_structure = pd.DataFrame(data)
-
def dataset_id(self) -> object:
pass
diff --git a/documentation/index.rst b/sphinx_output/index.rst
similarity index 86%
rename from documentation/index.rst
rename to sphinx_output/index.rst
index fe88b2e..cc4dc2d 100644
--- a/documentation/index.rst
+++ b/sphinx_output/index.rst
@@ -1,5 +1,5 @@
.. PyCTBN documentation master file, created by
- sphinx-quickstart on Mon Dec 7 15:11:12 2020.
+ sphinx-quickstart on Mon Dec 14 20:33:17 2020.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
@@ -10,7 +10,7 @@ Welcome to PyCTBN's documentation!
:maxdepth: 2
:caption: Contents:
- PyCTBN
+ classes
examples
Indices and tables
diff --git a/documentation/make.bat b/sphinx_output/make.bat
similarity index 100%
rename from documentation/make.bat
rename to sphinx_output/make.bat
diff --git a/documentation/modules.rst b/sphinx_output/modules.rst
similarity index 53%
rename from documentation/modules.rst
rename to sphinx_output/modules.rst
index 447544d..6af3efe 100644
--- a/documentation/modules.rst
+++ b/sphinx_output/modules.rst
@@ -1,7 +1,7 @@
-PyCTBN
-======
+classes
+=======
.. toctree::
:maxdepth: 4
- PyCTBN
+ classes