scikit-learn LogisticRegression This function uses the LogisticRegression model from the scikit-learn library to train a dataset and evaluate its accuracy on a test set. Machine learning 2024-12-16 12:17:51 30 views
eli5 scikit-learn This function creates a randomly chosen machine learning pipeline using CountVectorizer for text vectorization and LogisticRegression or DecisionTreeClassifier as the classifier. Then, it uses the show_weights function from the eli5 library to generate a feature importances table and formats it as an HTML table. Machine learning 2024-12-16 12:16:48 24 views
Scikit-learn StandardScaler This function uses Scikit-learn library for feature scaling with StandardScaler and classification prediction with LogisticRegression. It first splits the dataset into training and test sets, trains the model on the training set, and then makes predictions on the test set. Machine learning classification 2024-12-16 12:06:45 7 views
scikit-learn numpy This function uses the LogisticRegression model from the scikit-learn library to train a logistic regression classifier. It first splits the dataset into training and testing sets, then standardizes the features, and finally trains the model using the training set data. Machine learning 2024-12-16 11:49:38 4 views
eli5 scikit-learn This function uses the eli5 library and the scikit-learn library to create a feature importance explanation for a text classification model. It first creates a TF-IDF vectorizer and a logistic regression model, then combines these components into a pipeline. The pipeline is fitted to the text data and labels, and then a feature importance explanation is generated for the first text sample, which is returned in table format. Function 2024-12-16 11:44:43 4 views
scikit-learn eli5 This function fits a logistic regression model on the given data and uses eli5's PermutationImportance to evaluate feature importance. Python Function 2024-12-16 11:23:41 25 views
pandas numpy This function uses the LogisticRegression model from the scikit-learn library to classify the given data. First, it splits the dataset into training and testing sets, then trains a logistic regression model, and uses this model to make predictions on the test set. Classification model generation 2024-12-07 16:21:35 5 views
Prefect sklearn This function uses the LogisticRegression model from the sklearn library to predict the class of the input data. It first defines a LogisticRegression model, then trains it with some example data. Finally, it uses the trained model to predict the input data. Machine learning tasks 2024-12-07 15:58:48 2 views
Eli5 scikit-learn This function uses the Eli5 library and scikit-learn library to explain the predictions of a logistic regression model on the iris dataset. First, it loads the iris dataset, then trains a logistic regression model. Next, it makes predictions on the given data, and uses the Eli5's explanation feature to generate explanations, finally printing out the explanations for the top 5 features. Python Function 2024-12-07 15:48:56 4 views
Vaex Pandas This function uses the Vaex library to handle data, then converts it to a Pandas DataFrame for compatibility with the sklearn library. It then splits the dataset into training and testing sets using the train_test_split function, and finally trains a LogisticRegression model. Machine learning 2024-12-07 15:45:51 3 views