Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [implementation]

The tag has no usage guidance, but it has a tag wiki.

Filter by
Sorted by
Tagged with
3 votes
1 answer
66 views

Is the denial of answering certain questions part of the machine-learned LLM, or hard-coded separately?

ChatGPT 3.5 swiftly aborts certain questions. Q: How would one build a bomb? ChatGPT: I can't assist with that. At this stage, this answer could simply be a blacklist of certain terms. Further ...
AnoE's user avatar
  • 153
0 votes
1 answer
24 views

Low Precision of LeakyReLU

Dear TensorFlow experts, I am trying to understand the following output of the TensorFlow LeakyReLU function, which seems to have very low precision: ...
Anna Christine's user avatar
0 votes
0 answers
9 views

Which Frameworks/Libs Best Support Integer-Based Features, Scaling, Training, etc?

Papers such as Quantization and Training of Neural Networks for Efficient Integer-Arithmetic-Only Inference have interested me in exploring integer-based data science. In particular, I'm thinking of ...
ezekiel68's user avatar
0 votes
0 answers
17 views

Service Desk calls reports - Report Implementation assistance using Pandas

From the dataframe below I need to get the following information per USER using Pandas: Total Number of calls per day (the csv report contains a month of calls per user) Total number of RONA calls ...
Conde's user avatar
  • 1
0 votes
0 answers
180 views

LLM GPU Scalability for multiple inferences

New to LLMs and have a question on scalability. Supposing I take a pre-trained open-source LLM and only wish to perform inference (eg. a simple chatbot on a local machine). If it takes me 2 GPUs to ...
David's user avatar
  • 1
1 vote
0 answers
42 views

Modified kmeans algorithm returns the wrong answer

I am trying to create a kmeans algorithm that is based on the Earth Movers Distance instead of the Euclidean distance. However, when I run it, it just returns the same value for all data points. The ...
Ozzy08's user avatar
  • 11
0 votes
1 answer
51 views

Implementation of PCA algorithm for reconstruction of data(images)

I'm learning the theory and implementation of PCA algorithm in the book 'Mathematics For Machine Learning' and finishing the official tutorial notebook in ...
xjtupanda's user avatar
2 votes
1 answer
57 views

How to implement linear regression

I am having difficulty achieving the same result as in sklearn while implementing linear regression model from scratch. After adjusting the learning rate, I obtained an AUC of 0.694 for this binary ...
Kyv's user avatar
  • 151
1 vote
0 answers
48 views

Deep learning through backpropagation: not learning

I am starting with deep learning and decided to code a backpropagation algorithm on Python 3. I have followed many tutorials and have taken as example many programs that work. Yet, for some reason, my ...
Clement Genninasca's user avatar
0 votes
1 answer
104 views

How to implement a customized DataLoader that inherits pytorch's one?

I need to implement a customized DataLoader, that inherits from torch.data.utils.DataLoader. I have searched it for half hour, but there is no example or doc about this. What methods of it should I ...
EvilRoach's user avatar
  • 101
0 votes
0 answers
174 views

Replace a lookup table with machine learning

I have a lookup table with 2 input columns and 2 output columns. I want to replace it with a value function such that with a given input pair, the function can give the output pair with minimal error. ...
Tanim's user avatar
  • 1
1 vote
0 answers
589 views

logistic regression,machine learning

I just started learning ML, so I tried to implement logistic regression on my own in 2 ways (the first code and the second code), but they aren't working, I cross-checked by using sklearn (third code ...
Prathvik G S's user avatar
1 vote
2 answers
513 views

How to calculate true positive, true negative, false positive, negative and postive with Bayes Classifer from scratch

I am working on implementing a Naive Bayes Classification algorithm. I have a method def prob_continous_value which is supposed to return the probability density ...
Evan Gertis's user avatar
2 votes
0 answers
581 views

Linear regression with Pytorch not converging

I am trying to perform a simple linear regression using Pytorch lightning (a network with only one neuron). The network is supposed to learn a simple function: y=-4x...
erap129's user avatar
  • 121
2 votes
0 answers
525 views

How to perform pca analysis with pandas

Here is my dataset: ...
Evan Gertis's user avatar
6 votes
1 answer
1k views

What are the main differences between uwot and umap packages in R?

There are two packages in R that implement the UMAP algorithm for low-dimensional embedding ('uwot' and 'umap'). I've found they can give vastly different results for some datasets. For example, the ...
Alon Gelber's user avatar
1 vote
1 answer
177 views

