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(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)