| MATLAB 文件帮助: cv.LogisticRegression | 查看 cv.LogisticRegression 的代码 | Index |
LogisticRegression Logistic Regression classifier
ML implements logistic regression, which is a probabilistic classification technique. Logistic Regression is a binary classification algorithm which is closely related to Support Vector Machines (SVM). Like SVM, Logistic Regression can be extended to work on multi-class classification problems like digit recognition (i.e. recognizing digitis like 0,1 2, 3,... from the given images). This version of Logistic Regression supports both binary and multi-class classifications (for multi-class it creates a multiple 2-class classifiers). In order to train the logistic regression classifier, Batch Gradient Descent and Mini-Batch Gradient Descent algorithms are used (see [BatchDesWiki]). Logistic Regression is a discriminative classifier (see [LogRegTomMitch] for more details). Logistic Regression is implemented as a C++ class in cv.LogisticRegression.
In Logistic Regression, we try to optimize the training paramater
theta
such that the hypothesis 0 <= h_theta(x) <= 1
is acheived. We
have h_theta(x) = g(h_theta(x))
and g(z)=1/(1+e^(-z))
as the
logistic or sigmoid function. The term "Logistic" in Logistic Regression
refers to this function. For given data of a binary classification
problem of classes 0 and 1, one can determine that the given data
instance belongs to class 1 if h_theta(x) >= 0.5
or class 0 if
h_theta(x) < 0.5
.
In Logistic Regression, choosing the right parameters is of utmost importance for reducing the training error and ensuring high training accuracy:
LearningRate
property. It
determines how fast we approach the solution. It is a positive real
number.Iterations
property. This parameter can be thought as number of
steps taken and learning rate specifies if it is a long step or a
short step. This and previous parameter define how fast we arrive at a
possible solution.Regularization
property. One can specify
what kind of regularization has to be performed by passing one of
regularization kinds to this property.TrainMethod
property as either Batch
or
MiniBatch
. If training method is set to MiniBatch
, the size of the
mini batch has to be to a postive integer set with MiniBatchSize
property.A sample set of training parameters for the Logistic Regression classifier can be initialized as follows:
lr = cv.LogisticRegression();
lr.LearningRate = 0.05;
lr.Iterations = 1000;
lr.Regularization = 'L2';
lr.TrainMethod = 'MiniBatch';
lr.MiniBatchSize = 10;
[LogRegWiki]:
http://en.wikipedia.org/wiki/Logistic_regression
[BatchDesWiki]:
http://en.wikipedia.org/wiki/Gradient_descent_optimization
[LogRegTomMitch]:
"Generative and Discriminative Classifiers: Naive Bayes and Logistic Regression" in Machine Learning, Tom Mitchell. http://www.cs.cmu.edu/~tom/NewChapters.html
[RenMalik2003]:
"Learning a Classification Model for Segmentation". Proc. CVPR, Nice, France (2003).
| Superclasses | handle |
| Sealed | false |
| Construct on load | false |
| LogisticRegression | Creates/trains a logistic regression model |
| Iterations | Number of iterations. |
| LearningRate | The learning rate of the optimization algorithm. |
| MiniBatchSize | Number of training samples taken in each step of Mini-Batch Gradient |
| Regularization | Kind of regularization to be applied. |
| TermCriteria | Termination criteria of the training algorithm. |
| TrainMethod | Kind of training method used to train the classifier. |
| id | Object ID |
| addlistener | Add listener for event. | |
| calcError | Computes error on the training or test dataset | |
| clear | Clears the algorithm state | |
| delete | Destructor | |
| empty | Returns true if the algorithm is empty | |
| eq | == (EQ) Test handle equality. | |
| findobj | Find objects matching specified conditions. | |
| findprop | Find property of MATLAB handle object. | |
| ge | >= (GE) Greater than or equal relation for handles. | |
| getDefaultName | Returns the algorithm string identifier | |
| getLearntThetas | Returns the trained paramters | |
| getVarCount | Returns the number of variables in training samples | |
| gt | > (GT) Greater than relation for handles. | |
| isClassifier | Returns true if the model is a classifier | |
| isTrained | Returns true if the model is trained | |
| Sealed | isvalid | Test handle validity. |
| le | <= (LE) Less than or equal relation for handles. | |
| load | Loads algorithm from a file or a string | |
| lt | < (LT) Less than relation for handles. | |
| ne | ~= (NE) Not equal relation for handles. | |
| notify | Notify listeners of event. | |
| predict | Predicts responses for input samples | |
| save | Saves the algorithm parameters to a file or a string | |
| train | Trains the statistical model |
| ObjectBeingDestroyed | Notifies listeners that a particular object has been destroyed. |


