Skip to content

Latest commit

 

History

History
27 lines (17 loc) · 1.21 KB

File metadata and controls

27 lines (17 loc) · 1.21 KB

RandomPythonNotebooks

A place to save random python notebooks

  • AWS S3 file manipulations shows a few simple manipulations of files in an AWS S3 bucket
  • Decision tree path for each path of a decision tree, extracts the decisions at each node
  • Text Classification Using TF-IDF vectorization classify BBC news articles into 5 categories (business, entertainment, politics, sport, tech)

A brief description of each notebook follows.

AWS S3 file manipulations

The purpose of this notebook is to illustrate how to move files in S3 buckets, by copying and deleting files using the boto3 python library.

The example I will use consists of an S3 bucket that has three folders: input, archived and errors.



Initially, the archived and errors folders are empty, whereas the input folder has a single file in it: IF009_1.txt

Decision Tree Path

Train a decision tree on a data set. Then extract the decision tree paths. For each path, obtain the decisions for each node as well as some summary statistics of each leaf.