Fix tabular example

This commit is contained in:
Sylvain Gugger
2020-03-27 06:21:49 -07:00
parent c640215af0
commit 5a2aafdfa2
2 changed files with 16 additions and 66 deletions

View File

@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
@@ -1135,14 +1135,14 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"from fastai2.tabular.all import *\n",
"path = untar_data(URLs.ADULT_SAMPLE)\n",
"\n",
"dls = TabularDataLoaders.from_csv(path/'adult.csv', path, y_names=\"salary\",\n",
"dls = TabularDataLoaders.from_csv(path/'adult.csv', path=path, y_names=\"salary\",\n",
" cat_names = ['workclass', 'education', 'marital-status', 'occupation',\n",
" 'relationship', 'race'],\n",
" cont_names = ['age', 'fnlwgt', 'education-num'],\n",