data-science Questions
4
I'm attempting to do a grid search to optimize my model but it's taking far too long to execute. My total dataset is only about 15,000 observations with about 30-40 variables. I was successfully ab...
Balanchine asked 3/5, 2022 at 14:51
4
I want to implement a custom loss function in scikit learn. I use the following code snippet:
def my_custom_loss_func(y_true,y_pred):
diff3=max((abs(y_true-y_pred))*y_true)
return diff3
score=m...
Carmeliacarmelina asked 19/1, 2019 at 13:47
2
Solved
I'm currently trying to train a linear model using sklearn in python but not with mean squared error (MSE) as error measure - but with mean absolute error (MAE). I specificially need a linear model...
Morpheus asked 17/5, 2018 at 13:31
3
Solved
The title says it all. When you are working R and using RStudio, its really easy and simple to debug something by dropping a browser() call anywhere in your code and seeing what goes wrong. Is ther...
Hildie asked 23/6, 2017 at 18:37
4
I am installing layout-parser and following this link. Did not face any issues with the following packages.
pip install layoutparser
pip install "layoutparser[effdet]"
pip install lay...
Asymmetry asked 6/2, 2023 at 6:19
5
Solved
I'm using Python and I need to split my .csv imported data in two parts, a training and test set, E.G 70% training and 30% test.
I keep getting various errors, such as 'list' object is not callab...
Kirghiz asked 29/4, 2017 at 15:13
2
Solved
Suppose i have the data frame below:
I checked the documentation but it's only based on a single column.
Reproducible code:
x = np.random.normal(100,5,100)
data = pd.DataFrame(x)
epsilon = 10...
Braynard asked 12/3, 2020 at 7:37
4
Solved
I am not able to access jupyter lab created on google cloud
I created one notebook using Google AI platform. I was able to start it and work but suddenly it stopped and I am not able to start it n...
Longdrawnout asked 20/8, 2021 at 12:57
3
Solved
I am currently performing multi class SVM with linear kernel using python's scikit library.
The sample training data and testing data are as given below:
Model data:
x = [[20,32,45,33,32,44,0],[...
Latt asked 12/7, 2018 at 4:43
3
Solved
I'm trying to build a neural network to predict per-capita-income for counties in US based on the education level of their citizens.
X and y have the same dtype (I have checked this) but I'm gettin...
Copper asked 12/1, 2023 at 20:45
7
Solved
I want to use langchain for my project.
so I installed it using following command : pip install langchain
but While importing "langchain" I am facing following Error:
File /usr/lib/python...
Autism asked 23/5, 2023 at 10:9
3
Solved
I would like to update previous runs done with MLFlow, ie. changing/updating a parameter value to accommodate a change in the implementation. Typical uses cases:
Log runs using a parameter A, and ...
Haemoid asked 5/10, 2020 at 13:4
3
Solved
I have written a simple function where I am using the average_precision_score from scikit-learn to compute average precision.
My Code:
def compute_average_precision(predictions, gold):
gold_predic...
Mawson asked 10/6, 2017 at 0:4
2
Solved
I am training a tensorflow keras sequential model on around 20+ GB text based categorical data in a postgres db and i need to give class weights to the model.
Here is what i am doing.
class_weight...
Eventide asked 26/2, 2020 at 7:34
2
I have a big doubt... is see a lot of blog posts where they say that you can use the Colab front-end to edit a local Jupiter Notebook
However I don't see the point... the actual advantage would be ...
Herries asked 27/12, 2021 at 19:10
4
I need to obtain the type for each column to properly preprocess it.
Currently I do this via the following method:
import pandas as pd
# input is of type List[List[any]]
# but has one type (int...
Dessert asked 30/11, 2018 at 10:52
3
libraries im using
import pixellib
from pixellib.instance import instance_segmentation
import cv2
import matplotlib.pyplot as plt
the script:
segment_image = instance_segmentation()
segment_image....
Weinman asked 19/6, 2022 at 10:56
2
Solved
Hello everyone on Stack Overflow. Today, I would like to ask something very different question.
I am currently working as a data scientist, and I work alot on JupyterLab/Notebook. Couple of my co...
Gaiter asked 17/11, 2019 at 6:3
4
I'm trying to use StratifiedKFold to create train/test/val splits for use in a non-sklearn machine learning work flow. So, the DataFrame needs to be split and then stay that way.
I'm trying to do ...
Groome asked 20/7, 2017 at 17:54
1
I have been experimenting trying to solve it for weeks. I am using Google Colaboratory since I got a MacBook Pro with an Apple chip that is not supported by TensorFlow. Here is the Google Col...
Mythomania asked 16/4, 2023 at 13:52
17
I am totally new to Machine Learning and I have been working with unsupervised learning technique.
Image shows my sample Data(After all Cleaning) Screenshot :
Sample Data
I have this two Pipline bu...
Wallenstein asked 11/9, 2017 at 19:12
2
I have a daily time series dataset that I am using Python SARIMAX method to predict for future. But I do not know how to write codes in python that accounts for multiple seasonalities. As far as I ...
Spectroradiometer asked 6/6, 2018 at 3:17
2
I am a beginner and getting familiar with pandas .
It is throwing an error , When I was trying to create a new column this way :
drinks['total_servings'] = drinks.loc[: ,'beer_servings':'wine_servi...
Goulash asked 19/2, 2023 at 14:14
3
Solved
I have a dataframe that contains
user_id date browser conversion test sex age country
1 2015-12-03 IE 1 0 M 32.0 US
Here is my code:
from sklearn import tree
data['date'] = pd.to_datetime(data.da...
Scolecite asked 21/12, 2016 at 6:41
2
I'm using Pipeline and ColumnTransformer modules from sklearn library to perform feature engineering on my dataset.
The dataset initially looks like this:
date
date_block_num
shop_id
item_id
it...
Dumb asked 21/8, 2021 at 15:42
1 Next >
© 2022 - 2024 — McMap. All rights reserved.