Lockdown’s Bounty ability puts a card from the bottom of my deck under himself. What does it mean when a card is under Lockdown?
The cards under Lockdown are basically out of play for a while. They’re not considered on the battlefield, even if that’s where they are physically, so none of their abilities apply. If one of those cards is an Upgrade, that Upgrade isn’t on Lockdown, and so on. They’re also not in your scrap pile, so they won’t be shuffled into your deck when it’s empty. They’re just used to keep track of the bonuses from Lockdown’s other abilities.
Can I look at the card as it’s put under Lockdown?
No. The card is face-down, so neither player can look at it while it’s under Lockdown.
What happens to the cards under Lockdown if he is KO’d?
They’re put into your scrap pile.


GRAPHIC DESIGN
PHOTOGRAPHY
VIDEO PRODUCTION
NEGATIVE SPACE
VAFI PROJECT
WEIGHT
BARCODE
Street1
Street2
Street3
Street4
Portret1
Portret2
Potret3
Portet4
Nature1
Nature2
Nature3
Nature4


Library prototype, by Emilien Romulus (
github
)
Title*:
Author*:
Pages:
Already read:
Add Book
Save library locally


NUDES fabricates the 'bookworm' pavilion to foster a love of reading in india
by lynne myersfor their latest work, design studio NUDES is using architecture to tackle the issue of illiteracy in india. the project – which is aptly titled ‘bookworm’ – takes the form of a deployable pavilion that has been erected on a site in mumbai. designed to create an interactive learning space, the main concept behind the intervention is to encourage children to enjoy reading, in line with the UN’s sustainable development goal for ‘all youth and a substantial proportion of adults, both men and women, to achieve literacy and numeracy’ by 2030.
the pavilion aims to foster a love for reading irrespective of the language
all images © sameer chawda
the bookworm measures 120 ft long and 40 ft wide. the pavilion takes on a low, winding shape that is designed by NUDES to create a welcoming space as opposed to traditional libraries or institutional buildings that may be intimating to young children. the intervention includes areas for sitting and storytelling and can house approximately 12,000 books, which have been donated by severals schools across the city. in short, the ‘bookscape’ intends to make reading a fun and enjoyable activity, inviting kids to simultaneously explore and learn.
the pavilion measures 120 ft long by 40 ft wide
with the idea to spread a message of ’empowerment through education’, NUDES has designed the bookworm to travel across india, in both rural and urban areas. the structure is built using 3600 modular pre-fabricated components, meaning that it can be easily dismantled, transported and reassembled on different sites. deployed on site within a week, the pavilion also boasts a low carbon footprint and promotes sustainable building technologies.
the bookworm is fabricated from modular components
this project has been realized to address the startling number of people that still lack basic reading and writing skills across the world, and especially in sub-saharan africa and southern asia. proven to help improve health, reduce crime and alleviate poverty, boosting literacy rates marks an important step in providing better opportunities to all. NUDES’ bookworm has been supported by priyasri art gallery in collaboration with the CSMVS museum in affiliation with the children’s museum CSMVS. the pavilion will remain on site at the museum lawns in mumbai until december 2019 before traveling all over india, from cities to rural areas.
the pavilion ‘worms’ through the landscape to offer a unique browsing experience along a meandering pathway
the pavilion could also be experienced ‘inside-out’ to offer shaded reading and browsing areas
access entry points are created to explore the bookworm inside – out
the pavilion houses seating and storytelling areas
the pavilion is fabricated from recycled plywood and has a low carbon footprint
the pavilion can house approximately 12,000 books
aerial view of the pavilion
layouts illustrating the interior spaces of the pavilion
the pavilion is deployable and intends to travel across the country in both rural and urban areas
project info:
project name: bookworm pavilion
location: chhatrapati shivaji maharaj vastu sangrahalaya (CSMVS), mumbai, india
architect: NUDES
design team: nuru karim (founder & design principal NUDES), aditya jain, dhruval shah, salai v, jenish merchant, a aravind, supriya dubey
area: 4800 ft2 (445.93 m2)
materials: recycled plywood
photography: sameer chawda


