| |
- sets.Set(sets.BaseSet)
-
- fingerprint
- __builtin__.dict(__builtin__.object)
-
- fingerprint_counter
- fingerprint_bayes
class fingerprint(sets.Set) |
| |
- Method resolution order:
- fingerprint
- sets.Set
- sets.BaseSet
- __builtin__.object
Methods defined here:
- __init__(self, data=[])
- __repr__(self, NBITS=6, FINGER_TABLE='-0123456789abcdefghijklmnpqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+*')
- __str__(self, NBITS=6, FINGER_TABLE='-0123456789abcdefghijklmnpqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+*')
- fold(self, nbits)
- from_str(self, str, NBITS=6, FINGER_TABLE='-0123456789abcdefghijklmnpqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+*')
- max(self)
- shift(self, shift)
- tanimoto(self, other)
- tversky(self, other, alpha=1.0, beta=1.0)
Data and other attributes defined here:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'fingerprint' objects>
- list of weak references to the object (if defined)
Methods inherited from sets.Set:
- __as_immutable__(self)
- __as_temporarily_immutable__(self)
- __getstate__(self)
- __hash__(self)
- A Set cannot be hashed.
- __iand__(self, other)
- Update a set with the intersection of itself and another.
- __ior__(self, other)
- Update a set with the union of itself and another.
- __isub__(self, other)
- Remove all elements of another set from this set.
- __ixor__(self, other)
- Update a set with the symmetric difference of itself and another.
- __setstate__(self, data)
- add(self, element)
- Add an element to a set.
This has no effect if the element is already present.
- clear(self)
- Remove all elements from this set.
- difference_update(self, other)
- Remove all elements of another set from this set.
- discard(self, element)
- Remove an element from a set if it is a member.
If the element is not a member, do nothing.
- intersection_update(self, other)
- Update a set with the intersection of itself and another.
- pop(self)
- Remove and return an arbitrary set element.
- remove(self, element)
- Remove an element from a set; it must be a member.
If the element is not a member, raise a KeyError.
- symmetric_difference_update(self, other)
- Update a set with the symmetric difference of itself and another.
- union_update(self, other)
- Update a set with the union of itself and another.
- update(self, iterable)
- Add all values from an iterable (such as a list or file).
Data and other attributes inherited from sets.Set:
- __slots__ = []
Methods inherited from sets.BaseSet:
- __and__(self, other)
- Return the intersection of two sets as a new set.
(I.e. all elements that are in both sets.)
- __cmp__(self, other)
- __contains__(self, element)
- Report whether an element is a member of a set.
(Called in response to the expression `element in self'.)
- __copy__ = copy(self)
- Return a shallow copy of a set.
- __deepcopy__(self, memo)
- Return a deep copy of a set; used by copy module.
- __eq__(self, other)
- __ge__ = issuperset(self, other)
- Report whether this set contains another set.
- __gt__(self, other)
- __iter__(self)
- Return an iterator over the elements or a set.
This is the keys iterator for the underlying dict.
- __le__ = issubset(self, other)
- Report whether another set contains this set.
- __len__(self)
- Return the number of elements of a set.
- __lt__(self, other)
- __ne__(self, other)
- __or__(self, other)
- Return the union of two sets as a new set.
(I.e. all elements that are in either set.)
- __sub__(self, other)
- Return the difference of two sets as a new Set.
(I.e. all elements that are in this set and not in the other.)
- __xor__(self, other)
- Return the symmetric difference of two sets as a new set.
(I.e. all elements that are in exactly one of the sets.)
- copy(self)
- Return a shallow copy of a set.
- difference(self, other)
- Return the difference of two sets as a new Set.
(I.e. all elements that are in this set and not in the other.)
- intersection(self, other)
- Return the intersection of two sets as a new set.
(I.e. all elements that are in both sets.)
- issubset(self, other)
- Report whether another set contains this set.
- issuperset(self, other)
- Report whether this set contains another set.
- symmetric_difference(self, other)
- Return the symmetric difference of two sets as a new set.
(I.e. all elements that are in exactly one of the sets.)
- union(self, other)
- Return the union of two sets as a new set.
(I.e. all elements that are in either set.)
|
class fingerprint_bayes |
|
Classify fingerprints based on simple naive bayes model. |
|
Methods defined here:
- __init__(self, pos=[], neg=[])
- clear(self)
- score(self, fing)
- Return the -Log(P) that the example fingerprint is in the positive class, defined by self.pos.
This is a standard naive bayes calculation. The lower the score,
the more likely it is to be part of the positive class.
|
class fingerprint_counter(__builtin__.dict) |
|
Perform basic bean counting of bits in groups of fingerprints |
|
- Method resolution order:
- fingerprint_counter
- __builtin__.dict
- __builtin__.object
Methods defined here:
- __getitem__(self, key)
- __init__(self)
- add(self, finger)
- add_all(self, fingers)
- clear(self)
- max(self)
Data and other attributes defined here:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'fingerprint_counter' objects>
- list of weak references to the object (if defined)
Methods inherited from __builtin__.dict:
- __cmp__(...)
- x.__cmp__(y) <==> cmp(x,y)
- __contains__(...)
- x.__contains__(y) <==> y in x
- __delitem__(...)
- x.__delitem__(y) <==> del x[y]
- __eq__(...)
- x.__eq__(y) <==> x==y
- __ge__(...)
- x.__ge__(y) <==> x>=y
- __getattribute__(...)
- x.__getattribute__('name') <==> x.name
- __gt__(...)
- x.__gt__(y) <==> x>y
- __hash__(...)
- x.__hash__() <==> hash(x)
- __iter__(...)
- x.__iter__() <==> iter(x)
- __le__(...)
- x.__le__(y) <==> x<=y
- __len__(...)
- x.__len__() <==> len(x)
- __lt__(...)
- x.__lt__(y) <==> x<y
- __ne__(...)
- x.__ne__(y) <==> x!=y
- __repr__(...)
- x.__repr__() <==> repr(x)
- __setitem__(...)
- x.__setitem__(i, y) <==> x[i]=y
- copy(...)
- D.copy() -> a shallow copy of D
- get(...)
- D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.
- has_key(...)
- D.has_key(k) -> True if D has a key k, else False
- items(...)
- D.items() -> list of D's (key, value) pairs, as 2-tuples
- iteritems(...)
- D.iteritems() -> an iterator over the (key, value) items of D
- iterkeys(...)
- D.iterkeys() -> an iterator over the keys of D
- itervalues(...)
- D.itervalues() -> an iterator over the values of D
- keys(...)
- D.keys() -> list of D's keys
- pop(...)
- D.pop(k[,d]) -> v, remove specified key and return the corresponding value
If key is not found, d is returned if given, otherwise KeyError is raised
- popitem(...)
- D.popitem() -> (k, v), remove and return some (key, value) pair as a
2-tuple; but raise KeyError if D is empty
- setdefault(...)
- D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
- update(...)
- D.update(E) -> None. Update D from E: for k in E.keys(): D[k] = E[k]
- values(...)
- D.values() -> list of D's values
Data and other attributes inherited from __builtin__.dict:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
- fromkeys = <built-in method fromkeys of type object>
- dict.fromkeys(S[,v]) -> New dict with keys from S and values equal to v.
v defaults to None.
| |