Update google colab setup in notebooks

Undate save_all in grapher to make dest. folder if it doesn't exist
This commit is contained in:
2020-05-24 20:13:27 +02:00
parent 27b278860d
commit 5956cd0cd2
6 changed files with 8 additions and 19 deletions

View File

@@ -9,10 +9,7 @@
"#\n",
"# Google Colab setup\n",
"#\n",
"#import os\n",
"#os.chdir(\"/content\")\n",
"#!git clone https://github.com/Doctorado-ML/STree.git\n",
"#os.chdir(\"/content/STree\")"
"#!pip install git+https://github.com/doctorado-ml/stree"
]
},
{

View File

@@ -1,6 +1,6 @@
import setuptools
__version__ = "0.9rc1"
__version__ = "0.9rc2"
__author__ = "Ricardo Montañana Gómez"
def readme():
@@ -12,7 +12,7 @@ setuptools.setup(
name='STree',
version=__version__,
license='MIT License',
description='a python interface to oblique decision tree implementations',
description='Oblique decision tree with svm nodes',
long_description=readme(),
long_description_content_type='text/markdown',
packages=setuptools.find_packages(),
@@ -34,7 +34,6 @@ setuptools.setup(
'matplotlib',
'ipympl'
],
data_files=[('data', ['data/.gitignore'])],
test_suite="stree.tests",
zip_safe=False
)

View File

@@ -164,6 +164,8 @@ class Stree_grapher(Stree):
:type save_folder: str, optional
"""
self._check_fitted()
if not os.path.isdir(save_folder):
os.mkdir(save_folder)
seq = 1
for node in self:
node.save_hyperplane(save_folder=save_folder,

View File

@@ -9,10 +9,7 @@
"#\n",
"# Google Colab setup\n",
"#\n",
"#import os\n",
"#os.chdir(\"/content\")\n",
"#!git clone https://github.com/Doctorado-ML/STree.git\n",
"#os.chdir(\"/content/STree\")"
"#!pip install git+https://github.com/doctorado-ml/stree"
]
},
{

View File

@@ -9,10 +9,7 @@
"#\n",
"# Google Colab setup\n",
"#\n",
"#import os\n",
"#os.chdir(\"/content\")\n",
"#!git clone https://github.com/Doctorado-ML/STree.git\n",
"#os.chdir(\"/content/STree\")"
"#!pip install git+https://github.com/doctorado-ml/stree"
]
},
{

View File

@@ -9,10 +9,7 @@
"#\n",
"# Google Colab setup\n",
"#\n",
"#import os\n",
"#os.chdir(\"/content\")\n",
"#!git clone https://github.com/Doctorado-ML/STree.git\n",
"#os.chdir(\"/content/STree\")"
"#!pip install git+https://github.com/doctorado-ml/stree"
]
},
{