Compare commits

..

3 Commits
1.1 ... ovo-#36

Author SHA1 Message Date
acf10d8d7f Solve weak classifier 2021-05-10 12:06:47 +02:00
34bf539fa3 Update weak test 2021-05-10 10:56:34 +02:00
5a36c5d29b Implement ovo strategy
Add kernel liblinear with LinearSVC classifier
Set ovo strategy as default
2021-05-10 09:10:39 +02:00
7 changed files with 13 additions and 46 deletions

View File

@@ -1,6 +1,6 @@
SHELL := /bin/bash
.DEFAULT_GOAL := help
.PHONY: coverage deps help lint push test doc build
.PHONY: coverage deps help lint push test
coverage: ## Run tests with coverage
coverage erase
@@ -24,13 +24,6 @@ test: ## Run tests
doc: ## Update documentation
make -C docs --makefile=Makefile html
build: ## Build package
rm -fr dist/*
python setup.py sdist bdist_wheel
doc-clean: ## Update documentation
make -C docs --makefile=Makefile clean
help: ## Show help message
@IFS=$$'\n' ; \
help_lines=(`fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##/:/'`); \
@@ -46,4 +39,4 @@ help: ## Show help message
printf "%-20s %s" $$help_command ; \
printf '\033[0m'; \
printf "%s\n" $$help_info; \
done
done

View File

@@ -1,9 +1,8 @@
![CI](https://github.com/Doctorado-ML/STree/workflows/CI/badge.svg)
[![codecov](https://codecov.io/gh/doctorado-ml/stree/branch/master/graph/badge.svg)](https://codecov.io/gh/doctorado-ml/stree)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/35fa3dfd53a24a339344b33d9f9f2f3d)](https://www.codacy.com/gh/Doctorado-ML/STree?utm_source=github.com&utm_medium=referral&utm_content=Doctorado-ML/STree&utm_campaign=Badge_Grade)
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/Doctorado-ML/STree.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Doctorado-ML/STree/context:python)
# STree
# Stree
Oblique Tree classifier based on SVM nodes. The nodes are built and splitted with sklearn SVC models. Stree is a sklearn estimator and can be integrated in pipelines, grid searches, etc.

View File

@@ -1,4 +1,3 @@
sphinx
sphinx-rtd-theme
myst-parser
git+https://github.com/doctorado-ml/stree

View File

@@ -12,7 +12,6 @@
#
import os
import sys
import stree
sys.path.insert(0, os.path.abspath("../../stree/"))
@@ -24,8 +23,7 @@ copyright = "2020 - 2021, Ricardo Montañana Gómez"
author = "Ricardo Montañana Gómez"
# The full version, including alpha/beta/rc tags
version = stree.__version__
release = version
release = "1.0"
# -- General configuration ---------------------------------------------------

View File

@@ -1,9 +1,8 @@
# STree
# Stree
[![Codeship Status for Doctorado-ML/STree](https://app.codeship.com/projects/8b2bd350-8a1b-0138-5f2c-3ad36f3eb318/status?branch=master)](https://app.codeship.com/projects/399170)
[![codecov](https://codecov.io/gh/doctorado-ml/stree/branch/master/graph/badge.svg)](https://codecov.io/gh/doctorado-ml/stree)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/35fa3dfd53a24a339344b33d9f9f2f3d)](https://www.codacy.com/gh/Doctorado-ML/STree?utm_source=github.com&utm_medium=referral&utm_content=Doctorado-ML/STree&utm_campaign=Badge_Grade)
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/Doctorado-ML/STree.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Doctorado-ML/STree/context:python)
Oblique Tree classifier based on SVM nodes. The nodes are built and splitted with sklearn SVC models. Stree is a sklearn estimator and can be integrated in pipelines, grid searches, etc.

View File

@@ -1,4 +1,5 @@
import setuptools
import stree
def readme():
@@ -6,23 +7,11 @@ def readme():
return f.read()
def get_data(field):
item = ""
with open("stree/__init__.py") as f:
for line in f.readlines():
if line.startswith(f"__{field}__"):
delim = '"' if '"' in line else "'"
item = line.split(delim)[1]
break
else:
raise RuntimeError(f"Unable to find {field} string.")
return item
VERSION = stree.__version__
setuptools.setup(
name="STree",
version=get_data("version"),
license=get_data("license"),
version=stree.__version__,
license=stree.__license__,
description="Oblique decision tree with svm nodes",
long_description=readme(),
long_description_content_type="text/markdown",
@@ -32,19 +21,19 @@ setuptools.setup(
"Code": "https://github.com/Doctorado-ML/STree",
"Documentation": "https://stree.readthedocs.io/en/latest/index.html",
},
author=get_data("author"),
author_email=get_data("author_email"),
author=stree.__author__,
author_email=stree.__author_email__,
keywords="scikit-learn oblique-classifier oblique-decision-tree decision-\
tree svm svc",
classifiers=[
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: " + get_data("license"),
"License :: OSI Approved :: " + stree.__license__,
"Programming Language :: Python :: 3.8",
"Natural Language :: English",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Intended Audience :: Science/Research",
],
install_requires=["scikit-learn", "numpy"],
install_requires=["scikit-learn", "numpy", "ipympl"],
test_suite="stree.tests",
zip_safe=False,
)

View File

@@ -1,10 +0,0 @@
version: 2
sphinx:
configuration: docs/source/conf.py
python:
version: 3.8
install:
- requirements: requirements.txt
- requirements: docs/requirements.txt