def testVvGlobCoup(data, true_inc): output_line = ( 'Varying Variances Globally Coupled Bayesian Piece-Wise Linear Regression with moves on ' + 'change-points and parent sets on Yeast Data.') print(output_line) logger.info(output_line) # Print and write output baNet = Network(data, args.chain_length, args.burn_in) baNet.infer_network('var_glob_coup_nh_dbn') adjMatrixRoc(baNet.proposed_adj_matrix, true_inc, args.verbose) # save the chain into the output folder save_chain('vv_glob_coup_dbn.pckl', baNet)
def testSeqCoupPwBlrWithCpsParentMoves(data, true_inc): output_line = ( 'Sequentially Coupled Bayesian Piece-Wise Linear Regression with moves on ' + 'change-points and parent sets on Yeast data.') print(output_line) logger.info(output_line) # Print and write output baNet = Network(data, args.chain_length, args.burn_in) baNet.infer_network('seq_coup_nh_dbn') adjMatrixRoc(baNet.proposed_adj_matrix, true_inc, args.verbose) # save the chain into the output folder save_chain('seq_coup_dbn.pckl', baNet)
def testPwBlrWithCpsParentMoves(data, true_inc): output_line = ('Bayesian Piece-Wise Linear Regression with moves on ' + 'change-points and parent sets for the Yeast data.') print(output_line) logger.info(output_line) # Print and write output if args.change_points == 0: args.change_points = [] args.change_points.append(data.shape[0] + 1) # append the len data + 1 so the algo works baNet = Network(data, args.chain_length, args.burn_in) baNet.infer_network('varying_nh_dbn') adjMatrixRoc(baNet.proposed_adj_matrix, true_inc, args.verbose) # save the chain into the output folder save_chain('nh_dbn.pckl', baNet)
def testPwBlrWithParentMoves(data, true_inc): output_line = ( 'Bayesian Piece-Wise Linear Regression with moves on ' + 'the parent set only with fixed changepoints for the Yeast Data. \n') print(output_line) logger.info(output_line) # Print and write output if args.change_points == 0: args.change_points = [] args.change_points.append(data.shape[0] + 1) # append the len data + 1 so the algo works baNet = Network(data, args.chain_length, args.burn_in, args.change_points) # Create theh BN obj baNet.infer_network( 'fixed_nh_dbn') # Do the fixed changepoints version of the DBN algo adjMatrixRoc(baNet.proposed_adj_matrix, true_inc, args.verbose) # check the ROC
def testPwBlrWithCpsParentMoves(coefs): output_line = ('Bayesian Piece-Wise Linear Regression with moves on' + 'change-points and parent sets.') print(output_line) logger.info(output_line) # Print and write output # Generate data to test our algo network, _, adjMatrix = generateNetwork(args.num_features, args.num_indep, coefs, args.num_samples, args.change_points, args.verbose, args.generated_noise_var) baNet = Network(network, args.chain_length, args.burn_in) baNet.infer_network('varying_nh_dbn') trueAdjMatrix = adjMatrix[ 0] # For the moment we just get the adj matrix of the first cp adjMatrixRoc(baNet.proposed_adj_matrix, trueAdjMatrix, args.verbose)
def testPwBlrWithParentMoves(coefs): output_line = ('Bayesian Piece-Wise Linear Regression with moves on' + 'the parent set only with fixed changepoints. \n') print(output_line) logger.info(output_line) # Print and write output # Generate data to test our algo network, _, adjMatrix = generateNetwork(args.num_features, args.num_indep, coefs, args.num_samples, args.change_points, args.verbose, args.generated_noise_var) baNet = Network(network, args.chain_length, args.burn_in, args.change_points) # Create theh BN obj baNet.infer_network( 'fixed_nh_dbn') # Do the fixed chnagepoints version of the DBN algo trueAdjMatrix = adjMatrix[ 0] # For the moment we just get the adj matrix of the first cp adjMatrixRoc(baNet.proposed_adj_matrix, trueAdjMatrix, args.verbose)
def test_h_dbn(data, true_inc): output_line = ('Bayesian Linear Regression with moves on ' + 'the parent set only for the Yeast data. \n') print(output_line) logger.info(output_line) # Print and write output change_points = [ ] # set the cps empty list because this is the homegeneous version # Create/Call the Network objects/methods baNet = Network(data, args.chain_length, args.burn_in, args.change_points) # Create theh BN obj baNet.infer_network( 'h_dbn') # Do the fixed parents version of the DBN algo # trueAdjMatrix = adjMatrix[0] # For the moment we just get the adj matrix of the first cp adjMatrixRoc(baNet.proposed_adj_matrix, true_inc, args.verbose) # save the chain into the output folder save_chain('h_dbn.pckl', baNet)
def test_h_dbn(coefs): output_line = ('Bayesian Linear Regression with moves on' + 'the parent set only. \n') print(output_line) logger.info(output_line) # Print and write output change_points = [ ] # set the cps empty list because this is the homegeneous version # Generate data to test our algo network, _, adjMatrix = generateNetwork(args.num_features, args.num_indep, coefs, args.num_samples, change_points, args.verbose, args.generated_noise_var) baNet = Network(network, args.chain_length, args.burn_in, args.change_points) # Create theh BN obj baNet.infer_network( 'h_dbn') # Do the fixed parents version of the DBN algo trueAdjMatrix = adjMatrix[ 0] # For the moment we just get the adj matrix of the first cp adjMatrixRoc(baNet.proposed_adj_matrix, trueAdjMatrix, args.verbose)