{ "cells": [ { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": true }, "outputs": [], "source": [ "import logging\n", "import gensim\n", "\n", "from sklearn.datasets import fetch_rcv1\n", "from sklearn.multiclass import OneVsRestClassifier\n", "from sklearn.metrics import f1_score, precision_score, recall_score\n", "from sklearn.pipeline import Pipeline\n", "from sklearn import svm\n", "\n", "logging.basicConfig()\n", "rcv1 = fetch_rcv1()" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "<1x47236 sparse matrix of type ''\n", "\twith 138 stored elements in Compressed Sparse Row format>" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "rcv1.data[0]" ] } ], "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.12" } }, "nbformat": 4, "nbformat_minor": 0 }