From a6a065b565c0db5cccb6b62a0a7148d687944c00 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Wed, 28 May 2025 20:35:50 +0000 Subject: [PATCH] update tree filename --- .gitignore | 2 +- DecisionTree.ipynb | 21 ++++++--------------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index b74871e..7a7b094 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ data.* __pycache__ -tree.tree \ No newline at end of file +tree.json \ No newline at end of file diff --git a/DecisionTree.ipynb b/DecisionTree.ipynb index 0703980..ac40b40 100644 --- a/DecisionTree.ipynb +++ b/DecisionTree.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 8, + "execution_count": 26, "id": "d5618056", "metadata": {}, "outputs": [], @@ -21,14 +21,14 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 27, "id": "d336971a", "metadata": {}, "outputs": [], "source": [ "# extract argument\n", "inputfile = \"data.csv\"\n", - "outputfile = \"tree.tree\"\n", + "outputfile = \"tree.json\"\n", "#testfile = args.t\n", "\n", "# output the tree\n", @@ -103,19 +103,10 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": null, "id": "b96f3403", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "train accuracy: 0.879490682862549\n", - "test accuracy: 0.879490682862549\n" - ] - } - ], + "outputs": [], "source": [ "# Training set X and Y\n", "Set1 = pd.read_csv(inputfile)\n", @@ -147,7 +138,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": null, "id": "7f36344d", "metadata": {}, "outputs": [],