<commit_before>'''
Created on 07.10.2013

@author: marscher
'''
import unittest

import assessment
import numpy as np


def create_rate_matrix():
    a = [[-3, 3, 0, 0 ],
         [2, -5, 3, 0 ],
         [0, 3, -5, 2],
         [0, 0, 3, -3] ]
    
    return np.asmatrix(a)

class AssessmentDenseTest(unittest.TestCase):

    def setUp(self):
        self.A = create_rate_matrix()

    def tearDown(self):
        pass

    def testIsRateMatrix(self):
        self.assert_(assessment.is_rate_matrix(self.A), \
                     'A should be a rate matrix')
        
        # manipulate matrix so it isn't a rate matrix any more<commit_msg>fixed signs of rate matrix example<commit_after>'''
Created on 07.10.2013

@author: marscher
'''
import unittest

import assessment
import numpy as np


def create_rate_matrix():
    a = [[-3, 3, 0, 0 ],
         [3, -5, 2, 0 ],
         [0, 3, -5, 2],
         [0, 0, 3, -3] ]
    
    return np.asmatrix(a)

class AssessmentDenseTest(unittest.TestCase):

    def setUp(self):
        self.A = create_rate_matrix()

    def tearDown(self):
        pass

    def testIsRateMatrix(self):
        self.assert_(assessment.is_rate_matrix(self.A), \
                     'A should be a rate matrix')
        
        # manipulate matrix so it isn't a rate matrix any more
{'fraction_non_alphanumeric': 0.12051868802440885, 'fraction_numerical': 0.036613272311212815, 'mean_word_length': 2.1538461538461537, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2262569', 'n_tokens_mistral': 474, 'n_tokens_neox': 429, 'n_words': 130}