Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Use for data science questions related to the programming language Python. Not intended for general coding questions (which should be asked on Stack Overflow).
26
votes
Accepted
How to use LeakyRelu as activation function in sequence DNN in keras?When it perfoms better ...
You can use the LeakyRelu layer, as in the python class, instead of just specifying the string name like in your example. It works similarly to a normal layer. …
16
votes
Accepted
Multi-dimentional and multivariate Time-Series forecast (RNN/LSTM) Keras
The input shape for an LSTM must be (num_samples, num_time_steps, num_features). In your example case, combining both cities as input, num_features will be 2x3=6.
If you lump all your 365 time steps …
15
votes
Accepted
Cutting numbers into fixed buckets
You don't really need to implement an algorithm to achieve this. There are a few tools that will do this for you.
You can get the data assigned to buckets for further processing using Pandas, or simp …
14
votes
Accepted
Activation function between LSTM layers
Simple explanation with images
We know that an activation is required between matrix multiplications to afford a neural network the ability to model non-linear processes.
A classical LSTM cell alrea …
13
votes
Accepted
How to make my Neural Netwok run on GPU instead of CPU
that includes the GPU version of Tensowflow like this:
conda create --name gpu_test tensorflow-gpu # creates the env and installs tf
conda activate gpu_test # activate the env
python …
12
votes
Accepted
Keras LSTM with 1D time series
LSTM layers require data of a different shape.
From your description, I understand the starting dataset to have 3125 rows and 1000 columns, where each row is one time-step. The target variable should …
11
votes
Accepted
What do Python's pandas/matplotlib/seaborn bring to the table that Tableau does not?
Don't worry - your hard-earned Python skills are still important ;)
Tableau is not a replacement - it is essentially a means of sharing your insights/findings. … Watch this video for a good overview of everything it can do, and how it connects to Python (and R/MatLab). There is just a bit of boiler plate code around your normal Python code. …
11
votes
What does the output of model.predict function from Keras mean?
The output of a neural network will never, by default, be binary - i.e. zeros or ones. The network works with continuous values (not discrete) in order to optimise the loss more freely in the framewor …
11
votes
Accepted
How to replace NaN values for image data?
Given you have images stretched out as columns in a table with ~48,500 rows, I am assuming you have the raw images that are 220x220 in dimension.
You can use a function available via OpenCV called inp …
10
votes
Accepted
Why would one crossvalidate the random state number?
I personally think that the general idea of optimising your model with different random seeds is not a good idea. There are many other, more important, aspects of the modelling process that you can wo …
10
votes
How to store strings in CSV with new line characters?
Also that this is done again in Python. My solution will require Python 3, although the principle could be applied to Python 2. … # True
That \N is pretty cool (and works in python 3.6 inside formatted strings too)... it basically allows you to pass the Name of a character, as per Unicode's specification. …
9
votes
Accepted
How to train data by batch from disk?
As you are working on image classification and would also like to implement some data augmentation, you can combine the two AND load the batches directly from a folder using the mighty 'ImageDataGener …
9
votes
scikit-learn n_jobs parameter on CPU usage & memory
I can imagine a value of -1 consumes all available resources as and when they become available. Depending on which function you are talking about, it seems data is copied for each of the jobs, which c …
9
votes
Accepted
Stratify on regression
I have done this before and didn't find a default implementation - the StratifiedKFold and RepeatedStratifiedKFold are only documented to work with classes.
The way I ended up doing it was not quite …
8
votes
How to Predict the future values of time horizon with Keras?
Such models can be constructed quite easily with Python, using the statsmodels package, which has a nice implementation. …