Random Forest Classification - SciKit vs Weka on prediction with 100 features

I wanted to get a much faster random forest classifier than the one from Weka, I first tried the C++ Shark implementation (results: few speed improvement, drop in correctly classifed instances)...

Plotting a ROC curve in scikit yields only 3 points

TLDR: scikit's roc_curve function is only returning 3 points for a certain dataset. Why could this be, and how do we control how many points to get back? I'm trying to draw a ROC curve, but...

Cross Validation function for logistic regression in R

I Come from a predominantly python + scikit learn background, and I was wondering how would one obtain the cross validation accuracy for a logistic regression model in R? I was searching and...

What is the output of clf.tree_.feature?

I observed that scikit-learn clf.tree_.feature occasional return negative values. For example -2. As far as I understand clf.tree_.feature is supposed to return sequential order of the features....

how to enforce Monotonic Constraints in XGBoost with ScikitLearn?

I build up a XGBoost model using scikit-learn and I am pretty happy with it. As fine tuning to avoid overfitting, I'd like to ensure monotonicity of some features but there I start facing some...

Build conda package upon installation

So I have published a conda package (link). This package contains .c extensions (coming from cython code), which need to be compiled when the package is installed. My problem is that none of the...

'NoneType' object is not iterable - Emotion Detection Error

I am trying to achieve emotion detection using opencv2. However when I run the python script it would have this error: In 1: runfile('C:/Users/Belay...

Predict iteratively from a list of scikit-learn models

I have two dataframes - one with predictors (df_learn), one with targets ( target_learn). I want to create a list of scikit-learn models (ml_list), one per target. So far, I have written...

Scikit-Learn Random Forest Classifier: High accuracy on Training and Test, but not Production

I am training a classifier to predict which classifies text-based requests into departments. I have ~107,000 labeled examples made of 22 imbalanced classes with roughly the following...

import surprise throws ContextualVersionConflict error in python3

Hi I installed surprise package and it has error at import (errr msg in section 3) At conda cmd, I installed surprise and later reinstalled scipy since it's in the error msg. It's as...

Basic filtering of data based on user & item in Python SciKit

I am trying to implement a recommender system to users based on their rating. I think the most common one. I was reading alot and shortlisted Surprise, a python-scikit based recommender...

Trained "Decision Tree" VS “Decision Path”

I am using scikit "Decision Tree" classifier for predicting the "effort size" of a migration project. Another part of my requirement is to find the features that are influencing the prediction. I...

scikit-surprise: python cannot find module even though pip lists it as installed

I am trying to use the scikit-surprise module to build a recommender system however I am having an error in getting it to compile. I am receiving the ImportError: Cannot import name "Reader"...

DistributionNotFound when importing surprise

While importing 'surprise', I am getting a DistributionNotFound error: DistributionNotFound: The 'joblib>=0.11' distribution was not found and is required by scikit-surprise from surprise import...

Skimage imread returns img_arrayndarray; what are the properties?

Really surprised but I cannot find any documentation on img_arrayndarray which is what skimage's imread returns. https://scikit-image.org/docs/dev/api/skimage.io.html#skimage.io.imread My primary...

Alpha_Vantage API returning incorrect time series data

I am downloading time series data for the Euro to USD exchange rate using the alpha_vantage API in a python pandas dataframe. I am using this to practice using pandas and scikit learn to attempt...

How to fix ' [Win error 5] access is denied' error while installing surprise in anaconda

I'm installing surprise package in anaconda and I got this Access denied error. I'm using windows 10. please see the error C:\Users\Hp>pip install surprise Collecting surprise Using cached...

ModuleNotFoundError: No module named 'surprise'

I have installed scikit-surprise in Windows10. C:\Users\Cosmos Lord>pip install scikit-surprise Requirement already satisfied: scikit-surprise in...

Python: slow imports of Surprise, formerly scikit-surprise, and Pandas

I made a recommendation system prototype using Surprise and Pandas Dataframe. I also made a command-line tool that takes in some parameters (like user id, type of recommendation, etc...), the main...

[Python in Dockerfile], how can I find out what is the correct order of packages in the "Requirements.txt" file?

Hi I'm building a simple Docker Image for Python and I'm struggling to find out what is the correct order of packages in Requirements.txt. It failed in middle of executing when it hit the beow...

ImportError: cannot import name 'evaluate' ( from surprise import evaluate )

from surprise import Reader, Dataset, SVD from surprise import evaluate --------------------------------------------------------------------------- ImportError ...

Python: Couldn't convert from String to Float

I followed this tutorial to implement sentiment analysis: https://stackabuse.com/python-for-nlp-sentiment-analysis-with-scikit-learn/ but I'm not a pro so I don'T understand every step in...

AWS Sagemaker scikit_bring_your_own example

I am following the https://github.com/awslabs/amazon-sagemaker-examples/tree/master/advanced_functionality/scikit_bring_your_own example for product recommendations. I want to use the SVD from...

How do I read a CSV file using Pandas then split the columns into two Numpy arrays using to_numpy for Scikit-Learn?

In summary I want a Python 3 function to: read data from a tab-separated CSV file return a two-part tuple where both parts are numpy arrays (examples below): the first part is all the data from...

ERROR: Command errored out with exit status 1:while installing scikit-surprise on python 3.8

I am trying the following command on python 3.8 ,pycharm windows10 for installing the package scikit-surprise for the evaluation of the recommendations system: pip install scikit-surprise and...

ModuleNotFoundError: No module named 'surprise' and others(I have various version of python)

I am now using python with mysql by mysql-python-connector but there's some problem of module importing. I import modules like this. import mysql.connector import os import surprise from surprise...

Cannot install scikit-surprise on my jupyter notebook

I am building a recommendation engine and am not able to install surprise, i thought the problem was because i didn't have a c compiler(since i found some people saying it would solve the...

Polynomial regression with scikit learn vs np.polyfit

I am quite surprised that nobody talks about this: the difference of polynomial regression done with scikit learn vs polyfit from numpy. First, the data: xdic={'X': {11: 300, 12: 170, 13: 288, 14:...

How to make predictions with scikit's Surprise?

I'm having some trouble understanding how the Surprise workflow. I have a file for training (which I seek to split into training and validation), and a file for testing data. I'm having trouble...

Getting errors while installing Surprise package

I am using the below command while installing surprise package. I have got error messages while installing and I am not able to understand. I need help to install this package successfully. *pip...