30f8696647af482f34e88661c43bf373b84a8da5,plasma/models/shallow_runner.py,,train,#Any#Any#Any#Any#,158
Before Change
print("validate: {} shots, {} disruptive".format(len(shot_list_validate),shot_list_validate.num_disruptive()))
print("training: {} shots, {} disruptive".format(len(shot_list_train),shot_list_train.num_disruptive()))
if not os.path.isfile(dataset_path):
feature_extractor = FeatureExtractor(loader)
shot_list_train = shot_list_train.random_sublist(debug_use_shots)
X,Y = feature_extractor.load_shots(shot_list_train,sample_prob = 1.0)
np.savez(dataset_path,X=X,Y=Y)
else:
print("dataset exists.")
dat = np.load(dataset_path)
X = dat["X"]
Y = dat["Y"]
print("Total data: {} samples, {} positive".format(len(X),np.sum(Y > 0)))
max_samples = 40000
num_samples = min(max_samples,len(Y))
indices = np.random.choice(np.array(range(len(Y))),num_samples,replace=False)
After Change
feature_extractor = FeatureExtractor(loader)
shot_list_train = shot_list_train.random_sublist(debug_use_shots)
X,Y,_ = feature_extractor.load_shots(shot_list_train,sample_prob = 1.0)
Xv,Yv,_ = feature_extractor.load_shots(shot_list_validate,sample_prob = 1.0)
X = np.concatenate(X,axis=0)
Y = np.concatenate(Y,axis=0)
Xv = np.concatenate(Xv,axis=0)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: PPPLDeepLearning/plasma-python
Commit Name: 30f8696647af482f34e88661c43bf373b84a8da5
Time: 2017-05-29
Author: jk7@tigergpu.princeton.edu
File Name: plasma/models/shallow_runner.py
Class Name:
Method Name: train
Project Name: RasaHQ/rasa
Commit Name: 3f53ea45a17dd29b8ef20db08484e7537c6aa4e3
Time: 2019-02-12
Author: t.wochinger@rasa.com
File Name: rasa/cli/run.py
Class Name:
Method Name: run
Project Name: dPys/PyNets
Commit Name: 7f7d0698ab5167cf9ec97aa3be1fc35a6f7a89dd
Time: 2019-10-14
Author: dpisner@utexas.edu
File Name: pynets/core/utils.py
Class Name:
Method Name: create_temporary_copy