Skip to content
Advertisement

Tag: machine-learning

‘cannot compute Pack as input #1(zero-based) was expected to be a float tensor but is a int32 tensor [Op:Pack] name: packed’. Error with tf.squeeze

I’m trying to display images of a dataset on a plot with their predictions. But I have this error: cannot compute Pack as input #1(zero-based) was expected to be a float tensor but is a int32 tensor [Op:Pack] name: packed This is the code in which I plot: I have the error on second line, on the tf.squeeze function. I

Remove outlier using quantile python

I need to remove outlier for a regression dataset. Lets say the dataset is consist in the following way With closer inspection, the column humidity has three outliers which are 50.0,18.0,0.01 but for windspeed column the outliers are 20 and 0.05 and both columns outliers are not in the same row. In this case if I remove my outlier with

Add features to the “numeric” dataset whose categorical value must be mapped using a conversion formula

I have this dataset: This is the request: “Add the Mjob and Fjob attributes to the “numeric” dataset whose categorical value must be mapped using a conversion formula of your choice.” Does anyone knows how to do it? For example: if ‘at_home’ value become ‘1’ in Mjob, I want the same result in the Fjob column. Same categorical values must

Missing categorical data should be encoded with an all-zero one-hot vector

I am working on a machine learning project with very sparsely labeled data. There are several categorical features, resulting in roughly one hundred different classes between the features. For example: After I put these through scikit’s OneHotEncoder I am expecting the missing data to be encoded as 00, since the docs state that handle_unknown=’ignore’ causes the encoder to return an

Advertisement