《PyInstaller打包实战指南》第十九节 单文件模式打包Sklearn(Scikit-learn)

第十九节 单文件模式打包Sklearn(Scikit-learn)

 

打包示例源码:

请点击该官方链接

 

版本信息:

scikit-learn==0.23.1

scipy==1.4.1

numpy==1.18.5

matplotlib==3.2.1

pyinstaller==3.6

 

打包系统:

Windows 10

 

打包前我们需要运行下代码,确保没有报错:

import numpy as np
import matplotlib.pyplot as plt

from sklearn.datasets import make_blobs
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis


n_train = 20  # samples for training
n_test = 200  # samples for testing
n_averages = 50  # how often to repeat classification
n_features_max = 75  # maximum number of features
step = 4  # step size for the calculation


def generate_data(n_samples, n_features):
    """Generate r

你可能感兴趣的:(pyinstaller,sklearn,scikit-learn,matplotlib,pyinstaller打包)