Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Drop Keys From Dictionary
Post: RE: Drop Keys From Dictionary

Thanks, with your help I made it work! Now, is there a convenient way to select these keys in a data frame ? E.g. if the dict gave me the keys : "a" , "b" and "e", I want to select them from the the ...
donnertrud General Coding Help 8 3,685 May-30-2020, 10:53 AM
    Thread: Drop Keys From Dictionary
Post: RE: Drop Keys From Dictionary

(May-30-2020, 09:55 AM)WiPi Wrote: Here's another straightforward method dictOfVals = {1: 0.2, 2: -0.1, 3: 2, 4: 0.1, 5: 0.05} newDict=dict() # Iterate over all the dict values for value in dictOf...
donnertrud General Coding Help 8 3,685 May-30-2020, 10:00 AM
    Thread: Drop Keys From Dictionary
Post: RE: Drop Keys From Dictionary

That would work aswell! Can you recall a code to do that ?
donnertrud General Coding Help 8 3,685 May-30-2020, 09:49 AM
    Thread: Drop Keys From Dictionary
Post: Drop Keys From Dictionary

Hi guys, I got a dictionary with values ranging from 0.25 to -0.25. I am looking for a way, to automatically drop all keys that are either 0 < value < 0.1 or 0 > value > -0.1 so basi...
donnertrud General Coding Help 8 3,685 May-30-2020, 09:24 AM
    Thread: Differencing Time series and Inverse after Training
Post: Differencing Time series and Inverse after Trainin...

Hello, I got a non-stationary Time Series and I want to predict the target variable in the future. For simplicity, let's say that the target variable is simply a price and the features are economic f...
donnertrud Data Science 0 4,101 May-27-2020, 06:11 AM
    Thread: Replacing "." in columns
Post: Replacing "." in columns

Hi guys, I got a data set with missing values, however, those cells contain a "." instead of being empty. Here is an example : [Image: https://imgur.com/a/YPsYKvz] I want to resample the data to w...
donnertrud Data Science 1 2,253 May-24-2020, 01:21 PM
    Thread: Can't make Random Forest Prediction work
Post: Can't make Random Forest Prediction work

Hi guys, I am trying to predict the target variable "Exchange Rate EURUSD" using a data set that I created by myself. I included a lot of economic indicators and the monthly EURUSD closing price from...
donnertrud Data Science 0 1,621 May-23-2020, 12:26 PM
    Thread: Problem with replacing strings
Post: RE: Problem with replacing strings

Both methods worked! Thank you so much
donnertrud General Coding Help 3 2,117 May-22-2020, 04:06 PM
    Thread: Problem with replacing strings
Post: Problem with replacing strings

Hi guys, I got a data set with Dates looking like this : Jan. 01 Feb. 01 Mar. 01 and so on. It seems Python can't transform this kind of date format using df['Date'] = pd.to_datetime(df['Date'])In...
donnertrud General Coding Help 3 2,117 May-22-2020, 03:08 PM
    Thread: Convert quarterly time series to monthly time series
Post: Convert quarterly time series to monthly time seri...

Hi, in order to bring all my data sets in the same shape, I need to convert a data set consisting of quartlery dates into a data set consisting of monthly dates. Here is a sample : Date Feat...
donnertrud General Coding Help 1 5,163 May-21-2020, 01:20 PM
    Thread: Utilize input predictions for Supervised Learning
Post: RE: Utilize input predictions for Supervised Learn...

Thanks for your response! What you describe makes sense, however, I want to focus on fundamental analysis due to various reasons. I would like to use an economic calender (https://tradingeconomics.co...
donnertrud Data Science 2 1,889 May-20-2020, 12:45 PM
    Thread: Utilize input predictions for Supervised Learning
Post: Utilize input predictions for Supervised Learning

Hi guys, Currently I am working on a paper in order to research the usefulness of ML in order to predict Forex Exchange Rates using Supervised Learning techniques. So far, my model is based on monthl...
donnertrud Data Science 2 1,889 May-20-2020, 06:01 AM
    Thread: Graph that shows predicted vs true values
Post: Graph that shows predicted vs true values

Hey guys, I have a simple Random Forest Regression Model which is supposed to predict the Number of Likes of an Instagram Picture based on given features. On some pictures the results are amazing, on...
donnertrud Data Science 1 2,559 Jan-28-2020, 04:04 PM
    Thread: Should you include uneven data
Post: Should you include uneven data

Hi guys, I am trying to make this post very short, because its a very general and simple question. I have a dataset which includes date as a feature. However, approx. 80% of the date is in the 4th qu...
donnertrud Data Science 0 1,547 Jan-20-2020, 07:42 AM
    Thread: Random Forest Hyperparamter Optimization
Post: Random Forest Hyperparamter Optimization

Hello, I have been trying to optimize the Random Forest Hyperparameter in order to lower the Mean Absolute Error of my Regression Model. I used Python to automatically look for those best parameters, ...
donnertrud Data Science 1 1,939 Jan-16-2020, 03:02 PM
    Thread: Random Forest high R2 Score but poor prediction
Post: RE: Random Forest high R2 Score but poor predictio...

If one is looking for the best parameters, is there a way to search for the best parameters which yield the lowest Mean Absolute Error ? Or is this done by default?
donnertrud Data Science 5 4,942 Jan-13-2020, 09:58 PM
    Thread: Random Forest high R2 Score but poor prediction
Post: RE: Random Forest high R2 Score but poor predictio...

Thanks for your response ! Instead of coding a loop which goes through different estimators, couldn't I run a RandomSearch with ranges for relevant RF parameters and looking for the best one with the ...
donnertrud Data Science 5 4,942 Jan-13-2020, 04:45 PM
    Thread: Random Forest high R2 Score but poor prediction
Post: Random Forest high R2 Score but poor prediction

Hi guys, I am working on a Regression task where one has to predict the number of likes of an Instagram pictures based on features which are given in a dataframe. I have attached a small part of that...
donnertrud Data Science 5 4,942 Jan-13-2020, 07:30 AM
    Thread: Creating a List with many variables in a simple way
Post: Creating a List with many variables in a simple wa...

Hi guys, I am currently working on a regression task with python. My model contains 26 variables, 17 of them are dummy variables. With that model I am trying to predict the dependent variable based o...
donnertrud General Coding Help 1 2,029 Jan-11-2020, 12:27 PM
    Thread: Difference between R^2 and .score
Post: Difference between R^2 and .score

Hi guys, As far as I know you can calculate the accuracy of a regression model with sklearn LinearRegression The code would be something like this : model = LinearRegression() accuracy = model.score...
donnertrud Data Science 1 6,887 Jan-08-2020, 04:23 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020