Package to classify aviation safety hazards from FAA Service Difficulty Reports data
Project description
Service Difficult Report (SDR) hazards classification package
:rocket: This is the source code for the SDR Classifier package that classifies potential aviation safety hazards from textual data. The work is a collaboration between FAA and Boeing data scientist teams
Version 0.1.0 out now! Check out the release notes here.
Demo
Virtual Environment
It is highly recommended to use venv, virtualenv or conda python environments. Read more about creating virtual environments via venv https://docs.python.org/3/tutorial/venv.html#creating-virtual-environments
Build and pip install the whl file locally
Run the command in the root folder to create the whl file in the dist folder
git clone https://github.com/Boeing/sdr-hazards-classification
python setup.py bdist_wheel
pip install ./distr/sdr_hazards_classification-0.1.0-py3-none-any.whl
Install sdr_hazards_classification from Pypi with pip
pip install sdr_hazards_classification
Example
:airplane: Follow the code snippet below to test and call the prediction method from the Depressurization model
from sdr_hazards_classification import sdr_api
import pandas as pd
my_model = sdr_api.SdrInferenceAPI()
#test the prediction method
my_model.test_sdr_depressurization_predictions()
event_text = "Lost cabin pressurization at flight level 30000, cabin altitude warning horn sounded at 10000 feet. Unabel to control cabin pressure with outflow valve closed"
pred, probs = my_model.get_predictions([event_text])
df = pd.read_csv('./src/sdr_classifier/data/SDR_Example.csv')
records = df["Text"]
#pass in a record list for prediction
pred, probs = my_model.get_predictions(records)
df['Prediction'] = pred
df['Prob'] = probs
print(df.head(2))
print("Done")
Contributing
🛩️ Please follow the contribution guideline
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for sdr-hazards-classification-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a7690b3c88c84bb8f09ca03bdf34cd78819e9a1c76d1f8ba24d010361b835f8 |
|
MD5 | 4c6ba920506c4a66357e5fc0c6ad4e6d |
|
BLAKE2b-256 | 3a463bbe57a043ea0cf453e946b02dc4cfcd7c2303b2150cf2a23ba39a441d34 |
Hashes for sdr_hazards_classification-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10dd9e3b9f757bd5eddefeb0fe1c4cfb82d99e7045f25ce56a5db3ff5a16d185 |
|
MD5 | f3357b2eed4a8c3211200bc06ba30ca8 |
|
BLAKE2b-256 | e3dd1dda6c69f4327054ea68faa0b4b8472bfcc23b13e85b0089b84b87cdfa3e |