Text Classification
Scikit-learn
Joblib
sentence-transformers
English
sentiment-analysis
imdb
movie-reviews
logistic-regression
Instructions to use abir71/imdb-sentiment-mpnet with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use abir71/imdb-sentiment-mpnet with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("abir71/imdb-sentiment-mpnet", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - sentence-transformers
How to use abir71/imdb-sentiment-mpnet with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("abir71/imdb-sentiment-mpnet") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
Download classifier.json from abir71/imdb-sentiment-mpnet: direct link, hf CLI and curl.
- Browser
- Download file 16.1 kB
-
https://huggingface.co/abir71/imdb-sentiment-mpnet/resolve/main/classifier.json
- Command line
-
hf download hf://abir71/imdb-sentiment-mpnet/classifier.json
-
curl -L -o classifier.json https://huggingface.co/abir71/imdb-sentiment-mpnet/resolve/main/classifier.json
16.1 kB
| {"type": "logistic", "w": [2.6878490447998047, -1.423030972480774, -2.1722240447998047, -2.6326799392700195, 3.873323917388916, 0.08021199703216553, -1.4661040306091309, 0.2991349995136261, 1.6453059911727905, -0.285847008228302, -4.8252339363098145, -3.411684989929199, -1.9703500270843506, 2.9497640132904053, 0.3444800078868866, -0.8069279789924622, -0.07075300067663193, 0.39256298542022705, -0.20000800490379333, 1.5697920322418213, 2.5528929233551025, 2.6004269123077393, -1.010975956916809, -0.7756580114364624, -2.565977096557617, -1.787479043006897, -4.71892786026001, -0.9810240268707275, -3.4857819080352783, -0.06544099748134613, 1.5354540348052979, 1.6476060152053833, 2.7984180450439453, 0.7971240282058716, 9.500000305706635e-05, -1.6996140480041504, -0.08105199784040451, 3.9058310985565186, -3.5662190914154053, 1.1081180572509766, 1.2238670587539673, 1.2445869445800781, -4.092988014221191, 1.7804570198059082, 0.11052200198173523, 0.17995700240135193, -1.0210360288619995, -0.2313160002231598, -1.342236042022705, -1.8642109632492065, 0.3492110073566437, 1.1652899980545044, -0.5800039768218994, -1.5205849409103394, 0.5701959729194641, -0.9289259910583496, 1.168869972229004, -1.791566014289856, -0.6824960112571716, 1.4947659969329834, -5.167203903198242, 1.0160620212554932, -2.0710930824279785, -0.22474899888038635, -1.7135649919509888, 0.12178400158882141, 1.6591819524765015, 0.048920001834630966, 0.6474909782409668, 3.6985340118408203, -2.8025200366973877, -0.5447869896888733, 0.7311139702796936, -0.6152650117874146, -1.6823619604110718, 1.3643649816513062, -1.1151659488677979, -0.8485950231552124, 2.2073299884796143, -0.07483399659395218, 0.5983830094337463, 4.883563995361328, -1.8276660442352295, -0.3411779999732971, 2.6289899349212646, 0.5518029928207397, -0.6626589894294739, 0.7968549728393555, 2.396789073944092, 0.8494939804077148, 1.9891040325164795, -0.5107870101928711, 2.9433488845825195, 0.20822100341320038, -0.7231050133705139, -5.361939907073975, -0.09297899901866913, -0.2551639974117279, 0.3408609926700592, 0.6606060266494751, -1.572680950164795, 6.406116008758545, -1.25627601146698, -0.5873540043830872, 0.7709180116653442, 0.4251050055027008, 2.783703088760376, 0.416157990694046, -1.1003639698028564, 0.7315340042114258, -0.13150300085544586, -0.17352600395679474, 3.899902105331421, -0.7280259728431702, -1.0948740243911743, 4.1322197914123535, -2.8579440116882324, -0.6520199775695801, -0.21850000321865082, 1.5949629545211792, -1.2260760068893433, -1.7952330112457275, 0.33896398544311523, 1.1795469522476196, 0.03464899957180023, -0.8810049891471863, -3.567650079727173, -1.3146859407424927, -1.7723779678344727, 1.9960780143737793, -1.6381299495697021, 1.0393450260162354, 1.9002139568328857, -2.064089059829712, 2.1444880962371826, -1.1024249792099, -0.7395099997520447, 3.6131839752197266, -1.3480360507965088, 1.0720340013504028, -1.1608489751815796, 0.05781000107526779, -0.5989819765090942, 2.3977138996124268, 1.3775750398635864, -0.739890992641449, -1.6167819499969482, 0.6417189836502075, 3.9366259574890137, 2.1329119205474854, 3.772578001022339, -1.758262038230896, 0.2387389987707138, -2.6378870010375977, -1.2507749795913696, -0.8849499821662903, 2.8608720302581787, -3.628192901611328, 1.4615579843521118, -2.9111831188201904, 2.59904408454895, -0.28494998812675476, -0.5326700210571289, 2.759382963180542, -0.33299100399017334, -4.45564603805542, -3.692842960357666, 0.06219099834561348, -0.8888490200042725, -2.326107978820801, -1.692945957183838, -2.830306053161621, 0.3352699875831604, -2.197000026702881, 2.3128418922424316, -1.0793190002441406, 0.2709270119667053, 1.1216460466384888, -1.6887359619140625, 1.6437350511550903, 1.3286570310592651, -1.6612659692764282, 2.583664894104004, -0.4681119918823242, -1.1799709796905518, -0.41665199398994446, 1.7192039489746094, -0.8363410234451294, 0.6416550278663635, 3.2404539585113525, -3.4906198978424072, 0.23321300745010376, 0.5285869836807251, -1.2973079681396484, -1.7371759414672852, 0.3039889931678772, 2.6074159145355225, -1.410465955734253, 0.8827840089797974, 0.19519299268722534, -0.595986008644104, -3.825171947479248, 0.7368040084838867, 0.47999200224876404, -1.0627670288085938, 1.9526859521865845, -1.3644939661026, 0.5557810068130493, 1.3748970031738281, -0.34497401118278503, 0.23327000439167023, 2.188046932220459, 1.419631004333496, -0.49330100417137146, -3.4188790321350098, 2.711699962615967, -0.6312779784202576, 1.2380789518356323, 1.2129950523376465, 4.886673927307129, -0.19909599423408508, 3.1167120933532715, -1.522515058517456, -0.4739159941673279, 2.6599199771881104, -2.022033929824829, 1.4238359928131104, 0.5506100058555603, -1.5368479490280151, 1.2980910539627075, 0.046445999294519424, 0.15801699459552765, 1.7388509511947632, -0.8312669992446899, -0.482789009809494, -0.3708130121231079, -0.6748129725456238, 1.6562800407409668, -1.2174509763717651, 1.5378350019454956, 2.203011989593506, 1.2927919626235962, 3.7546119689941406, 3.307720899581909, 0.751013994216919, -0.5358960032463074, 1.1775259971618652, 1.8477040529251099, -0.6177679896354675, 1.5003260374069214, 0.7184579968452454, 2.393660068511963, -5.074807167053223, -0.4355759918689728, -1.4382539987564087, 1.632182002067566, -1.817911982536316, -0.05094999819993973, -0.4385159909725189, -1.2762889862060547, -0.858381986618042, 2.3705968856811523, 1.954395055770874, -0.19284799695014954, -0.6822149753570557, 1.8606890439987183, -2.870332956314087, -1.3244179487228394, -3.0562798976898193, -4.982851982116699, -3.0546040534973145, -2.3357338905334473, -1.6140700578689575, -0.09763000160455704, -3.926269054412842, -1.1584819555282593, -0.36692699790000916, -1.612017035484314, -1.0357509851455688, 0.33799898624420166, 0.8486440181732178, 1.1958550214767456, 2.131890058517456, 1.6219079494476318, -1.6207250356674194, -3.0187458992004395, 2.0923171043395996, 2.0798609256744385, -5.189598083496094, -3.0928220748901367, -0.05435299873352051, -0.9931300282478333, 0.056178998202085495, 1.175542950630188, -2.860335111618042, 0.675940990447998, -0.787293016910553, 0.4579469859600067, -3.9575281143188477, -1.6834779977798462, 2.339931011199951, 1.1503429412841797, 2.149168014526367, -1.0261850357055664, -0.652629017829895, 4.6888580322265625, 1.7621020078659058, 2.8271889686584473, 3.607196092605591, 0.7135429978370667, 1.3124819993972778, -1.6814450025558472, 0.8468599915504456, -1.0269019603729248, -1.3985929489135742, 1.3730429410934448, 1.8547320365905762, 1.4120800495147705, -2.1352639198303223, 1.2900489568710327, -2.2738230228424072, -0.015527999959886074, 3.1760430335998535, -2.1680500507354736, 2.811357021331787, -0.8018400073051453, 5.906015872955322, 4.101487159729004, 1.4785120487213135, 2.4726788997650146, -6.023960113525391, -2.5627400875091553, -0.15965299308300018, -0.49533000588417053, -0.3354929983615875, 2.226639986038208, 2.3055920600891113, -1.939102053642273, -3.4669299125671387, 0.03182800114154816, 3.0390329360961914, -2.5697879791259766, -1.3201240301132202, -0.921176016330719, -6.174232006072998, -1.0158929824829102, -1.589858055114746, -1.4462300539016724, 0.285504013299942, -1.9729429483413696, -2.16709303855896, -3.226555109024048, 0.8347200155258179, -0.4926590025424957, 4.2917962074279785, 2.1870620250701904, -0.7976760268211365, -0.1821960061788559, 0.08286499977111816, -1.3511830568313599, 1.4592440128326416, 2.8515560626983643, 0.3775379955768585, -0.3357140123844147, -1.0301779508590698, -2.0841450691223145, -3.1933140754699707, -1.97394597530365, 2.728355884552002, 1.526945948600769, 0.17538100481033325, -0.2213120013475418, -0.6584159731864929, 0.5751979947090149, 1.4937069416046143, -1.4426419734954834, -0.023514999076724052, -0.26382601261138916, -0.31480100750923157, 1.7007659673690796, -1.1828320026397705, -0.0648920014500618, 3.9381940364837646, 0.7108089923858643, 0.11166000366210938, 0.9348019957542419, 1.149469017982483, -1.518875002861023, 1.2447689771652222, 2.3641700744628906, -0.009968999773263931, -1.2396279573440552, 1.507720947265625, -1.0637580156326294, -2.699850082397461, 1.3077850341796875, -5.6948018074035645, 1.2704010009765625, -2.4373340606689453, 0.677374005317688, 0.5196319818496704, 5.646515846252441, -0.3119620084762573, -0.15761099755764008, -1.0532350540161133, -0.619920015335083, -0.39469000697135925, -0.13379499316215515, -3.7805099487304688, -0.6207870244979858, 0.4288159906864166, 1.8458060026168823, -1.6937509775161743, -0.6191369891166687, -0.25806400179862976, -0.04224599897861481, 0.12169300019741058, 1.5320069789886475, -0.28659600019454956, -0.351624995470047, 3.169797897338867, -1.0346720218658447, 3.0387630462646484, -4.495975971221924, -0.5777119994163513, 2.5236449241638184, -0.19265800714492798, -0.964900016784668, 0.09384399652481079, 0.6718260049819946, 0.5108529925346375, -0.650111973285675, 1.5784200429916382, -3.523864984512329, -0.8607879877090454, -0.1748580038547516, 2.7491259574890137, 1.434630036354065, 2.7807259559631348, 0.9284070134162903, 2.2307279109954834, 2.4699039459228516, 3.0338199138641357, 1.5569859743118286, -0.19247500598430634, 0.9093019962310791, 0.9528200030326843, -1.148826003074646, 1.3115750551223755, 0.027459999546408653, -1.5449060201644897, -0.5763429999351501, -0.019115999341011047, 1.7233500480651855, -0.22801099717617035, 0.13197700679302216, -0.1962530016899109, -2.775135040283203, -2.9978959560394287, 2.284857988357544, 0.8394880294799805, -3.577609062194824, -1.3926689624786377, -2.0908780097961426, 0.8655239939689636, 0.22420799732208252, 1.3898719549179077, 1.4389690160751343, 1.776190996170044, -1.0681350231170654, 0.48162001371383667, 3.751375913619995, 0.13106399774551392, 1.4299540519714355, 0.6250929832458496, 0.7232159972190857, 0.48948100209236145, 0.5870640277862549, 1.155648946762085, 1.7195470333099365, -0.4892919957637787, -0.32126298546791077, 0.5592910051345825, -0.8185610175132751, -0.384552001953125, -0.15683899819850922, -0.6832619905471802, -0.7117059826850891, -2.256351947784424, 1.4679150581359863, 0.36261001229286194, -0.2018910050392151, 1.5518310070037842, -1.0192899703979492, 2.2590229511260986, -1.729822039604187, -0.30145999789237976, 2.320262908935547, 3.001446008682251, 0.08252199739217758, 2.00045108795166, -0.4999299943447113, 0.4988040030002594, -2.0265140533447266, -0.8537870049476624, 0.6738319993019104, 2.1736960411071777, -0.5519310235977173, 0.9439030289649963, 2.464737892150879, -3.144455909729004, -1.5805120468139648, 0.648842990398407, -0.21453100442886353, -1.1509510278701782, -2.0076749324798584, 4.304994106292725, 4.594595909118652, 1.7661319971084595, 3.075261116027832, -1.4896490573883057, 2.068837881088257, 0.06556600332260132, 1.3247120380401611, 1.015326976776123, -0.30243900418281555, 3.914249897003174, -0.6417779922485352, -2.0709900856018066, -2.97981595993042, -2.792651891708374, -0.6256110072135925, -6.485995769500732, -2.047110080718994, -0.1372150033712387, -0.06533200293779373, 2.3100318908691406, -1.2075190544128418, 3.2583320140838623, 0.7648199796676636, 0.7070599794387817, -1.7781909704208374, 0.11476799845695496, -0.3118470013141632, -1.8629790544509888, 1.1877360343933105, -1.9011750221252441, 0.46558400988578796, -2.135483980178833, -1.6671559810638428, -2.7695820331573486, 2.237968921661377, -3.959968090057373, 2.243910074234009, 2.984325885772705, -0.0, -0.39907601475715637, -0.07502199709415436, 1.046085000038147, 0.894212007522583, -3.7943971157073975, -1.6575080156326294, -1.7400859594345093, -4.47238302230835, 0.9049410223960876, 1.1533360481262207, -1.8024920225143433, -1.6029249429702759, -2.098947048187256, -1.933419942855835, -0.11715000122785568, -3.6291050910949707, 1.5362440347671509, -0.30732399225234985, 0.1794479936361313, 1.1862930059432983, -1.1224780082702637, 0.7004010081291199, 0.12530399858951569, 1.696897029876709, -2.181555986404419, -0.44460800290107727, 2.6415278911590576, 3.9060020446777344, 1.7298380136489868, -3.6263821125030518, -3.665855884552002, 2.02406907081604, -0.9493839740753174, -0.4160099923610687, -1.8681340217590332, 1.1709250211715698, -1.4561660289764404, 2.9686999320983887, 0.8293370008468628, -1.478898048400879, 1.8918479681015015, -0.3482019901275635, -3.5721700191497803, -0.5948470234870911, -1.0581849813461304, -0.7444509863853455, 0.7629690170288086, -0.44452500343322754, -0.9670950174331665, -1.4954379796981812, -0.3817090094089508, -0.9060869812965393, -0.8034350275993347, 1.866178035736084, -2.91878604888916, -3.186739921569824, 0.22655600309371948, -2.264385938644409, -0.22774100303649902, 1.1278259754180908, 0.4571489989757538, -1.3941030502319336, -0.6381329894065857, -1.037824034690857, 2.5065391063690186, -1.6499069929122925, 0.9882460236549377, 0.8370540142059326, -1.0272350311279297, -0.8445249795913696, -1.413390040397644, 2.419766902923584, -1.8389309644699097, -1.4359990358352661, -2.068418025970459, 2.984895944595337, -1.871034026145935, 0.7150760293006897, -4.657893180847168, 0.09441900253295898, -1.8330570459365845, 2.292849063873291, 4.837838172912598, -0.7920860052108765, 1.4040809869766235, 0.8590530157089233, 4.188676834106445, -3.8076798915863037, -3.030226945877075, 2.8418049812316895, -0.8596389889717102, 2.1215620040893555, 1.4915980100631714, 1.759863018989563, -2.1539580821990967, 4.270832061767578, 3.084383010864258, 0.20711900293827057, -1.871317982673645, 3.5106940269470215, -0.5889009833335876, -2.1154890060424805, -0.31697899103164673, -0.6303189992904663, -2.308461904525757, 0.40331798791885376, 3.606919050216675, 1.4377199411392212, 1.1711779832839966, -2.39082407951355, -2.566473960876465, -1.9192800521850586, -0.3903200030326843, 0.20830899477005005, -0.7855299711227417, -1.6736810207366943, 0.5321829915046692, -0.4931870102882385, 1.8450570106506348, -2.624501943588257, -2.7350881099700928, -2.9044110774993896, -1.0171229839324951, 2.909374952316284, 1.8826940059661865, 0.8430569767951965, 4.875271797180176, 2.8622450828552246, 1.5205179452896118, 2.628592014312744, 0.21145300567150116, 0.5303840041160583, 9.000000318337698e-06, 1.7474069595336914, 1.413282036781311, 0.07947800308465958, 2.0276169776916504, 0.7461100220680237, -1.2180479764938354, 1.7456539869308472, 1.4749460220336914, -0.9871780276298523, -2.6290459632873535, -0.9514830112457275, -1.2056150436401367, 3.2889161109924316, 1.7913329601287842, -1.523908019065857, -0.9268079996109009, 0.45465201139450073, 1.427718997001648, -1.1932480335235596, 0.8841500282287598, -0.36970001459121704, 1.2489969730377197, -2.4722061157226562, -0.2515380084514618, -2.328857898712158, -0.6241459846496582, -3.5658819675445557, -2.3076069355010986, 0.9456639885902405, 0.8343039751052856, -0.24762099981307983, 2.017035961151123, -1.7770659923553467, -0.0907600000500679, 1.7437859773635864, 0.4649820029735565, 0.6018810272216797, -0.8693100214004517, -3.5219600200653076, 0.7894110083580017, 1.952923059463501, -1.0784159898757935, 1.1858689785003662, -0.5346789956092834, 0.7356629967689514, -1.5441370010375977, 0.42033401131629944, -3.6106019020080566, -2.991666078567505, 3.6747779846191406, -1.664147973060608, 0.3996509909629822, -2.745371103286743, 0.6136369705200195, 1.1688820123672485, -2.0797109603881836, -3.369288921356201, 0.22901999950408936, -0.0672290027141571, -0.32290199398994446, -1.5206129550933838, 2.798369884490967, -1.1459599733352661, -1.081697940826416, 1.2142499685287476, 0.31399500370025635, -1.9951989650726318, 0.0, -2.6392970085144043, 0.05465399846434593, 0.4332660138607025, 1.5776070356369019, 6.376128196716309, -1.9141119718551636, -0.4540950059890747, 0.9558190107345581, 2.0879340171813965, 3.043976068496704, 2.7279319763183594], "b": 0.8378589153289795, "test": {"logistic_regression": {"C": 10.0, "accuracy": 0.9111, "precision": 0.9039, "recall": 0.9206, "f1": 0.9122, "roc_auc": 0.9694}, "mlp_256": {"accuracy": 0.9114, "precision": 0.9065, "recall": 0.918, "f1": 0.9122, "roc_auc": 0.9707}}, "deployed": "logistic_regression", "data": {"reviews": 50000, "duplicates_removed": 419, "train": 39664, "test": 9917}} |