- Blog Posts
Stereotype threat describes the situation in which people feel that they could be potentially stereotyped / "confirm a negative stereotype about their social group."
I've been fortunate enough that I've never really been subjected to negative stereotypes. I can only think of one specific instance where I was stereotyped but it pales in comparison to what some people have to deal with all their lives. With that said, I can remember the emotions I felt in that moment. At first I was surprised and kind of taken back that someone could say what they did. I thought it was a joke at first and then when I realized that this particular individual was being serious I felt so angry. I ended up just leaving that situation and rarely spoke to that person after that conversation.
It wasn't until the next day that I was able to reflect on what happened with a clear head.  But wow, I can totally see how people could get violent or alter their behavior in general as a result of negative stereotypes / discrimination. I mean for me I get mad because of stereotypes attached to my identity but that's about it. People of color and gay/trans people get it way worse... I those people are literally dying because of some of the stereotypes attached to them and it's apalling.
Stereotypes as a whole are awkward to deal with. I think the best thing to do is address them when they come up. There have been times where I've had to step between a friend and a stranger because said stranger was being racist. Racism is messed up and that's putting it lightly but for better or worse sometimes it's just better to walk away from the situation. I know that may seem like the weak thing to do but with the way our society is sometimes it's just prudent to walk away.
That's pretty much the extent of my experiences. I've been luckier than most and that's a blessing in itself. "Lucky" probably isn't the right word... There is inherent privilege that I have because of my skin color in this country. I'm not proud of it but it's outside of my control. All I can do is try to help out those who haven't been as fortunate as myself.


1. Embed the Live Chat Widget
Copy the following script and insert it into your website's HTML source code between the <head> tags. This code must be inserted into every page on which you wish to display the Zopim Chat Widget.
This is the new Chat Widget script. If you were using the classic widget, remove the old script first.


A little bit about me.
Hey, my name is Natasha.
I'm a recent grad of UW living in the Waterloo area. Always striving to improve myself, I recently enrolled in the U of T coding bootcamp. Using my tech savvy and design skills, I create elegant solutions to problems.


:: CZE
Cross-country skier Katerina Neumannova secured the Czech Republic's first ever Olympic winter medal at Nagano in 1998 by winning silver in the women's 5km classic and bronze in the 15km pursuit.


Preparation time
less than 30 mins
Cooking time
1 to 2 hours
Serves
Serves 4
Try this simple one-pot dish using chicken breasts and store cupboard basics for a satisfying meal for four.
Put the onion, garlic and chicken stock into a saucepan over a medium heat and bring to the boil. Season with salt and freshly ground black pepper and boil for five minutes, or until reduced in volume by half.
Add the chicken, tomatoes, ground cinnamon, ground ginger and dried apricots or prunes. Return the mixture to the boil, then reduce the heat to low, cover with a lid and simmer very gently, stirring occasionally, for about an hour.
Make the couscous addording to the packet instructions.
Just before serving, stir the honey and coriander into the chicken and cook for a further five minutes. Serve with couscous and yoghurt.