code: @SuppressWarnings("deprecation")
      public static ProbabilisticNetwork loadNetwork(File netFile)
              throws ShanksException {
          ProbabilisticNetwork net = null;
          BaseIO io = new NetIO();
          try {
              net = (ProbabilisticNetwork) io.load(netFile);
              net.compile();
          } catch (LoadException e) {
              throw new ShanksException(e);
          } catch (IOException e) {
              throw new ShanksException(e);
          } catch (Exception e) {
              throw new ShanksException(e);
          }
          return net;
      }
docs: Load a Bayesian network and return the probabilistic network object
  
  @param netFile
  @return
  @throws ShanksException