-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.py
More file actions
28 lines (22 loc) · 707 Bytes
/
run.py
File metadata and controls
28 lines (22 loc) · 707 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
"""
Date: January 08, 2019
"""
import pandas as pd
import argparse
from dataloader import DataLoader
from bkt import BKT
ap = argparse.ArgumentParser()
ap.add_argument("-c", "--config", required=True, help="Path to configuration file")
args = vars(ap.parse_args())
# Read data file, configuration file, connection type
CONFIG_FILE = args["config"]
# CONFIG_FILE = "configurations/config.json"
# Instantiate DataLoader and BKT objects, and fit BKT parameters
dl = DataLoader(CONFIG_FILE)
data = dl.read_data()
bkt = BKT(dl, data)
bkt.fit()
skill_models = pd.DataFrame(bkt.skill_models).transpose()
skill_models.to_csv("skill_models.csv")
# Apply fitted parameters and write to a CSV file
bkt.predict()