bigmlcom / bigml-php Goto Github PK
View Code? Open in Web Editor NEWBigML.io Php Bindings
License: Other
BigML.io Php Bindings
License: Other
I believe there's a couple of errors in
https://github.com/bigmlcom/bigml-php/blob/master/bigml/ensemble.php#L111
that I think should be changed to
foreach (range(0, $number_of_models - 1, $max_models) as $index) {
array_push($this->models_splits,
array_slice($models, $index, $max_models));
}
and also in multivote extend
method's check (the argument can be a stdClass object).
https://github.com/bigmlcom/bigml-php/blob/master/bigml/multivote.php#L857
so it should be changed to something like:
function extend($predictions_info) {
/*Given a list of predictions, extends the list with another list of
predictions and adds the order information. For instance,
predictions_info could be:
[{'prediction': 'Iris-virginica', 'confidence': 0.3},
{'prediction': 'Iris-versicolor', 'confidence': 0.8}]
where the expected prediction keys are: prediction (compulsory),
confidence, distribution and count.
*/
if (is_array($predictions_info) ) {
$order = $this->next_order();
$i=0;
foreach($predictions_info as $prediction) {
if (is_array($prediction)) {
$prediction['order'] = $order+$i;
array_push($this->predictions, $prediction);
} else if (get_class($prediction) == 'stdClass') {
$prediction->order = $order + $i;
array_push($this->predictions, $prediction);
} else {
error_log("WARNING: failed to add the prediction.\n Only dict like predictions are expected\n");
}
$i+=1;
}
} else {
error_log("WARNING: failed to add the predictions.\nOnly a list of dict-like predictions are expected.");
}
}
They prevent the ensemble predict method from working when the max_models is set to some integer lower than the number of models in the ensemble. For a 10 model ensemble you can test it like this.
php > include 'ensemble.php';
php > $ensemble = new Ensemble('ensemble/52faea8c035d07258d00861f', null, 2);
php > $ensemble->predict(array());
Some late changes in the Logistic Regression arguments need to be incorporated in the Local Logistic Regression object. Fix test_scenario12 and test_scenario14 in test_05_compare_predictions.
My Current PHP version: 7.1.28
My PHPUnit 7.5.9 by Sebastian Bergmann and contributors.
PHPUnit installed with PHP Archive (PHAR)
➜ wget -O phpunit https://phar.phpunit.de/phpunit-7.phar
➜ chmod +x phpunit
➜ ./phpunit --version
but after installing PHPUnit with PHAR it isn't generate "src/autoload.php" but just only file phpunit
but if I run ./phpunit --version in terminal it's show PHPUnit 7.5.9 by Sebastian Bergmann and contributors.
I download the zip in https://github.com/bigmlcom/bigml-php and extract it then I run it bigml-php-master/tests/test_00_regressions.php then I got an error message PHP Fatal error: Class 'PHPUnit_Framework_TestCase' not found
can anybody help me please
how i can change the default objective field?
thanks
As per a user request, we should add the equivalent of the api.ok method in the Python bindings
Existe un error en la línea 115 del fichero bigml.php.
El parámetro que recibe la función no es el que se asigna al static.
Debería ser $devMode y no $defMode.
public static function setDevMode($devMode=false) {
self::$devMode = $defMode;
}
Un saludo y gracias.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.