{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "这个shallow modle输出的结果是0.88160,比我之前的根据官方教程做的0.84要好很多。分类器恐怕不会造成这么大的差异,应该是在BOW_LR.py中,`lab_fea = select_feature('../../data/feature_chi.txt', max_feature)[\"1\"]`,这一行语句的效果。从中选了1000个作为feature的单词。\n" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": true }, "outputs": [], "source": [ "%load_ext autoreload\n", "%autoreload 2" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": true }, "outputs": [], "source": [ "import pandas as pd" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [], "source": [ "\"\"\"\n", "error_bad_lines : boolean, default True\n", "Lines with too many fields (e.g. a csv line with too many commas) will by default cause an exception to be raised, \n", "and no DataFrame will be returned. \n", "If False, then these “bad lines” will dropped from the DataFrame that is returned.\n", "\n", "warn_bad_lines : boolean, default True\n", "If error_bad_lines is False, and warn_bad_lines is True, \n", "a warning for each “bad line” will be output.\n", "\"\"\"\n", "\n", "\n", "# Preprocessing Training Data\n", "train = pd.read_csv(\"../Sentiment/data/labeledTrainData.tsv\", header=0, delimiter='\\t', quoting=3, error_bad_lines=False)\n" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
\n", " | id | \n", "sentiment | \n", "review | \n", "
---|---|---|---|
0 | \n", "\"5814_8\" | \n", "1 | \n", "\"With all this stuff going down at the moment ... | \n", "
1 | \n", "\"2381_9\" | \n", "1 | \n", "\"\\\"The Classic War of the Worlds\\\" by Timothy ... | \n", "
2 | \n", "\"7759_3\" | \n", "0 | \n", "\"The film starts with a manager (Nicholas Bell... | \n", "
3 | \n", "\"3630_4\" | \n", "0 | \n", "\"It must be assumed that those who praised thi... | \n", "
4 | \n", "\"9495_8\" | \n", "1 | \n", "\"Superbly trashy and wondrously unpretentious ... | \n", "
\"With all this stuff going down at the moment with MJ i've started listening to his music, watching the odd documentary here and there, watched The Wiz and watched Moonwalker again. Maybe i just want to get a certain insight into this guy who i thought was really cool in the eighties just to maybe make up my mind whether he is guilty or innocent. Moonwalker is part biography, part feature film which i remember going to see at the cinema when it was originally released. Some of it has subtle messages about MJ's feeling towards the press and also the obvious message of drugs are bad m'kay.
Visually impressive but of course this is all about Michael Jackson so unless you remotely like MJ in anyway then you are going to hate this and find it boring. Some may call MJ an egotist for consenting to the making of this movie BUT MJ and most of his fans would say that he made it for the fans which if true is really nice of him.
The actual feature film bit when it finally starts is only on for 20 minutes or so excluding the Smooth Criminal sequence and Joe Pesci is convincing as a psychopathic all powerful drug lord. Why he wants MJ dead so bad is beyond me. Because MJ overheard his plans? Nah, Joe Pesci's character ranted that he wanted people to know it is he who is supplying drugs etc so i dunno, maybe he just hates MJ's music.
Lots of cool things in this like MJ turning into a car and a robot and the whole Speed Demon sequence. Also, the director must have had the patience of a saint when it came to filming the kiddy Bad sequence as usually directors hate working with one kid let alone a whole bunch of them performing a complex dance scene.
Bottom line, this movie is for people who like MJ on one level or another (which i think is most people). If not, then stay away. It does try and give off a wholesome message and ironically MJ's bestest buddy in this movie is a girl! Michael Jackson is truly one of the most talented people ever to grace this planet but is he guilty? Well, with all the attention i've gave this subject....hmmm well i don't know because people can be different behind closed doors, i know this for a fact. He is either an extremely nice but stupid guy or one of the most sickest liars. I hope he is not the latter.\"
\n", " | id | \n", "sentiment | \n", "review | \n", "
---|---|---|---|
0 | \n", "\"5814_8\" | \n", "1 | \n", "\"With all this stuff going down at the moment ... | \n", "
1 | \n", "\"2381_9\" | \n", "1 | \n", "\"\\\"The Classic War of the Worlds\\\" by Timothy ... | \n", "
2 | \n", "\"7759_3\" | \n", "0 | \n", "\"The film starts with a manager (Nicholas Bell... | \n", "
3 | \n", "\"3630_4\" | \n", "0 | \n", "\"It must be assumed that those who praised thi... | \n", "
4 | \n", "\"9495_8\" | \n", "1 | \n", "\"Superbly trashy and wondrously unpretentious ... | \n", "