Questions tagged [machine-learning]

Implementation questions about machine learning algorithms. General questions about machine learning (concepts, theory, methodology, terminology, etc.) should be posted to their specific communities.

Machine learning revolves around developing self-learning computer algorithms that function by virtue of discovering patterns in data and making intelligent decisions based on such patterns.

Machine learning is a subfield of computer science that evolved from the study of pattern recognition and computational learning theory in artificial intelligence. Machine learning explores the construction and study of algorithms that can learn from and make predictions about data. Such algorithms operate by building a model from example inputs in order to make data-driven predictions or decisions rather than following strictly static program instructions.

NOTE: If you want to use this tag for a question not directly concerning implementation, then consider posting on Cross Validated, Data Science, or Artificial Intelligence instead; otherwise you're probably off-topic. Please choose one site only and do not cross-post to more than one - see Is cross-posting a question on multiple Stack Exchange sites permitted if the question is on-topic for each site? (tl;dr: no).

Classic Problems:

Relevant Algorithms:

Applications:

Software:

Related-tags:

Video Lectures:-

55241 questions
12
votes
3 answers

What are "Factor Graphs" and what are they useful for?

A friend is using Factor Graphs to do text mining (identifying references to people in text), and it got me interested in this tool, but I'm having a hard time finding an intuitive explanation of what Factor Graphs are and how to use them. Can…
sanity
  • 35,347
  • 40
  • 135
  • 226
12
votes
1 answer

How to write to TensorBoard in TensorFlow 2

I'm quite familiar in TensorFlow 1.x and I'm considering to switch to TensorFlow 2 for an upcoming project. I'm having some trouble understanding how to write scalars to TensorBoard logs with eager execution, using a custom training loop. Problem…
Javier
  • 225
  • 2
  • 6
12
votes
2 answers

Optimize deep Q network with long episode

I am working on a problem for which we aim to solve with deep Q learning. However, the problem is that training just takes too long for each episode, roughly 83 hours. We are envisioning to solve the problem within, say, 100 episode. So we are…
12
votes
3 answers

Tensorflow Lite GPU support for python

Anyone know if Tensorflow Lite has GPU support for Python? I've seen guides for Android and iOS, but I haven't come across anything about Python. If tensorflow-gpu is installed and tensorflow.lite.python.interpreter is imported, will GPU be used…
John M.
  • 2,642
  • 7
  • 26
  • 55
12
votes
2 answers

Keras load_model with custom objects doesn't work properly

Setting As already mentioned in the title, I got a problem with my custom loss function, when trying to load the saved model. My loss looks as follows: def weighted_cross_entropy(weights): weights = K.variable(weights) def loss(y_true,…
pafi
  • 619
  • 1
  • 8
  • 20
12
votes
1 answer

what is Gridsearch.cv_results_ , could any explain all the things in that i.e mean_test_score etc .?

I am doing hyperparameter tuning with GridSearchCV for Decision Trees. I have fit the model and I am trying to find what does exactly Gridsearch.cv_results_ gives. I have read the documentation but still its not clear. Could anyone explain this…
12
votes
1 answer

TypeError: __call__() missing 1 required positional argument: 'inputs'

I am trying to predict the close price (1 or 0) based on the features present in the 'input_data'. But when I try to run the code I am getting the below error, I am not sure how to fix this. Any help is much appreciated, thanks Traceback (most…
12
votes
1 answer

Efficient PyTorch DataLoader collate_fn function for inputs of various dimensions

I'm having trouble writing a custom collate_fn function for the PyTorch DataLoader class. I need the custom function because my inputs have different dimensions. I'm currently trying to write the baseline implementation of the Stanford MURA paper.…
user7213391
12
votes
1 answer

Full gradient descent in keras

I am trying to implement full gradient descent in keras. This means that for each epoch I am training on the entire dataset. This is why the batch size is defined to be the length size of the training set. from keras.models import Sequential from…
user552231
  • 1,095
  • 3
  • 21
  • 40
12
votes
1 answer

Custom combined hinge/kb-divergence loss function in siamese-net fails to generate meaningful speaker-embeddings

I'm currently trying to implement a siamese-net in Keras where I have to implement the following loss function: loss(p ∥ q) = Is · KL(p ∥ q) + Ids · HL(p ∥ q) detailed description of loss function from paper Where KL is the Kullback-Leibler…
12
votes
2 answers

Keras reports TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'

I'm a beginner in Keras and just write a toy example. It reports a TypeError. The code and error are as follows: Code: inputs = keras.Input(shape=(3, )) cell = keras.layers.SimpleRNNCell(units=5, activation='softmax') label =…
12
votes
3 answers

XGBoost - n_estimators = 1 equal to single-tree classifier?

I have some training pipeline that heavily uses XGBoost instead of scikit-learn, only because of the way XGBoost cleanly handles null values. However, I'm tasked with introducing non-technical folks to machine learning, and thought it'd be good to…
blacksite
  • 12,086
  • 10
  • 64
  • 109
12
votes
1 answer

pytorch freeze weights and update param_groups

Freezing weights in pytorch for param_groups setting. So if one wants to freeze weights during training: for param in child.parameters(): param.requires_grad = False the optimizer also has to be updated to not include the non gradient…
Benedict K.
  • 836
  • 2
  • 8
  • 22
12
votes
4 answers

Python OCR: ignore signatures in documents

I'm trying to do OCR of a scanned document which has handwritten signatures in it. See the image below. My question is simple, is there a way to still extract the names of the people using OCR while ignoring the signatures? When I run Tesseract OCR…
vdvaxel
  • 667
  • 1
  • 14
  • 41
12
votes
3 answers

What is Killed:9 and how to fix in macOS Terminal?

I have a simple Python code for a machine learning project. I have a relatively big database of spontaneous speech. I started to train my speech model. Since it's a huge database I let it work overnight. In the morning I woke up and saw a…
Hordon
  • 603
  • 2
  • 9
  • 21