File tree Expand file tree Collapse file tree 6 files changed +24
-0
lines changed
Expand file tree Collapse file tree 6 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,8 @@ Samples
3737.. autofunction :: get_khiops_version
3838.. code-block :: python
3939
40+ from khiops import core as kh
41+
4042 print (f " Khiops version: { kh.get_khiops_version()} " )
4143 .. autofunction :: build_dictionary_from_data_table
4244.. code-block :: python
@@ -1635,6 +1637,9 @@ Samples
16351637.. code-block :: python
16361638
16371639 # Set the file paths
1640+ import os
1641+ from khiops import core as kh
1642+
16381643 splice_dir = os.path.join(kh.get_samples_dir(), " SpliceJunction" )
16391644 dictionary_file_path = os.path.join(splice_dir, " SpliceJunction.kdic" )
16401645 data_table_path = os.path.join(splice_dir, " SpliceJunctionDNA.txt" )
Original file line number Diff line number Diff line change @@ -369,6 +369,7 @@ Samples
369369 import os
370370 import pandas as pd
371371 import pickle
372+ from khiops import core as kh
372373 from khiops.sklearn import KhiopsClassifier
373374
374375 # Create/clean the output directory
@@ -534,7 +535,9 @@ Samples
534535.. code-block :: python
535536
536537 # Imports
538+ import os
537539 import pandas as pd
540+ from khiops import core as kh
538541 from khiops.sklearn import KhiopsEncoder
539542
540543 # Load the dataset
Original file line number Diff line number Diff line change 2323 "metadata" : {},
2424 "outputs" : [],
2525 "source" : [
26+ " from khiops import core as kh\n " ,
27+ " \n " ,
2628 " print(f\" Khiops version: {kh.get_khiops_version()}\" )"
2729 ]
2830 },
21672169 "outputs" : [],
21682170 "source" : [
21692171 " # Set the file paths\n " ,
2172+ " import os\n " ,
2173+ " from khiops import core as kh\n " ,
2174+ " \n " ,
21702175 " splice_dir = os.path.join(kh.get_samples_dir(), \" SpliceJunction\" )\n " ,
21712176 " dictionary_file_path = os.path.join(splice_dir, \" SpliceJunction.kdic\" )\n " ,
21722177 " data_table_path = os.path.join(splice_dir, \" SpliceJunctionDNA.txt\" )\n " ,
Original file line number Diff line number Diff line change 2525
2626def get_khiops_version ():
2727 """Shows the Khiops version"""
28+ from khiops import core as kh
29+
2830 print (f"Khiops version: { kh .get_khiops_version ()} " )
2931
3032
@@ -1847,6 +1849,9 @@ def simplify_coclustering():
18471849def extract_clusters ():
18481850 """Extract the clusters' id, members, frequencies and typicalities into a file"""
18491851 # Set the file paths
1852+ import os
1853+ from khiops import core as kh
1854+
18501855 splice_dir = os .path .join (kh .get_samples_dir (), "SpliceJunction" )
18511856 dictionary_file_path = os .path .join (splice_dir , "SpliceJunction.kdic" )
18521857 data_table_path = os .path .join (splice_dir , "SpliceJunctionDNA.txt" )
Original file line number Diff line number Diff line change 433433 " import os\n " ,
434434 " import pandas as pd\n " ,
435435 " import pickle\n " ,
436+ " from khiops import core as kh\n " ,
436437 " from khiops.sklearn import KhiopsClassifier\n " ,
437438 " \n " ,
438439 " # Create/clean the output directory\n " ,
637638 "outputs" : [],
638639 "source" : [
639640 " # Imports\n " ,
641+ " import os\n " ,
640642 " import pandas as pd\n " ,
643+ " from khiops import core as kh\n " ,
641644 " from khiops.sklearn import KhiopsEncoder\n " ,
642645 " \n " ,
643646 " # Load the dataset\n " ,
Original file line number Diff line number Diff line change @@ -374,6 +374,7 @@ def khiops_classifier_pickle():
374374 import os
375375 import pandas as pd
376376 import pickle
377+ from khiops import core as kh
377378 from khiops .sklearn import KhiopsClassifier
378379
379380 # Create/clean the output directory
@@ -555,7 +556,9 @@ def khiops_encoder():
555556 usually splits the dataset into train and test subsets.
556557 """
557558 # Imports
559+ import os
558560 import pandas as pd
561+ from khiops import core as kh
559562 from khiops .sklearn import KhiopsEncoder
560563
561564 # Load the dataset
You can’t perform that action at this time.
0 commit comments