Skip to main content

➡ Types of SQL Joins ⬅ Credits - Steve Stedman



Comments

Popular posts from this blog

Class Weights for Handling Imbalanced Datasets

In scikit-learn, a lot of classifiers come with a built-in method of handling imbalanced classes. If we have highly imbalanced classes and have not addressed it during preprocessing, we have the option of using the class_weight parameter to weight the classes to make certain we have a balanced mix of each class. Specifically, the balanced argument will automatically weigh classes inversely proportional to their frequency. import numpy as np import pandas as pd import seaborn as sns import warnings from imblearn.over_sampling import SMOTE from imblearn.pipeline import make_pipeline from pylab import rcParams from sklearn.linear_model import LogisticRegression from sklearn.metrics import accuracy_score from sklearn.metrics import precision_score , recall_score from sklearn.metrics import f1_score , roc_auc_score , roc_curve from sklearn.model_selection import train_test_split from sklearn.model_selection import GridSearchCV In [2]:...

learning advanced SQL deeply

If you are well aware with the basic SQL, then learning advanced SQL is not a rocket science. I am sharing the  topics for advanced SQL  with a little description, you can go through the links which are referred by me also for  learning advanced SQL deeply . Advanced SQL Topics - a. Stored Procedures -  Stored Procedures  are stored as a group in RDBMS and it is a collection of SQL statements. We can reuse it whenever we require in programming. The major benefit of the Stored Procedure is that it provides a security layer between the user interface and database. You can learn this with the help of syntax and example. b. Indexes -  Indexes  used to speed up data retrieval in the database. It is a schema object. It slows down data input with insert and update statements, but speed up select queries and where clauses. Indexes are of following types - Normal Index Unique Index Clustered Index Non-Clustered Index Function-Based Index Composit...

Darts: Time Series Analysis made easy

  Dart: Sci-kit learn for Time Series Analysis It comprises all the API required for Time series analysis and its primary goal is to simplify the time series machine learning experience. Darts in not inbuilt, so install it using " pip install u8darts" In [4]: import pandas as pd from darts import TimeSeries Like pandas has DataFrame, Similarly, Darts has TimeSeries In [7]: df = pd . read_csv ( '../input/air-passengers/AirPassengers.csv' ) Series = TimeSeries . from_dataframe ( df , 'Month' , '#Passengers' ) This timeseries is univariate, containing only one variable. Splitting the series into training and validation TimeSeries In [9]: train , val = Series . split_before ( pd . Timestamp ( '19580101' )) Models All the time series models: Exponential smoothing, ARIMA & auto-ARIMA, Facebook Prophet, Theta method, FFT (Fast Fourier Transform), Recurrent neural networks (vanilla RNNs, GRU, and LSTM variants), Temporal Convol...