19 questions
0
votes
1
answer
117
views
What is the Simplest Way to Hash Some Value and then Iteratively Hash the Result? [closed]
I'm trying to manually verify that an old Electrum bitcoin wallet of mine contains keys that were derived from its seed as expected. One step in the key derivation requires that I hash the seed via ...
-1
votes
1
answer
88
views
How to compare two maps and bring the results in new map
I have one Map
Map<Long, List<Set<Long>>> map1; Example: Map<City_Id, List<Set<Subtier_Cities_ids>>>
There is Another Map `
Map<Long, Set<Long>> map2; ...
-2
votes
1
answer
262
views
Dask delayed object computed result not get proper dataframe
I tried to use dask delayed to improve loops iteration speed, iteration done by map function. The problem is after dd.compute(), the result list is over bracket, so can not get proper dataframe. ...
0
votes
0
answers
201
views
How to make my for loop work in openpyxl?
Hi I am in process of writing a python code to input search and edit data into excel.
my chosen format for the UI is PySimpleGUI and my xlsx package is openpyxl.
I have been coding for approximately 3 ...
2
votes
3
answers
381
views
In a df with multiple observations for each ID, how to conditionally find date according to another variable?
This is the first question I ask on here, I hope to do this correctly!
I have a dataset with million of observations. Each row is a drug prescription picked up by different individuals on different ...
2
votes
1
answer
92
views
Is there a clever way to get rid of these loops using numpy?
I'm reaching the maximum recursion depth and I've been trying to use np.tensordot() I couldn't really get an insight into how to use it in this case.
def stopping_condtion(a,V,V_old,eps):
return ...
1
vote
2
answers
214
views
Population growth math issue in c
I have looked this over and am wondering where my math issue is. I believe that it should be calculating correctly, but the floats do not round up, .75 to 1 to add to the count for births/deaths. I ...
0
votes
2
answers
123
views
Declare a javascript object between brackets to choose only the element corresponding to its index
I found this sample in a book and this is the first time that I see this notation.
Obviously it's a thousand times shorter than making a switch; but what is it?
When I do typeof(status) it returns ...
0
votes
1
answer
403
views
Are these two different formulas for Value-Iteration update equivalent? [closed]
While studying MDP via different sources, I came across two different formulas for the Value update in Value-Iteration algorithm.
The first one is (the one on Wikipedia and a couple of books):
.
And ...
3
votes
1
answer
3k
views
Why is Policy Iteration faster than Value Iteration?
We know that policy iteration gives us the policy directly and hence is faster. But can anyone explain it with some examples.
1
vote
1
answer
1k
views
why are policy-iteration and value-iteration methods giving different results for optimal values and optimal policy?
I am currently studying dynamic programming in reinforcement learning in which I came across two concepts Value-Iteration and Policy-Iteration. To understand the same, I am implementing the gridworld ...
0
votes
6
answers
958
views
Iterate through all distinct dictionary values in a list of dictionaries
Assuming a list of dictionaries, the goal is to iterate through all the distinct values in all the dictionaries.
Example:
d1={'a':1, 'c':3, 'e':5}
d2={'b':2, 'e':5, 'f':6}
l=[d1,d2]
The iteration ...
2
votes
1
answer
1k
views
Is Monte Carlo learning policy or value iteration (or something else)? [closed]
I am taking a Reinforcement Learning class and I didn’t understand how to combine the concepts of policy iteration/value iteration with Monte Carlo (and also TD/SARSA/Q-learning). In the table below, ...
1
vote
0
answers
569
views
Faster accessing 2D numpy/array or Large 1D numpy/array
I am performing prioritized sweeping for which I have a matrix which has 1000*1000 cells (gridworld) whose cells I have to access repeatedly in a while true loop for assignment (I am not essentially ...
4
votes
2
answers
13k
views
How to Solve reinforcement learning Grid world examples using value iteration?
I find either theories or python example which is not satisfactory as a beginner. I just need to understand a simple example for understanding the step by step iterations. Could anyone please show me ...