From c01089af443c514116ce6036346bdd66c2a33ffb Mon Sep 17 00:00:00 2001 From: Baptiste Bauvin <baptiste.bauvin.1@ulaval.ca> Date: Fri, 2 Feb 2018 18:04:12 +0100 Subject: [PATCH] Added some docs and refactored some --- .gitignore | 1 + ipynb/How to add a monoview classifier.ipynb | 100 +++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 ipynb/How to add a monoview classifier.ipynb diff --git a/.gitignore b/.gitignore index 452926b3..971508ca 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ TODO *.pyc .idea/** ipynb/.ipynb_checkpoints/** +docs/source/monomulti/.ipynb_checkpoints/** Results/** Data/** multiview_platform/MonoMultiviewClassifiers/Results/* diff --git a/ipynb/How to add a monoview classifier.ipynb b/ipynb/How to add a monoview classifier.ipynb new file mode 100644 index 00000000..ab2ebf32 --- /dev/null +++ b/ipynb/How to add a monoview classifier.ipynb @@ -0,0 +1,100 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Monoview classifier framework" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## File addition" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "* In the `MonoviewClassifiers` package, you need to add a python module called after your monoview classifier (let's call it MOC for **MO**noview **C**lassifier)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## The `MOC.py` file" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "In this file, you need to add several functions forthe platform to be able to use your classifier, they are alllisted below : " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### `canProbas`" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This function is just used to knowif the classifier can predict a probability for each label instead of just predicting the a label." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "def canProbas():\n", + " return True" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### `fit`" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This function returns a fitted sklearn classifier object" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.13" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} -- GitLab