Saravanan666/pypi-org huggingface dataset:
Package: prediction-flow-x
prediction-flowprediction-flowis a Python package providing modernDeep-Learningbased CTR models. Models are implemented byPyTorch.how to useInstall using pip.pip install prediction-flowfeaturehow to define featureThere are two parameters for all feature types, name and column_flow.
The name parameter is used to index the column raw data from input data frame.
The column_flow parameter is a single transformer of a list of transformers.
The transformer is used to pre-process the column data before training the model.dense number featureNumber('age', StandardScaler())
Number('ctr', None)sparse category featureCategory('movieId', CategoryEncoder(min_cnt=1))var length sequence featureSequence('genres', SequenceEncoder(sep='|', min_cnt=1))transformerThe following transformers are provided now.transformersupported feature typedetailStandardScalerNumberWrapper of scikit-learn's StandardScaler. Null value must be filled in advance.LogTransformerNumberLog scaler. Null value must be filled in advance.CategoryEncoderCategoryConverting str value to int. Null value must be filled in advance using '__UNKNOWN__'.SequenceEncoderSequenceConverting sequence str value to int. Null value must be filled in advance using '__UNKNOWN__'.modelmodelreferenceDNN-Wide & Deep[DLRS 2016]Wide & Deep Learning for Recommender SystemsDeepFM[IJCAI 2017]DeepFM: A Factorization-Machine based Neural Network for CTR PredictionDIN[KDD 2018]Deep Interest Network for Click-Through Rate PredictionDNN + GRU + GRU + Attention[AAAI 2019]Deep Interest Evolution Network for Click-Through Rate PredictionDNN + GRU + AIGRU[AAAI 2019]Deep Interest Evolution Network for Click-Through Rate PredictionDNN + GRU + AGRU[AAAI 2019]Deep Interest Evolution Network for Click-Through Rate PredictionDNN + GRU + AUGRU[AAAI 2019]Deep Interest Evolution Network for Click-Through Rate PredictionDIEN[AAAI 2019]Deep Interest Evolution Network for Click-Through Rate PredictionOTHERTODOexamplemovielens-1MThis dataset is just used to test the code can run, accuracy does not make
sense.Prepare the dataset.preprocess.ipynbRun the model.movielens-1m.ipynbamazonPrepare the dataset.prepare_neg.ipynbRun the model.amazon.ipynbAn example usingpytorch-lightning.amazon-lightning.ipynbaccuracyacknowledge and referenceReferring the design fromDeepCTR,
the features are divided into dense (class Number), sparse (class Category),
sequence (class Sequence) types.
Package: predictionguard
Prediction Guard - Python ClientThis package provides functionality developed to simplify interfacing withPrediction Guardin Python 3.DocumentationSee theAPI documentation.InstallationThe package can be installed withpip:pipinstall--upgradepredictionguardRequirementsPython 3.6+Quick StartTo use this library, you must have an access token and specify it as a string when creating thepg.Clientobject. Access tokens can be created through the Prediction Guard platform (link coming soon). This is a basic example that:Instantiates a Prediction Guard clientDefines some example model input/ outputCreates a prediction proxy endpointUses the endpoint to make a predictionimportpredictionguardaspg# Initialize a Prediction Guard client.client=Client(token=<youraccesstoken>)# Create some examples illustrating the kind of predictions you# want to make (domain/ use case specific).examples=[{"input":{"phrase":"I'm so excited about Prediction Guard. It's gonna be awesome!"},"output":{"sentiment":"POS"}},{"input":{"phrase":"AI development without Prediction Guard is bad. It's really terrible."},"output":{"sentiment":"NEG"}}]# Create a prediction "proxy." This proxy will save your examples, evaluate# SOTA models to find the best one for your use case, and expose the best model# at an endpoint corresponding to the proxy.client.create_proxy(task='sentiment',name='my-sentiment-proxy',examples=examples)# Now your ready to start getting reliable, future proof predictions. No fuss!client.predict(name='test-client-sentiment4',data={"phrase":"Isn't this great! I'm so happy I'm using Prediction Guard"})
Package: predictionrevisited
Prediction RevisitedVersion 1.0.0This python module implements the core statistical concepts from the book
"Prediction Revisited: The Importance of Observation" by Megan Czasonis, Mark
Kritzman and David Turkington. In short, these methods form predictions by
interpreting data as 'experiences' rather than variables, which builds from a
rigorous base of information theory and facilitates intuitive interpretation
of predictions as averages of prior outcomes. This procedure works on the
principle of relevance, which is determined using the Mahalanobis distance.The baseline predictions from a relevance-weighted average match those of
ordinary least squares linear regression. However, this view allows us to gain
additional insight from the importance of each observation, and it allows us
to extend linear regression to Partial Sample Regression, which relies on a
subset of the most relevant data and is therefore locally conditional to the
circumstances of every prediction.Relevance-weighted prediction also allows us to evaluate the fit of every
individual prediction, which is distinct from the R-squared of a model. In
fact, for a full-sample regression the R-squared is equal to the information-
weighted average fit of every prediction trial. We also define a measure of
precision and asymmetry, as well as co-occurrence which is a single-
observation component of correlation."Prediction Revisited" also uses pairwise comparisons between observations to
elucidate new intuition. While theoretically elegant, pairwise comparisons
are often computationally inefficient, so this code module offers the
flexibility to perform most computations more efficiently with shortcut=True.Most of the module is built on top of numpy for matrix manipulation, but we
also include ancillary features and a demo that ingests Pandas DataFrames. Note
that for clarity, we keep results as 2-dimensional arrays in most cases.For more information, see:www.predictionrevisited.comDependenciesnumpy (for all matrix calculations)
pandas (for ancillary features involving data formatted in DataFrames)LicenseMIT (see LICENSE.md)"""
Package: predictions
import predictionsExamplesCrashimportpredictionso=predictions.crashvarName=o.crashpredictor()#  varName returns a dict {{'crashchance': str(chance), 'crashprediction': str(prediction)}chance=varName[crashchance]prediction=varName[crashprediction]print(chance,prediction)Minesimportpredictionso=predictions.minesoutput=o.minespredictor(tileo,bombs)# tileo = How many tiles the user wants to open  # bombs = how many bombs on the fieldprint(output)Towersimportpredictionso=predictions.towersoutput=o.towerspredictor()print(output)Rouletteimportpredictionso=predictions.rouletteoutput=o.roulettepredictor()print(output)
Package: predictions-analyzer-tpmeli
predictions_analyzerPredictions Analyzer is a powerful tool to help discover which models perform best on the kinds of samples you have.  This allows you to create local models and ensemble models with precision, while also finding out which samples are the most challenging to classify.Documentation:https://predictions-analyzer.readthedocs.io/en/latestNotesCurrently in development.
Expected first release: Early Febuary 2021
Package: predictit-client
PredictIt API ClientPredictIt API Client for Python. Python 3+ required.Installationpip install predictit-clientUsagefrompredictit_clientimportClientGet all marketsmarket_id=2721client=Client()markets=client.get_all_markets()# -> List[Market]Get single marketmarket_id=2721client=Client()market=client.get_market_with_id(market_id)# -> Optional[Market]Market Fieldsmarket_id:intname:strshort_name:strimage_url:strurl:strcontracts:List[Contract]time_stamp:strstatus:strContract Fieldscontract_id:intdate_end:strimage_url:strname:strshort_name:strstatus:strlast_trade_price:floatbest_buy_yes_cost:floatbest_buy_no_cost:floatbest_sell_yes_cost:floatbest_sell_no_cost:floatdisplay_order:int
Package: predictive_imputer
Predictive ImputerPredictive imputation of missing values with sklearn interface. This is a simple implementation of the idea presented in the MissForest R package.Free software: MIT licenseDocumentation:https://predictive-imputer.readthedocs.io.FeaturesBasic imputation using RandomForestRegressorCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.2.0 (2017-04-01)Add new models that can be used for imputation: KNN and PCA (@founderfan)Add early stopping (@founderfan)0.1.0 (2016-11-28)First release on PyPI.
Package: predictiveness-curve
predictiveness-curveWhat's Predictiveness Curve?Predictiveness curve is a method to display two graphs simultaneously. In both figures, the x-axis is risk percentile, the y-axis of one figure is the value of risk, and the y-axis of the other figure is true positive fractions. This makes it possible to visualize whether the model of risk fits in the medical field and which value of risk should be used as the basis for the model. SeeAm. J. Epidemiol. 2008; 167:362–368for details.InstallThis module implements functions to plotPredictiveness Curve.Install with :pip install predictiveness-curveExamplefrompredictiveness_curveimportplot_predictiveness_curvefromsklearn.datasetsimportload_breast_cancerfromsklearn.ensembleimportRandomForestClassifierfromsklearn.model_selectionimporttrain_test_splitdata=load_breast_cancer()y=data.targetX=data.datatraining_X,test_X,training_y,test_y=train_test_split(X,y,test_size=0.5,random_state=42)clsf=RandomForestClassifier(n_estimators=100,random_state=42)clsf.fit(training_X,training_y)probabilities=clsf.predict_proba(test_X)[:,1]plot_predictiveness_curve(probabilities,test_y)Seenotebooks directoryfor details.
Package: predictiveopt
Predictive Hyper Parameter OptimisationImplementation of a newly developed Predictive Hyperparameter Optimisation algorithm.https://pypi.org/project/predictiveopt/Installationpip install predictiveoptBuilding instructionsBuilding the package:python setup.py sdist bdist_wheelUploading to PyPi:python -m twine upload  dist/*Uploading new versions:twine upload --skip-existing dist/*
Package: predictnow-api
TO BEGIN ANY WORK WITH PREDICTNOW.AI CLIENT, WE START BY IMPORTING AND CREATING A CLASS INSTANCEfrom predictnow.pdapi import PredictNowClient
import pandas as pdapi_key = "KeyProvidedToEachOfOurSubscriber"api_host = "http://%VMIP%"Initial variablesusername = "user1"email = "xxxx@gmail.com"
client = PredictNowClient(api_host,api_key)YOU WILL NEED TO EDIT THIS INPUT DATASET FILE PATH, LABELNAME AND MODELNAME!file_path = 'my_amazing_features.xlsx'  # ********************
labelname = 'futreturn' #might need to change this name accordingly *******************************
modelname = 'model1' # *********************************************
import osNOW YOUR PREDICTNOW.AI CLIENT HAS BEEN SETUP.For classification problemparams = {"timeseries": "yes", "weights": "no", "prob_calib": "no", "eda": "no", "type": "classification", "feature_selection": "shap", "analysis": "small", "boost": "gbdt", "mode": "train", "testsize": "1"}For regression problemsparams = {"timeseries": "yes", "weights": "no", "prob_calib": "no", "eda": "no", "type": "regression", "feature_selection": "shap", "analysis": "small", "boost": "gbdt", "mode": "train", "testsize": "1"}print("THE PARAMS", params)LET'S CREATE THE MODEL BY SENDING THE PARAMETERS TO PREDICTNOW.AIresponse = client.create_model(
username=username, # only letters, numbers, or underscores
model_name=modelname,
params=params,
)print(response)LET'S LOAD UP THE FILE TO PANDAS IN THE LOCAL ENVIRONMENTfrom pandas import read_csv  # If you have the Excel file, replace read_csv with read_excel
from pandas import read_excel
df = read_excel(file_path)  # Same here
df.name = "testdataframe"  # Optional, but recommendedprint(df)START TRAINING MODELNOTE: THIS MAY TAKE UP TO several minutesresponse = client.train(
model_name=modelname,
input_df=df,
label=labelname,username=username,
email=email,
return_output=False)print("THE CLIENT HAS SENT THE DATASET TO THE SERVER AND TRIGGERED THE TRAINING MODEL TASK")
print(response)CHECK THE STATUS OF THE MODELstatus = client.getstatus(
username=username,
train_id=response["train_id"]
)print("Current status:")
print(status)NOW WE WILL DOWNLOAD FILESif status["state"] == "COMPLETED":response = client.getresult(
    model_name=modelname,
    username=username,
)

import pandas as pd
predicted_prob_cv = pd.read_json(response.predicted_prob_cv)
print("predicted_prob_cv")
print(predicted_prob_cv)

predicted_prob_test = pd.read_json(response.predicted_prob_test)
print("predicted_prob_test")
print(predicted_prob_test)


predicted_targets_cv = pd.read_json(response.predicted_targets_cv)
print("predicted_targets_cv")
print(predicted_targets_cv)START PREDICTING USING THE TRAINED MODELif status["state"] == "COMPLETED":df = read_excel("example_input_live_latest.xlsx")
df.name = "myfirstpredictname"  # optional, but recommended

# Predict demo
response = client.predict(
    model_name=modelname,
    input_df=df,
    username=username,
    eda=params["eda"],
    prob_calib=params["prob_calib"]
)
Package: predictnow-api-client
Usage:from predictnow.pdapi import PredictNowClientSetup client along with its api keyapi_key = "<YOUR_API_KEY>"
client = PredictNowClient(api_key)Train demotrain_input_path = 'C:/Users/devstack/Documents/example_input_train.csv'
train_params = {
"username": "welly",
"email": "welly@predictnow.ai",
"label": "futreturn",
"timeseries": "yes",
"type": "classification",
"feature_selection": "shap",
"analysis": "small",
"boost": "gbdt",
"mode": "train",
"testsize": "0.2",
"weights": "no",
"prob_calib": "no",
"suffix": "myfirstsuffix",
"eda": "no",
}response = client.train(train_input_path, train_params)
print(response)Predict demolive_input_path = 'C:/Users/devstack/Documents/example_input_live.csv'
username = train_params["username"]
suffix = train_params["suffix"]
path = "../" + train_params["username"]
predict_params = {
"username": username,
"model_name": "saved_model_" + suffix + ".pkl",  # TODO proper model name
"eda": "no",
}
response = client.predict(live_input_path, params=predict_params)
print(response)Save Result demoresponse = client.save_to_output({"username": "welly", "output": "C:/Users/devstack/Documents"})
print(response)
Package: predictnow-client
Usage:from predictnow.pdapi import PredictNowClient
import pandas as pd
api_key = "%KeyProvidedToEachOfOurSubscriber"api_host = "http://%VMIP%"  # current makeshift api host
username = "helloWorld"
email = "helloWorld@yourmail.com"client = PredictNowClient(api_host,api_key)You will need to edit this input dataset file path and labelname!file_path = 'my_amazing_features.xlsx'
labelname = 'Next_day_strategy_return'
import osFor classification problemsparams = {'timeseries': 'yes', 'type': 'classification',  'feature_selection': 'shap', 'analysis': 'none', 'boost': 'gbdt',  'testsize': '0.2', 'weights': 'no', 'eda': 'yes', 'prob_calib': 'no', 'mode': 'train'}For regression problems, suitable for CPOparams = {'timeseries': 'yes', 'type': 'regression',   'feature_selection': 'none', 'analysis': 'none', 'boost': 'gbdt', 'testsize': '0.2', 'weights': 'no', 'eda': 'yes', 'prob_calib': 'no', 'mode': 'train'}response = client.create_model( username=username,
model_name="test1",
params=params
)from pandas import read_excel
df = read_excel(file_path, engine="openpyxl")  # Same here
df.name = "testdataframe"  # Optional, but recommended########## TRAIN MODE ###################################
response = client.train(
model_name="test1",
input_df=df,
label=labelname,
username=username,
email=email)status = client.getstatus(
        username=username,
    train_id=response["train_id"]
)if status["state"] == "COMPLETED":response = client.getresult(
model_name="test1",
username=username,
)
predicted_targets_cv = pd.read_json(response.predicted_targets_cv)
print("predicted_targets_cv")
print(predicted_targets_cv)

predicted_targets_test = pd.read_json(response.predicted_targets_test)
print("predicted_targets_test")
print(predicted_targets_test)

if response.feature_importance:
	feature_importance = pd.read_json(response.feature_importance)
	print("feature_importance")
	print(feature_importance)


performance_metrics = pd.read_json(response.performance_metrics)
print("performance_metrics")
print(performance_metrics)########## LIVE MODE ###################################
if status["state"] == "COMPLETED":
df = read_csv("example_input_live.csv") # live input data
df.name = "myfirstpredictname"  # optional, but recommended
# Making live predictions
response = client.predict(
model_name="test1",
input_df=df,username=username,
eda="yes",
prob_calib=params["prob_calib"],
)
y_pred = pd.read_json(response.labels)
print("THE LABELS")
print(y_pred)
Package: predictr
predictr - Predict the Reliabilitypredictr: predict + reliability, in other words: A tool to predict the reliability.The aim of this package is to provide state of the art tools for all kinds of Weibull analyses.predictr already includes many methods (see list below). A guideline on when to use which method will be added soon.Main FeaturesParameter EstimationUncensored two-parameter Weibull distributionType I and type II right-censored two-parameter Weibull distributionBx-life calculatorMaximum Likelihood Estimation (MLE)Median Rank Regression (MRR)Bias-correction methodsC4 method (reduced bias adjustment)Hirose and Ross methodNon-Parametric Bootstrap correction (mean, median, trimmed mean)Parametric Bootstrap correction (mean, median, trimmed mean)Confidence boundsBeta-Binomial BoundsMonte-Carlo Pivotal BoundsNon-Parametric Bootstrap BoundsParametric Bootstrap BoundsFisher BoundsLikelihood Ratio BoundsPlotsWeibull Probability Plots with all needed information on themMultiple Weibull plots in one figureContour plotsImportant LinksPyPiGithub RepositoryDocumentationZenodo
Package: predict-the-object-collision
Predict the Collision and Save the EarthAbout the DatasetThe official dataset is from NASA's official websitehttps://cneos.jpl.nasa.gov/ca/. And the modified version of this dataset is available on Kaggle. Link :https://www.kaggle.com/datasets/sameepvani/nasa-nearest-earth-objectsThe dataset consists of 90837 rows and 10 columns.The models are used in this project,Adaboost ClassifierLogistic RegressionMulti-Layer PerceptronStochastic Gradient DescentXGBoost ClassifierLinear Perceptron ClassifierSupport Vector ClassificationGradient Boosting ClassifierK-Nearest NeighborsRandom Forest ClassifierProcedureFirst install the package using pippipinstallpredict-the-collisionimport main_fun() from predict_collisionfrompredict_collisionimportmain_funThe first parameter is "Data Path of CSV" and the second parameter is "Input Number of the prediction model"Model NameUser inputAdaboost Classifier1Logistic Regression2Multi-Layer Perceptron3Stochastic Gradient Descent4XGBoost Classifier5Linear Perceptron Classifier6Support Vector Classification7Gradient Boosting Classifier8K-Nearest Neighbors9Random Forest Classifier10Such asmain_fun("csv_path",1)
Package: predikon
PredikonSub-Matrix Factorization for Real-Time Vote PredictionThepredikonlibrary is the Python library for the algorithm proposed inAlexander Immer*, Victor Kristof*, Matthias Grossglauser, Patrick Thiran,Sub-Matrix Factorization for Real-Time Vote Prediction, KDD 2020Thepredikonalgorithm enables you to predict aggregate vote outcomes (e.g., national) from partial outcomes (e.g., regional) that are revealed sequentially.
See theusage documentationmore details on how to use this library or read the paper linked above for more details on how the algorithm works.It is the algorithm poweringpredikon.ch, a platform for real-time vote prediction in Switzerland.InstallationTo install the Predikon library from PyPI, runpipinstallpredikonGetting StartedGiven a datasetYof historical vote results collected in an array ofRregions andVvotes, given a vectoryof partial results, and given an optional weightingwper region (e.g., the number of valid votes in each region), it is easy to predict the unobserved entries ofyafter observing at least one regional result (one entry ofy) of an ongoing referendum or election:frompredikonimportLogisticSubSVDmodel=LogisticSubSVD(Y,w)pred=model.fit_predict(y)# All unobserved entries in `y` are now filled in.You can then obtain a prediction for the aggregate outcome (assuming the weights are the number of valid votes in this example) as:N=w.sum()# Total number of votes.ypred=pred.dot(w)/Nytrue=y.dot(w)/Nprint(abs(ypred-ytrue))Have a look at theexample notebookfor a complete example of how to use thepredikonlibrary (with Swiss referenda).Going FurtherYou can find further information in:Theexample notebookusing Swiss referendaTheusage documentationdescribing the set up in more detailsThescientific paperintroducing the algorithmAnd don't hesitate toreach out usif you have questions or toopen issues!RequirementsPython 3.5 and aboveNumPy1.0.0 and abovescikit-learn0.16.1 and above
Package: predikto-elasticsearch
Unofficial low-level client for Elasticsearch. Its goal is to be a slight extension of the official elasticsearch-py
library, while providing more frequent releases in the interim.  Specifically, we are working with elasticsearch 2.x,
1.x is not supported, and 5.x is probably an afterthought.  For support of either of those two, head to the main repo.CompatibilityAt the time of the fork, the most recent version of the elasticsearch 2.x version was 2.4.0, so the first release ofpredikto-elasticsearch-py will be 2.4.1.InstallationInstall theelasticsearchpackage withpip:pip install predikto-elasticsearchExample useSimple use-case:>>> from datetime import datetime
>>> from elasticsearch import Elasticsearch

# by default we connect to localhost:9200
>>> es = Elasticsearch()

# create an index in elasticsearch, ignore status code 400 (index already exists)
>>> es.indices.create(index='my-index', ignore=400)
{u'acknowledged': True}

# datetimes will be serialized
>>> es.index(index="my-index", doc_type="test-type", id=42, body={"any": "data", "timestamp": datetime.now()})
{u'_id': u'42', u'_index': u'my-index', u'_type': u'test-type', u'_version': 1, u'ok': True}

# but not deserialized
>>> es.get(index="my-index", doc_type="test-type", id=42)['_source']
{u'any': u'data', u'timestamp': u'2013-05-12T19:45:31.804229'}FeaturesThe client’s features include:translating basic Python data types to and from json (datetimes are not
decoded for performance reasons)configurable automatic discovery of cluster nodespersistent connectionsload balancing (with pluggable selection strategy) across all available nodesfailed connection penalization (time based - failed connections won’t be
retried until a timeout is reached)support for ssl and http authenticationthread safetypluggable architectureLicenseCopyright 2015 ElasticsearchLicensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.