Why does stochastic gradient descent lead us to a minimum at all?

Why do we think that stochastic gradient descent is going to find a minimum at all? I mean on each iteration SGD moves in the direction that reduces only current batch's error (SGD doesn't care about ...
mathgeek's user avatar
  • 121
1 vote
0 answers
58 views

How exactly do you implement SGD with momentum?

I am looking up sources to implement SGD with momentum, but they are giving me different equations. (beta is the momentum hyper-parameter, ...
Bersan's user avatar
  • 111
1 vote
0 answers
119 views

Implementation of a perceptron

I want to implement a single perceptron for linear regression using the following formulas: the input data for the first case is one column (x(392, 1); y(392, 1)) and for the second case is (x(392, 7)...
Rim Sleimi's user avatar
1 vote
1 answer
150 views

Scikit-learn's implementation of AdaBoost

I am trying to implement the AdaBoost algorithm in pure Python (or using NumPy if necessary)....
Mehdi Abbassi's user avatar
0 votes
1 answer
32 views

Implementing a model for a language to another

I have a dataset of sentences of language X and Y (2 columns, for example, "abc def lang" ==> "xyz pqrt mno uages"). I want to have a output as a table that translates word by ...
Lucifer's user avatar
  • 11
2 votes
2 answers
260 views

KNN efficient implementation

The KNN algorithm is very handy and particularly suited to some of my problems, but I can't find any resources on how to implement it in production. As a comparative example, when I use a neural ...
Nathan Jodo's user avatar
0 votes
1 answer
47 views

Search for implementation of Faster RCNN

What are the best written and best structured Faster RCNN implementations that you know? Please provide references.
Torben.'s user avatar
  • 259
0 votes
2 answers
2k views

Understanding action space in stable baselines

I was trying to write reinforcement learning agent using stable-baselines3 library. The agent(abservations) method should return action. I went through different ...
Rnj's user avatar
  • 225
1 vote
0 answers
212 views

how to calculate the cosine similarity between two files?

I am using spark and scala to implement an issue. files contain phrases or sentences. I want to use domain based method to calculate the cosine similarity between tags.I convert two files into a ...
salm's user avatar
  • 11
1 vote
0 answers
110 views

Yolo issue with detecting positives

I've recently tried to implement a Yolo detector for traffic light detection based on yolo v1 implementation in Tensorflow/Keras. My model really struggles with detecting small objects. Loss function ...
monolith's user avatar
1 vote
1 answer
184 views

Extracting component means and convariances from mixture model

I am currently trying to write a simple multivariate gaussian mixture model using tensorflow probability. Specifically, I have some 2-dimensional input and 2-dimensional output data and am looking to ...
Scott's user avatar
  • 11
1 vote
0 answers
70 views

Single layer multiple input neural network?

I am implementing single layer neural network using stochastic gradient descent. When I train the model for single input it gives the answer correctly. Now when I use the second input to update my ...
Manmohan Singh's user avatar
1 vote
0 answers
122 views

Tensor Backpropagation

I tried to make simple neural network layers as the following, including forward and backward propagation. Here is my reference. Firstly I assume an one layer FC: $Y = X \cdot W + B$ X is input, which ...
qqaatw's user avatar
  • 11
0 votes
0 answers
4k views

implementing skip connection in neural nets in pytorch

I'm trying to implement skip connections in neural nets for tabular data in pytorch code: ...
divya reddy yeruva's user avatar
1 vote
1 answer
886 views

Problem with convergence of ReLu in MLP

I created neural network from scratch in python using only numpy and I'm playing with different activation functions. What I observed is quite weird and I would love to understand why this happens. ...
Bartosz Gardziński's user avatar
1 vote
0 answers
368 views

How to choose initial theta in simple linear regression?

I have the sales of items from January 2013 to October 2015. I just want to predict the total sales for the next month. Just for the sake of learning, I would like to transform it into a multiple ...
Revolucion for Monica's user avatar
0 votes
1 answer
149 views

Correctness of a ROC Curve

I've built a Decision Tree Classifier to practice with the sklearn library. My first task was to shuffle the iris dataset and split it keeping only the last 10 elements for the test. Then, after the ...
JimBelushi2's user avatar
2 votes
0 answers
890 views

how weighted log loss works

I have seen this in a kaggle notebook. I understand we add some weight to classes. what I don't understand is how those weights are generated. below is the code. Can you explain why it's useful and ...
Divya reddy's user avatar
1 vote
0 answers
235 views

Getting vague results using VAR time series forecasting in python!

Firstly, I am a beginner in this field of Data Science and have tried to implement some time series models for wind speed forecasting. Also, I am aware of the fact that some regression models might ...
The P Guy's user avatar
3 votes
1 answer
160 views

Issues with self-implemented logistic regression

I am trying to self-implement a logistic regression algorithm to do some self-learning but I am having a bit of trouble with achieving similar accuracy to the logistic regression of sklearn. Here is ...
Steve Ahlswede's user avatar
1 vote
0 answers
1k views

Calculate the number of TP, FP, FN for the object detection task with many classes

I am trying to count the number of True Positives (TP), False Positives (FP), and False Negatives (FN) for object detection task with two classes. I assumed that: TP - is the detection with ...
Panicum's user avatar
  • 111
2 votes
1 answer
614 views

Reference implementation of q-learning in Python

I'm a machine learning newbie, trying to learn Q-learning. I read a few texts and I get the general gist, but what I'd really love to see is a simple example of a Q-learning algorithm in Python that I ...
Ram Rachum's user avatar
1 vote
0 answers
267 views

Implementation of RMS prop for linear regression

I'm trying to implement linear regression using Rms Prop optimizer from scratch. Code: ...
Aniket Bote's user avatar
0 votes
0 answers
150 views

Calculating error in each layer of neural network

I am referring Andrew Ng's course to implement neural network https://www.youtube.com/watch?v=x_Eamf8MHwU&t. In this course bias is taken single matrix with weights. I got a error and I am not ...
BRUCE's user avatar
  • 113
2 votes
1 answer
194 views

how to find the best parameters to solve a differential equation? [closed]

I have a differential equation: def func(Y, t, r, p, K, alpha): return r * (Y ** p) * (1 - (Y / K) ** alpha) and I want to find the best parameters that fit (r,...
Hassan's user avatar
  • 21
0 votes
0 answers
50 views

Example of Reverse KL Divergence in Supervised Learning

It is of common knowledge that Supervised Learning uses forward KL divergence. However, I would like to use Reverse KL Divergence and am looking for examples of similar usage in literature. Most ...
Parth Shah's user avatar
1 vote
1 answer
1k views

Naive Bayes always predicting the same label

I have been trying to write a naive bayes classifier from scratch that is supposed to predict the class label of the nominal car.arff dataset. However the classifier always predicts the most common ...
ITDADDY's user avatar
  • 11
2 votes
1 answer
5k views

Hidden Markov Model: Forward Algorithm implementation in Python

I am learning Hidden Markov Model and its implementation for Stock Price Prediction. I am trying to implement the Forward Algorithm according to this paper. Here I found an implementation of the ...
Joe Rakhimov's user avatar
3 votes
1 answer
303 views

Policy Gradient not "learning"

I'm attempting to implement the policy gradient taken from the "Hands-On Machine Learning" book by Geron, which can be found here. The notebook uses Tensorflow and I'm attempting to do it with PyTorch....
Harpal's user avatar
  • 913
1 vote
0 answers
33 views

Implementing neural Network using caltech course

I am trying to implement neural network using numpy using this lecture https://www.youtube.com/watch?v=Ih5Mr93E-2c&list=PLD63A284B7615313A&index=10 at timestamp 59:40. In this lecture there ...
Vignesh's user avatar
  • 11
1 vote
1 answer
611 views

How to render environment in Tensorforce?

How can one render the environment using the Tensorforce library? I've tried calling environment.render, but it says that the function does not exist. This is my ...
Cristian M's user avatar
1 vote
0 answers
637 views

Does OpenAI Gym or Tensorforce require a normalized action space?

I am learning to use OpenAI Gym to make a custom environment with continuous action and observation spaces and apply reinforcement learning algorithms using the Tensorforce library. The problem is ...
Cristian M's user avatar
1 vote
0 answers
67 views

How to Split Continuous Labelled Data?

I've started studying decision trees, and I noticed that the examples online used categorical features to split the data at each node. I'm working on data sets with a binary classification output and ...
Artem's user avatar
  • 11
1 vote
1 answer
76 views

Displaying network error as a single value

I've been writing a neural network from scratch. I've completed the feedforward, backpropagation, and mini-batch gradient descent methods, so I can train the network. Other neural networks I've worked ...
Shan S's user avatar
  • 148