class_docstr: Implements a recurrent DQN designed to produce melody sequences.
class_docstr_tok: ["Implements","a","recurrent","DQN","designed","to","produce","melody","sequences","."]
docstr: Computes statistics about music theory rule adherence.
  
  Args:
    num_compositions: How many compositions should be randomly generated
      for computing the statistics.
    key: The numeric values of notes belonging to this key. Defaults to C
      Major if not provided.
    tonic_note: The tonic/1st note of the desired key.
  
  Returns:
    A dictionary containing the statistics.
docstr_tok: ["Computes","statistics","about","music","theory","rule","adherence",".","Args",":","num_compositions",":","How","many","compositions","should","be","randomly","generated","for","computing","the","statistics",".","key",":","The","numeric","values","of","notes","belonging","to","this","key",".","Defaults","to","C","Major","if","not","provided",".","tonic_note",":","The","tonic\/1st","note","of","the","desired","key",".","Returns",":","A","dictionary","containing","the","statistics","."]
code: def evaluate_music_theory_metrics(
      self,
      num_compositions=10000,
      key=None,
      tonic_note=rl_tuner_ops.C_MAJOR_TONIC,
  ):
      """Computes statistics about music theory rule adherence.
  
      Args:
        num_compositions: How many compositions should be randomly generated
          for computing the statistics.
        key: The numeric values of notes belonging to this key. Defaults to C
          Major if not provided.
        tonic_note: The tonic/1st note of the desired key.
  
      Returns:
        A dictionary containing the statistics.
      """
      stat_dict = rl_tuner_eval_metrics.compute_composition_stats(
          self,
          num_compositions=num_compositions,
          composition_length=self.num_notes_in_melody,
          key=key,
          tonic_note=tonic_note,
      )
  
      return stat_dict
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import os
  import random
  import urllib
  from magenta.models.rl_tuner import note_rnn_loader
  from magenta.models.rl_tuner import rl_tuner_eval_metrics
  from magenta.models.rl_tuner import rl_tuner_ops
  import matplotlib.pyplot
  from note_seq import melodies_lib
  from note_seq import midi_io
  import numpy
  import scipy.special
  from six.moves import range
  from six.moves import reload_module
  from six.moves import urllib
  import tensorflow.compat.v1
label_desc: Use image node_id 39 for calling the RLTuner obj's underlying member method code with example usage: obj.evaluate_music_theory_metrics(num_compositions, key, tonic_note) and returns: stat_dict