Comment

Comment by Bostonian

On the general topic of Python performance, just importing needed modules can take a few seconds. The output of the code

   import time
   start = time.time()
   import os
   import numpy as np
   import pandas as pd
   import xgboost as xgb
   from sklearn.metrics import mean_squared_error
   from scipy.stats import pearsonr
   import matplotlib.pyplot as plt
   print("time elapsed (s):", "%0.3f"%(time.time() - start))
on my Windows machine is

time elapsed (s): 2.630

parent Bostonian 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton