Git Product home page Git Product logo

phw1's Introduction

PHW1

2022 Machine Learning PHW1

Various algorithm test automation functions for one dataset

Result Example

Document

Class getBest5(dataset= 'dataset path')

When a user inserts a dataset, the dataset is preprocessed and the best combination of hyper parameters, scaler, and model is found and Top5 is output. There are 3 scalers [MinMaxScaler(), StandardScaler(), RobustScaler()] and 4 algorithms [Logistic Regression(), Entropy Classifier(), Gini Classifier(), SVC()] and many hyper parameters for each algorithm Included.

LogisticRegression

C=[0.001, 0.01, 0.1, 1, 10, 25, 50, 100]

max_iter=[50,100,150]

lver=['newton-cg', 'lbfgs', 'liblinear']

DecisionTreeClassifier

criterion = ['entropy']

max_depth = [2,4,6,8,10,12]

min_samples_leaf = [1, 2, 5, 10]

min_samples_split = [2, 5, 10, 15]

max_features = ['auto', 'sqrt','log2']

Gini Classifier

criterion = ['gini']

max_depth = [2,4,6,8,10,12]

min_samples_leaf = [1, 2, 5, 10]

min_samples_split = [2, 5, 10, 15]

max_features = ['auto', 'sqrt','log2']

SVC

C=[0.001, 0.01, 0.1, 1, 10, 25, 50, 100]

kernel=['linear', 'sigmoid', 'rbf', 'poly']

gamma=[0.001, 0.01, 0.1, 1, 10, 25, 50, 100]

Examples

dataset = 'breastCancer.csv'

print(getBest5(dataset))

Methods

preprocessing(dataset = 'dataset path'):

parameter:: dataset

The path of the dataset you want to preprocess

return:: X_train, X_test, y_train, y_test

Preprocessing the dataset and dividing it into a train set and a test set

modeling(X_train, X_test, y_train, y_test):

parameter:: X_train, X_test, y_train, y_test

The train set and test set of the dataset you want to experiment with

Return:: final_top5.values.tolist()

Combination of scaler, algorithm, and hyper parameters of the final Top 5 composed of a list

phw1's People

Contributors

thistoo avatar leehakho avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.