Posts by Rodrigo Ferraz • 309 points
21 posts
-
0
votes1
answer100
viewsQ: Selecting a column from a conditional loop in a pandas dataframe
I have a pandas dataframe with five rows 3 three columns. I want to create a function where my code returns which columns the value of the last row is greater than the first row. In the example of…
-
0
votes1
answer32
viewsQ: Calculating difference between first and last line in a dataframe pandas
I have a pandas dataframe with five rows 3 three columns. I want to create a function where my code returns columns where the last row is larger than the first row. In the example of my code I want…
-
1
votes0
answers92
viewsQ: Applying apply function on a pandas dataframe
I have a code (CODIGO01) that calculates the moving averages (21 periods) of a particular (individual) stock exchange share (IBOV - B3). Then I created a loop for where it determines q an asset this…
-
0
votes1
answer84
viewsQ: Exit of a Recurrent Neural Network with Tensorflow and Keras
I set up a dataset with my image data. I want to do convolutional neural network training but I ended up stopping at the exit layer of the network. The idea after training the network is to generate…
-
0
votes0
answers98
viewsQ: Predictions from Cross Validation
I am working with a regression problem. I built a Multilayerperceptron (MLP) using Scikit-Learn. I made two predictions...one using MPL using 70% of data for training and 30% for validation.…
-
0
votes1
answer81
viewsQ: Color Bar Values in Matplotlib
I have a code with 3 variables: a1, a2 and dc1.The variable dc1 is the absolute difference value of a2 and a1. I am generating a graph in matplotlib with the values of the a1 variable and would like…
-
2
votes1
answer217
viewsQ: Calculating numerical integrals from numpy arrays
I have the triple integral of the figure. I used the documentation of the scipy to solve her. Now I want to exchange the values of the upper limits of x, y and z, which in this problem are the…
-
1
votes1
answer761
viewsQ: How to create a dataset to work with Keras classification
I have a series of images (12500 in total) in rgb format and I want to create a dataset to work on Keras. I want to leave them in a format similar to the Mnist dataset...with Shape (12500,50,50).…
-
0
votes1
answer235
viewsQ: Making Predictions using LSTM with Keras
Good morning, group. I’m doing some tests with predictive models using lstm with the keras. In the test that I did, I trained the model with some random data that I found on the internet. Only I’m…
-
1
votes1
answer39
viewsQ: Multilayer Perceptron Two-Layer Code Problem
I have a problem with the following code: import numpy as np def nonlin(x,deriv=False): if(deriv==True): return x*(1-x) return 1/(1+np.exp(np.float32(-x))) X =…
-
1
votes1
answer157
viewsQ: Python Code Numpy Arrays Creation Problem
I’m having trouble in the following code. I don’t understand what is wrong. I believe it is in the function sigmoid where she appears not to be receiving values float. import numpy as np # sigmoid…
-
1
votes1
answer77
viewsQ: Error importing database from Mnist
Good afternoon, I am trying to import a mnist dataset but when I enter this code: # importar as bibliotecas necessárias from sklearn.datasets import fetch_mldata import matplotlib.pyplot as plt…
-
0
votes1
answer125
viewsQ: Error in Python code
I’m trying to run the following code but always appears this same type of error: "usage: bw2color_image.py [-h] --i I --p P --m M --c C bw2color_image.py: error: the following arguments are…
python-3.xasked Rodrigo Ferraz 309 -
1
votes1
answer80
viewsQ: Doubt Python Code and Opencv2
In this code I can do facial detection from a webcan. I use my notebook camera. I want this code to send a text message, for example "Detected Person" every time it detects a face. I tried to put an…
-
0
votes1
answer39
viewsQ: Print multiple lists each in a column
I have five lists that were extracted from an Excel table in CSV. I would like to know how I do to print them in the terminal next to each other, I believe it can be done with a loop for, but I…
python-3.xasked Rodrigo Ferraz 309 -
1
votes0
answers89
viewsQ: Circular Graph for Python Correlation Analysis
Good afternoon: I’m a beginner in python. I wonder where I can find study material to generate circular graphs for correlation analysis in python similar to the figure below (in the language R). I…
python-3.xasked Rodrigo Ferraz 309 -
1
votes1
answer110
viewsQ: How to keep the window created by Pyqt5 open?
After studying the object orientation part for a long time I started to study Pyqt5. I was doubtful in the following code: class App(QWidget): def __init__(self): super().__init__()…
-
1
votes2
answers3000
viewsQ: Printing data from a Python dictionary
How do I print the data of a dictionary each in a column? For example: lanchonete = {"Salgado":4.50, "Lanche":6.50,"Suco":3.00,"Refrigerante":3.50,"Doce":1.00} for m in lanchonete: print (m[0]) I…
-
0
votes2
answers41
viewsQ: Doubt about inserting content from a file . txt to a list
I have a question about inserting the contents of a text file into a python list. I want to put the first line of a text file in a list. In my code it performs the task but the following message…
python-3.xasked Rodrigo Ferraz 309 -
0
votes1
answer42
viewsQ: Optimizing Data Output
Good morning: I made this code for an exercise. My question is: How can I optimize the outputs without having to do multiple prints. In this code I made for three exits. Only if it was for 10 exits…
python-3.xasked Rodrigo Ferraz 309 -
5
votes2
answers2226
viewsQ: Switch string to high box and remove blanks
I’m trying to make a program in Python 3 that should turn the typed text into upper box and remove blanks. I would like to know what is wrong with my code since it is not eliminating the whitespace.…