This commit is contained in:
s444417 2022-05-17 20:35:45 +02:00
parent ca70a52e9f
commit bea6c0cada
4 changed files with 28 additions and 6 deletions

View File

@ -19996,3 +19996,5 @@
2004.0621537194256
1924.6022305381223
1967.4833548100212
1999.0
1999.0

1 1825.0344950703334
19996 2004.0621537194256
19997 1924.6022305381223
19998 1967.4833548100212
19999 1999.0
20000 1999.0

View File

@ -11560,3 +11560,4 @@
1935.8485031558441
1940.562491157199
1958.4093899338734
1999.0
1 1967.9383941311928
11560 1935.8485031558441
11561 1940.562491157199
11562 1958.4093899338734
11563 1999.0

View File

@ -504,7 +504,7 @@
},
{
"cell_type": "code",
"execution_count": 115,
"execution_count": 127,
"metadata": {},
"outputs": [],
"source": [
@ -512,28 +512,46 @@
"testYPath = \"./dev-1/out.tsv\"\n",
"\n",
"testX = pd.read_csv(testXPath, sep='\\t', nrows=nrows, header=None)\n",
"\n",
"# testY = pd.read_csv(testYPath, sep='\\t', nrows=nrows, header=None)\n",
"testXtfidfVector = vectorizer.transform(testX[0])\n"
]
},
{
"cell_type": "code",
"execution_count": 116,
"execution_count": 128,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[1967.93839413 1941.34584207 1967.15515902 ... 1935.84850316 1940.56249116\n",
" 1958.40938993]\n"
"11562\n",
"11562\n"
]
}
],
"source": [
"print(testX.shape[0])\n",
"\n",
"print(testXtfidfVector.shape[0])"
]
},
{
"cell_type": "code",
"execution_count": 117,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"11562\n"
]
}
],
"source": [
"pred = reg.predict(testXtfidfVector)\n",
"print(pred)\n",
"print(len(pred))\n",
"\n",
"import csv\n",
"with open(testYPath, 'w', newline='') as f_output:\n",

View File

@ -14217,3 +14217,4 @@
1936.0490932436148
1990.1215448613398
1913.0711081496029
1999.0
1 1984.7906451252588
14217 1936.0490932436148
14218 1990.1215448613398
14219 1913.0711081496029
14220 1999.0