I’m exploring neural networks, and I want to model some pictures with neural network. Picture is a function that maps pixel coordinates to color, so I make my network also with 2 input variables (x, y) and 1 (shade) to 3 (R, G, B) output coordinates. For example, like this: Now, I plot it like this: But…
Python: Create a list in which each element is a list with a name
before you all tell me to search for stuff, let me tell you “I HAVE”. I have searched quite a bit. Forums, educational/training sites, stackexchange and all the regulars. I haven’t been able to get what I need. I am not running to SE at the first sign of trouble either. I have registered on …
Translating python raw string / regex to ruby
I’m currently trying to translate a python script to ruby. Now I’m stuck on a part that uses a raw string for a regex. This is the original python code: This is my attempt to translate it to ruby: Unfortunately I must be doing it wrong because I get this error: I also tried: But it results in the …
get p value and r value from HuberRegressor in Sklearn
I have datasets with some outliers. From the simple linear regression, using I can get coefficient, intercept, r_value, p_value, std_err But I want to apply robust regression method as I don’t want to include outliers. So I applied Huber regressor from Sklearn, from that, I can get, coefficient, interce…
Looking for a more efficient way to do the array multiplication in this loop
I have a script that is taking a bit long to run, so I was trying to look through and speed it up where I can. I found a part that takes ~10 minutes or so and I feel like it could be a bit more efficient, but I might be wrong. Basically, I am trying to multiply one array,
Extract Summary Values from ARIMA
I faced the following issue after running ARIMA model: How do I extract Prob(Q) and Prob(H) values from ARIMA Summary Table? For example, I can easily obtain AIC by typing: Unfortunately, I could not find properties for Ljung-Box and Heteroskedasticity here. Do you know how to get them easily? Answer The summ…
Click to expand all clickable elements inside a website by Python
I’m trying to collect and save all the links that are inside the called tags href that are always on this path of elements: The script I’m using is this: The problem is that in this model I can’t get the values that are hidden because of the elements that need to be expanded from a link in o…
How to append elements from a multi-dimensional list into 2nd multi-dimensional list
I am trying to append elements from a multi-dimensional list into a 2nd multi-dimensional list. Here is the code I wrote – The output I am getting is – The output I am looking for is of sort – I want to replace elements of innermost list of “my_list” with the elements of the R…
Replacing a window with a new one- Python tkinter
I’m creating a quiz game in Pythonn tkinter. I’m using my original window, called window in the beginning of the program. Then, if the user clicks on the START button, window gets replaced with window2 and the buttons that get created in the App class are displayed on window2. When I do that, it t…
Python try/finally wtih sys.exc_info()
I’m trying to write a python job that which I will be using in all the other jobs to capture the job start time and when a program finishes successfully or with some issues, I capture the error details and load the details into a table. Program I’m using the job I’m trying to capture the err…