Skip to main content

Use to train neural networks, A Package for optimize models, transfer or copy files from one directory to other, use for nlp short word treatment, choosing optimal data for ML models, use for Image Scraping , use in timeseries problem to split the data into train and test, Deal with emojis and emoticons in nlp, word tokenize, token, get the list of Punctuation marks and English Pronouns too, can be used to read text files

Project description

A package to increase the accuracy of ML models, training neural networks, converting text into tokens, transfer or copy files from one directory to other, gives you the best data for model training, works on text data also, short word treatment for NLP problems, can be used for Image Scraping also, use it to split the timeseries data into training and testing, deal with emojis and emoticons, word tokenizer, tokenize words, can be used to remove stop words too, Punctuations and get English Pronouns list too, use to read text files # Optilearn

Optilearn is a versatile package designed to improve the accuracy of machine learning models, handle neural network training, and offer various utilities for NLP, image scraping, and timeseries data manipulation.

Features:

  • Neural Network Training: Use the optilearn.nn module to train neural networks.
  • Optimal Data Combination: Use optilearn.optimal to find the best data combination for ML and DL models.
  • Image Scraping: Use optilearn.images to download images from websites.
  • Text and NLP Processing: Use optilearn.text and optilearn.words for text tokenization, short word treatment, and more NLP tasks.
  • File Handling: Use optilearn.files to transfer and copy files between directories.
  • Timeseries Data Handling: Use optilearn.sequential to split sequential data like timeseries into training and testing sets.

Installation

!pip install optilearn

1. Neural network training

from optilearn.nn import Sequential,Dense,Dropout,EarlyStopping,ReduceLearningRate

model2=Sequential() model2.add(Dense(300,input_dim=784,activation='relu')) model2.add(Dropout(0.3)) model2.add(Dense(100,activation='relu')) model2.add(Dropout(0.3)) model2.add(Dense(150,activation='relu')) model2.add(Dropout(0.3)) model2.add(Dense(100,activation='relu')) model2.add(Dropout(0.3)) model2.add(Dense(50,activation='relu')) model2.add(Dropout(0.1)) model2.add(Dense(10,activation='softmax'))

model2.compile(loss='categorical_crossentropy',optimizer='adam',learning_rate=0.01)

rl= ReduceLearningRate(monitor='val_accuracy',factor=0.1,patience=20,verbose=1,min_delta=0.001,cooldown=3,min_lr=0.0001) es = EarlyStopping(monitor = 'val_accuracy',min_delta=0.0001,mode='max',verbose=1,patience=30,restore_best_weights=True,baseline=0.99)

g1=model2.fit(x_train,y_train,validation_data=[x_test,y_test],epochs=500,verbose=1,batch_size=128,callbacks=[rl,es])

2. Get best data combination for ML and DL models

from optilearn.optimal import OptimalDataSelector

x_train,y_train,x_test,y_test = OptimalDataSelector(X,Y,combination=15000,train_size=0.8,active_checkpoint=True,bs_problem='reg',scaling='st_normal')

3. Dealing NLP Problems

from optilearn.text import EmoTextHandler,word_tokenizer,Punctuation,EnglishPronouns,read_txt,text_to_tokens from optilearn.word import short_word_treatment`

4. File Transfering from one to another folder

from optilearn.files import FilePathway

5. Image scrapping from websites

from optilearn.images import web_image_downloader

6. splitting timeseries based data into training and testing

from optilearn.sequential import timeseries_split

x_train,x_test,y_train,y_test=timeseries_split(df1,'08:00:00',n_previous_values=50,train_size=0.8) x_train.shape,x_test.shape,y_train.shape,y_test.shape

*** For more detailed documentation, visit our GitHub Page --> https://github.com/about-optilearn.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

optilearn-1.2.6.tar.gz (49.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

optilearn-1.2.6-py3-none-any.whl (72.0 kB view details)

Uploaded Python 3

File details

Details for the file optilearn-1.2.6.tar.gz.

File metadata

  • Download URL: optilearn-1.2.6.tar.gz
  • Upload date:
  • Size: 49.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for optilearn-1.2.6.tar.gz
Algorithm Hash digest
SHA256 9f2757d93ac5dc21f9cd497f3178727a2c280eae0298f17861fb5cf183a90c87
MD5 3d38c2fc173e2aa03c1e1477163272e1
BLAKE2b-256 1f66062758606cbf2622ca0ba6d39a0ed87949c6f66c165f5f3e27b19bb4b6e8

See more details on using hashes here.

File details

Details for the file optilearn-1.2.6-py3-none-any.whl.

File metadata

  • Download URL: optilearn-1.2.6-py3-none-any.whl
  • Upload date:
  • Size: 72.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for optilearn-1.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 2d4e916ef7c604d82c35b05bc1d65d87e13f7c3557419e41bc6cc2bb876e6d41
MD5 20e1a575bf571f78d2ae92a08995e01e
BLAKE2b-256 ef752db43b3390f8bc6601888d2442b83eafa49113b7fc8b59d9ca47b85ff6f2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page