update tree filename

This commit is contained in:
2025-05-28 20:35:50 +00:00
parent 39fd9a1862
commit a6a065b565
2 changed files with 7 additions and 16 deletions

2
.gitignore vendored
View File

@@ -1,3 +1,3 @@
data.* data.*
__pycache__ __pycache__
tree.tree tree.json

View File

@@ -2,7 +2,7 @@
"cells": [ "cells": [
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 8, "execution_count": 26,
"id": "d5618056", "id": "d5618056",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
@@ -21,14 +21,14 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 24, "execution_count": 27,
"id": "d336971a", "id": "d336971a",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
"# extract argument\n", "# extract argument\n",
"inputfile = \"data.csv\"\n", "inputfile = \"data.csv\"\n",
"outputfile = \"tree.tree\"\n", "outputfile = \"tree.json\"\n",
"#testfile = args.t\n", "#testfile = args.t\n",
"\n", "\n",
"# output the tree\n", "# output the tree\n",
@@ -103,19 +103,10 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 16, "execution_count": null,
"id": "b96f3403", "id": "b96f3403",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"train accuracy: 0.879490682862549\n",
"test accuracy: 0.879490682862549\n"
]
}
],
"source": [ "source": [
"# Training set X and Y\n", "# Training set X and Y\n",
"Set1 = pd.read_csv(inputfile)\n", "Set1 = pd.read_csv(inputfile)\n",
@@ -147,7 +138,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 25, "execution_count": null,
"id": "7f36344d", "id": "7f36344d",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],