forked from kubapok/retroc2
update
This commit is contained in:
parent
eeb51fec1d
commit
3a326579b5
13
model.ipynb
13
model.ipynb
@ -2,17 +2,10 @@
|
|||||||
"cells": [
|
"cells": [
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 99,
|
"execution_count": 1,
|
||||||
"id": "8f5480f9-fa82-4150-acff-9309fdc43690",
|
"id": "8f5480f9-fa82-4150-acff-9309fdc43690",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"107463\n"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"text/plain": [
|
"text/plain": [
|
||||||
@ -20,7 +13,7 @@
|
|||||||
" ('linearregression', LinearRegression())])"
|
" ('linearregression', LinearRegression())])"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 99,
|
"execution_count": 1,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"output_type": "execute_result"
|
"output_type": "execute_result"
|
||||||
}
|
}
|
||||||
@ -35,8 +28,6 @@
|
|||||||
"with open('train/train.tsv', 'r', encoding='utf8') as file:\n",
|
"with open('train/train.tsv', 'r', encoding='utf8') as file:\n",
|
||||||
" train_data = pd.read_csv(file, sep='\\t', names=['Begin', 'End', 'Title', 'Publisher', 'Text'])\n",
|
" train_data = pd.read_csv(file, sep='\\t', names=['Begin', 'End', 'Title', 'Publisher', 'Text'])\n",
|
||||||
"\n",
|
"\n",
|
||||||
"print(len(train_data)) \n",
|
|
||||||
"train_data = train_data[:10000]\n",
|
|
||||||
" \n",
|
" \n",
|
||||||
"X = train_data['Text']\n",
|
"X = train_data['Text']\n",
|
||||||
"Y = train_data['Begin']\n",
|
"Y = train_data['Begin']\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user