bsmart.scans.AL

Active Learning scan using neural networks

Active learning scan with a customizable neural network (see settings in JSON file), a smart point selection algorithm which encourages searches around existing good points while maintaining point diversity, and some safeguards against premature training failures.

You can find more information about this type of scan in: Goodsell, Mark D. and Joury, Ari: “Active learning BSM parameter spaces”, arXiv:2204.13950, April 2022. Please cite this paper if you are using this scan.

Information

BSMArt Name: AL

Requires:
  • torch

  • pandas

  • scipy

  • numpy

Settings:

  • Cores: Number of cores

  • Points: Number of points

  • InitCSV: Initial CSV file

  • TestCSV: Test CSV file

  • Benchmark: Benchmark CSV file

  • Networks: Dict of network settings

bsmart.scans.AL.ClassifyFunc(my_type, mean, var)[source]

Generates a lambda function to decide whether a point is excluded or not based on one observable.

class bsmart.scans.AL.Discriminator(*args: Any, **kwargs: Any)[source]

Bases: Module

forward(x)[source]
class bsmart.scans.AL.MyDataset(*args: Any, **kwargs: Any)[source]

Bases: Dataset

add_some_points_balance(scalerfuncs, good_points, bad_points)[source]
class bsmart.scans.AL.NewScan(inputs, log)[source]

Bases: Scan

Scanner class for Random Scans

classifypoint(observables)[source]
count_parameters(model)[source]
create_scalers()[source]
create_scalers_from_data(thedataset, frame_variables)[source]
distancesq(a, b)[source]
do_test(set_to_test)[source]
do_train(train_set, dsteps)[source]
generate_parameter_points(proposedpoints)[source]
initial_training()[source]
postprocess(Point, observables, data_point, temp_dir, log, lock=None)[source]

Run classification

propose_KfromL(K, L, points=None)[source]
propose_KfromL_diverse(K, L, points=None)[source]
propose_fromGood(numpoints)[source]
rescore_diversity(full_set, last_new_point)[source]
run()[source]

Cycle through generating points and training the network until either we have a lot of (good?) points or some criterion is met, e.g. the network is confident of everything

save_model(pc='')[source]
scale_points(zeroonepoints, down=False)[source]
bsmart.scans.AL.choices(dataset, thismany)[source]
bsmart.scans.AL.create_edge_penalty(a, b)[source]
bsmart.scans.AL.scaler_func(vmin, vmax)[source]