Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: GridSearchCV for multi-label classification
Post: GridSearchCV for multi-label classification

hi, I am doing a multi-label text classification, and I am getting the following errors when I attempt to do a Gridsearch to get best params over multiple different algos. the error occurs when i am...
mapypy Data Science 0 3,713 Mar-29-2021, 01:58 AM
    Thread: Applying function
Post: Applying function

code Hi, I still see nulls in X_train and my pipline seems to not have applied. For example, there should be more columns due to one-hot encoding. Am I doing something wrong? def apply_fe_pipelin...
mapypy General Coding Help 1 2,273 Feb-27-2021, 02:31 PM
    Thread: look at first letter in list and append word for assertion
Post: RE: look at first letter in list and append word f...

(Feb-06-2021, 04:20 PM)buran Wrote: So what have you tried? What are your thoughts on solving this? i tried to put a for loop in the function, but i am not sure about how to call two strings and als...
mapypy Homework 3 1,933 Feb-06-2021, 04:47 PM
    Thread: look at first letter in list and append word for assertion
Post: look at first letter in list and append word for a...

Hi, I have a list of names, such as: words=['cat', dog', 'lion','snake', 'fox'] I then want to write a function that looks at the words that start with c and s and validate that through an assertio...
mapypy Homework 3 1,933 Feb-06-2021, 03:41 PM
    Thread: Simple calculation using datetime
Post: Simple calculation using datetime

Hi, How can i calculate age using date time without hardcoding current year? The way I want to solve and validate is as follows: from datetime import date def get_age(birth_year): """ return...
mapypy Data Science 2 1,897 Feb-06-2021, 09:13 AM
    Thread: Return both key and value by calling only dict value
Post: RE: Return both key and value by calling only dict...

(Feb-06-2021, 07:55 AM)buran Wrote: why not swap keys and values in the dict if you are going to search by state code? otherwise, as it is now, you need to iterate over items and if value is what yo...
mapypy General Coding Help 3 2,208 Feb-06-2021, 08:58 AM
    Thread: Return both key and value by calling only dict value
Post: Return both key and value by calling only dict val...

Hi I want to write a 3-5 line function, very small that returns state name and code as a tupple. e.g. if input "CA" return "California", "CA" def get_state_with_code(state_code): return...
mapypy General Coding Help 3 2,208 Feb-06-2021, 07:31 AM
    Thread: Generate Random operator, take user input and validate the user
Post: RE: Generate Random operator, take user input and ...

(Feb-02-2021, 03:00 PM)buran Wrote: you choose operator twice. there is no guarantee the question and the "correct" answer are the same operation. As a side note - look at operator module, instead ...
mapypy General Coding Help 4 5,571 Feb-02-2021, 03:35 PM
    Thread: Generate Random operator, take user input and validate the user
Post: Generate Random operator, take user input and vali...

Hi, I have the following code: import random number_one = random.randint(0, 100) number_two = random.randint(0, 100) rand_ops = ['+', '-', '/', '*'] while(True): correct_answer = eval (str...
mapypy General Coding Help 4 5,571 Feb-02-2021, 02:56 PM

User Panel Messages

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