no function called predict although stats toolbox is downloaded

1 Ansicht (letzte 30 Tage)
jj
jj am 26 Mai 2020
Beantwortet: Steven Lord am 26 Mai 2020
Hi, although matlab documentation says predict() is in the statistics and machine learning toolbox, I cannot find it.
> help predict
predict not found.
Use the Help browser search field to search the documentation, or
type "help help" for help command options, such as help for methods.
>> ver
-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.8.0.1323502 (R2020a)
MATLAB License Number: 649021
Operating System: Microsoft Windows 10 Enterprise Version 10.0 (Build 18363)
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB Version 9.8 (R2020a)
Computer Vision Toolbox Version 9.2 (R2020a)
Curve Fitting Toolbox Version 3.5.11 (R2020a)
Global Optimization Toolbox Version 4.3 (R2020a)
Image Processing Toolbox Version 11.1 (R2020a)
Optimization Toolbox Version 8.5 (R2020a)
Parallel Computing Toolbox Version 7.2 (R2020a)
Signal Processing Toolbox Version 8.4 (R2020a)
Statistics and Machine Learning Toolbox Version 11.7 (R2020a)
Symbolic Math Toolbox Version 8.5 (R2020a)

Antworten (1)

Steven Lord
Steven Lord am 26 Mai 2020
There are several different functions named predict in Statistics and Machine Learning Toolbox. Each is for a specific type of object (the TreeBagger method predict is different from the RegressionLinear method predict, etc.) and you can only get help on one of those methods if MATLAB has loaded the class by that name into memory (or if you explicitly ask for the class method's help text.)
help TreeBagger.predict
For instance, here's the output from some commands I ran in a new session of release R2020a.
>> help predict
predict not found.
Use the Help browser search field to search the documentation, or
type "help help" for help command options, such as help for methods.
>> which -all predict
'predict' not found.
>> help TreeBagger.predict
predict Predict response.
YFIT = predict(B,X) computes the predicted response of the trained
*snip a bunch of help text*
>> which -all predict
C:\Program Files\MATLAB\R2020a\toolbox\stats\stats\@TreeBagger\TreeBagger.m % TreeBagger method
*snip more output of which*

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by