Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PacktPublishing/Artificial-Intelligence-with-Python
/ functions
Functions
204 in github.com/PacktPublishing/Artificial-Intelligence-with-Python
⨍
Functions
204
◇
Types & classes
32
↓ 35 callers
Method
show
(self)
Chapter 09/code/coins.py:41
↓ 25 callers
Method
join
Returns combined hash from two hashes one - existing (combined) hash so far two - hash of new element one = join(one,
Chapter 09/code/easyAI/AI/HashTT.py:51
↓ 15 callers
Method
run
(self,routine)
Chapter 08/code/robot.py:59
↓ 9 callers
Method
train
(self, X_train, y_train)
Chapter 11/code/crf.py:35
↓ 7 callers
Method
switch_player
(self)
Chapter 09/code/easyAI/TwoPlayersGame.py:108
↓ 7 callers
Function
visualize_classifier
(classifier, X, y, title='')
Chapter 03/code/utilities.py:4
↓ 6 callers
Method
copy
(self)
Chapter 09/code/easyAI/TwoPlayersGame.py:111
↓ 6 callers
Method
possible_moves
(self)
Chapter 09/code/coins.py:21
↓ 6 callers
Function
read_data
(input_file, index)
Chapter 11/code/timeseries.py:5
↓ 5 callers
Function
get_location
(rows, input_element)
Chapter 07/code/puzzle.py:62
↓ 5 callers
Method
is_over
(self)
Chapter 09/code/coins.py:33
↓ 5 callers
Function
parent
(x, y)
Chapter 06/code/family.py:5
↓ 5 callers
Method
scoring
(self)
Chapter 09/code/coins.py:37
↓ 5 callers
Method
store
Stores an entry into the table
Chapter 09/code/easyAI/AI/TT.py:52
↓ 4 callers
Function
create_layer
(shape)
Chapter 16/code/cnn.py:21
↓ 4 callers
Function
get_frame
(cap, scaling_factor)
Chapter 13/code/frame_diff.py:14
↓ 4 callers
Method
make_move
(self, move)
Chapter 09/code/coins.py:25
↓ 4 callers
Method
play
(self, nmoves=1000, verbose=True)
Chapter 09/code/easyAI/TwoPlayersGame.py:69
↓ 4 callers
Function
string_to_list
(input_string)
Chapter 07/code/puzzle.py:58
↓ 3 callers
Function
extract_features
(words)
Chapter 10/code/sentiment_analyzer.py:6
↓ 3 callers
Function
grandparent
(x, y)
Chapter 06/code/family.py:9
↓ 3 callers
Method
hash_key
Given a key this will create a number and then convert it to an index for the dict.
Chapter 09/code/easyAI/AI/DictTT.py:24
↓ 3 callers
Method
lookup
Requests the entry in the table. Returns None if the entry has not been previously stored in the table.
Chapter 09/code/easyAI/AI/TT.py:35
↓ 3 callers
Method
loss_condition
(self)
Chapter 09/code/connect_four.py:44
↓ 3 callers
Function
mfcc
Compute MFCC features from an audio signal. :param signal: the audio signal from which to compute features. Should be an N*1 array :param sam
Chapter 12/code/features/base.py:13
↓ 3 callers
Function
pearson_score
(dataset, user1, user2)
Chapter 05/code/compute_scores.py:44
↓ 3 callers
Function
visualize_classifier
(classifier, X, y)
Chapter 02/code/utilities.py:4
↓ 2 callers
Method
__contains__
(self, key)
Chapter 09/code/easyAI/AI/DictTT.py:98
↓ 2 callers
Function
chunker
(input_data, N)
Chapter 10/code/text_chunker.py:6
↓ 2 callers
Method
classify
(self, input_data)
Chapter 11/code/crf.py:43
↓ 2 callers
Function
convert_to_letters
(indices)
Chapter 11/code/crf.py:47
↓ 2 callers
Function
convolution_2d
(x, W)
Chapter 16/code/cnn.py:28
↓ 2 callers
Function
extract_features
(word, N=2)
Chapter 10/code/gender_identifier.py:9
↓ 2 callers
Function
fbank
Compute Mel-filterbank energy features from an audio signal. :param signal: the audio signal from which to compute features. Should be an N*1 arr
Chapter 12/code/features/base.py:38
↓ 2 callers
Method
get
Gets the value for the given key, or the default.
Chapter 09/code/easyAI/AI/DictTT.py:44
↓ 2 callers
Function
get_data
(num_points)
Chapter 14/code/recurrent_neural_network.py:5
↓ 2 callers
Function
get_filterbanks
Compute a Mel-filterbank. The filters are stored in the rows, the columns correspond to fft bins. The filters are returned as an array of size nfi
Chapter 12/code/features/base.py:128
↓ 2 callers
Function
hz2mel
Convert a value in Hertz to Mels :param hz: a value in Hz. This can also be a numpy array, conversion proceeds element-wise. :returns: a valu
Chapter 12/code/features/base.py:112
↓ 2 callers
Method
loss_condition
(self)
Chapter 09/code/tic_tac_toe.py:26
↓ 2 callers
Method
loss_condition
(self)
Chapter 09/code/hexapawn.py:65
↓ 2 callers
Function
max_pooling
(x)
Chapter 16/code/cnn.py:32
↓ 2 callers
Method
mix
Auxiliary function.
Chapter 09/code/easyAI/AI/Hashes.py:82
↓ 2 callers
Function
mtd
This implements Memory-Enhanced Test Driver. This method is not meant to be used directly. It's used by several algorithms from MT family
Chapter 09/code/easyAI/AI/MTdriver.py:87
↓ 2 callers
Function
tone_synthesizer
(freq, duration, amplitude=1.0, sampling_freq=44100)
Chapter 12/code/synthesizer.py:8
↓ 2 callers
Function
visualize_output
(nn, num_points_test)
Chapter 14/code/recurrent_neural_network.py:24
↓ 2 callers
Method
win
(self)
Chapter 09/code/coins.py:29
↓ 1 callers
Method
_reset
(self)
Chapter 08/code/robot.py:19
↓ 1 callers
Method
after
Returns final value of hash
Chapter 09/code/easyAI/AI/HashTT.py:18
↓ 1 callers
Method
ask_move
(self, game)
Chapter 09/code/easyAI/Player.py:57
↓ 1 callers
Method
before
(self, key)
Chapter 09/code/easyAI/AI/Hashes.py:97
↓ 1 callers
Method
before
Returns initial value of hash. It's also the place where you can initialize some auxiliary variables
Chapter 09/code/easyAI/AI/HashTT.py:11
↓ 1 callers
Function
build_arg_parser
()
Chapter 15/code/balancer.py:5
↓ 1 callers
Function
build_arg_parser
()
Chapter 15/code/run_environment.py:5
↓ 1 callers
Function
build_arg_parser
()
Chapter 16/code/cnn.py:6
↓ 1 callers
Function
build_arg_parser
()
Chapter 16/code/single_layer.py:6
↓ 1 callers
Function
build_arg_parser
()
Chapter 12/code/speech_recognizer.py:12
↓ 1 callers
Function
build_arg_parser
()
Chapter 07/code/greedy_search.py:4
↓ 1 callers
Function
build_arg_parser
()
Chapter 05/code/collaborative_filtering.py:7
↓ 1 callers
Function
build_arg_parser
()
Chapter 05/code/movie_recommender.py:8
↓ 1 callers
Function
build_arg_parser
()
Chapter 05/code/compute_scores.py:5
↓ 1 callers
Function
build_arg_parser
()
Chapter 11/code/crf.py:12
↓ 1 callers
Function
build_arg_parser
()
Chapter 03/code/random_forests.py:14
↓ 1 callers
Function
build_models
(input_folder)
Chapter 12/code/speech_recognizer.py:44
↓ 1 callers
Function
check_prime
(x)
Chapter 06/code/prime.py:6
↓ 1 callers
Method
compute_hash
Computes real hash
Chapter 09/code/easyAI/AI/Hashes.py:117
↓ 1 callers
Method
compute_score
(self, input_data)
Chapter 12/code/speech_recognizer.py:40
↓ 1 callers
Function
create_toolbox
(num_bits)
Chapter 08/code/bit_counter.py:11
↓ 1 callers
Function
create_toolbox
()
Chapter 08/code/robot.py:107
↓ 1 callers
Function
create_toolbox
(strategy)
Chapter 08/code/visualization.py:7
↓ 1 callers
Function
create_toolbox
()
Chapter 08/code/symbol_regression.py:26
↓ 1 callers
Method
delete
Deletes the given key from the dictionary.
Chapter 09/code/easyAI/AI/DictTT.py:67
↓ 1 callers
Function
euclidean_score
(dataset, user1, user2)
Chapter 05/code/compute_scores.py:16
↓ 1 callers
Method
evaluate
(self, X_test, y_test)
Chapter 11/code/crf.py:39
↓ 1 callers
Function
find_similar_users
(dataset, user, num_users)
Chapter 05/code/collaborative_filtering.py:14
↓ 1 callers
Function
frame_diff
(prev_frame, cur_frame, next_frame)
Chapter 13/code/frame_diff.py:4
↓ 1 callers
Function
get_biases
(shape)
Chapter 16/code/cnn.py:17
↓ 1 callers
Function
get_frame
(cap, scaling_factor)
Chapter 13/code/colorspaces.py:5
↓ 1 callers
Function
get_frame
(cap, scaling_factor)
Chapter 13/code/background_subtraction.py:5
↓ 1 callers
Function
get_recommendations
(dataset, input_user)
Chapter 05/code/movie_recommender.py:15
↓ 1 callers
Method
get_slot
Returns the index, key, and value of a slot found in the dict. Returns -1, key, and default (None if not set) when not found.
Chapter 09/code/easyAI/AI/DictTT.py:32
↓ 1 callers
Function
get_weights
(shape)
Chapter 16/code/cnn.py:13
↓ 1 callers
Method
hash_char
Returns hash for an one-letter string
Chapter 09/code/easyAI/AI/HashTT.py:45
↓ 1 callers
Method
hash_int
Returns hash for a number
Chapter 09/code/easyAI/AI/HashTT.py:39
↓ 1 callers
Function
id_solve
Solves a game using iterative deepening, i.e. determines if by playing perfectly the first player can force a win, or whether it will always
Chapter 09/code/easyAI/AI/solving.py:5
↓ 1 callers
Function
lifter
Apply a cepstral lifter the the matrix of cepstra. This has the effect of increasing the magnitude of the high frequency DCT coeffs. :par
Chapter 12/code/features/base.py:158
↓ 1 callers
Function
list_to_string
(input_list)
Chapter 07/code/puzzle.py:54
↓ 1 callers
Function
load_data
(input_file)
Chapter 10/code/topic_modeler.py:7
↓ 1 callers
Method
load_data
(self)
Chapter 11/code/crf.py:26
↓ 1 callers
Function
logfbank
Compute log Mel-filterbank energy features from an audio signal. :param signal: the audio signal from which to compute features. Should be an N*1
Chapter 12/code/features/base.py:67
↓ 1 callers
Function
magspec
Compute the magnitude spectrum of each frame in frames. If frames is an NxD matrix, output will be NxNFFT. :param frames: the array of frames. E
Chapter 12/code/features/sigproc.py:68
↓ 1 callers
Function
mel2hz
Convert a value in Mels to Hertz :param mel: a value in Mels. This can also be a numpy array, conversion proceeds element-wise. :returns: a v
Chapter 12/code/features/base.py:120
↓ 1 callers
Function
mt
This implements Memory-Enhanced Test with transposition tables. This method is not meant to be used directly. This implementation is insp
Chapter 09/code/easyAI/AI/MTdriver.py:6
↓ 1 callers
Function
negamax
This implements Negamax with transposition tables. This method is not meant to be used directly. See ``easyAI.Negamax`` for an example of
Chapter 09/code/easyAI/AI/Negamax.py:11
↓ 1 callers
Method
possible_moves
(self)
Chapter 09/code/tic_tac_toe.py:18
↓ 1 callers
Method
possible_moves
(self)
Chapter 09/code/hexapawn.py:38
↓ 1 callers
Function
powspec
Compute the power spectrum of each frame in frames. If frames is an NxD matrix, output will be NxNFFT. :param frames: the array of frames. Each
Chapter 12/code/features/sigproc.py:78
↓ 1 callers
Function
process
(input_text)
Chapter 10/code/topic_modeler.py:17
↓ 1 callers
Method
result
(self, state, action)
Chapter 07/code/maze.py:32
↓ 1 callers
Function
run_tests
(test_files)
Chapter 12/code/speech_recognizer.py:100
↓ 1 callers
Method
set
Sets the key to the value, replacing any existing value.
Chapter 09/code/easyAI/AI/DictTT.py:51
next →
1–100 of 204, ranked by callers